spring-commands-testunit 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7e1e61052d2be0b90497be25ad0dc62959a2a415
4
+ data.tar.gz: ec3d63b45fcc2ead74877131d227aecbd344ad54
5
+ SHA512:
6
+ metadata.gz: b518a248191e38280fb004880acb755701a2b9ca24a7767dcc6da03af57a20f6fe44cb0e857eda9e1a813eb18859ec1a6b4f50de775c573b20bd7cb58056beb1
7
+ data.tar.gz: 5423b1b395b4dc9505d9d6d22d370be744ebbf0d5aec58b0d34364932274eba2c082c79cf2ae9200b6144a0e89be02aab916bef2c009caa9ce8be9f503a35e49
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Jon Leighton
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # spring-commands-testunit
2
+
3
+ This gem implements a `testunit` command for
4
+ [Spring](https://github.com/jonleighton/spring), which supports running
5
+ a file/directory of `Test::Unit`-style tests:
6
+
7
+ ```
8
+ spring testunit test/controllers/posts_controller_test.rb
9
+ spring testunit test/controllers
10
+ ```
11
+
12
+ It's no longer necessary if you're on Rails 4, since in Rails 4 you can
13
+ pass the file/directory to the `rake test` command:
14
+
15
+ ```
16
+ spring rake test test/controllers/posts_controller_test.rb
17
+ spring rake test test/controllers
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ Add to the `development` group in your Gemfile:
23
+
24
+ ``` ruby
25
+ gem "spring-commands-testunit", require: false
26
+ ```
27
+
28
+ Add to your `config/spring.rb`:
29
+
30
+ ``` ruby
31
+ require "spring/commands/testunit"
32
+ ```
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,36 @@
1
+ module Spring
2
+ module Commands
3
+ class TestUnit
4
+ def env(*)
5
+ "test"
6
+ end
7
+
8
+ def call
9
+ $LOAD_PATH.unshift "test"
10
+ ARGV << "test" if ARGV.empty?
11
+ ARGV.each do |arg|
12
+ break if arg.start_with?("-")
13
+ require_test(File.expand_path(arg))
14
+ end
15
+ end
16
+
17
+ def require_test(path)
18
+ if File.directory?(path)
19
+ Dir[File.join path, "**", "*_test.rb"].each { |f| require f }
20
+ else
21
+ require path
22
+ end
23
+ end
24
+
25
+ def description
26
+ "Execute a Test::Unit test."
27
+ end
28
+
29
+ def fallback
30
+ %{exec "bundle", "exec", "ruby", "-Itest", *ARGV}
31
+ end
32
+ end
33
+
34
+ Spring.register_command "testunit", TestUnit.new
35
+ end
36
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "spring-commands-testunit"
7
+ spec.version = "1.0.0"
8
+ spec.authors = ["Jon Leighton"]
9
+ spec.email = ["j@jonathanleighton.com"]
10
+ spec.description = %q{testunit command for spring}
11
+ spec.summary = %q{testunit command for spring}
12
+ spec.homepage = ""
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.3"
21
+ spec.add_development_dependency "rake"
22
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spring-commands-testunit
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jon Leighton
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: testunit command for spring
42
+ email:
43
+ - j@jonathanleighton.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - LICENSE.txt
50
+ - README.md
51
+ - Rakefile
52
+ - lib/spring/commands/testunit.rb
53
+ - spring-commands-testunit.gemspec
54
+ homepage: ''
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.1.9
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: testunit command for spring
78
+ test_files: []
79
+ has_rdoc: