hound-tools 0.0.4

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.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.hound.yml +6 -0
  4. data/.hound/defaults.yml +265 -0
  5. data/.hound/overrides.yml +19 -0
  6. data/.rspec +3 -0
  7. data/.rubocop.yml +8 -0
  8. data/.rubocop_merged_for_hound.yml +41 -0
  9. data/.rubocop_todo.yml +11 -0
  10. data/.travis.yml +12 -0
  11. data/Gemfile +12 -0
  12. data/Guardfile +40 -0
  13. data/LICENSE.txt +22 -0
  14. data/README.md +98 -0
  15. data/Rakefile +22 -0
  16. data/bin/hound-tools +5 -0
  17. data/hound-tools.gemspec +26 -0
  18. data/lib/hound/tools.rb +7 -0
  19. data/lib/hound/tools/cli.rb +74 -0
  20. data/lib/hound/tools/hound_defaults.rb +30 -0
  21. data/lib/hound/tools/hound_overrides.rb +26 -0
  22. data/lib/hound/tools/hound_yml.rb +31 -0
  23. data/lib/hound/tools/merged_yml.rb +40 -0
  24. data/lib/hound/tools/rubocop_yml.rb +24 -0
  25. data/lib/hound/tools/runner.rb +71 -0
  26. data/lib/hound/tools/template.rb +38 -0
  27. data/lib/hound/tools/templates/_.hound.yml +6 -0
  28. data/lib/hound/tools/templates/_.hound/defaults.yml +265 -0
  29. data/lib/hound/tools/templates/_.hound/overrides.yml +19 -0
  30. data/lib/hound/tools/templates/_.rubocop.yml +8 -0
  31. data/lib/hound/tools/version.rb +5 -0
  32. data/spec/lib/hound/tools/cli_spec.rb +90 -0
  33. data/spec/lib/hound/tools/hound_defaults_spec.rb +52 -0
  34. data/spec/lib/hound/tools/hound_overrides_spec.rb +52 -0
  35. data/spec/lib/hound/tools/hound_yml_spec.rb +77 -0
  36. data/spec/lib/hound/tools/merged_yml_spec.rb +53 -0
  37. data/spec/lib/hound/tools/rubocop_yml_spec.rb +68 -0
  38. data/spec/lib/hound/tools/template_spec.rb +43 -0
  39. data/spec/spec_helper.rb +47 -0
  40. metadata +147 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8ec02dc7204a2c0153e37f49f0e1534f76dd212b
4
+ data.tar.gz: 50aba4ae0fde54c3e91993359081b8ee63738352
5
+ SHA512:
6
+ metadata.gz: f4530b600664f69091719ecd2c8d96fe6bcb33d70904bba7fcc443abcdd278dbb20485886f8dd8df7602fb4fe425ab591e7dff0f9704ba2b88ac9e1a48d57280
7
+ data.tar.gz: dc1c4bceb2f5f28c52dd44282dca0f4c07eaef0ff66b1330ba4bf0c16f0caaa14e00aa5aa28c8dd73b631e028a05b9d59c7b6a2a57f4297059ea4af8ca3d78ae
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
@@ -0,0 +1,6 @@
1
+ ruby:
2
+ enabled: true
3
+ config_file: .rubocop_merged_for_hound.yml
4
+
5
+ coffee_script:
6
+ enabled: true
@@ -0,0 +1,265 @@
1
+ #
2
+ # NOTE: * DO NOT EDIT THIS FILE! *
3
+ #
4
+ # This file should match the config/style_guides/ruby.yml from the
5
+ # thoughtbot/hound project
6
+
7
+ AllCops:
8
+ Exclude:
9
+ - db/schema.rb
10
+
11
+ AccessorMethodName:
12
+ Enabled: false
13
+
14
+ ActionFilter:
15
+ Enabled: false
16
+
17
+ Alias:
18
+ Enabled: false
19
+
20
+ ArrayJoin:
21
+ Enabled: false
22
+
23
+ AsciiComments:
24
+ Enabled: false
25
+
26
+ AsciiIdentifiers:
27
+ Enabled: false
28
+
29
+ Attr:
30
+ Enabled: false
31
+
32
+ BlockNesting:
33
+ Enabled: false
34
+
35
+ CaseEquality:
36
+ Enabled: false
37
+
38
+ CharacterLiteral:
39
+ Enabled: false
40
+
41
+ ClassAndModuleChildren:
42
+ Enabled: false
43
+
44
+ ClassLength:
45
+ Enabled: false
46
+
47
+ ClassVars:
48
+ Enabled: false
49
+
50
+ CollectionMethods:
51
+ PreferredMethods:
52
+ find: detect
53
+ reduce: inject
54
+ collect: map
55
+ find_all: select
56
+
57
+ ColonMethodCall:
58
+ Enabled: false
59
+
60
+ CommentAnnotation:
61
+ Enabled: false
62
+
63
+ CyclomaticComplexity:
64
+ Enabled: false
65
+
66
+ Delegate:
67
+ Enabled: false
68
+
69
+ DeprecatedHashMethods:
70
+ Enabled: false
71
+
72
+ Documentation:
73
+ Enabled: false
74
+
75
+ DotPosition:
76
+ EnforcedStyle: trailing
77
+
78
+ DoubleNegation:
79
+ Enabled: false
80
+
81
+ EachWithObject:
82
+ Enabled: false
83
+
84
+ EmptyLiteral:
85
+ Enabled: false
86
+
87
+ Encoding:
88
+ Enabled: false
89
+
90
+ EvenOdd:
91
+ Enabled: false
92
+
93
+ FileName:
94
+ Enabled: false
95
+
96
+ FlipFlop:
97
+ Enabled: false
98
+
99
+ FormatString:
100
+ Enabled: false
101
+
102
+ GlobalVars:
103
+ Enabled: false
104
+
105
+ GuardClause:
106
+ Enabled: false
107
+
108
+ IfUnlessModifier:
109
+ Enabled: false
110
+
111
+ IfWithSemicolon:
112
+ Enabled: false
113
+
114
+ InlineComment:
115
+ Enabled: false
116
+
117
+ Lambda:
118
+ Enabled: false
119
+
120
+ LambdaCall:
121
+ Enabled: false
122
+
123
+ LineEndConcatenation:
124
+ Enabled: false
125
+
126
+ LineLength:
127
+ Max: 80
128
+
129
+ MethodLength:
130
+ Enabled: false
131
+
132
+ ModuleFunction:
133
+ Enabled: false
134
+
135
+ NegatedIf:
136
+ Enabled: false
137
+
138
+ NegatedWhile:
139
+ Enabled: false
140
+
141
+ Next:
142
+ Enabled: false
143
+
144
+ NilComparison:
145
+ Enabled: false
146
+
147
+ Not:
148
+ Enabled: false
149
+
150
+ NumericLiterals:
151
+ Enabled: false
152
+
153
+ OneLineConditional:
154
+ Enabled: false
155
+
156
+ OpMethod:
157
+ Enabled: false
158
+
159
+ ParameterLists:
160
+ Enabled: false
161
+
162
+ PercentLiteralDelimiters:
163
+ Enabled: false
164
+
165
+ PerlBackrefs:
166
+ Enabled: false
167
+
168
+ PredicateName:
169
+ NamePrefixBlacklist:
170
+ - is_
171
+
172
+ Proc:
173
+ Enabled: false
174
+
175
+ RaiseArgs:
176
+ Enabled: false
177
+
178
+ RegexpLiteral:
179
+ Enabled: false
180
+
181
+ SelfAssignment:
182
+ Enabled: false
183
+
184
+ SingleLineBlockParams:
185
+ Enabled: false
186
+
187
+ SingleLineMethods:
188
+ Enabled: false
189
+
190
+ SignalException:
191
+ Enabled: false
192
+
193
+ SpecialGlobalVars:
194
+ Enabled: false
195
+
196
+ StringLiterals:
197
+ EnforcedStyle: double_quotes
198
+
199
+ VariableInterpolation:
200
+ Enabled: false
201
+
202
+ TrailingComma:
203
+ Enabled: false
204
+
205
+ TrivialAccessors:
206
+ Enabled: false
207
+
208
+ VariableInterpolation:
209
+ Enabled: false
210
+
211
+ WhenThen:
212
+ Enabled: false
213
+
214
+ WhileUntilModifier:
215
+ Enabled: false
216
+
217
+ WordArray:
218
+ Enabled: false
219
+
220
+ # Lint
221
+
222
+ AmbiguousOperator:
223
+ Enabled: false
224
+
225
+ AmbiguousRegexpLiteral:
226
+ Enabled: false
227
+
228
+ AssignmentInCondition:
229
+ Enabled: false
230
+
231
+ ConditionPosition:
232
+ Enabled: false
233
+
234
+ DeprecatedClassMethods:
235
+ Enabled: false
236
+
237
+ ElseLayout:
238
+ Enabled: false
239
+
240
+ HandleExceptions:
241
+ Enabled: false
242
+
243
+ InvalidCharacterLiteral:
244
+ Enabled: false
245
+
246
+ LiteralInCondition:
247
+ Enabled: false
248
+
249
+ LiteralInInterpolation:
250
+ Enabled: false
251
+
252
+ Loop:
253
+ Enabled: false
254
+
255
+ ParenthesesAsGroupedExpression:
256
+ Enabled: false
257
+
258
+ RequireParentheses:
259
+ Enabled: false
260
+
261
+ UnderscorePrefixedVariableName:
262
+ Enabled: false
263
+
264
+ Void:
265
+ Enabled: false
@@ -0,0 +1,19 @@
1
+ # NOTE: DO NOT put a 'inheried_from' in this file, because Hound with silently
2
+ # ignore it
3
+ #
4
+ # Files you want to exclude
5
+ AllCops:
6
+ # Rails cops (so we don't need to run with -R option)
7
+ RunRailsCops: true
8
+ Exclude:
9
+ - db/schema.rb
10
+ - Gemfile
11
+ - Rakefile
12
+
13
+ # TODO: put your overrides here:
14
+
15
+ StringLiterals:
16
+ EnforcedStyle: single_quotes
17
+ #
18
+ # LineLength:
19
+ # Max: 200
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require spec_helper
3
+ --format documentation
@@ -0,0 +1,8 @@
1
+ inherit_from:
2
+ - .hound/defaults.yml
3
+ - .hound/overrides.yml
4
+ - .rubocop_todo.yml
5
+
6
+ # Rails cops (so we don't need to run with -R option)
7
+ AllCops:
8
+ RunRailsCops: true
@@ -0,0 +1,41 @@
1
+ # This is a file generated by `hound-tools`
2
+ #
3
+ # We don't include .hound/defaults.yml, because Hound has internally
4
+ # loaded them at this point
5
+ #
6
+ # ---------------------------------
7
+ # .hound/overrides.yml
8
+ # ---------------------------------
9
+ # NOTE: DO NOT put a 'inheried_from' in this file, because Hound with silently
10
+ # ignore it
11
+ #
12
+ # Files you want to exclude
13
+ AllCops:
14
+ # Rails cops (so we don't need to run with -R option)
15
+ RunRailsCops: true
16
+ Exclude:
17
+ - db/schema.rb
18
+ - Gemfile
19
+ - Rakefile
20
+
21
+ # TODO: put your overrides here:
22
+
23
+ StringLiterals:
24
+ EnforcedStyle: single_quotes
25
+ #
26
+ # LineLength:
27
+ # Max: 200
28
+ # ---------------------------------
29
+ # .rubocop_todo.yml
30
+ # ---------------------------------
31
+ # This configuration was generated by `rubocop --auto-gen-config`
32
+ # on 2014-12-09 04:22:05 +0100 using RuboCop version 0.25.0.
33
+ # The point is for the user to remove these configuration records
34
+ # one by one as the offenses are removed from the code base.
35
+ # Note that changes in the inspected code, or installation of new
36
+ # versions of RuboCop, may require this file to be generated again.
37
+
38
+ # Offense count: 24
39
+ # Configuration parameters: AllowURI.
40
+ Metrics/LineLength:
41
+ Max: 113
@@ -0,0 +1,11 @@
1
+ # This configuration was generated by `rubocop --auto-gen-config`
2
+ # on 2014-12-09 04:22:05 +0100 using RuboCop version 0.25.0.
3
+ # The point is for the user to remove these configuration records
4
+ # one by one as the offenses are removed from the code base.
5
+ # Note that changes in the inspected code, or installation of new
6
+ # versions of RuboCop, may require this file to be generated again.
7
+
8
+ # Offense count: 24
9
+ # Configuration parameters: AllowURI.
10
+ Metrics/LineLength:
11
+ Max: 113
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ bundler_args: --without development
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1.5
7
+ - jruby-19mode
8
+ - ruby-head
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: jruby-19mode
12
+ - rvm: ruby-head
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem "guard-rspec", require: false
7
+ end
8
+
9
+ group :test do
10
+ gem 'rspec', '~> 3.1', require: false
11
+ gem 'rake', require: false
12
+ end
@@ -0,0 +1,40 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %(app lib config test spec feature)
6
+
7
+ ## Uncomment to clear the screen before every task
8
+ # clearing :on
9
+
10
+ # Note: The cmd option is now required due to the increasing number of ways
11
+ # rspec may be run, below are examples of the most common uses.
12
+ # * bundler: 'bundle exec rspec'
13
+ # * bundler binstubs: 'bin/rspec'
14
+ # * spring: 'bin/rspec' (This will use spring if running and you have
15
+ # installed the spring binstubs per the docs)
16
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
17
+ # * 'just' rspec: 'rspec'
18
+
19
+ guard :rspec, cmd: 'bundle exec rspec', all_after_pass: true do
20
+ require 'ostruct'
21
+
22
+ # Generic Ruby apps
23
+ rspec = OpenStruct.new
24
+ rspec.spec = ->(m) { "spec/#{m}_spec.rb" }
25
+ rspec.spec_dir = 'spec'
26
+ rspec.spec_helper = 'spec/spec_helper.rb'
27
+
28
+ watch(%r{^spec/.+_spec\.rb$})
29
+ watch(%r{^lib/(.+)\.rb$}) { |m| rspec.spec.("lib/#{m[1]}") }
30
+ watch(rspec.spec_helper) { rspec.spec_dir }
31
+
32
+ hound = OpenStruct.new
33
+ hound.libspec = ->(m) { "spec/lib/hound/tools/#{m}_spec.rb" }
34
+ hound.libspecs = ->(m) { m.map { |name| hound.libspec.(name) } }
35
+ hound.template_r = ->(m) { /^#{Regexp.quote("lib/hound/tools/templates/_#{m}")}$/ }
36
+
37
+ watch('lib/hound/tools/template.rb') { hound.libspecs.(%w(cli hound_yml hound_defaults)) }
38
+ watch(hound.template_r.('.hound.yml')) { hound.libspecs.(%w(cli hound_yml)) }
39
+ watch(hound.template_r.('.rubocop.hound_defaults.yml')) { hound.libspecs.(%w(cli hound_defaults)) }
40
+ end