spec_run_queue 0.1.5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13e42eb5482af6ea7bacd176bd75443ef3dac8f9
4
- data.tar.gz: 0c4a8d8814f081b6dffbf20c6ccb79a89d643959
3
+ metadata.gz: 5aa7877ca4044b9281dbc7507efcd78bd064a32a
4
+ data.tar.gz: 1bdd945382799abd43150037f81abab13ca373ed
5
5
  SHA512:
6
- metadata.gz: e7c9e742bd974e391c048a642dc8e184e6c20560319b1179d557b67be13ea8b73c13ea8911b18d4aaf6cb0eff004e3ba77503d51ccc6ca06768997f745454c3a
7
- data.tar.gz: 0aa36f26d92daa36584bb860257b9a4137dae002fca821ce734a2c9bc337377738de18b48bbdb667a3776cafe98a373be30797cc3ffef822aa82c51f85d7a511
6
+ metadata.gz: 6df914fa2ac01296ef133f336a44b67fd919f672eefa7a8d47dfd04ce987c89ae009c33c7e42ba734e18275d5129cd8e05e43afe52ff265b99a21d9b4b987628
7
+ data.tar.gz: b1fc0b9d505f4f6ba5bd667ecd49886553e87403ed7b5628ee20dc914452f9db19ab9986c0345dafa05389405be368795b16b15bf22ef85225a00c8e82e6635b
@@ -3,7 +3,7 @@ require 'yaml'
3
3
 
4
4
  module SpecRunQueue
5
5
  class Configuration
6
- attr_accessor :rspec_bin
6
+ attr_accessor :rspec_bin, :rspec_format
7
7
 
8
8
  def add_notifier(runner_symbol, options = {})
9
9
  klass = SpecRunQueue::Notifier.send(:const_get, runner_symbol.to_s.capitalize)
@@ -12,7 +12,8 @@ module SpecRunQueue
12
12
 
13
13
  def to_h
14
14
  h = {}
15
- h[:rspec_bin] = rspec_bin if rspec_bin
15
+ h[:rspec_bin] = rspec_bin if rspec_bin
16
+ h[:rspec_format] = rspec_format if rspec_format
16
17
  h
17
18
  end
18
19
  end
@@ -8,7 +8,11 @@ module SpecRunQueue
8
8
  end
9
9
 
10
10
  def rspec_bin
11
- options.fetch(:rspec_bin, "rspec")
11
+ options.fetch(:rspec_bin, 'rspec')
12
+ end
13
+
14
+ def rspec_format
15
+ options.fetch(:rspec_format, 'nested')
12
16
  end
13
17
 
14
18
  def add_notifier(notifier)
@@ -22,9 +26,9 @@ module SpecRunQueue
22
26
  end
23
27
 
24
28
  begin
25
- cmd = "#{rspec_bin} -f nested --drb"
26
- cmd << " -l#{instruction[:line]}" if instruction[:line]
29
+ cmd = "#{rspec_bin} -f #{rspec_format} --drb"
27
30
  cmd << " #{instruction[:target]}"
31
+ cmd << ":#{instruction[:line]}" if instruction[:line]
28
32
  puts "Running command #{cmd}"
29
33
  output = run_cmd(cmd)
30
34
 
@@ -1,3 +1,3 @@
1
1
  module SpecRunQueue
2
- VERSION = "0.1.5"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -31,6 +31,18 @@ describe SpecRunQueue::SystemRunner do
31
31
  end
32
32
  end
33
33
 
34
+ describe "getting the rspec format" do
35
+ it "is 'nested' by default" do
36
+ runner = SpecRunQueue::SystemRunner.new
37
+ runner.rspec_format.should == "nested"
38
+ end
39
+
40
+ it "will use the rspec_format option if present" do
41
+ runner = SpecRunQueue::SystemRunner.new(:rspec_format => "spec_f")
42
+ runner.rspec_format.should == "spec_f"
43
+ end
44
+ end
45
+
34
46
  describe "adding a notifier" do
35
47
  it "should append the notifier onto the notifiers list" do
36
48
  runner = SpecRunQueue::SystemRunner.new
@@ -73,7 +85,7 @@ describe SpecRunQueue::SystemRunner do
73
85
 
74
86
  context "with a line number" do
75
87
  it "should call to run the spec using the -l flag" do
76
- runner.should_receive(:run_cmd).with("spec -f nested --drb -l42 foo_spec.rb")
88
+ runner.should_receive(:run_cmd).with("spec -f nested --drb foo_spec.rb:42")
77
89
  runner.run_spec(:target => "foo_spec.rb", :line => 42)
78
90
  end
79
91
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spec_run_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendon Murphy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-17 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-growl
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  description: Use a queue to run specs outside your editor
@@ -60,7 +60,7 @@ executables:
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gitignore
63
+ - ".gitignore"
64
64
  - Gemfile
65
65
  - README.markdown
66
66
  - Rakefile
@@ -91,17 +91,17 @@ require_paths:
91
91
  - lib
92
92
  required_ruby_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - '>='
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project: spec_run_queue
104
- rubygems_version: 2.0.14
104
+ rubygems_version: 2.2.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Use a queue to run specs outside your editor