devtools 0.1.0 → 0.1.5
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 +4 -4
- data/.rspec +1 -0
- data/Gemfile +0 -2
- data/README.md +3 -3
- data/circle.yml +1 -1
- data/config/devtools.yml +2 -0
- data/config/flay.yml +2 -2
- data/config/flog.yml +1 -1
- data/config/mutant.yml +2 -0
- data/config/reek.yml +7 -12
- data/config/rubocop.yml +8 -0
- data/devtools.gemspec +21 -19
- data/lib/devtools/config.rb +76 -55
- data/lib/devtools/flay.rb +94 -0
- data/lib/devtools/project/initializer/rake.rb +9 -7
- data/lib/devtools/project/initializer/rspec.rb +28 -55
- data/lib/devtools/project/initializer.rb +2 -12
- data/lib/devtools/project.rb +28 -105
- data/lib/devtools/rake/flay.rb +126 -0
- data/lib/devtools/spec_helper.rb +1 -3
- data/lib/devtools.rb +34 -83
- data/shared/spec/shared/abstract_type_behavior.rb +0 -2
- data/shared/spec/shared/command_method_behavior.rb +0 -2
- data/shared/spec/shared/each_method_behaviour.rb +0 -2
- data/shared/spec/shared/hash_method_behavior.rb +0 -2
- data/shared/spec/shared/idempotent_method_behavior.rb +0 -2
- data/shared/spec/support/ice_nine_config.rb +0 -2
- data/spec/integration/devtools/rake/flay/verify_spec.rb +164 -0
- data/spec/spec_helper.rb +2 -8
- data/spec/unit/devtools/config/yardstick_spec.rb +17 -0
- data/spec/unit/devtools/config_spec.rb +78 -0
- data/spec/unit/devtools/flay/file_list/call_spec.rb +19 -0
- data/spec/unit/devtools/flay/scale/flay_report_spec.rb +17 -0
- data/spec/unit/devtools/flay/scale/measure_spec.rb +43 -0
- data/spec/unit/devtools/project/initializer/rake_spec.rb +21 -0
- data/spec/unit/devtools/project/initializer/rspec_spec.rb +52 -0
- data/spec/unit/devtools/project_spec.rb +34 -0
- data/spec/unit/devtools_spec.rb +14 -0
- data/tasks/metrics/ci.rake +2 -3
- data/tasks/metrics/coverage.rake +0 -2
- data/tasks/metrics/flay.rake +6 -33
- data/tasks/metrics/flog.rake +0 -2
- data/tasks/metrics/mutant.rake +31 -39
- data/tasks/metrics/reek.rake +5 -4
- data/tasks/metrics/rubocop.rake +0 -2
- data/tasks/metrics/yardstick.rake +0 -14
- data/tasks/spec.rake +0 -2
- data/tasks/yard.rake +0 -2
- metadata +99 -35
- data/.travis.yml +0 -15
- data/TODO +0 -0
- data/bin/devtools +0 -18
- data/default/config/devtools.yml +0 -2
- data/default/config/flay.yml +0 -3
- data/default/config/flog.yml +0 -2
- data/default/config/mutant.yml +0 -3
- data/default/config/reek.yml +0 -103
- data/default/config/rubocop.yml +0 -91
- data/default/config/yardstick.yml +0 -2
- data/lib/devtools/platform.rb +0 -118
- data/lib/devtools/site/initializer.rb +0 -57
- data/lib/devtools/site.rb +0 -41
metadata
CHANGED
|
@@ -1,43 +1,99 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devtools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Markus Schirp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: procto
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.0.x
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.0.x
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: anima
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 0.3.x
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 0.3.x
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: concord
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: 0.1.x
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: 0.1.x
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: adamantium
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 0.2.x
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 0.2.x
|
|
13
69
|
- !ruby/object:Gem::Dependency
|
|
14
70
|
name: rspec
|
|
15
71
|
requirement: !ruby/object:Gem::Requirement
|
|
16
72
|
requirements:
|
|
17
73
|
- - "~>"
|
|
18
74
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
75
|
+
version: 3.4.0
|
|
20
76
|
type: :runtime
|
|
21
77
|
prerelease: false
|
|
22
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
79
|
requirements:
|
|
24
80
|
- - "~>"
|
|
25
81
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
82
|
+
version: 3.4.0
|
|
27
83
|
- !ruby/object:Gem::Dependency
|
|
28
84
|
name: rspec-core
|
|
29
85
|
requirement: !ruby/object:Gem::Requirement
|
|
30
86
|
requirements:
|
|
31
87
|
- - "~>"
|
|
32
88
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 3.
|
|
89
|
+
version: 3.4.0
|
|
34
90
|
type: :runtime
|
|
35
91
|
prerelease: false
|
|
36
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
93
|
requirements:
|
|
38
94
|
- - "~>"
|
|
39
95
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 3.
|
|
96
|
+
version: 3.4.0
|
|
41
97
|
- !ruby/object:Gem::Dependency
|
|
42
98
|
name: rspec-its
|
|
43
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -86,14 +142,14 @@ dependencies:
|
|
|
86
142
|
requirements:
|
|
87
143
|
- - "~>"
|
|
88
144
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 2.
|
|
145
|
+
version: 2.7.0
|
|
90
146
|
type: :runtime
|
|
91
147
|
prerelease: false
|
|
92
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
149
|
requirements:
|
|
94
150
|
- - "~>"
|
|
95
151
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 2.
|
|
152
|
+
version: 2.7.0
|
|
97
153
|
- !ruby/object:Gem::Dependency
|
|
98
154
|
name: flog
|
|
99
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -114,28 +170,28 @@ dependencies:
|
|
|
114
170
|
requirements:
|
|
115
171
|
- - "~>"
|
|
116
172
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 3.
|
|
173
|
+
version: 3.10.2
|
|
118
174
|
type: :runtime
|
|
119
175
|
prerelease: false
|
|
120
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
177
|
requirements:
|
|
122
178
|
- - "~>"
|
|
123
179
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 3.
|
|
180
|
+
version: 3.10.2
|
|
125
181
|
- !ruby/object:Gem::Dependency
|
|
126
182
|
name: rubocop
|
|
127
183
|
requirement: !ruby/object:Gem::Requirement
|
|
128
184
|
requirements:
|
|
129
185
|
- - "~>"
|
|
130
186
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 0.
|
|
187
|
+
version: 0.37.2
|
|
132
188
|
type: :runtime
|
|
133
189
|
prerelease: false
|
|
134
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
191
|
requirements:
|
|
136
192
|
- - "~>"
|
|
137
193
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 0.
|
|
194
|
+
version: 0.37.2
|
|
139
195
|
- !ruby/object:Gem::Dependency
|
|
140
196
|
name: simplecov
|
|
141
197
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,73 +226,61 @@ dependencies:
|
|
|
170
226
|
requirements:
|
|
171
227
|
- - "~>"
|
|
172
228
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 0.8.
|
|
229
|
+
version: 0.8.10
|
|
174
230
|
type: :runtime
|
|
175
231
|
prerelease: false
|
|
176
232
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
233
|
requirements:
|
|
178
234
|
- - "~>"
|
|
179
235
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: 0.8.
|
|
236
|
+
version: 0.8.10
|
|
181
237
|
- !ruby/object:Gem::Dependency
|
|
182
238
|
name: mutant-rspec
|
|
183
239
|
requirement: !ruby/object:Gem::Requirement
|
|
184
240
|
requirements:
|
|
185
241
|
- - "~>"
|
|
186
242
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: 0.8.
|
|
243
|
+
version: 0.8.8
|
|
188
244
|
type: :runtime
|
|
189
245
|
prerelease: false
|
|
190
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
247
|
requirements:
|
|
192
248
|
- - "~>"
|
|
193
249
|
- !ruby/object:Gem::Version
|
|
194
|
-
version: 0.8.
|
|
195
|
-
description: A metagem
|
|
250
|
+
version: 0.8.8
|
|
251
|
+
description: A metagem wrapping development tools
|
|
196
252
|
email:
|
|
197
253
|
- mbj@schirp-dso.com
|
|
198
|
-
executables:
|
|
199
|
-
- devtools
|
|
254
|
+
executables: []
|
|
200
255
|
extensions: []
|
|
201
256
|
extra_rdoc_files:
|
|
202
257
|
- README.md
|
|
203
|
-
- TODO
|
|
204
258
|
files:
|
|
205
259
|
- ".gitignore"
|
|
206
260
|
- ".rspec"
|
|
207
261
|
- ".rubocop.yml"
|
|
208
262
|
- ".ruby-gemset"
|
|
209
|
-
- ".travis.yml"
|
|
210
263
|
- Gemfile
|
|
211
264
|
- LICENSE
|
|
212
265
|
- README.md
|
|
213
266
|
- Rakefile
|
|
214
|
-
- TODO
|
|
215
|
-
- bin/devtools
|
|
216
267
|
- circle.yml
|
|
268
|
+
- config/devtools.yml
|
|
217
269
|
- config/flay.yml
|
|
218
270
|
- config/flog.yml
|
|
219
271
|
- config/mutant.yml
|
|
220
272
|
- config/reek.yml
|
|
221
273
|
- config/rubocop.yml
|
|
222
274
|
- config/yardstick.yml
|
|
223
|
-
- default/config/devtools.yml
|
|
224
|
-
- default/config/flay.yml
|
|
225
|
-
- default/config/flog.yml
|
|
226
|
-
- default/config/mutant.yml
|
|
227
|
-
- default/config/reek.yml
|
|
228
|
-
- default/config/rubocop.yml
|
|
229
|
-
- default/config/yardstick.yml
|
|
230
275
|
- devtools.gemspec
|
|
231
276
|
- lib/devtools.rb
|
|
232
277
|
- lib/devtools/config.rb
|
|
233
|
-
- lib/devtools/
|
|
278
|
+
- lib/devtools/flay.rb
|
|
234
279
|
- lib/devtools/project.rb
|
|
235
280
|
- lib/devtools/project/initializer.rb
|
|
236
281
|
- lib/devtools/project/initializer/rake.rb
|
|
237
282
|
- lib/devtools/project/initializer/rspec.rb
|
|
238
|
-
- lib/devtools/
|
|
239
|
-
- lib/devtools/site/initializer.rb
|
|
283
|
+
- lib/devtools/rake/flay.rb
|
|
240
284
|
- lib/devtools/spec_helper.rb
|
|
241
285
|
- shared/spec/shared/abstract_type_behavior.rb
|
|
242
286
|
- shared/spec/shared/command_method_behavior.rb
|
|
@@ -244,7 +288,17 @@ files:
|
|
|
244
288
|
- shared/spec/shared/hash_method_behavior.rb
|
|
245
289
|
- shared/spec/shared/idempotent_method_behavior.rb
|
|
246
290
|
- shared/spec/support/ice_nine_config.rb
|
|
291
|
+
- spec/integration/devtools/rake/flay/verify_spec.rb
|
|
247
292
|
- spec/spec_helper.rb
|
|
293
|
+
- spec/unit/devtools/config/yardstick_spec.rb
|
|
294
|
+
- spec/unit/devtools/config_spec.rb
|
|
295
|
+
- spec/unit/devtools/flay/file_list/call_spec.rb
|
|
296
|
+
- spec/unit/devtools/flay/scale/flay_report_spec.rb
|
|
297
|
+
- spec/unit/devtools/flay/scale/measure_spec.rb
|
|
298
|
+
- spec/unit/devtools/project/initializer/rake_spec.rb
|
|
299
|
+
- spec/unit/devtools/project/initializer/rspec_spec.rb
|
|
300
|
+
- spec/unit/devtools/project_spec.rb
|
|
301
|
+
- spec/unit/devtools_spec.rb
|
|
248
302
|
- tasks/metrics/ci.rake
|
|
249
303
|
- tasks/metrics/coverage.rake
|
|
250
304
|
- tasks/metrics/flay.rake
|
|
@@ -275,10 +329,20 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
275
329
|
version: '0'
|
|
276
330
|
requirements: []
|
|
277
331
|
rubyforge_project:
|
|
278
|
-
rubygems_version: 2.
|
|
332
|
+
rubygems_version: 2.5.1
|
|
279
333
|
signing_key:
|
|
280
334
|
specification_version: 4
|
|
281
|
-
summary: A metagem
|
|
335
|
+
summary: A metagem wrapping development tools
|
|
282
336
|
test_files:
|
|
337
|
+
- spec/integration/devtools/rake/flay/verify_spec.rb
|
|
283
338
|
- spec/spec_helper.rb
|
|
339
|
+
- spec/unit/devtools/config/yardstick_spec.rb
|
|
340
|
+
- spec/unit/devtools/config_spec.rb
|
|
341
|
+
- spec/unit/devtools/flay/file_list/call_spec.rb
|
|
342
|
+
- spec/unit/devtools/flay/scale/flay_report_spec.rb
|
|
343
|
+
- spec/unit/devtools/flay/scale/measure_spec.rb
|
|
344
|
+
- spec/unit/devtools/project/initializer/rake_spec.rb
|
|
345
|
+
- spec/unit/devtools/project/initializer/rspec_spec.rb
|
|
346
|
+
- spec/unit/devtools/project_spec.rb
|
|
347
|
+
- spec/unit/devtools_spec.rb
|
|
284
348
|
has_rdoc:
|
data/.travis.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
sudo: false
|
|
2
|
-
language: ruby
|
|
3
|
-
bundler_args: --without yard guard benchmarks
|
|
4
|
-
script: "bundle exec rake ci"
|
|
5
|
-
rvm:
|
|
6
|
-
- '2.1'
|
|
7
|
-
- '2.2'
|
|
8
|
-
- rbx
|
|
9
|
-
matrix:
|
|
10
|
-
include:
|
|
11
|
-
- rvm: jruby
|
|
12
|
-
env: JRUBY_OPTS="$JRUBY_OPTS --debug --2.0"
|
|
13
|
-
allow_failures:
|
|
14
|
-
- rvm: jruby
|
|
15
|
-
- rvm: rbx
|
data/TODO
DELETED
|
File without changes
|
data/bin/devtools
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# encoding: utf-8
|
|
3
|
-
|
|
4
|
-
require 'bundler'
|
|
5
|
-
|
|
6
|
-
Bundler.setup
|
|
7
|
-
|
|
8
|
-
require 'devtools'
|
|
9
|
-
|
|
10
|
-
command = ARGV.first
|
|
11
|
-
|
|
12
|
-
case command
|
|
13
|
-
when 'init' then Devtools.init
|
|
14
|
-
when 'sync' then Devtools.sync
|
|
15
|
-
when 'update' then Devtools.update
|
|
16
|
-
else
|
|
17
|
-
puts 'command not supported'
|
|
18
|
-
end
|
data/default/config/devtools.yml
DELETED
data/default/config/flay.yml
DELETED
data/default/config/flog.yml
DELETED
data/default/config/mutant.yml
DELETED
data/default/config/reek.yml
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
Attribute:
|
|
3
|
-
enabled: true
|
|
4
|
-
exclude: []
|
|
5
|
-
BooleanParameter:
|
|
6
|
-
enabled: true
|
|
7
|
-
exclude: []
|
|
8
|
-
ClassVariable:
|
|
9
|
-
enabled: true
|
|
10
|
-
exclude: []
|
|
11
|
-
ControlParameter:
|
|
12
|
-
enabled: true
|
|
13
|
-
exclude: []
|
|
14
|
-
DataClump:
|
|
15
|
-
enabled: true
|
|
16
|
-
exclude: []
|
|
17
|
-
max_copies: 2
|
|
18
|
-
min_clump_size: 2
|
|
19
|
-
DuplicateMethodCall:
|
|
20
|
-
enabled: true
|
|
21
|
-
exclude: []
|
|
22
|
-
max_calls: 1
|
|
23
|
-
allow_calls: []
|
|
24
|
-
FeatureEnvy:
|
|
25
|
-
enabled: true
|
|
26
|
-
exclude: []
|
|
27
|
-
IrresponsibleModule:
|
|
28
|
-
enabled: true
|
|
29
|
-
exclude: []
|
|
30
|
-
LongParameterList:
|
|
31
|
-
enabled: true
|
|
32
|
-
exclude: []
|
|
33
|
-
max_params: 2
|
|
34
|
-
overrides:
|
|
35
|
-
initialize:
|
|
36
|
-
max_params: 3
|
|
37
|
-
LongYieldList:
|
|
38
|
-
enabled: true
|
|
39
|
-
exclude: []
|
|
40
|
-
max_params: 2
|
|
41
|
-
NestedIterators:
|
|
42
|
-
enabled: true
|
|
43
|
-
exclude: []
|
|
44
|
-
max_allowed_nesting: 1
|
|
45
|
-
ignore_iterators: []
|
|
46
|
-
NilCheck:
|
|
47
|
-
enabled: true
|
|
48
|
-
exclude: []
|
|
49
|
-
RepeatedConditional:
|
|
50
|
-
enabled: true
|
|
51
|
-
exclude: []
|
|
52
|
-
max_ifs: 1
|
|
53
|
-
TooManyInstanceVariables:
|
|
54
|
-
enabled: true
|
|
55
|
-
exclude: []
|
|
56
|
-
max_instance_variables: 3
|
|
57
|
-
TooManyMethods:
|
|
58
|
-
enabled: true
|
|
59
|
-
exclude: []
|
|
60
|
-
max_methods: 10
|
|
61
|
-
TooManyStatements:
|
|
62
|
-
enabled: true
|
|
63
|
-
exclude:
|
|
64
|
-
- each
|
|
65
|
-
max_statements: 2
|
|
66
|
-
UncommunicativeMethodName:
|
|
67
|
-
enabled: true
|
|
68
|
-
exclude: []
|
|
69
|
-
reject:
|
|
70
|
-
- !ruby/regexp /^[a-z]$/
|
|
71
|
-
- !ruby/regexp /[0-9]$/
|
|
72
|
-
- !ruby/regexp /[A-Z]/
|
|
73
|
-
accept: []
|
|
74
|
-
UncommunicativeModuleName:
|
|
75
|
-
enabled: true
|
|
76
|
-
exclude: []
|
|
77
|
-
reject:
|
|
78
|
-
- !ruby/regexp /^.$/
|
|
79
|
-
- !ruby/regexp /[0-9]$/
|
|
80
|
-
accept: []
|
|
81
|
-
UncommunicativeParameterName:
|
|
82
|
-
enabled: true
|
|
83
|
-
exclude: []
|
|
84
|
-
reject:
|
|
85
|
-
- !ruby/regexp /^.$/
|
|
86
|
-
- !ruby/regexp /[0-9]$/
|
|
87
|
-
- !ruby/regexp /[A-Z]/
|
|
88
|
-
accept: []
|
|
89
|
-
UncommunicativeVariableName:
|
|
90
|
-
enabled: true
|
|
91
|
-
exclude: []
|
|
92
|
-
reject:
|
|
93
|
-
- !ruby/regexp /^.$/
|
|
94
|
-
- !ruby/regexp /[0-9]$/
|
|
95
|
-
- !ruby/regexp /[A-Z]/
|
|
96
|
-
accept: []
|
|
97
|
-
UnusedParameters:
|
|
98
|
-
enabled: true
|
|
99
|
-
exclude: []
|
|
100
|
-
UtilityFunction:
|
|
101
|
-
enabled: true
|
|
102
|
-
exclude: []
|
|
103
|
-
max_helper_calls: 0
|
data/default/config/rubocop.yml
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
AllCops:
|
|
2
|
-
Includes:
|
|
3
|
-
- '**/*.rake'
|
|
4
|
-
- 'Gemfile'
|
|
5
|
-
Excludes:
|
|
6
|
-
- '**/vendor/**'
|
|
7
|
-
- '**/benchmarks/**'
|
|
8
|
-
|
|
9
|
-
# Avoid parameter lists longer than five parameters.
|
|
10
|
-
ParameterLists:
|
|
11
|
-
Max: 3
|
|
12
|
-
CountKeywordArgs: true
|
|
13
|
-
|
|
14
|
-
# Limit method length
|
|
15
|
-
MethodLength:
|
|
16
|
-
CountComments: false
|
|
17
|
-
Max: 10
|
|
18
|
-
|
|
19
|
-
# Avoid more than `Max` levels of nesting.
|
|
20
|
-
BlockNesting:
|
|
21
|
-
Max: 3
|
|
22
|
-
|
|
23
|
-
# Align with the style guide.
|
|
24
|
-
CollectionMethods:
|
|
25
|
-
PreferredMethods:
|
|
26
|
-
collect: 'map'
|
|
27
|
-
inject: 'reduce'
|
|
28
|
-
find: 'detect'
|
|
29
|
-
find_all: 'select'
|
|
30
|
-
|
|
31
|
-
# Do not force public/protected/private keyword to be indented at the same
|
|
32
|
-
# level as the def keyword. My personal preference is to outdent these keywords
|
|
33
|
-
# because I think when scanning code it makes it easier to identify the
|
|
34
|
-
# sections of code and visually separate them. When the keyword is at the same
|
|
35
|
-
# level I think it sort of blends in with the def keywords and makes it harder
|
|
36
|
-
# to scan the code and see where the sections are.
|
|
37
|
-
AccessModifierIndentation:
|
|
38
|
-
Enabled: false
|
|
39
|
-
|
|
40
|
-
# Limit line length
|
|
41
|
-
LineLength:
|
|
42
|
-
Max: 79
|
|
43
|
-
|
|
44
|
-
# Disable documentation checking until a class needs to be documented once
|
|
45
|
-
Documentation:
|
|
46
|
-
Enabled: false
|
|
47
|
-
|
|
48
|
-
# Do not always use &&/|| instead of and/or.
|
|
49
|
-
AndOr:
|
|
50
|
-
Enabled: false
|
|
51
|
-
|
|
52
|
-
# Do not favor modifier if/unless usage when you have a single-line body
|
|
53
|
-
IfUnlessModifier:
|
|
54
|
-
Enabled: false
|
|
55
|
-
|
|
56
|
-
# Allow case equality operator (in limited use within the specs)
|
|
57
|
-
CaseEquality:
|
|
58
|
-
Enabled: false
|
|
59
|
-
|
|
60
|
-
# Constants do not always have to use SCREAMING_SNAKE_CASE
|
|
61
|
-
ConstantName:
|
|
62
|
-
Enabled: false
|
|
63
|
-
|
|
64
|
-
# Not all trivial readers/writers can be defined with attr_* methods
|
|
65
|
-
TrivialAccessors:
|
|
66
|
-
Enabled: false
|
|
67
|
-
|
|
68
|
-
# Do not prefer do/end over {} for multiline blocks
|
|
69
|
-
Blocks:
|
|
70
|
-
Enabled: false
|
|
71
|
-
|
|
72
|
-
# Allow empty lines around body
|
|
73
|
-
EmptyLinesAroundBody:
|
|
74
|
-
Enabled: false
|
|
75
|
-
|
|
76
|
-
# Prefer String#% over Kernel#sprintf
|
|
77
|
-
FormatString:
|
|
78
|
-
Enabled: false
|
|
79
|
-
|
|
80
|
-
# Use square brackets for literal Array objects
|
|
81
|
-
PercentLiteralDelimiters:
|
|
82
|
-
PreferredDelimiters:
|
|
83
|
-
'%': ()
|
|
84
|
-
'%i': '[]'
|
|
85
|
-
'%q': ()
|
|
86
|
-
'%Q': ()
|
|
87
|
-
'%r': '{}'
|
|
88
|
-
'%s': ()
|
|
89
|
-
'%w': '[]'
|
|
90
|
-
'%W': '[]'
|
|
91
|
-
'%x': ()
|
data/lib/devtools/platform.rb
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
module Devtools
|
|
4
|
-
|
|
5
|
-
# Provides methods to determine the ruby platform
|
|
6
|
-
module Platform
|
|
7
|
-
|
|
8
|
-
DEFAULT_RVM_NAME = 'mri'.freeze
|
|
9
|
-
|
|
10
|
-
# Return Ruby engine string
|
|
11
|
-
#
|
|
12
|
-
# @return [String]
|
|
13
|
-
#
|
|
14
|
-
# @api private
|
|
15
|
-
def ruby_engine
|
|
16
|
-
@ruby_engine ||= (defined?(RUBY_ENGINE) && RUBY_ENGINE || 'ruby').freeze
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# Return RVM name
|
|
20
|
-
#
|
|
21
|
-
# @return [String]
|
|
22
|
-
#
|
|
23
|
-
# @api private
|
|
24
|
-
def rvm_name
|
|
25
|
-
@rvm_name ||= begin
|
|
26
|
-
engine = ruby_engine
|
|
27
|
-
engine == 'ruby' ? DEFAULT_RVM_NAME : engine
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Return RVM string
|
|
32
|
-
#
|
|
33
|
-
# @return [String]
|
|
34
|
-
#
|
|
35
|
-
# @api private
|
|
36
|
-
def rvm
|
|
37
|
-
@rvm ||= "#{rvm_name}-#{RUBY_VERSION}".freeze
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Test for being executed under JRuby
|
|
41
|
-
#
|
|
42
|
-
# @return [true]
|
|
43
|
-
# if running under JRuby
|
|
44
|
-
#
|
|
45
|
-
# @return [false]
|
|
46
|
-
# otherwise
|
|
47
|
-
#
|
|
48
|
-
# @api private
|
|
49
|
-
def jruby?
|
|
50
|
-
ruby_engine == 'jruby'
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# Test for being executed under rbx
|
|
54
|
-
#
|
|
55
|
-
# @return [true]
|
|
56
|
-
# if running under rbx
|
|
57
|
-
#
|
|
58
|
-
# @return [false]
|
|
59
|
-
# otherwise
|
|
60
|
-
#
|
|
61
|
-
# @api private
|
|
62
|
-
def rbx?
|
|
63
|
-
ruby_engine == 'rbx'
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Test for being executed under rubies with a JIT
|
|
67
|
-
#
|
|
68
|
-
# @return [true]
|
|
69
|
-
# if running under JRuby or rbx
|
|
70
|
-
#
|
|
71
|
-
# @return [false]
|
|
72
|
-
# otherwise
|
|
73
|
-
#
|
|
74
|
-
# @api private
|
|
75
|
-
def jit?
|
|
76
|
-
jruby? || rbx?
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Test for 1.8 mode
|
|
80
|
-
#
|
|
81
|
-
# @return [true]
|
|
82
|
-
# if running under 1.8.x
|
|
83
|
-
#
|
|
84
|
-
# @return [false]
|
|
85
|
-
# otherwise
|
|
86
|
-
#
|
|
87
|
-
# @api private
|
|
88
|
-
def ruby18?
|
|
89
|
-
RUBY_VERSION.start_with?('1.8.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
# Test for 1.9 mode
|
|
93
|
-
#
|
|
94
|
-
# @return [true]
|
|
95
|
-
# if running under 1.9.x
|
|
96
|
-
#
|
|
97
|
-
# @return [false]
|
|
98
|
-
# otherwise
|
|
99
|
-
#
|
|
100
|
-
# @api private
|
|
101
|
-
def ruby19?
|
|
102
|
-
RUBY_VERSION.start_with?('1.9.')
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
# Test for 2.0 mode
|
|
106
|
-
#
|
|
107
|
-
# @return [true]
|
|
108
|
-
# if running under 2.0.x
|
|
109
|
-
#
|
|
110
|
-
# @return [false]
|
|
111
|
-
# otherwise
|
|
112
|
-
#
|
|
113
|
-
# @api private
|
|
114
|
-
def ruby20?
|
|
115
|
-
RUBY_VERSION.start_with?('2.0.')
|
|
116
|
-
end
|
|
117
|
-
end # module Platform
|
|
118
|
-
end # module Devtools
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
module Devtools
|
|
4
|
-
class Site
|
|
5
|
-
|
|
6
|
-
# Supports initializing new projects with a Rakefile
|
|
7
|
-
class Initializer
|
|
8
|
-
|
|
9
|
-
def self.call(root)
|
|
10
|
-
new(root).call
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
attr_reader :site
|
|
14
|
-
|
|
15
|
-
attr_reader :root
|
|
16
|
-
|
|
17
|
-
attr_reader :config_dir
|
|
18
|
-
|
|
19
|
-
def initialize(site)
|
|
20
|
-
@site = site
|
|
21
|
-
@root = site.root
|
|
22
|
-
config_dir = @root.join(DEFAULT_CONFIG_DIR_NAME).tap(&:mkpath)
|
|
23
|
-
@config_dir = config_dir.parent
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Init devtools using default config
|
|
27
|
-
#
|
|
28
|
-
# @return [undefined]
|
|
29
|
-
#
|
|
30
|
-
# @api public
|
|
31
|
-
def call
|
|
32
|
-
FileUtils.cp_r(DEFAULT_CONFIG_PATH, config_dir)
|
|
33
|
-
|
|
34
|
-
site.sync
|
|
35
|
-
init_rakefile
|
|
36
|
-
|
|
37
|
-
self
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
private
|
|
41
|
-
|
|
42
|
-
# Initialize the Rakefile
|
|
43
|
-
#
|
|
44
|
-
# @return [undefined]
|
|
45
|
-
#
|
|
46
|
-
# @api private
|
|
47
|
-
def init_rakefile
|
|
48
|
-
rakefile = root.join(RAKE_FILE_NAME)
|
|
49
|
-
return if rakefile.file? && rakefile.read.include?(INIT_RAKE_TASKS)
|
|
50
|
-
rakefile.open('a') do |file|
|
|
51
|
-
file << ANNOTATION_WRAPPER % [REQUIRE, INIT_RAKE_TASKS].join("\n")
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
end # class Initializer
|
|
56
|
-
end # class Site
|
|
57
|
-
end # module Devtools
|