mercy 1.5.0 → 1.6.0
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 +5 -5
- data/.circleci/config.yml +25 -7
- data/.gitignore +5 -0
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +371 -0
- data/Dockerfile +6 -0
- data/README.md +7 -2
- data/Rakefile +8 -3
- data/config/rubycritc.rb +12 -0
- data/config/yardstick.rb +13 -0
- data/config/yardstick.yml +33 -0
- data/docker-compose.yml +14 -9
- data/lib/mercy/version.rb +1 -1
- data/mercy.gemspec +21 -14
- data/scripts/check_readme.sh +6 -0
- data/scripts/rubycritic.sh +10 -0
- metadata +111 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: efbff24ff9fd197b28ce66ec24080912613c3e0f5c2a22d3695473eb0a6db787
|
|
4
|
+
data.tar.gz: 35873dbc0c8fef80b09f09b0086726f755375702b788ad8d1112562aa4dc76a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c00f84e1f4de457e3d3ed056f5c7517f3531644f7da5d49b58241ab29b2474ac96def6ad785584231d48efc752f7bbcd73a9e73e933561329831004598066b1e
|
|
7
|
+
data.tar.gz: 72d5546fff6c02c89e8bb110eb2d6ac2e73da0751fc6e0c94e67285e6a2578f6dd52388d7d3b7b3f51164d0c58035b52f7e145416293cda28b5ef6a2230965dc
|
data/.circleci/config.yml
CHANGED
|
@@ -2,12 +2,30 @@ version: 2
|
|
|
2
2
|
jobs:
|
|
3
3
|
build:
|
|
4
4
|
docker:
|
|
5
|
-
- image:
|
|
5
|
+
- image: darthjee/circleci_ruby_gems:0.0.2
|
|
6
6
|
steps:
|
|
7
7
|
- checkout
|
|
8
|
-
- run:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- run:
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
- run:
|
|
9
|
+
name: Prepare Coverage Test Report
|
|
10
|
+
command: cc-test-reporter before-build
|
|
11
|
+
- run:
|
|
12
|
+
name: Bundle Install
|
|
13
|
+
command: bundle install
|
|
14
|
+
- run:
|
|
15
|
+
name: RSpec
|
|
16
|
+
command: bundle exec rspec
|
|
17
|
+
- run:
|
|
18
|
+
name: Rubocop
|
|
19
|
+
command: rubocop
|
|
20
|
+
- run:
|
|
21
|
+
name: Coverage Test Report
|
|
22
|
+
command: cc-test-reporter after-build --exit-code $?
|
|
23
|
+
- run:
|
|
24
|
+
name: Yardstick coverage check
|
|
25
|
+
command: bundle exec rake verify_measurements
|
|
26
|
+
- run:
|
|
27
|
+
name: Check version documentation
|
|
28
|
+
command: scripts/check_readme.sh
|
|
29
|
+
- run:
|
|
30
|
+
name: Rubycritcs check
|
|
31
|
+
command: scripts/rubycritic.sh
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2019-05-07 16:52:59 +0000 using RuboCop version 0.58.1.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Cop supports --auto-correct.
|
|
11
|
+
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
|
12
|
+
# Include: **/*.gemspec
|
|
13
|
+
Gemspec/OrderedDependencies:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'mercy.gemspec'
|
|
16
|
+
|
|
17
|
+
# Offense count: 1
|
|
18
|
+
# Configuration parameters: Include.
|
|
19
|
+
# Include: **/*.gemspec
|
|
20
|
+
Gemspec/RequiredRubyVersion:
|
|
21
|
+
Exclude:
|
|
22
|
+
- 'mercy.gemspec'
|
|
23
|
+
|
|
24
|
+
# Offense count: 1
|
|
25
|
+
# Cop supports --auto-correct.
|
|
26
|
+
Layout/EmptyLineAfterMagicComment:
|
|
27
|
+
Exclude:
|
|
28
|
+
- 'mercy.gemspec'
|
|
29
|
+
|
|
30
|
+
# Offense count: 2
|
|
31
|
+
# Cop supports --auto-correct.
|
|
32
|
+
# Configuration parameters: EnforcedStyle.
|
|
33
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
|
34
|
+
Layout/EmptyLinesAroundBlockBody:
|
|
35
|
+
Exclude:
|
|
36
|
+
- 'spec/lib/mercy/report/error_spec.rb'
|
|
37
|
+
- 'spec/lib/mercy/status_spec.rb'
|
|
38
|
+
|
|
39
|
+
# Offense count: 1
|
|
40
|
+
# Cop supports --auto-correct.
|
|
41
|
+
# Configuration parameters: EnforcedStyle.
|
|
42
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
|
43
|
+
Layout/EmptyLinesAroundModuleBody:
|
|
44
|
+
Exclude:
|
|
45
|
+
- 'lib/mercy/class_methods.rb'
|
|
46
|
+
|
|
47
|
+
# Offense count: 2
|
|
48
|
+
# Cop supports --auto-correct.
|
|
49
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
|
50
|
+
Layout/ExtraSpacing:
|
|
51
|
+
Exclude:
|
|
52
|
+
- 'mercy.gemspec'
|
|
53
|
+
- 'spec/spec_helper.rb'
|
|
54
|
+
|
|
55
|
+
# Offense count: 3
|
|
56
|
+
# Cop supports --auto-correct.
|
|
57
|
+
# Configuration parameters: Width, IgnoredPatterns.
|
|
58
|
+
Layout/IndentationWidth:
|
|
59
|
+
Exclude:
|
|
60
|
+
- 'spec/lib/mercy/status_builder_spec.rb'
|
|
61
|
+
- 'spec/support/fixture_helpers.rb'
|
|
62
|
+
|
|
63
|
+
# Offense count: 11
|
|
64
|
+
# Cop supports --auto-correct.
|
|
65
|
+
# Configuration parameters: AllowForAlignment.
|
|
66
|
+
Layout/SpaceAroundOperators:
|
|
67
|
+
Exclude:
|
|
68
|
+
- 'lib/mercy/report/error.rb'
|
|
69
|
+
- 'lib/mercy/report/range.rb'
|
|
70
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
71
|
+
- 'spec/lib/mercy/report_builder_spec.rb'
|
|
72
|
+
- 'spec/lib/mercy/status_builder_spec.rb'
|
|
73
|
+
- 'spec/support/report/dummy.rb'
|
|
74
|
+
|
|
75
|
+
# Offense count: 16
|
|
76
|
+
# Cop supports --auto-correct.
|
|
77
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
|
|
78
|
+
# SupportedStyles: space, no_space, compact
|
|
79
|
+
# SupportedStylesForEmptyBrackets: space, no_space
|
|
80
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
|
81
|
+
Exclude:
|
|
82
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
83
|
+
- 'spec/lib/mercy/report_builder_spec.rb'
|
|
84
|
+
- 'spec/lib/mercy/status_builder_spec.rb'
|
|
85
|
+
- 'spec/lib/mercy/status_spec.rb'
|
|
86
|
+
|
|
87
|
+
# Offense count: 4
|
|
88
|
+
# Cop supports --auto-correct.
|
|
89
|
+
# Configuration parameters: EnforcedStyle.
|
|
90
|
+
# SupportedStyles: space, no_space
|
|
91
|
+
Layout/SpaceInsideParens:
|
|
92
|
+
Exclude:
|
|
93
|
+
- 'spec/lib/mercy/report_builder_spec.rb'
|
|
94
|
+
|
|
95
|
+
# Offense count: 5
|
|
96
|
+
# Cop supports --auto-correct.
|
|
97
|
+
# Configuration parameters: EnforcedStyle.
|
|
98
|
+
# SupportedStyles: final_newline, final_blank_line
|
|
99
|
+
Layout/TrailingBlankLines:
|
|
100
|
+
Exclude:
|
|
101
|
+
- 'Gemfile'
|
|
102
|
+
- 'lib/mercy/report/multiple.rb'
|
|
103
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
104
|
+
- 'spec/lib/mercy/report/report_config_spec.rb'
|
|
105
|
+
- 'spec/lib/mercy/report_spec.rb'
|
|
106
|
+
|
|
107
|
+
# Offense count: 9
|
|
108
|
+
# Cop supports --auto-correct.
|
|
109
|
+
# Configuration parameters: AllowInHeredoc.
|
|
110
|
+
Layout/TrailingWhitespace:
|
|
111
|
+
Exclude:
|
|
112
|
+
- 'spec/lib/mercy/report/range_spec.rb'
|
|
113
|
+
- 'spec/lib/mercy/report_spec.rb'
|
|
114
|
+
|
|
115
|
+
# Offense count: 4
|
|
116
|
+
Lint/AmbiguousBlockAssociation:
|
|
117
|
+
Exclude:
|
|
118
|
+
- 'spec/support/models/document.rb'
|
|
119
|
+
|
|
120
|
+
# Offense count: 1
|
|
121
|
+
Lint/IneffectiveAccessModifier:
|
|
122
|
+
Exclude:
|
|
123
|
+
- 'lib/mercy/report.rb'
|
|
124
|
+
|
|
125
|
+
# Offense count: 1
|
|
126
|
+
Lint/ParenthesesAsGroupedExpression:
|
|
127
|
+
Exclude:
|
|
128
|
+
- 'spec/support/fixture_helpers.rb'
|
|
129
|
+
|
|
130
|
+
# Offense count: 27
|
|
131
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
|
132
|
+
# ExcludedMethods: refine
|
|
133
|
+
Metrics/BlockLength:
|
|
134
|
+
Max: 311
|
|
135
|
+
|
|
136
|
+
# Offense count: 2
|
|
137
|
+
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
|
138
|
+
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
|
139
|
+
Naming/MemoizedInstanceVariableName:
|
|
140
|
+
Exclude:
|
|
141
|
+
- 'lib/mercy/period_parser.rb'
|
|
142
|
+
|
|
143
|
+
# Offense count: 3
|
|
144
|
+
# Cop supports --auto-correct.
|
|
145
|
+
Performance/RedundantMatch:
|
|
146
|
+
Exclude:
|
|
147
|
+
- 'lib/arstotzka/type_cast_ext.rb'
|
|
148
|
+
- 'lib/mercy/period_parser.rb'
|
|
149
|
+
|
|
150
|
+
# Offense count: 18
|
|
151
|
+
# Configuration parameters: Prefixes.
|
|
152
|
+
# Prefixes: when, with, without
|
|
153
|
+
RSpec/ContextWording:
|
|
154
|
+
Exclude:
|
|
155
|
+
- 'spec/lib/mercy/report/error_spec.rb'
|
|
156
|
+
- 'spec/lib/mercy/report/range_spec.rb'
|
|
157
|
+
|
|
158
|
+
# Offense count: 39
|
|
159
|
+
# Cop supports --auto-correct.
|
|
160
|
+
RSpec/EmptyLineAfterFinalLet:
|
|
161
|
+
Exclude:
|
|
162
|
+
- 'spec/lib/mercy/report/error_spec.rb'
|
|
163
|
+
- 'spec/lib/mercy/report/range_spec.rb'
|
|
164
|
+
- 'spec/lib/mercy/report_builder_spec.rb'
|
|
165
|
+
- 'spec/lib/mercy/status_builder_spec.rb'
|
|
166
|
+
- 'spec/lib/mercy/status_spec.rb'
|
|
167
|
+
|
|
168
|
+
# Offense count: 3
|
|
169
|
+
# Cop supports --auto-correct.
|
|
170
|
+
RSpec/EmptyLineAfterHook:
|
|
171
|
+
Exclude:
|
|
172
|
+
- 'spec/lib/mercy/report/error_spec.rb'
|
|
173
|
+
|
|
174
|
+
# Offense count: 1
|
|
175
|
+
# Configuration parameters: CustomTransform, IgnoreMethods.
|
|
176
|
+
RSpec/FilePath:
|
|
177
|
+
Exclude:
|
|
178
|
+
- 'spec/lib/mercy/report/report_config_spec.rb'
|
|
179
|
+
|
|
180
|
+
# Offense count: 11
|
|
181
|
+
# Configuration parameters: AggregateFailuresByDefault.
|
|
182
|
+
RSpec/MultipleExpectations:
|
|
183
|
+
Max: 3
|
|
184
|
+
|
|
185
|
+
# Offense count: 111
|
|
186
|
+
RSpec/NamedSubject:
|
|
187
|
+
Exclude:
|
|
188
|
+
- 'spec/lib/arstotzka/type_cast_spec.rb'
|
|
189
|
+
- 'spec/lib/mercy/report/error_spec.rb'
|
|
190
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
191
|
+
- 'spec/lib/mercy/report/range_spec.rb'
|
|
192
|
+
- 'spec/lib/mercy/report/report_config_spec.rb'
|
|
193
|
+
- 'spec/lib/mercy/report_builder_spec.rb'
|
|
194
|
+
- 'spec/lib/mercy/report_spec.rb'
|
|
195
|
+
- 'spec/lib/mercy/status_builder_spec.rb'
|
|
196
|
+
- 'spec/lib/mercy/status_spec.rb'
|
|
197
|
+
- 'spec/support/shared_examples/time_parser.rb'
|
|
198
|
+
|
|
199
|
+
# Offense count: 48
|
|
200
|
+
RSpec/NestedGroups:
|
|
201
|
+
Max: 6
|
|
202
|
+
|
|
203
|
+
# Offense count: 11
|
|
204
|
+
# Cop supports --auto-correct.
|
|
205
|
+
# Configuration parameters: Strict, EnforcedStyle.
|
|
206
|
+
# SupportedStyles: inflected, explicit
|
|
207
|
+
RSpec/PredicateMatcher:
|
|
208
|
+
Exclude:
|
|
209
|
+
- 'spec/lib/mercy/report/error_spec.rb'
|
|
210
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
211
|
+
- 'spec/lib/mercy/report/range_spec.rb'
|
|
212
|
+
- 'spec/lib/mercy/report_builder_spec.rb'
|
|
213
|
+
|
|
214
|
+
# Offense count: 2
|
|
215
|
+
# Cop supports --auto-correct.
|
|
216
|
+
# Configuration parameters: EnforcedStyle.
|
|
217
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
|
218
|
+
Style/BracesAroundHashParameters:
|
|
219
|
+
Exclude:
|
|
220
|
+
- 'spec/lib/arstotzka/type_cast_spec.rb'
|
|
221
|
+
- 'spec/lib/mercy/period_parser_spec.rb'
|
|
222
|
+
|
|
223
|
+
# Offense count: 7
|
|
224
|
+
# Cop supports --auto-correct.
|
|
225
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
|
226
|
+
# SupportedStyles: nested, compact
|
|
227
|
+
Style/ClassAndModuleChildren:
|
|
228
|
+
Exclude:
|
|
229
|
+
- 'lib/mercy/report/active_record.rb'
|
|
230
|
+
- 'lib/mercy/report/multiple.rb'
|
|
231
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
232
|
+
- 'spec/lib/mercy/report_spec.rb'
|
|
233
|
+
|
|
234
|
+
# Offense count: 14
|
|
235
|
+
Style/Documentation:
|
|
236
|
+
Exclude:
|
|
237
|
+
- 'spec/**/*'
|
|
238
|
+
- 'test/**/*'
|
|
239
|
+
- 'lib/arstotzka/type_cast_ext.rb'
|
|
240
|
+
- 'lib/mercy.rb'
|
|
241
|
+
- 'lib/mercy/class_methods.rb'
|
|
242
|
+
- 'lib/mercy/concern.rb'
|
|
243
|
+
- 'lib/mercy/period_parser.rb'
|
|
244
|
+
- 'lib/mercy/report.rb'
|
|
245
|
+
- 'lib/mercy/report/active_record.rb'
|
|
246
|
+
- 'lib/mercy/report/error.rb'
|
|
247
|
+
- 'lib/mercy/report/multiple.rb'
|
|
248
|
+
- 'lib/mercy/report/range.rb'
|
|
249
|
+
- 'lib/mercy/report_builder.rb'
|
|
250
|
+
- 'lib/mercy/report_config.rb'
|
|
251
|
+
- 'lib/mercy/status.rb'
|
|
252
|
+
- 'lib/mercy/status_builder.rb'
|
|
253
|
+
|
|
254
|
+
# Offense count: 2
|
|
255
|
+
# Cop supports --auto-correct.
|
|
256
|
+
# Configuration parameters: EnforcedStyle.
|
|
257
|
+
# SupportedStyles: compact, expanded
|
|
258
|
+
Style/EmptyMethod:
|
|
259
|
+
Exclude:
|
|
260
|
+
- 'spec/support/report/dummy.rb'
|
|
261
|
+
|
|
262
|
+
# Offense count: 1
|
|
263
|
+
# Cop supports --auto-correct.
|
|
264
|
+
Style/Encoding:
|
|
265
|
+
Exclude:
|
|
266
|
+
- 'mercy.gemspec'
|
|
267
|
+
|
|
268
|
+
# Offense count: 1
|
|
269
|
+
# Cop supports --auto-correct.
|
|
270
|
+
Style/ExpandPathArguments:
|
|
271
|
+
Exclude:
|
|
272
|
+
- 'mercy.gemspec'
|
|
273
|
+
|
|
274
|
+
# Offense count: 2
|
|
275
|
+
# Cop supports --auto-correct.
|
|
276
|
+
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
277
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
278
|
+
Style/HashSyntax:
|
|
279
|
+
Exclude:
|
|
280
|
+
- 'Rakefile'
|
|
281
|
+
- 'spec/support/schema.rb'
|
|
282
|
+
|
|
283
|
+
# Offense count: 14
|
|
284
|
+
# Cop supports --auto-correct.
|
|
285
|
+
Style/MutableConstant:
|
|
286
|
+
Exclude:
|
|
287
|
+
- 'lib/mercy/report.rb'
|
|
288
|
+
- 'lib/mercy/report/error.rb'
|
|
289
|
+
- 'lib/mercy/report/range.rb'
|
|
290
|
+
- 'lib/mercy/version.rb'
|
|
291
|
+
- 'spec/lib/mercy/report/multiple_spec.rb'
|
|
292
|
+
- 'spec/lib/mercy/report_spec.rb'
|
|
293
|
+
- 'spec/support/report/dummy.rb'
|
|
294
|
+
|
|
295
|
+
# Offense count: 2
|
|
296
|
+
# Cop supports --auto-correct.
|
|
297
|
+
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
|
298
|
+
Style/ParenthesesAroundCondition:
|
|
299
|
+
Exclude:
|
|
300
|
+
- 'lib/mercy/report/active_record.rb'
|
|
301
|
+
- 'lib/mercy/report/error.rb'
|
|
302
|
+
|
|
303
|
+
# Offense count: 4
|
|
304
|
+
# Cop supports --auto-correct.
|
|
305
|
+
Style/RedundantParentheses:
|
|
306
|
+
Exclude:
|
|
307
|
+
- 'lib/mercy/report/active_record.rb'
|
|
308
|
+
- 'lib/mercy/report/error.rb'
|
|
309
|
+
- 'spec/support/fixture_helpers.rb'
|
|
310
|
+
|
|
311
|
+
# Offense count: 1
|
|
312
|
+
# Cop supports --auto-correct.
|
|
313
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
|
314
|
+
Style/RedundantReturn:
|
|
315
|
+
Exclude:
|
|
316
|
+
- 'lib/mercy/report/range.rb'
|
|
317
|
+
|
|
318
|
+
# Offense count: 2
|
|
319
|
+
# Cop supports --auto-correct.
|
|
320
|
+
Style/RedundantSelf:
|
|
321
|
+
Exclude:
|
|
322
|
+
- 'lib/mercy/class_methods.rb'
|
|
323
|
+
- 'lib/mercy/report.rb'
|
|
324
|
+
|
|
325
|
+
# Offense count: 1
|
|
326
|
+
# Cop supports --auto-correct.
|
|
327
|
+
# Configuration parameters: EnforcedStyle.
|
|
328
|
+
# SupportedStyles: use_perl_names, use_english_names
|
|
329
|
+
Style/SpecialGlobalVars:
|
|
330
|
+
Exclude:
|
|
331
|
+
- 'mercy.gemspec'
|
|
332
|
+
|
|
333
|
+
# Offense count: 10
|
|
334
|
+
# Cop supports --auto-correct.
|
|
335
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
336
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
337
|
+
Style/StringLiterals:
|
|
338
|
+
Exclude:
|
|
339
|
+
- 'Gemfile'
|
|
340
|
+
- 'Rakefile'
|
|
341
|
+
- 'mercy.gemspec'
|
|
342
|
+
- 'spec/spec_helper.rb'
|
|
343
|
+
|
|
344
|
+
# Offense count: 11
|
|
345
|
+
# Cop supports --auto-correct.
|
|
346
|
+
# Configuration parameters: MinSize.
|
|
347
|
+
# SupportedStyles: percent, brackets
|
|
348
|
+
Style/SymbolArray:
|
|
349
|
+
EnforcedStyle: brackets
|
|
350
|
+
|
|
351
|
+
# Offense count: 1
|
|
352
|
+
# Cop supports --auto-correct.
|
|
353
|
+
# Configuration parameters: IgnoredMethods.
|
|
354
|
+
# IgnoredMethods: respond_to, define_method
|
|
355
|
+
Style/SymbolProc:
|
|
356
|
+
Exclude:
|
|
357
|
+
- 'lib/mercy/status.rb'
|
|
358
|
+
|
|
359
|
+
# Offense count: 1
|
|
360
|
+
# Cop supports --auto-correct.
|
|
361
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
362
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
|
363
|
+
Style/TrailingCommaInHashLiteral:
|
|
364
|
+
Exclude:
|
|
365
|
+
- 'lib/mercy/report/range.rb'
|
|
366
|
+
|
|
367
|
+
# Offense count: 21
|
|
368
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
369
|
+
# URISchemes: http, https
|
|
370
|
+
Metrics/LineLength:
|
|
371
|
+
Max: 110
|
data/Dockerfile
ADDED
data/README.md
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
Mercy
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
-

|
|
5
|
-
|
|
6
4
|
[](https://codeclimate.com/github/darthjee/mercy)
|
|
7
5
|
[](https://codeclimate.com/github/darthjee/mercy/coverage)
|
|
8
6
|
[](https://codeclimate.com/github/darthjee/mercy)
|
|
7
|
+
[](https://badge.fury.io/rb/mercy)
|
|
8
|
+
|
|
9
|
+

|
|
9
10
|
|
|
10
11
|
This gem tries to make server monitoring easier and more reliable by adding an easly configurable
|
|
11
12
|
report and making it avaliable in a controller
|
|
12
13
|
|
|
14
|
+
Yard Documentation
|
|
15
|
+
-------------------
|
|
16
|
+
https://www.rubydoc.info/gems/mercy/1.6.0
|
|
17
|
+
|
|
13
18
|
Getting started
|
|
14
19
|
---------------
|
|
15
20
|
1. Add Mercy to your `Gemfile` and `bundle install`:
|
data/Rakefile
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
|
+
require 'yardstick/rake/measurement'
|
|
6
|
+
require './config/yardstick'
|
|
7
|
+
require './config/rubycritc'
|
|
3
8
|
|
|
4
9
|
RSpec::Core::RakeTask.new
|
|
5
10
|
|
|
6
|
-
task :
|
|
11
|
+
task default: :spec
|
|
7
12
|
task test: :spec
|
data/config/rubycritc.rb
ADDED
data/config/yardstick.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'yardstick/rake/measurement'
|
|
4
|
+
require 'yardstick/rake/verify'
|
|
5
|
+
require 'yaml'
|
|
6
|
+
|
|
7
|
+
options = YAML.load_file('config/yardstick.yml')
|
|
8
|
+
|
|
9
|
+
Yardstick::Rake::Measurement.new(:yardstick_measure, options) do |measurement|
|
|
10
|
+
measurement.output = 'measurement/report.txt'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
Yardstick::Rake::Verify.new(:verify_measurements, options)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
threshold: 48.4
|
|
2
|
+
require_exact_threshold: false
|
|
3
|
+
rules:
|
|
4
|
+
ApiTag::Presence:
|
|
5
|
+
enabled: true
|
|
6
|
+
exclude: []
|
|
7
|
+
ApiTag::Inclusion:
|
|
8
|
+
enabled: true
|
|
9
|
+
exclude: []
|
|
10
|
+
ApiTag::ProtectedMethod:
|
|
11
|
+
enabled: true
|
|
12
|
+
exclude: []
|
|
13
|
+
ApiTag::PrivateMethod:
|
|
14
|
+
enabled: true
|
|
15
|
+
exclude: []
|
|
16
|
+
ExampleTag:
|
|
17
|
+
enabled: true
|
|
18
|
+
exclude: []
|
|
19
|
+
ReturnTag:
|
|
20
|
+
enabled: true
|
|
21
|
+
exclude: []
|
|
22
|
+
Summary::Presence:
|
|
23
|
+
enabled: true
|
|
24
|
+
exclude: []
|
|
25
|
+
Summary::Length:
|
|
26
|
+
enabled: true
|
|
27
|
+
exclude: []
|
|
28
|
+
Summary::Delimiter:
|
|
29
|
+
enabled: true
|
|
30
|
+
exclude: []
|
|
31
|
+
Summary::SingleLine:
|
|
32
|
+
enabled: true
|
|
33
|
+
exclude: []
|
data/docker-compose.yml
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
version: '
|
|
1
|
+
version: '3'
|
|
2
2
|
services:
|
|
3
3
|
base: &base
|
|
4
|
-
image:
|
|
5
|
-
working_dir: /home/app/
|
|
4
|
+
image: mercy
|
|
5
|
+
working_dir: /home/app/app
|
|
6
6
|
volumes:
|
|
7
|
-
- .:/home/app/
|
|
8
|
-
- mercy_gems_2_4_0:/usr/local/bundle
|
|
7
|
+
- .:/home/app/app
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
base_build:
|
|
10
|
+
<<: *base
|
|
11
|
+
build: .
|
|
12
|
+
command: echo done
|
|
11
13
|
|
|
12
14
|
mercy:
|
|
13
15
|
<<: *base
|
|
14
16
|
container_name: mercy
|
|
15
|
-
|
|
17
|
+
depends_on: [base_build]
|
|
18
|
+
command: /bin/bash -c 'rspec'
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
test_all:
|
|
21
|
+
<<: *base
|
|
22
|
+
depends_on: [base_build]
|
|
23
|
+
command: /bin/bash -c 'rspec && yard && rake yardstick_measure && rake verify_measurements'
|
data/lib/mercy/version.rb
CHANGED
data/mercy.gemspec
CHANGED
|
@@ -4,29 +4,36 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
require 'mercy/version'
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |gem|
|
|
7
|
-
gem.name
|
|
8
|
-
gem.version
|
|
9
|
-
gem.authors
|
|
10
|
-
gem.email
|
|
11
|
-
gem.
|
|
12
|
-
gem.description
|
|
13
|
-
gem.
|
|
7
|
+
gem.name = 'mercy'
|
|
8
|
+
gem.version = Mercy::VERSION
|
|
9
|
+
gem.authors = ["Darthjee"]
|
|
10
|
+
gem.email = ["darthjee@gmail.com"]
|
|
11
|
+
gem.summary = 'Gem for easy health check'
|
|
12
|
+
gem.description = 'Gem for easy health check'
|
|
13
|
+
gem.homepage = 'https://github.com/darthjee/mercy'
|
|
14
|
+
gem.required_ruby_version = '>= 2.5.0'
|
|
14
15
|
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
17
18
|
gem.test_files = gem.files.grep(%r{^(test|gem|features)/})
|
|
18
19
|
gem.require_paths = ["lib"]
|
|
19
20
|
|
|
20
|
-
gem.add_runtime_dependency 'activesupport',
|
|
21
|
+
gem.add_runtime_dependency 'activesupport', '~> 5.x'
|
|
21
22
|
gem.add_runtime_dependency 'darthjee-active_ext', '>= 1.3.1'
|
|
22
|
-
gem.add_runtime_dependency 'arstotzka',
|
|
23
|
+
gem.add_runtime_dependency 'arstotzka', '>= 1.3.2'
|
|
24
|
+
gem.add_runtime_dependency 'darthjee-core_ext', '>= 1.7.4'
|
|
23
25
|
|
|
24
26
|
gem.add_development_dependency 'activerecord', '~> 5.x'
|
|
25
27
|
gem.add_development_dependency "sqlite3"
|
|
26
28
|
|
|
27
|
-
gem.add_development_dependency
|
|
28
|
-
gem.add_development_dependency
|
|
29
|
-
gem.add_development_dependency
|
|
30
|
-
gem.add_development_dependency '
|
|
31
|
-
gem.add_development_dependency '
|
|
29
|
+
gem.add_development_dependency 'bundler', '~> 1.16.1'
|
|
30
|
+
gem.add_development_dependency 'pry-nav', '~> 0.2.4'
|
|
31
|
+
gem.add_development_dependency 'rake', '>= 12.3.1'
|
|
32
|
+
gem.add_development_dependency 'rspec', '>= 3.8'
|
|
33
|
+
gem.add_development_dependency 'rubocop', '0.58.1'
|
|
34
|
+
gem.add_development_dependency 'rubocop-rspec', '1.30.0'
|
|
35
|
+
gem.add_development_dependency 'rubycritic', '>= 4.0.2'
|
|
36
|
+
gem.add_development_dependency 'simplecov', '~> 0.16.x'
|
|
37
|
+
gem.add_development_dependency 'yard', '>= 0.9.18'
|
|
38
|
+
gem.add_development_dependency 'yardstick', '>= 0.9.9'
|
|
32
39
|
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
DIFF_LIST=$(git diff --name-only $CIRCLE_SHA1 $(git merge-base $CIRCLE_SHA1 origin/master) | grep "^lib/")
|
|
4
|
+
|
|
5
|
+
if [ ! -z "$DIFF_LIST" ]; then
|
|
6
|
+
mkdir -p tmp/rubycritic/compare
|
|
7
|
+
bundle exec rubycritic --format console --branch origin/master -t 0 $DIFF_LIST
|
|
8
|
+
else
|
|
9
|
+
echo "No changes detected. Skipping rubycritic..."
|
|
10
|
+
fi
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mercy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Darthjee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-05-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -44,14 +44,28 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.
|
|
47
|
+
version: 1.3.2
|
|
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: 1.
|
|
54
|
+
version: 1.3.2
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: darthjee-core_ext
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 1.7.4
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 1.7.4
|
|
55
69
|
- !ruby/object:Gem::Dependency
|
|
56
70
|
name: activerecord
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -84,72 +98,142 @@ dependencies:
|
|
|
84
98
|
name: bundler
|
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
|
86
100
|
requirements:
|
|
87
|
-
- - "
|
|
101
|
+
- - "~>"
|
|
88
102
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
103
|
+
version: 1.16.1
|
|
90
104
|
type: :development
|
|
91
105
|
prerelease: false
|
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
107
|
requirements:
|
|
94
|
-
- - "
|
|
108
|
+
- - "~>"
|
|
95
109
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
110
|
+
version: 1.16.1
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: pry-nav
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 0.2.4
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 0.2.4
|
|
97
125
|
- !ruby/object:Gem::Dependency
|
|
98
126
|
name: rake
|
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
|
100
128
|
requirements:
|
|
101
129
|
- - ">="
|
|
102
130
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
131
|
+
version: 12.3.1
|
|
104
132
|
type: :development
|
|
105
133
|
prerelease: false
|
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
135
|
requirements:
|
|
108
136
|
- - ">="
|
|
109
137
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
138
|
+
version: 12.3.1
|
|
111
139
|
- !ruby/object:Gem::Dependency
|
|
112
140
|
name: rspec
|
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
|
114
142
|
requirements:
|
|
115
143
|
- - ">="
|
|
116
144
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
145
|
+
version: '3.8'
|
|
118
146
|
type: :development
|
|
119
147
|
prerelease: false
|
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
149
|
requirements:
|
|
122
150
|
- - ">="
|
|
123
151
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '
|
|
152
|
+
version: '3.8'
|
|
125
153
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
154
|
+
name: rubocop
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - '='
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: 0.58.1
|
|
160
|
+
type: :development
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - '='
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: 0.58.1
|
|
167
|
+
- !ruby/object:Gem::Dependency
|
|
168
|
+
name: rubocop-rspec
|
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - '='
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: 1.30.0
|
|
174
|
+
type: :development
|
|
175
|
+
prerelease: false
|
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - '='
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: 1.30.0
|
|
181
|
+
- !ruby/object:Gem::Dependency
|
|
182
|
+
name: rubycritic
|
|
127
183
|
requirement: !ruby/object:Gem::Requirement
|
|
128
184
|
requirements:
|
|
129
185
|
- - ">="
|
|
130
186
|
- !ruby/object:Gem::Version
|
|
131
|
-
version:
|
|
187
|
+
version: 4.0.2
|
|
132
188
|
type: :development
|
|
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:
|
|
194
|
+
version: 4.0.2
|
|
139
195
|
- !ruby/object:Gem::Dependency
|
|
140
196
|
name: simplecov
|
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
|
198
|
+
requirements:
|
|
199
|
+
- - "~>"
|
|
200
|
+
- !ruby/object:Gem::Version
|
|
201
|
+
version: 0.16.x
|
|
202
|
+
type: :development
|
|
203
|
+
prerelease: false
|
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
+
requirements:
|
|
206
|
+
- - "~>"
|
|
207
|
+
- !ruby/object:Gem::Version
|
|
208
|
+
version: 0.16.x
|
|
209
|
+
- !ruby/object:Gem::Dependency
|
|
210
|
+
name: yard
|
|
141
211
|
requirement: !ruby/object:Gem::Requirement
|
|
142
212
|
requirements:
|
|
143
213
|
- - ">="
|
|
144
214
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
215
|
+
version: 0.9.18
|
|
146
216
|
type: :development
|
|
147
217
|
prerelease: false
|
|
148
218
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
219
|
requirements:
|
|
150
220
|
- - ">="
|
|
151
221
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
222
|
+
version: 0.9.18
|
|
223
|
+
- !ruby/object:Gem::Dependency
|
|
224
|
+
name: yardstick
|
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
|
226
|
+
requirements:
|
|
227
|
+
- - ">="
|
|
228
|
+
- !ruby/object:Gem::Version
|
|
229
|
+
version: 0.9.9
|
|
230
|
+
type: :development
|
|
231
|
+
prerelease: false
|
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
233
|
+
requirements:
|
|
234
|
+
- - ">="
|
|
235
|
+
- !ruby/object:Gem::Version
|
|
236
|
+
version: 0.9.9
|
|
153
237
|
description: Gem for easy health check
|
|
154
238
|
email:
|
|
155
239
|
- darthjee@gmail.com
|
|
@@ -160,10 +244,16 @@ files:
|
|
|
160
244
|
- ".circleci/config.yml"
|
|
161
245
|
- ".gitignore"
|
|
162
246
|
- ".rspec"
|
|
247
|
+
- ".rubocop.yml"
|
|
248
|
+
- ".rubocop_todo.yml"
|
|
249
|
+
- Dockerfile
|
|
163
250
|
- Gemfile
|
|
164
251
|
- LICENSE
|
|
165
252
|
- README.md
|
|
166
253
|
- Rakefile
|
|
254
|
+
- config/rubycritc.rb
|
|
255
|
+
- config/yardstick.rb
|
|
256
|
+
- config/yardstick.yml
|
|
167
257
|
- docker-compose.yml
|
|
168
258
|
- lib/arstotzka/type_cast_ext.rb
|
|
169
259
|
- lib/mercy.rb
|
|
@@ -182,6 +272,8 @@ files:
|
|
|
182
272
|
- lib/mercy/version.rb
|
|
183
273
|
- mercy.gemspec
|
|
184
274
|
- mercy.jpg
|
|
275
|
+
- scripts/check_readme.sh
|
|
276
|
+
- scripts/rubycritic.sh
|
|
185
277
|
- spec/lib/arstotzka/type_cast_spec.rb
|
|
186
278
|
- spec/lib/mercy/period_parser_spec.rb
|
|
187
279
|
- spec/lib/mercy/report/error_spec.rb
|
|
@@ -209,7 +301,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
209
301
|
requirements:
|
|
210
302
|
- - ">="
|
|
211
303
|
- !ruby/object:Gem::Version
|
|
212
|
-
version:
|
|
304
|
+
version: 2.5.0
|
|
213
305
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
306
|
requirements:
|
|
215
307
|
- - ">="
|
|
@@ -217,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
217
309
|
version: '0'
|
|
218
310
|
requirements: []
|
|
219
311
|
rubyforge_project:
|
|
220
|
-
rubygems_version: 2.6
|
|
312
|
+
rubygems_version: 2.7.6
|
|
221
313
|
signing_key:
|
|
222
314
|
specification_version: 4
|
|
223
315
|
summary: Gem for easy health check
|