warder 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/detects_code_duplication.feature +4 -1
- data/lib/warder/code_duplication_runner.rb +7 -1
- data/lib/warder/version.rb +1 -1
- data/warder.gemspec +8 -8
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8293a08b303f9d5b9eb1fa1159b437f251e6dfe9
|
4
|
+
data.tar.gz: fd4341bbdf903230a80b2e2b600fd51e57ea0a7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30aa9ddb458431940bc85e130ab887226cb2306838e0b86db9750c8212d399964de6b039e08f8577dfd3f3fb501a707883852f2961108913ea6ad7808685bbef
|
7
|
+
data.tar.gz: 4d1a665377df8e920a214de587078489431428db44f68bec9e72056efd8258284288c50a05c760b70a77a9108611293d0a045f44864e58eb80cafe21338ddb68
|
@@ -11,7 +11,10 @@ Feature: detects code duplication
|
|
11
11
|
|
12
12
|
Scenario: run warder with enabled code duplication option on invalid file
|
13
13
|
Given I have invalid_code_duplication file in directory
|
14
|
-
When I
|
14
|
+
When I set the environment variables to:
|
15
|
+
| variable | value |
|
16
|
+
| FLAY_SCORE | 15 |
|
17
|
+
And I run `warder --code-duplication`
|
15
18
|
Then warder detects code duplication issues
|
16
19
|
Then the exit status should be 1
|
17
20
|
|
@@ -11,7 +11,13 @@ module Warder
|
|
11
11
|
private
|
12
12
|
|
13
13
|
def command_with_options
|
14
|
-
"#{COMMAND_NAME} -d -m #{
|
14
|
+
"#{COMMAND_NAME} -d -m #{flay_score} #{@options.files}"
|
15
|
+
end
|
16
|
+
|
17
|
+
def flay_score
|
18
|
+
env_flay_score = ENV['FLAY_SCORE']
|
19
|
+
return self.class::FLAY_SCORE unless env_flay_score
|
20
|
+
env_flay_score.to_i
|
15
21
|
end
|
16
22
|
end
|
17
23
|
end
|
data/lib/warder/version.rb
CHANGED
data/warder.gemspec
CHANGED
@@ -14,24 +14,24 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($RS)
|
17
|
-
spec.executables = spec.files.grep(
|
18
|
-
spec.test_files = spec.files.grep(
|
17
|
+
spec.executables = spec.files.grep(%r{^bin\/\w+$}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features|cucumber)\/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'rubocop', '~> 0.
|
21
|
+
spec.add_dependency 'rubocop', '~> 0.31'
|
22
22
|
spec.add_dependency 'reek', '~> 1.6'
|
23
|
-
spec.add_dependency 'flay', '~> 2.
|
23
|
+
spec.add_dependency 'flay', '~> 2.6.1'
|
24
24
|
spec.add_dependency 'flog', '~> 4.3'
|
25
25
|
spec.add_dependency 'mago', '~> 0.1'
|
26
|
-
spec.add_dependency 'brakeman', '~>
|
26
|
+
spec.add_dependency 'brakeman', '~> 3.0'
|
27
27
|
spec.add_dependency 'rails_best_practices', '~> 1.15'
|
28
28
|
spec.add_dependency 'sandi_meter', '~> 1.1'
|
29
29
|
spec.add_dependency 'bundler-audit', '~> 0.3'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
32
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
33
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
34
|
-
spec.add_development_dependency 'cucumber', '~> 2.0
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.2'
|
34
|
+
spec.add_development_dependency 'cucumber', '~> 2.0'
|
35
35
|
spec.add_development_dependency 'aruba', '~> 0.6'
|
36
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
36
|
+
spec.add_development_dependency 'simplecov', '~> 0.10'
|
37
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yura Tolstik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.31'
|
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
|
-
version: '0.
|
26
|
+
version: '0.31'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: reek
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.6.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.6.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: flog
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '3.0'
|
90
90
|
type: :runtime
|
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: '
|
96
|
+
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rails_best_practices
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,28 +170,28 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '3.
|
173
|
+
version: '3.2'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '3.
|
180
|
+
version: '3.2'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: cucumber
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 2.0
|
187
|
+
version: '2.0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 2.0
|
194
|
+
version: '2.0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: aruba
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,14 +212,14 @@ dependencies:
|
|
212
212
|
requirements:
|
213
213
|
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: '0.
|
215
|
+
version: '0.10'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '0.
|
222
|
+
version: '0.10'
|
223
223
|
description: Warder of ruby code
|
224
224
|
email:
|
225
225
|
- yltsrc@gmail.com
|
@@ -352,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
352
|
version: '0'
|
353
353
|
requirements: []
|
354
354
|
rubyforge_project:
|
355
|
-
rubygems_version: 2.4.
|
355
|
+
rubygems_version: 2.4.6
|
356
356
|
signing_key:
|
357
357
|
specification_version: 4
|
358
358
|
summary: Tool to help improve the quality of ruby code
|