blockscore 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.hound.yml +334 -36
- data/.rspec +2 -3
- data/.rubocop.yml +515 -0
- data/.rubocop_todo.yml +55 -0
- data/Gemfile +8 -0
- data/README.md +10 -4
- data/Rakefile +5 -5
- data/circleci.sh +2 -2
- data/example.env +2 -0
- data/lib/blockscore/base.rb +2 -2
- data/lib/blockscore/question_set.rb +2 -1
- data/lib/blockscore/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95aa4ac3b2b8c25d456377f4066a5fa90f34fbb2
|
4
|
+
data.tar.gz: daf03b7e723348d224713044b731c885103c29e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c84aaa771f0b1d3a61808e417390c68fcb8af776c10d390c02ab4c0f598de49b946a285a7347754ad9c8478bd0fb4707eef54881834ec0cabf7b560e19debf1
|
7
|
+
data.tar.gz: 08c7702ed385e4717f384ac393d552d7efb2234e5670cc94e7729e64a98bdc935bb9e6066f926ad40df9ac63cdb609bdd0747fbb8aa13577621f7b41659dae00
|
data/.gitignore
CHANGED
data/.hound.yml
CHANGED
@@ -1,27 +1,20 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
require: rubocop-rspec
|
1
3
|
AllCops:
|
2
4
|
Include:
|
3
5
|
- "**/*.rake"
|
4
6
|
- "**/Gemfile"
|
5
7
|
- "**/Rakefile"
|
6
|
-
Exclude:
|
7
|
-
- "vendor/**/*"
|
8
|
-
- "db/**/*"
|
9
8
|
DisplayCopNames: true
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
Enabled: true
|
14
|
-
EnforcedStyle: ruby19
|
15
|
-
SupportedStyles:
|
16
|
-
- ruby19
|
17
|
-
- hash_rockets
|
18
|
-
TrailingWhitespace:
|
9
|
+
Style/Documentation:
|
10
|
+
Enabled: false
|
11
|
+
Style/TrailingWhitespace:
|
19
12
|
Enabled: false
|
20
13
|
Style/TrailingBlankLines:
|
21
14
|
Enabled: false
|
22
15
|
Style/ExtraSpacing:
|
23
16
|
Enabled: false
|
24
|
-
StringLiterals:
|
17
|
+
Style/StringLiterals:
|
25
18
|
EnforcedStyle: single_quotes
|
26
19
|
Metrics/LineLength:
|
27
20
|
Max: 100
|
@@ -77,7 +70,6 @@ Style/RegexpLiteral:
|
|
77
70
|
'/' character.
|
78
71
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
79
72
|
Enabled: true
|
80
|
-
MaxSlashes: 1
|
81
73
|
Style/SignalException:
|
82
74
|
Description: Checks for proper usage of fail and raise.
|
83
75
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
@@ -94,23 +86,23 @@ Style/TrivialAccessors:
|
|
94
86
|
AllowDSLWriters: false
|
95
87
|
IgnoreClassMethods: false
|
96
88
|
Whitelist:
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
89
|
+
- to_ary
|
90
|
+
- to_a
|
91
|
+
- to_c
|
92
|
+
- to_enum
|
93
|
+
- to_h
|
94
|
+
- to_hash
|
95
|
+
- to_i
|
96
|
+
- to_int
|
97
|
+
- to_io
|
98
|
+
- to_open
|
99
|
+
- to_path
|
100
|
+
- to_proc
|
101
|
+
- to_r
|
102
|
+
- to_regexp
|
103
|
+
- to_str
|
104
|
+
- to_s
|
105
|
+
- to_sym
|
114
106
|
Style/WordArray:
|
115
107
|
Description: Use %w or %W for arrays of words.
|
116
108
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
@@ -149,9 +141,6 @@ Style/DeprecatedHashMethods:
|
|
149
141
|
Description: Checks for use of deprecated Hash methods.
|
150
142
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
151
143
|
Enabled: true
|
152
|
-
Style/Documentation:
|
153
|
-
Description: Document classes and non-namespace modules.
|
154
|
-
Enabled: true
|
155
144
|
Style/DoubleNegation:
|
156
145
|
Description: Checks for uses of double negation (!!).
|
157
146
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
@@ -211,7 +200,316 @@ Lint/UnderscorePrefixedVariableName:
|
|
211
200
|
Style/MultilineOperationIndentation:
|
212
201
|
Description: Checks indentation of binary operations that span more than one line.
|
213
202
|
Enabled: true
|
214
|
-
EnforcedStyle:
|
203
|
+
EnforcedStyle: indented
|
215
204
|
SupportedStyles:
|
216
205
|
- aligned
|
217
|
-
- indented
|
206
|
+
- indented
|
207
|
+
Style/AccessModifierIndentation:
|
208
|
+
EnforcedStyle: indent
|
209
|
+
SupportedStyles:
|
210
|
+
- outdent
|
211
|
+
- indent
|
212
|
+
Style/AlignHash:
|
213
|
+
EnforcedHashRocketStyle: key
|
214
|
+
EnforcedColonStyle: key
|
215
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
216
|
+
SupportedLastArgumentHashStyles:
|
217
|
+
- always_inspect
|
218
|
+
- always_ignore
|
219
|
+
- ignore_implicit
|
220
|
+
- ignore_explicit
|
221
|
+
Style/AlignParameters:
|
222
|
+
EnforcedStyle: with_first_parameter
|
223
|
+
SupportedStyles:
|
224
|
+
- with_first_parameter
|
225
|
+
- with_fixed_indentation
|
226
|
+
Style/AndOr:
|
227
|
+
EnforcedStyle: always
|
228
|
+
SupportedStyles:
|
229
|
+
- always
|
230
|
+
- conditionals
|
231
|
+
Style/BarePercentLiterals:
|
232
|
+
EnforcedStyle: bare_percent
|
233
|
+
SupportedStyles:
|
234
|
+
- percent_q
|
235
|
+
- bare_percent
|
236
|
+
Style/BlockDelimiters:
|
237
|
+
EnforcedStyle: line_count_based
|
238
|
+
SupportedStyles:
|
239
|
+
- line_count_based
|
240
|
+
- semantic
|
241
|
+
ProceduralMethods:
|
242
|
+
- benchmark
|
243
|
+
- bm
|
244
|
+
- bmbm
|
245
|
+
- create
|
246
|
+
- each_with_object
|
247
|
+
- measure
|
248
|
+
- new
|
249
|
+
- realtime
|
250
|
+
- tap
|
251
|
+
- with_object
|
252
|
+
FunctionalMethods:
|
253
|
+
- let
|
254
|
+
- let!
|
255
|
+
- subject
|
256
|
+
- watch
|
257
|
+
IgnoredMethods:
|
258
|
+
- lambda
|
259
|
+
- proc
|
260
|
+
- it
|
261
|
+
Style/BracesAroundHashParameters:
|
262
|
+
EnforcedStyle: no_braces
|
263
|
+
SupportedStyles:
|
264
|
+
- braces
|
265
|
+
- no_braces
|
266
|
+
- context_dependent
|
267
|
+
Style/CaseIndentation:
|
268
|
+
IndentWhenRelativeTo: case
|
269
|
+
SupportedStyles:
|
270
|
+
- case
|
271
|
+
- end
|
272
|
+
IndentOneStep: false
|
273
|
+
Style/ClassAndModuleChildren:
|
274
|
+
EnforcedStyle: nested
|
275
|
+
SupportedStyles:
|
276
|
+
- nested
|
277
|
+
- compact
|
278
|
+
Style/ClassCheck:
|
279
|
+
EnforcedStyle: is_a?
|
280
|
+
SupportedStyles:
|
281
|
+
- is_a?
|
282
|
+
- kind_of?
|
283
|
+
Style/CollectionMethods:
|
284
|
+
PreferredMethods:
|
285
|
+
collect: map
|
286
|
+
collect!: map!
|
287
|
+
inject: reduce
|
288
|
+
detect: find
|
289
|
+
find_all: select
|
290
|
+
Style/CommandLiteral:
|
291
|
+
EnforcedStyle: backticks
|
292
|
+
SupportedStyles:
|
293
|
+
- backticks
|
294
|
+
- percent_x
|
295
|
+
- mixed
|
296
|
+
AllowInnerBackticks: false
|
297
|
+
Style/Copyright:
|
298
|
+
Notice: "^Copyright (\\(c\\) )?2[0-9]{3} .+"
|
299
|
+
AutocorrectNotice: ''
|
300
|
+
Style/EmptyElse:
|
301
|
+
EnforcedStyle: both
|
302
|
+
SupportedStyles:
|
303
|
+
- empty
|
304
|
+
- nil
|
305
|
+
- both
|
306
|
+
Style/EmptyLineBetweenDefs:
|
307
|
+
AllowAdjacentOneLineDefs: false
|
308
|
+
Style/EmptyLinesAroundBlockBody:
|
309
|
+
EnforcedStyle: no_empty_lines
|
310
|
+
SupportedStyles:
|
311
|
+
- empty_lines
|
312
|
+
- no_empty_lines
|
313
|
+
Style/EmptyLinesAroundClassBody:
|
314
|
+
EnforcedStyle: no_empty_lines
|
315
|
+
SupportedStyles:
|
316
|
+
- empty_lines
|
317
|
+
- no_empty_lines
|
318
|
+
Style/EmptyLinesAroundModuleBody:
|
319
|
+
EnforcedStyle: no_empty_lines
|
320
|
+
SupportedStyles:
|
321
|
+
- empty_lines
|
322
|
+
- no_empty_lines
|
323
|
+
Style/Encoding:
|
324
|
+
EnforcedStyle: always
|
325
|
+
SupportedStyles:
|
326
|
+
- when_needed
|
327
|
+
- always
|
328
|
+
AutoCorrectEncodingComment: "# encoding: utf-8"
|
329
|
+
Style/FirstParameterIndentation:
|
330
|
+
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
331
|
+
SupportedStyles:
|
332
|
+
- consistent
|
333
|
+
- special_for_inner_method_call
|
334
|
+
- special_for_inner_method_call_in_parentheses
|
335
|
+
Style/For:
|
336
|
+
EnforcedStyle: each
|
337
|
+
SupportedStyles:
|
338
|
+
- for
|
339
|
+
- each
|
340
|
+
Style/FormatString:
|
341
|
+
EnforcedStyle: format
|
342
|
+
SupportedStyles:
|
343
|
+
- format
|
344
|
+
- sprintf
|
345
|
+
- percent
|
346
|
+
Style/GuardClause:
|
347
|
+
MinBodyLength: 1
|
348
|
+
Style/HashSyntax:
|
349
|
+
EnforcedStyle: ruby19
|
350
|
+
SupportedStyles:
|
351
|
+
- ruby19
|
352
|
+
- ruby19_no_mixed_keys
|
353
|
+
- hash_rockets
|
354
|
+
UseHashRocketsWithSymbolValues: false
|
355
|
+
Style/IndentationConsistency:
|
356
|
+
EnforcedStyle: normal
|
357
|
+
SupportedStyles:
|
358
|
+
- normal
|
359
|
+
- rails
|
360
|
+
Style/IndentationWidth:
|
361
|
+
Width: 2
|
362
|
+
Style/IndentHash:
|
363
|
+
EnforcedStyle: special_inside_parentheses
|
364
|
+
SupportedStyles:
|
365
|
+
- special_inside_parentheses
|
366
|
+
- consistent
|
367
|
+
Style/LambdaCall:
|
368
|
+
EnforcedStyle: call
|
369
|
+
SupportedStyles:
|
370
|
+
- call
|
371
|
+
- braces
|
372
|
+
Style/NonNilCheck:
|
373
|
+
IncludeSemanticChanges: false
|
374
|
+
Style/MethodDefParentheses:
|
375
|
+
EnforcedStyle: require_parentheses
|
376
|
+
SupportedStyles:
|
377
|
+
- require_parentheses
|
378
|
+
- require_no_parentheses
|
379
|
+
Style/MethodName:
|
380
|
+
EnforcedStyle: snake_case
|
381
|
+
SupportedStyles:
|
382
|
+
- snake_case
|
383
|
+
- camelCase
|
384
|
+
Style/OptionHash:
|
385
|
+
SuspiciousParamNames:
|
386
|
+
- options
|
387
|
+
- opts
|
388
|
+
- args
|
389
|
+
- params
|
390
|
+
- parameters
|
391
|
+
Style/ParenthesesAroundCondition:
|
392
|
+
AllowSafeAssignment: true
|
393
|
+
Style/PercentQLiterals:
|
394
|
+
EnforcedStyle: lower_case_q
|
395
|
+
SupportedStyles:
|
396
|
+
- lower_case_q
|
397
|
+
- upper_case_q
|
398
|
+
Style/PredicateName:
|
399
|
+
NamePrefix:
|
400
|
+
- is_
|
401
|
+
- has_
|
402
|
+
- have_
|
403
|
+
NamePrefixBlacklist:
|
404
|
+
- is_
|
405
|
+
- has_
|
406
|
+
- have_
|
407
|
+
Style/RaiseArgs:
|
408
|
+
EnforcedStyle: exploded
|
409
|
+
SupportedStyles:
|
410
|
+
- compact
|
411
|
+
- exploded
|
412
|
+
Style/RedundantReturn:
|
413
|
+
AllowMultipleReturnValues: false
|
414
|
+
Style/Semicolon:
|
415
|
+
AllowAsExpressionSeparator: false
|
416
|
+
Style/SingleLineBlockParams:
|
417
|
+
Methods:
|
418
|
+
- reduce:
|
419
|
+
- a
|
420
|
+
- e
|
421
|
+
- inject:
|
422
|
+
- a
|
423
|
+
- e
|
424
|
+
Style/StringLiteralsInInterpolation:
|
425
|
+
EnforcedStyle: single_quotes
|
426
|
+
SupportedStyles:
|
427
|
+
- single_quotes
|
428
|
+
- double_quotes
|
429
|
+
Style/StringMethods:
|
430
|
+
PreferredMethods:
|
431
|
+
intern: to_sym
|
432
|
+
Style/SpaceAroundBlockParameters:
|
433
|
+
EnforcedStyleInsidePipes: no_space
|
434
|
+
SupportedStyles:
|
435
|
+
- space
|
436
|
+
- no_space
|
437
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
438
|
+
EnforcedStyle: space
|
439
|
+
SupportedStyles:
|
440
|
+
- space
|
441
|
+
- no_space
|
442
|
+
Style/SpaceAroundOperators:
|
443
|
+
MultiSpaceAllowedForOperators:
|
444
|
+
- "="
|
445
|
+
- "=>"
|
446
|
+
Style/SpaceBeforeBlockBraces:
|
447
|
+
EnforcedStyle: space
|
448
|
+
SupportedStyles:
|
449
|
+
- space
|
450
|
+
- no_space
|
451
|
+
Style/SpaceInsideBlockBraces:
|
452
|
+
EnforcedStyle: space
|
453
|
+
SupportedStyles:
|
454
|
+
- space
|
455
|
+
- no_space
|
456
|
+
EnforcedStyleForEmptyBraces: no_space
|
457
|
+
SpaceBeforeBlockParameters: true
|
458
|
+
Style/SpaceInsideHashLiteralBraces:
|
459
|
+
EnforcedStyle: space
|
460
|
+
EnforcedStyleForEmptyBraces: no_space
|
461
|
+
SupportedStyles:
|
462
|
+
- space
|
463
|
+
- no_space
|
464
|
+
Style/SpaceInsideStringInterpolation:
|
465
|
+
EnforcedStyle: no_space
|
466
|
+
SupportedStyles:
|
467
|
+
- space
|
468
|
+
- no_space
|
469
|
+
Style/SymbolProc:
|
470
|
+
IgnoredMethods:
|
471
|
+
- respond_to
|
472
|
+
Style/TrailingComma:
|
473
|
+
EnforcedStyleForMultiline: no_comma
|
474
|
+
SupportedStyles:
|
475
|
+
- comma
|
476
|
+
- consistent_comma
|
477
|
+
- no_comma
|
478
|
+
Style/VariableName:
|
479
|
+
EnforcedStyle: snake_case
|
480
|
+
SupportedStyles:
|
481
|
+
- snake_case
|
482
|
+
- camelCase
|
483
|
+
Style/WhileUntilModifier:
|
484
|
+
MaxLineLength: 80
|
485
|
+
Metrics/AbcSize:
|
486
|
+
Max: 15
|
487
|
+
Metrics/BlockNesting:
|
488
|
+
Max: 3
|
489
|
+
Metrics/ModuleLength:
|
490
|
+
CountComments: false
|
491
|
+
Max: 100
|
492
|
+
Metrics/CyclomaticComplexity:
|
493
|
+
Max: 6
|
494
|
+
Metrics/MethodLength:
|
495
|
+
CountComments: false
|
496
|
+
Max: 10
|
497
|
+
Metrics/ParameterLists:
|
498
|
+
Max: 5
|
499
|
+
CountKeywordArgs: true
|
500
|
+
Metrics/PerceivedComplexity:
|
501
|
+
Max: 7
|
502
|
+
Lint/AssignmentInCondition:
|
503
|
+
AllowSafeAssignment: true
|
504
|
+
Lint/EndAlignment:
|
505
|
+
AlignWith: keyword
|
506
|
+
SupportedStyles:
|
507
|
+
- keyword
|
508
|
+
- variable
|
509
|
+
AutoCorrect: false
|
510
|
+
Lint/DefEndAlignment:
|
511
|
+
AlignWith: start_of_line
|
512
|
+
SupportedStyles:
|
513
|
+
- start_of_line
|
514
|
+
- def
|
515
|
+
AutoCorrect: false
|
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,515 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
require: rubocop-rspec
|
3
|
+
AllCops:
|
4
|
+
Include:
|
5
|
+
- "**/*.rake"
|
6
|
+
- "**/Gemfile"
|
7
|
+
- "**/Rakefile"
|
8
|
+
DisplayCopNames: true
|
9
|
+
Style/Documentation:
|
10
|
+
Enabled: false
|
11
|
+
Style/TrailingWhitespace:
|
12
|
+
Enabled: false
|
13
|
+
Style/TrailingBlankLines:
|
14
|
+
Enabled: false
|
15
|
+
Style/ExtraSpacing:
|
16
|
+
Enabled: false
|
17
|
+
Style/StringLiterals:
|
18
|
+
EnforcedStyle: single_quotes
|
19
|
+
Metrics/LineLength:
|
20
|
+
Max: 100
|
21
|
+
Style/DotPosition:
|
22
|
+
EnforcedStyle: leading
|
23
|
+
Style/CommentAnnotation:
|
24
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
25
|
+
REVIEW).
|
26
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
27
|
+
Enabled: true
|
28
|
+
Rails/Delegate:
|
29
|
+
Description: Prefer delegate method for delegations.
|
30
|
+
Enabled: true
|
31
|
+
Style/FileName:
|
32
|
+
Enabled: true
|
33
|
+
Style/GlobalVars:
|
34
|
+
Enabled: true
|
35
|
+
Style/IfUnlessModifier:
|
36
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
37
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
38
|
+
Enabled: true
|
39
|
+
MaxLineLength: 100
|
40
|
+
Style/Next:
|
41
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
42
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
43
|
+
Enabled: true
|
44
|
+
EnforcedStyle: always
|
45
|
+
SupportedStyles:
|
46
|
+
- skip_modifier_ifs
|
47
|
+
- always
|
48
|
+
Style/NumericLiterals:
|
49
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
50
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
51
|
+
Enabled: true
|
52
|
+
MinDigits: 5
|
53
|
+
Style/PercentLiteralDelimiters:
|
54
|
+
Description: Use `%`-literal delimiters consistently
|
55
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
56
|
+
Enabled: true
|
57
|
+
PreferredDelimiters:
|
58
|
+
"%": "()"
|
59
|
+
"%i": "()"
|
60
|
+
"%q": "()"
|
61
|
+
"%Q": "()"
|
62
|
+
"%r": "()"
|
63
|
+
"%s": "()"
|
64
|
+
"%w": "()"
|
65
|
+
"%W": "()"
|
66
|
+
"%x": "()"
|
67
|
+
Style/RegexpLiteral:
|
68
|
+
Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
|
69
|
+
characters. Use %r only for regular expressions matching more than `MaxSlashes`
|
70
|
+
'/' character.
|
71
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
72
|
+
Enabled: true
|
73
|
+
Style/SignalException:
|
74
|
+
Description: Checks for proper usage of fail and raise.
|
75
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
76
|
+
Enabled: true
|
77
|
+
Style/SingleLineMethods:
|
78
|
+
Description: Avoid single-line methods.
|
79
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
80
|
+
Enabled: true
|
81
|
+
AllowIfMethodIsEmpty: true
|
82
|
+
Style/TrivialAccessors:
|
83
|
+
Enabled: true
|
84
|
+
ExactNameMatch: false
|
85
|
+
AllowPredicates: false
|
86
|
+
AllowDSLWriters: false
|
87
|
+
IgnoreClassMethods: false
|
88
|
+
Whitelist:
|
89
|
+
- to_ary
|
90
|
+
- to_a
|
91
|
+
- to_c
|
92
|
+
- to_enum
|
93
|
+
- to_h
|
94
|
+
- to_hash
|
95
|
+
- to_i
|
96
|
+
- to_int
|
97
|
+
- to_io
|
98
|
+
- to_open
|
99
|
+
- to_path
|
100
|
+
- to_proc
|
101
|
+
- to_r
|
102
|
+
- to_regexp
|
103
|
+
- to_str
|
104
|
+
- to_s
|
105
|
+
- to_sym
|
106
|
+
Style/WordArray:
|
107
|
+
Description: Use %w or %W for arrays of words.
|
108
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
109
|
+
Enabled: true
|
110
|
+
MinSize: 0
|
111
|
+
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
112
|
+
Metrics/ClassLength:
|
113
|
+
Description: Avoid classes longer than 250 lines of code.
|
114
|
+
Enabled: true
|
115
|
+
CountComments: false
|
116
|
+
Max: 250
|
117
|
+
Style/MethodCalledOnDoEndBlock:
|
118
|
+
Description: Avoid chaining a method call on a do...end block.
|
119
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
120
|
+
Enabled: true
|
121
|
+
Style/SymbolArray:
|
122
|
+
Description: Use %i or %I for arrays of symbols.
|
123
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
124
|
+
Enabled: true
|
125
|
+
Style/AccessorMethodName:
|
126
|
+
Description: Check the naming of accessor methods for get_/set_.
|
127
|
+
Enabled: true
|
128
|
+
Style/CharacterLiteral:
|
129
|
+
Description: Checks for uses of character literals.
|
130
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
131
|
+
Enabled: true
|
132
|
+
Style/ClassVars:
|
133
|
+
Description: Avoid the use of class variables.
|
134
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
135
|
+
Enabled: true
|
136
|
+
Style/ColonMethodCall:
|
137
|
+
Description: 'Do not use :: for method call.'
|
138
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
139
|
+
Enabled: true
|
140
|
+
Style/DeprecatedHashMethods:
|
141
|
+
Description: Checks for use of deprecated Hash methods.
|
142
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
143
|
+
Enabled: true
|
144
|
+
Style/DoubleNegation:
|
145
|
+
Description: Checks for uses of double negation (!!).
|
146
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
147
|
+
Enabled: true
|
148
|
+
Style/EachWithObject:
|
149
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
150
|
+
Enabled: true
|
151
|
+
Style/EmptyLiteral:
|
152
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
153
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
154
|
+
Enabled: true
|
155
|
+
Style/IfWithSemicolon:
|
156
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
157
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
158
|
+
Enabled: true
|
159
|
+
Style/Lambda:
|
160
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
161
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
162
|
+
Enabled: true
|
163
|
+
Style/LineEndConcatenation:
|
164
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
165
|
+
end.
|
166
|
+
Enabled: true
|
167
|
+
Style/ModuleFunction:
|
168
|
+
Description: Checks for usage of `extend self` in modules.
|
169
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
170
|
+
Enabled: true
|
171
|
+
Style/NegatedIf:
|
172
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
173
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
174
|
+
Enabled: true
|
175
|
+
Style/NegatedWhile:
|
176
|
+
Description: Favor until over while for negative conditions.
|
177
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
178
|
+
Enabled: true
|
179
|
+
Style/NilComparison:
|
180
|
+
Description: Prefer x.nil? to x == nil.
|
181
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
182
|
+
Enabled: true
|
183
|
+
Style/SelfAssignment:
|
184
|
+
Description: Checks for places where self-assignment shorthand should have been
|
185
|
+
used.
|
186
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
187
|
+
Enabled: true
|
188
|
+
Style/StructInheritance:
|
189
|
+
Description: Checks for inheritance from Struct.new.
|
190
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
191
|
+
Enabled: true
|
192
|
+
Style/VariableInterpolation:
|
193
|
+
Description: Don't interpolate global, instance and class variables directly in
|
194
|
+
strings.
|
195
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
196
|
+
Enabled: true
|
197
|
+
Lint/UnderscorePrefixedVariableName:
|
198
|
+
Description: Do not use prefix `_` for a variable that is used.
|
199
|
+
Enabled: true
|
200
|
+
Style/MultilineOperationIndentation:
|
201
|
+
Description: Checks indentation of binary operations that span more than one line.
|
202
|
+
Enabled: true
|
203
|
+
EnforcedStyle: indented
|
204
|
+
SupportedStyles:
|
205
|
+
- aligned
|
206
|
+
- indented
|
207
|
+
Style/AccessModifierIndentation:
|
208
|
+
EnforcedStyle: indent
|
209
|
+
SupportedStyles:
|
210
|
+
- outdent
|
211
|
+
- indent
|
212
|
+
Style/AlignHash:
|
213
|
+
EnforcedHashRocketStyle: key
|
214
|
+
EnforcedColonStyle: key
|
215
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
216
|
+
SupportedLastArgumentHashStyles:
|
217
|
+
- always_inspect
|
218
|
+
- always_ignore
|
219
|
+
- ignore_implicit
|
220
|
+
- ignore_explicit
|
221
|
+
Style/AlignParameters:
|
222
|
+
EnforcedStyle: with_first_parameter
|
223
|
+
SupportedStyles:
|
224
|
+
- with_first_parameter
|
225
|
+
- with_fixed_indentation
|
226
|
+
Style/AndOr:
|
227
|
+
EnforcedStyle: always
|
228
|
+
SupportedStyles:
|
229
|
+
- always
|
230
|
+
- conditionals
|
231
|
+
Style/BarePercentLiterals:
|
232
|
+
EnforcedStyle: bare_percent
|
233
|
+
SupportedStyles:
|
234
|
+
- percent_q
|
235
|
+
- bare_percent
|
236
|
+
Style/BlockDelimiters:
|
237
|
+
EnforcedStyle: line_count_based
|
238
|
+
SupportedStyles:
|
239
|
+
- line_count_based
|
240
|
+
- semantic
|
241
|
+
ProceduralMethods:
|
242
|
+
- benchmark
|
243
|
+
- bm
|
244
|
+
- bmbm
|
245
|
+
- create
|
246
|
+
- each_with_object
|
247
|
+
- measure
|
248
|
+
- new
|
249
|
+
- realtime
|
250
|
+
- tap
|
251
|
+
- with_object
|
252
|
+
FunctionalMethods:
|
253
|
+
- let
|
254
|
+
- let!
|
255
|
+
- subject
|
256
|
+
- watch
|
257
|
+
IgnoredMethods:
|
258
|
+
- lambda
|
259
|
+
- proc
|
260
|
+
- it
|
261
|
+
Style/BracesAroundHashParameters:
|
262
|
+
EnforcedStyle: no_braces
|
263
|
+
SupportedStyles:
|
264
|
+
- braces
|
265
|
+
- no_braces
|
266
|
+
- context_dependent
|
267
|
+
Style/CaseIndentation:
|
268
|
+
IndentWhenRelativeTo: case
|
269
|
+
SupportedStyles:
|
270
|
+
- case
|
271
|
+
- end
|
272
|
+
IndentOneStep: false
|
273
|
+
Style/ClassAndModuleChildren:
|
274
|
+
EnforcedStyle: nested
|
275
|
+
SupportedStyles:
|
276
|
+
- nested
|
277
|
+
- compact
|
278
|
+
Style/ClassCheck:
|
279
|
+
EnforcedStyle: is_a?
|
280
|
+
SupportedStyles:
|
281
|
+
- is_a?
|
282
|
+
- kind_of?
|
283
|
+
Style/CollectionMethods:
|
284
|
+
PreferredMethods:
|
285
|
+
collect: map
|
286
|
+
collect!: map!
|
287
|
+
inject: reduce
|
288
|
+
detect: find
|
289
|
+
find_all: select
|
290
|
+
Style/CommandLiteral:
|
291
|
+
EnforcedStyle: backticks
|
292
|
+
SupportedStyles:
|
293
|
+
- backticks
|
294
|
+
- percent_x
|
295
|
+
- mixed
|
296
|
+
AllowInnerBackticks: false
|
297
|
+
Style/Copyright:
|
298
|
+
Notice: "^Copyright (\\(c\\) )?2[0-9]{3} .+"
|
299
|
+
AutocorrectNotice: ''
|
300
|
+
Style/EmptyElse:
|
301
|
+
EnforcedStyle: both
|
302
|
+
SupportedStyles:
|
303
|
+
- empty
|
304
|
+
- nil
|
305
|
+
- both
|
306
|
+
Style/EmptyLineBetweenDefs:
|
307
|
+
AllowAdjacentOneLineDefs: false
|
308
|
+
Style/EmptyLinesAroundBlockBody:
|
309
|
+
EnforcedStyle: no_empty_lines
|
310
|
+
SupportedStyles:
|
311
|
+
- empty_lines
|
312
|
+
- no_empty_lines
|
313
|
+
Style/EmptyLinesAroundClassBody:
|
314
|
+
EnforcedStyle: no_empty_lines
|
315
|
+
SupportedStyles:
|
316
|
+
- empty_lines
|
317
|
+
- no_empty_lines
|
318
|
+
Style/EmptyLinesAroundModuleBody:
|
319
|
+
EnforcedStyle: no_empty_lines
|
320
|
+
SupportedStyles:
|
321
|
+
- empty_lines
|
322
|
+
- no_empty_lines
|
323
|
+
Style/Encoding:
|
324
|
+
EnforcedStyle: always
|
325
|
+
SupportedStyles:
|
326
|
+
- when_needed
|
327
|
+
- always
|
328
|
+
AutoCorrectEncodingComment: "# encoding: utf-8"
|
329
|
+
Style/FirstParameterIndentation:
|
330
|
+
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
331
|
+
SupportedStyles:
|
332
|
+
- consistent
|
333
|
+
- special_for_inner_method_call
|
334
|
+
- special_for_inner_method_call_in_parentheses
|
335
|
+
Style/For:
|
336
|
+
EnforcedStyle: each
|
337
|
+
SupportedStyles:
|
338
|
+
- for
|
339
|
+
- each
|
340
|
+
Style/FormatString:
|
341
|
+
EnforcedStyle: format
|
342
|
+
SupportedStyles:
|
343
|
+
- format
|
344
|
+
- sprintf
|
345
|
+
- percent
|
346
|
+
Style/GuardClause:
|
347
|
+
MinBodyLength: 1
|
348
|
+
Style/HashSyntax:
|
349
|
+
EnforcedStyle: ruby19
|
350
|
+
SupportedStyles:
|
351
|
+
- ruby19
|
352
|
+
- ruby19_no_mixed_keys
|
353
|
+
- hash_rockets
|
354
|
+
UseHashRocketsWithSymbolValues: false
|
355
|
+
Style/IndentationConsistency:
|
356
|
+
EnforcedStyle: normal
|
357
|
+
SupportedStyles:
|
358
|
+
- normal
|
359
|
+
- rails
|
360
|
+
Style/IndentationWidth:
|
361
|
+
Width: 2
|
362
|
+
Style/IndentHash:
|
363
|
+
EnforcedStyle: special_inside_parentheses
|
364
|
+
SupportedStyles:
|
365
|
+
- special_inside_parentheses
|
366
|
+
- consistent
|
367
|
+
Style/LambdaCall:
|
368
|
+
EnforcedStyle: call
|
369
|
+
SupportedStyles:
|
370
|
+
- call
|
371
|
+
- braces
|
372
|
+
Style/NonNilCheck:
|
373
|
+
IncludeSemanticChanges: false
|
374
|
+
Style/MethodDefParentheses:
|
375
|
+
EnforcedStyle: require_parentheses
|
376
|
+
SupportedStyles:
|
377
|
+
- require_parentheses
|
378
|
+
- require_no_parentheses
|
379
|
+
Style/MethodName:
|
380
|
+
EnforcedStyle: snake_case
|
381
|
+
SupportedStyles:
|
382
|
+
- snake_case
|
383
|
+
- camelCase
|
384
|
+
Style/OptionHash:
|
385
|
+
SuspiciousParamNames:
|
386
|
+
- options
|
387
|
+
- opts
|
388
|
+
- args
|
389
|
+
- params
|
390
|
+
- parameters
|
391
|
+
Style/ParenthesesAroundCondition:
|
392
|
+
AllowSafeAssignment: true
|
393
|
+
Style/PercentQLiterals:
|
394
|
+
EnforcedStyle: lower_case_q
|
395
|
+
SupportedStyles:
|
396
|
+
- lower_case_q
|
397
|
+
- upper_case_q
|
398
|
+
Style/PredicateName:
|
399
|
+
NamePrefix:
|
400
|
+
- is_
|
401
|
+
- has_
|
402
|
+
- have_
|
403
|
+
NamePrefixBlacklist:
|
404
|
+
- is_
|
405
|
+
- has_
|
406
|
+
- have_
|
407
|
+
Style/RaiseArgs:
|
408
|
+
EnforcedStyle: exploded
|
409
|
+
SupportedStyles:
|
410
|
+
- compact
|
411
|
+
- exploded
|
412
|
+
Style/RedundantReturn:
|
413
|
+
AllowMultipleReturnValues: false
|
414
|
+
Style/Semicolon:
|
415
|
+
AllowAsExpressionSeparator: false
|
416
|
+
Style/SingleLineBlockParams:
|
417
|
+
Methods:
|
418
|
+
- reduce:
|
419
|
+
- a
|
420
|
+
- e
|
421
|
+
- inject:
|
422
|
+
- a
|
423
|
+
- e
|
424
|
+
Style/StringLiteralsInInterpolation:
|
425
|
+
EnforcedStyle: single_quotes
|
426
|
+
SupportedStyles:
|
427
|
+
- single_quotes
|
428
|
+
- double_quotes
|
429
|
+
Style/StringMethods:
|
430
|
+
PreferredMethods:
|
431
|
+
intern: to_sym
|
432
|
+
Style/SpaceAroundBlockParameters:
|
433
|
+
EnforcedStyleInsidePipes: no_space
|
434
|
+
SupportedStyles:
|
435
|
+
- space
|
436
|
+
- no_space
|
437
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
438
|
+
EnforcedStyle: space
|
439
|
+
SupportedStyles:
|
440
|
+
- space
|
441
|
+
- no_space
|
442
|
+
Style/SpaceAroundOperators:
|
443
|
+
MultiSpaceAllowedForOperators:
|
444
|
+
- "="
|
445
|
+
- "=>"
|
446
|
+
Style/SpaceBeforeBlockBraces:
|
447
|
+
EnforcedStyle: space
|
448
|
+
SupportedStyles:
|
449
|
+
- space
|
450
|
+
- no_space
|
451
|
+
Style/SpaceInsideBlockBraces:
|
452
|
+
EnforcedStyle: space
|
453
|
+
SupportedStyles:
|
454
|
+
- space
|
455
|
+
- no_space
|
456
|
+
EnforcedStyleForEmptyBraces: no_space
|
457
|
+
SpaceBeforeBlockParameters: true
|
458
|
+
Style/SpaceInsideHashLiteralBraces:
|
459
|
+
EnforcedStyle: space
|
460
|
+
EnforcedStyleForEmptyBraces: no_space
|
461
|
+
SupportedStyles:
|
462
|
+
- space
|
463
|
+
- no_space
|
464
|
+
Style/SpaceInsideStringInterpolation:
|
465
|
+
EnforcedStyle: no_space
|
466
|
+
SupportedStyles:
|
467
|
+
- space
|
468
|
+
- no_space
|
469
|
+
Style/SymbolProc:
|
470
|
+
IgnoredMethods:
|
471
|
+
- respond_to
|
472
|
+
Style/TrailingComma:
|
473
|
+
EnforcedStyleForMultiline: no_comma
|
474
|
+
SupportedStyles:
|
475
|
+
- comma
|
476
|
+
- consistent_comma
|
477
|
+
- no_comma
|
478
|
+
Style/VariableName:
|
479
|
+
EnforcedStyle: snake_case
|
480
|
+
SupportedStyles:
|
481
|
+
- snake_case
|
482
|
+
- camelCase
|
483
|
+
Style/WhileUntilModifier:
|
484
|
+
MaxLineLength: 80
|
485
|
+
Metrics/AbcSize:
|
486
|
+
Max: 15
|
487
|
+
Metrics/BlockNesting:
|
488
|
+
Max: 3
|
489
|
+
Metrics/ModuleLength:
|
490
|
+
CountComments: false
|
491
|
+
Max: 100
|
492
|
+
Metrics/CyclomaticComplexity:
|
493
|
+
Max: 6
|
494
|
+
Metrics/MethodLength:
|
495
|
+
CountComments: false
|
496
|
+
Max: 10
|
497
|
+
Metrics/ParameterLists:
|
498
|
+
Max: 5
|
499
|
+
CountKeywordArgs: true
|
500
|
+
Metrics/PerceivedComplexity:
|
501
|
+
Max: 7
|
502
|
+
Lint/AssignmentInCondition:
|
503
|
+
AllowSafeAssignment: true
|
504
|
+
Lint/EndAlignment:
|
505
|
+
AlignWith: keyword
|
506
|
+
SupportedStyles:
|
507
|
+
- keyword
|
508
|
+
- variable
|
509
|
+
AutoCorrect: false
|
510
|
+
Lint/DefEndAlignment:
|
511
|
+
AlignWith: start_of_line
|
512
|
+
SupportedStyles:
|
513
|
+
- start_of_line
|
514
|
+
- def
|
515
|
+
AutoCorrect: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2015-09-18 10:16:19 -0700 using RuboCop version 0.34.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: 2
|
10
|
+
Metrics/AbcSize:
|
11
|
+
Max: 21
|
12
|
+
|
13
|
+
# Offense count: 1
|
14
|
+
Metrics/CyclomaticComplexity:
|
15
|
+
Max: 9
|
16
|
+
|
17
|
+
# Offense count: 9
|
18
|
+
# Configuration parameters: AllowURI, URISchemes.
|
19
|
+
Metrics/LineLength:
|
20
|
+
Max: 125
|
21
|
+
|
22
|
+
# Offense count: 2
|
23
|
+
# Configuration parameters: CountComments.
|
24
|
+
Metrics/MethodLength:
|
25
|
+
Max: 18
|
26
|
+
|
27
|
+
# Offense count: 2
|
28
|
+
# Configuration parameters: CountComments.
|
29
|
+
Metrics/ModuleLength:
|
30
|
+
Max: 123
|
31
|
+
|
32
|
+
# Offense count: 1
|
33
|
+
Metrics/PerceivedComplexity:
|
34
|
+
Max: 10
|
35
|
+
|
36
|
+
# Offense count: 1
|
37
|
+
Style/EachWithObject:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/blockscore/util.rb'
|
40
|
+
|
41
|
+
# Offense count: 2
|
42
|
+
Style/ModuleFunction:
|
43
|
+
Exclude:
|
44
|
+
- 'lib/blockscore/response.rb'
|
45
|
+
- 'lib/blockscore/util.rb'
|
46
|
+
|
47
|
+
# Offense count: 4
|
48
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
49
|
+
Style/RaiseArgs:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
# Offense count: 1
|
53
|
+
Style/SymbolArray:
|
54
|
+
Exclude:
|
55
|
+
- 'lib/blockscore/actions/update.rb'
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# Blockscore-Ruby ![logo](https://d1vf4z01lc8cfc.cloudfront.net/assets/logo-footer-ee82ad3d16c743790d0bc4baa14c393a.png)
|
2
|
+
|
3
|
+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/BlockScore/blockscore-ruby/blob/master/LICENSE)
|
4
|
+
[![Circle CI](https://img.shields.io/circleci/project/BlockScore/blockscore-ruby/master.svg?style=flat-square)](https://circleci.com/gh/BlockScore/blockscore-ruby)
|
5
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/BlockScore/blockscore-ruby.svg?style=flat-square)](https://codeclimate.com/github/BlockScore/blockscore-ruby)
|
6
|
+
[![Test Coverage](https://img.shields.io/codeclimate/coverage/github/BlockScore/blockscore-ruby.svg?style=flat-square)](https://codeclimate.com/github/BlockScore/blockscore-ruby/coverage)
|
7
|
+
[![Dependency Status](https://img.shields.io/gemnasium/BlockScore/blockscore-ruby.svg?style=flat-square)](https://gemnasium.com/BlockScore/blockscore-ruby)
|
2
8
|
|
3
9
|
This is the official library for Ruby clients of the BlockScore API. [Click here to read the full documentation including code examples](http://docs.blockscore.com/ruby/).
|
4
10
|
|
@@ -13,7 +19,7 @@ gem install blockscore
|
|
13
19
|
If you are using Rails, add the following to your `Gemfile`:
|
14
20
|
|
15
21
|
```ruby
|
16
|
-
gem 'blockscore', '~> 4.2.
|
22
|
+
gem 'blockscore', '~> 4.2.1'
|
17
23
|
```
|
18
24
|
|
19
25
|
## Getting Started
|
@@ -57,8 +63,8 @@ To see the list of calls you can make, please visit our [full Ruby API reference
|
|
57
63
|
|
58
64
|
## Testing
|
59
65
|
|
60
|
-
|
66
|
+
In order to run the test suite:
|
61
67
|
|
62
68
|
```shell
|
63
|
-
$ rspec
|
69
|
+
$ rspec
|
64
70
|
```
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
Bundler.setup(:default, :development)
|
7
7
|
rescue Bundler::BundlerError => e
|
8
8
|
$stderr.puts e.message
|
9
|
-
$stderr.puts
|
9
|
+
$stderr.puts 'Run `bundle install` to install missing gems'
|
10
10
|
exit e.status_code
|
11
11
|
end
|
12
12
|
require 'rake'
|
@@ -21,17 +21,17 @@ Rake::TestTask.new(:test) do |test|
|
|
21
21
|
test.verbose = true
|
22
22
|
end
|
23
23
|
|
24
|
-
desc
|
24
|
+
desc 'Code coverage detail'
|
25
25
|
task :simplecov do
|
26
|
-
ENV['COVERAGE'] =
|
26
|
+
ENV['COVERAGE'] = 'true'
|
27
27
|
Rake::Task['test'].execute
|
28
28
|
end
|
29
29
|
|
30
|
-
task :
|
30
|
+
task default: :test
|
31
31
|
|
32
32
|
require 'rdoc/task'
|
33
33
|
Rake::RDocTask.new do |rdoc|
|
34
|
-
version = File.exist?('VERSION') ? File.read('VERSION') :
|
34
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ''
|
35
35
|
|
36
36
|
rdoc.rdoc_dir = 'rdoc'
|
37
37
|
rdoc.title = "blockscore #{version}"
|
data/circleci.sh
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/bin/bash
|
2
|
-
RUBY_VERSIONS=(
|
2
|
+
RUBY_VERSIONS=(2.0.0-p645 2.1.6 2.2.2)
|
3
3
|
CIRCLE_NODE_RUBY_VERSION="${RUBY_VERSIONS[$CIRCLE_NODE_INDEX]}"
|
4
4
|
|
5
5
|
if [[ "$1" = "build" ]]
|
@@ -8,4 +8,4 @@ then
|
|
8
8
|
elif [[ "$1" = "spec" ]]
|
9
9
|
then
|
10
10
|
rvm-exec $CIRCLE_NODE_RUBY_VERSION rspec;
|
11
|
-
fi
|
11
|
+
fi
|
data/example.env
ADDED
data/lib/blockscore/base.rb
CHANGED
@@ -29,7 +29,7 @@ module BlockScore
|
|
29
29
|
|
30
30
|
def inspect
|
31
31
|
str_attr = "JSON:#{JSON.pretty_generate(attributes)}"
|
32
|
-
"#<#{self.class}
|
32
|
+
"#<#{self.class}:#{format('%#016x', object_id << 1)} #{str_attr}>"
|
33
33
|
end
|
34
34
|
|
35
35
|
def refresh
|
@@ -69,7 +69,7 @@ module BlockScore
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def persisted?
|
72
|
-
!id.nil?
|
72
|
+
!id.nil? && !attributes[:deleted]
|
73
73
|
end
|
74
74
|
|
75
75
|
protected
|
data/lib/blockscore/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blockscore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alain Meier
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -165,6 +165,8 @@ files:
|
|
165
165
|
- ".gitignore"
|
166
166
|
- ".hound.yml"
|
167
167
|
- ".rspec"
|
168
|
+
- ".rubocop.yml"
|
169
|
+
- ".rubocop_todo.yml"
|
168
170
|
- Gemfile
|
169
171
|
- LICENSE
|
170
172
|
- README.md
|
@@ -172,6 +174,7 @@ files:
|
|
172
174
|
- blockscore.gemspec
|
173
175
|
- circle.yml
|
174
176
|
- circleci.sh
|
177
|
+
- example.env
|
175
178
|
- lib/blockscore.rb
|
176
179
|
- lib/blockscore/actions/all.rb
|
177
180
|
- lib/blockscore/actions/create.rb
|