guard-preek 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: caf9057c452f07f91d58c906b4a1c377066cf246
4
- data.tar.gz: 0feec294992458ccb9ad229ba375e058cf8f90f1
3
+ metadata.gz: 4d70f633c65091a081ca4de010f5d7fa38ec7e0a
4
+ data.tar.gz: 450c022d4761cc9795a756ca24b6bf44bff54cea
5
5
  SHA512:
6
- metadata.gz: d85f0eed064d0baea15d2e8960b8a86b90261ebd85420ea77feaa4da4ea99eed0d94023e302bb01884d7ea7211d2d5c274d1550f44820ef62bdbba6570be6462
7
- data.tar.gz: 414f4f483613ba9f856d41f8af10cab6001257a2dcada1b6dce939bc0f2c6de9c5b0e4b898f033b1053f6344b34e52cc01428127877d254c15bcb8077f5740ca
6
+ metadata.gz: f3bf6db8c8a03b3337a20e582335b884f73684f32e8e16f3ba91738aef5c0d77c7f531cf965a8f1f6b80cd73af5469257446259f06508c4d0447608916826bbf
7
+ data.tar.gz: 40aa5d8ccff37b3e38c212a8090d7c22b32db9eca51c0ecdd58ce9bf132eae67ee20efeafe012bb4264b268ed02d9d0b6c5a63c1bd0362d11ed28615543fb0ff
data/Guardfile CHANGED
@@ -1,4 +1,4 @@
1
- guard :rspec do
1
+ guard :rspec, cmd: 'rspec' do
2
2
  watch(%r{^spec/.+_spec\.rb$})
3
3
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
4
  watch('spec/spec_helper.rb') { "spec" }
data/README.md CHANGED
@@ -14,7 +14,7 @@ Do your refactoring with [Guard](https://github.com/guard/guard) and [Preek](htt
14
14
  or
15
15
 
16
16
  # Add to Gemfile
17
- gem 'guard/preek'
17
+ gem 'guard-preek'
18
18
 
19
19
  or install it yourself
20
20
 
@@ -19,12 +19,12 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "preek", "~> 1.2"
22
- spec.add_runtime_dependency 'guard', '>= 1.6', '>= 1.6'
22
+ spec.add_runtime_dependency 'guard', '~> 2.0'
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake"
26
- spec.add_development_dependency "guard-rspec"
27
- spec.add_development_dependency "rspec"
26
+ spec.add_development_dependency "guard-rspec", '~> 4.3'
27
+ spec.add_development_dependency "rspec", '~> 3.1.0'
28
28
  spec.add_development_dependency "rspec-given"
29
29
  spec.add_development_dependency 'coveralls'
30
30
  end
@@ -1,9 +1,9 @@
1
1
  require "guard/preek/version"
2
2
  require 'guard'
3
- require 'guard/guard'
3
+ require 'guard/plugin'
4
4
 
5
5
  module Guard
6
- class Preek < Guard
6
+ class Preek < Guard::Plugin
7
7
  autoload :Runner, 'guard/preek/runner'
8
8
 
9
9
  def run_on_changes(paths)
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  class PreekVersion
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Guard::Preek do
4
4
  include CaptureHelper
5
5
 
6
- Given(:guard){ Guard::Preek.new([], options) }
6
+ Given(:guard){ Guard::Preek.new(options) }
7
7
  Given(:options){ Hash.new }
8
8
 
9
9
  context '#run_on_changes' do
@@ -13,20 +13,20 @@ describe Guard::Preek do
13
13
  context 'with no options' do
14
14
  context 'with a smell' do
15
15
  Given(:file) {'nil_check'}
16
- Then { output.should match(/NilCheck/) }
17
- Then { output.should include(paths[0])}
16
+ Then { expect(output).to match(/NilCheck/) }
17
+ Then { expect(output).to include(paths[0])}
18
18
  end
19
19
 
20
20
  context 'with Irresponsible' do
21
21
  Given(:file) {'irresponsible'}
22
- Then { output.should match(/No smells detected/) }
23
- Then { output.should_not include(paths[0])}
22
+ Then { expect(output).to match(/No smells detected/) }
23
+ Then { expect(output).not_to include(paths[0])}
24
24
  end
25
25
 
26
26
  context 'without smell' do
27
27
  Given(:file) {'non_smelly'}
28
- Then { output.should match(/No smells detected/) }
29
- Then { output.should_not include(paths[0])}
28
+ Then { expect(output).to match(/No smells detected/) }
29
+ Then { expect(output).not_to include(paths[0])}
30
30
  end
31
31
  end
32
32
 
@@ -35,20 +35,20 @@ describe Guard::Preek do
35
35
 
36
36
  context 'with a smell' do
37
37
  Given(:file) {'nil_check'}
38
- Then { output.should match(/NilCheck/) }
39
- Then { output.should include(paths[0])}
38
+ Then { expect(output).to match(/NilCheck/) }
39
+ Then { expect(output).to include(paths[0])}
40
40
  end
41
41
 
42
42
  context 'with Irresponsible' do
43
43
  Given(:file) {'irresponsible'}
44
- Then { output.should match(/No smells detected/) }
45
- Then { output.should include(paths[0])}
44
+ Then { expect(output).to match(/No smells detected/) }
45
+ Then { expect(output).to include(paths[0])}
46
46
  end
47
47
 
48
48
  context 'without smell' do
49
49
  Given(:file) {'non_smelly'}
50
- Then { output.should match(/No smells detected/) }
51
- Then { output.should include(paths[0])}
50
+ Then { expect(output).to match(/No smells detected/) }
51
+ Then { expect(output).to include(paths[0])}
52
52
  end
53
53
  end
54
54
 
@@ -58,9 +58,9 @@ describe Guard::Preek do
58
58
  context 'with "run_all_dir" option' do
59
59
  Given(:options){ {run_all_dir: 'spec/test_files'} }
60
60
  When(:output) { capture(:stdout) { guard.run_all } }
61
- Then{ output.should match /NilCheck/ }
62
- Then{ output.should match /TooManyStatements/ }
63
- Then{ output.should_not match /Irresponsible/ }
61
+ Then{ expect(output).to match /NilCheck/ }
62
+ Then{ expect(output).to match /TooManyStatements/ }
63
+ Then{ expect(output).not_to match /Irresponsible/ }
64
64
  end
65
65
  end
66
66
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Guard::Preek do
4
4
 
5
- Given(:guard){ Guard::Preek.new([], options) }
5
+ Given(:guard){ Guard::Preek.new(options) }
6
6
  Given(:options){ Hash.new }
7
7
  Given(:paths){ ['some_file.rb'] }
8
8
  Given(:runner){ double('runner', perform: true) }
@@ -12,16 +12,16 @@ describe Guard::Preek do
12
12
  When{ guard.run_on_changes(paths) }
13
13
 
14
14
  context 'with no options' do
15
- Given{ Guard::Preek::Runner.should_receive(:new).with(paths, options[:report]).and_return(runner) }
16
- Given{ runner.should_receive(:perform) }
15
+ Given{ expect(Guard::Preek::Runner).to receive(:new).with(paths, options[:report]).and_return(runner) }
16
+ Given{ expect(runner).to receive(:perform) }
17
17
  Then{ 'its great' }
18
18
  end
19
19
 
20
20
  context 'with "report: :verbose" option' do
21
21
  Given(:options){ {report: :verbose} }
22
22
  Given(:runner){ double('runner', perform: true) }
23
- Given{ Guard::Preek::Runner.should_receive(:new).with(paths, options[:report]).and_return(runner) }
24
- Given{ runner.should_receive(:perform) }
23
+ Given{ expect(Guard::Preek::Runner).to receive(:new).with(paths, options[:report]).and_return(runner) }
24
+ Given{ expect(runner).to receive(:perform) }
25
25
  Then{ 'its great' }
26
26
  end
27
27
  end
@@ -30,8 +30,8 @@ describe Guard::Preek do
30
30
  context 'with "run_all_dir" option' do
31
31
  Given(:options){ {run_all_dir: 'lib'} }
32
32
  Given(:runner){ double('runner', perform: true) }
33
- Given{ Guard::Preek::Runner.should_receive(:new).with(options[:run_all_dir], options[:report]).and_return(runner) }
34
- Given{ runner.should_receive(:perform) }
33
+ Given{ expect(Guard::Preek::Runner).to receive(:new).with(options[:run_all_dir], options[:report]).and_return(runner) }
34
+ Given{ expect(runner).to receive(:perform) }
35
35
  When{ guard.run_all }
36
36
  Then{ 'also great' }
37
37
  end
@@ -39,15 +39,15 @@ describe Guard::Preek do
39
39
  context 'with "report: verbose" option' do
40
40
  Given(:options){ {report: :verbose, run_all_dir: 'lib'} }
41
41
  Given(:runner){ double('runner', perform: true) }
42
- Given{ Guard::Preek::Runner.should_receive(:new).with(options[:run_all_dir], options[:report]).and_return(runner) }
43
- Given{ runner.should_receive(:perform) }
42
+ Given{ expect(Guard::Preek::Runner).to receive(:new).with(options[:run_all_dir], options[:report]).and_return(runner) }
43
+ Given{ expect(runner).to receive(:perform) }
44
44
  When{ guard.run_all }
45
45
  Then{ 'its great' }
46
46
  end
47
47
 
48
48
  context 'with no options' do
49
49
  Then{
50
- Guard::UI.should_receive(:error).with(/Guardfile/)
50
+ expect(Guard::UI).to receive(:error).with(/Guardfile/)
51
51
  expect { guard.run_all }.to throw_symbol :task_has_failed
52
52
  }
53
53
  end
@@ -12,7 +12,6 @@ require 'rspec-given'
12
12
  require 'capture_helper'
13
13
 
14
14
  RSpec.configure do |config|
15
- config.treat_symbols_as_metadata_keys_with_true_values = true
16
15
  config.run_all_when_everything_filtered = true
17
16
  config.filter_run :focus
18
17
 
metadata CHANGED
@@ -1,125 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-preek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Neverland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-04 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: preek
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
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: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: guard
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.6'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
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: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard-rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '4.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '4.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 3.1.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 3.1.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-given
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: coveralls
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description: Guard for refactoring, view code smells in color using Preek
@@ -129,9 +129,9 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - .gitignore
133
- - .rspec
134
- - .travis.yml
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".travis.yml"
135
135
  - Gemfile
136
136
  - Guardfile
137
137
  - LICENSE.txt
@@ -161,17 +161,17 @@ require_paths:
161
161
  - lib
162
162
  required_ruby_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - '>='
169
+ - - ">="
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  requirements: []
173
173
  rubyforge_project:
174
- rubygems_version: 2.2.1
174
+ rubygems_version: 2.2.2
175
175
  signing_key:
176
176
  specification_version: 4
177
177
  summary: View code smells (in color) when refactoring
@@ -185,3 +185,4 @@ test_files:
185
185
  - spec/test_files/nil_check.rb
186
186
  - spec/test_files/non_smelly.rb
187
187
  - spec/test_files/too_many_statements.rb
188
+ has_rdoc: