ribose-cli 0.3.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ebd977c4f28de1dae19264d567d2dd317c14c368d235bfd944270af8cfc57d5
4
- data.tar.gz: 9f17d44a9fbb00c7d5f90dc76c93259def1f931071b5f2bcde3f35b78aa50154
3
+ metadata.gz: 6d20edf826efa0993691d8d238c54a5c1724915c00e6a6145cf8aca346702396
4
+ data.tar.gz: c3b7f67625909d48c1be2e5e4f577fdecf4f00072c956ae2aa5de6b75a35c4cc
5
5
  SHA512:
6
- metadata.gz: cd18ed72592777558fbd33c9607b82bc13bb8b4db143ea82f2d4d9578c45cda2ec757db43a032cfe6001b6bff3405108238cc918b3e3066b32d5b102c727af3a
7
- data.tar.gz: bca09acb44c4ff82ee6e14366f9551c766f58289a11bcfae3bb2f721f0c59668250734bd27ef98896e372a99ddb5379b0cc645a2b7cfeee3ab1c5f133409c7db
6
+ metadata.gz: fb1d7e8dd588fe3af36ea8887c3a9f9dd963341d3b3efaef38129051c2bfa5b0ed6e5c693ff415cebc7f5e53549fd00737a06fda42605f3f3cbc1abcd8f8eb9c
7
+ data.tar.gz: 29ffd854ca97ed29265ee7fc01fedc3069f4705329e59b7b9a693b74aeca4e78859b90a5c176e5ff01c62bf5d14c0cf131c00cf0e69d4612737b692a2ceffb69
@@ -0,0 +1,27 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ tags: [ v* ]
7
+ pull_request:
8
+
9
+ jobs:
10
+ test:
11
+ name: RSpec
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby: ['2.5', '2.6', '2.7', '3.0' ]
17
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ bundler-cache: true
26
+
27
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ .rubocop-https-*
data/.rubocop.yml CHANGED
@@ -1,645 +1,10 @@
1
- AllCops:
2
- Include:
3
- - "**/*.rake"
4
- - "**/Gemfile"
5
- - "**/Rakefile"
6
-
7
- Exclude:
8
- - db/schema.rb
9
-
10
- Naming/AccessorMethodName:
11
- Description: Check the naming of accessor methods for get_/set_.
12
- Enabled: false
13
-
14
- Style/Alias:
15
- Description: 'Use alias_method instead of alias.'
16
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
17
- Enabled: false
18
-
19
- Style/ArrayJoin:
20
- Description: 'Use Array#join instead of Array#*.'
21
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
22
- Enabled: false
23
-
24
- Style/AsciiComments:
25
- Description: 'Use only ascii symbols in comments.'
26
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
27
- Enabled: false
28
-
29
- Naming/AsciiIdentifiers:
30
- Description: 'Use only ascii symbols in identifiers.'
31
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
32
- Enabled: false
33
-
34
- Style/Attr:
35
- Description: 'Checks for uses of Module#attr.'
36
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
37
- Enabled: false
38
-
39
- Metrics/BlockNesting:
40
- Description: 'Avoid excessive block nesting'
41
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
42
- Enabled: false
43
-
44
- Style/CaseEquality:
45
- Description: 'Avoid explicit use of the case equality operator(===).'
46
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
47
- Enabled: false
48
-
49
- Style/CharacterLiteral:
50
- Description: 'Checks for uses of character literals.'
51
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
52
- Enabled: false
53
-
54
- Style/ClassAndModuleChildren:
55
- Description: 'Checks style of children classes and modules.'
56
- Enabled: true
57
- EnforcedStyle: nested
58
-
59
- Metrics/ClassLength:
60
- Description: 'Avoid classes longer than 100 lines of code.'
61
- Enabled: false
62
-
63
- Metrics/ModuleLength:
64
- Description: 'Avoid modules longer than 100 lines of code.'
65
- Enabled: false
66
-
67
- Style/ClassVars:
68
- Description: 'Avoid the use of class variables.'
69
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
70
- Enabled: false
71
-
72
- Style/CollectionMethods:
73
- Enabled: true
74
- PreferredMethods:
75
- find: detect
76
- inject: reduce
77
- collect: map
78
- find_all: select
79
-
80
- Style/ColonMethodCall:
81
- Description: 'Do not use :: for method call.'
82
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
83
- Enabled: false
84
-
85
- Style/CommentAnnotation:
86
- Description: >-
87
- Checks formatting of special comments
88
- (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
89
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
90
- Enabled: false
91
-
92
- Metrics/AbcSize:
93
- Description: >-
94
- A calculated magnitude based on number of assignments,
95
- branches, and conditions.
96
- Enabled: false
97
-
98
- Metrics/BlockLength:
99
- CountComments: true # count full line comments?
100
- Max: 25
101
- ExcludedMethods: []
102
- Exclude:
103
- - "spec/**/*"
104
-
105
- Metrics/CyclomaticComplexity:
106
- Description: >-
107
- A complexity metric that is strongly correlated to the number
108
- of test cases needed to validate a method.
109
- Enabled: false
110
-
111
- Rails/Delegate:
112
- Description: 'Prefer delegate method for delegations.'
113
- Enabled: false
114
-
115
- Style/PreferredHashMethods:
116
- Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
117
- StyleGuide: '#hash-key'
118
- Enabled: false
119
-
120
- Style/Documentation:
121
- Description: 'Document classes and non-namespace modules.'
122
- Enabled: false
123
-
124
- Style/DoubleNegation:
125
- Description: 'Checks for uses of double negation (!!).'
126
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
127
- Enabled: false
128
-
129
- Style/EachWithObject:
130
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
131
- Enabled: false
132
-
133
- Style/EmptyLiteral:
134
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
135
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
136
- Enabled: false
137
-
138
- # Checks whether the source file has a utf-8 encoding comment or not
139
- # AutoCorrectEncodingComment must match the regex
140
- # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
141
- Style/Encoding:
142
- Enabled: false
143
-
144
- Style/EvenOdd:
145
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
146
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
147
- Enabled: false
148
-
149
- Naming/FileName:
150
- Description: 'Use snake_case for source file names.'
151
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
152
- Enabled: false
153
-
154
- Style/FrozenStringLiteralComment:
155
- Description: >-
156
- Add the frozen_string_literal comment to the top of files
157
- to help transition from Ruby 2.3.0 to Ruby 3.0.
158
- Enabled: false
159
-
160
- Style/FlipFlop:
161
- Description: 'Checks for flip flops'
162
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
163
- Enabled: false
164
-
165
- Style/FormatString:
166
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
167
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
168
- Enabled: false
169
-
170
- Style/GlobalVars:
171
- Description: 'Do not introduce global variables.'
172
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
173
- Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
174
- Enabled: false
175
-
176
- Style/GuardClause:
177
- Description: 'Check for conditionals that can be replaced with guard clauses'
178
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
179
- Enabled: false
180
-
181
- Style/IfUnlessModifier:
182
- Description: >-
183
- Favor modifier if/unless usage when you have a
184
- single-line body.
185
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
186
- Enabled: false
187
-
188
- Style/IfWithSemicolon:
189
- Description: 'Do not use if x; .... Use the ternary operator instead.'
190
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
191
- Enabled: false
192
-
193
- Style/InlineComment:
194
- Description: 'Avoid inline comments.'
195
- Enabled: false
196
-
197
- Style/Lambda:
198
- Description: 'Use the new lambda literal syntax for single-line blocks.'
199
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
200
- Enabled: false
201
-
202
- Style/LambdaCall:
203
- Description: 'Use lambda.call(...) instead of lambda.(...).'
204
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
205
- Enabled: false
206
-
207
- Style/LineEndConcatenation:
208
- Description: >-
209
- Use \ instead of + or << to concatenate two string literals at
210
- line end.
211
- Enabled: false
212
-
213
- Metrics/LineLength:
214
- Description: 'Limit lines to 80 characters.'
215
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
216
- Max: 80
217
-
218
- Metrics/MethodLength:
219
- Description: 'Avoid methods longer than 10 lines of code.'
220
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
221
- Enabled: false
222
-
223
- Style/ModuleFunction:
224
- Description: 'Checks for usage of `extend self` in modules.'
225
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
226
- Enabled: false
227
-
228
- Style/MultilineBlockChain:
229
- Description: 'Avoid multi-line chains of blocks.'
230
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
231
- Enabled: false
232
-
233
- Style/NegatedIf:
234
- Description: >-
235
- Favor unless over if for negative conditions
236
- (or control flow or).
237
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
238
- Enabled: false
239
-
240
- Style/NegatedWhile:
241
- Description: 'Favor until over while for negative conditions.'
242
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
243
- Enabled: false
244
-
245
- Style/Next:
246
- Description: 'Use `next` to skip iteration instead of a condition at the end.'
247
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
248
- Enabled: false
249
-
250
- Style/NilComparison:
251
- Description: 'Prefer x.nil? to x == nil.'
252
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
253
- Enabled: false
254
-
255
- Style/Not:
256
- Description: 'Use ! instead of not.'
257
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
258
- Enabled: false
259
-
260
- Style/NumericLiterals:
261
- Description: >-
262
- Add underscores to large numeric literals to improve their
263
- readability.
264
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
265
- Enabled: false
266
-
267
- Style/OneLineConditional:
268
- Description: >-
269
- Favor the ternary operator(?:) over
270
- if/then/else/end constructs.
271
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
272
- Enabled: false
273
-
274
- Naming/BinaryOperatorParameterName:
275
- Description: 'When defining binary operators, name the argument other.'
276
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
277
- Enabled: false
278
-
279
- Metrics/ParameterLists:
280
- Description: 'Avoid parameter lists longer than three or four parameters.'
281
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
282
- Enabled: false
283
-
284
- Style/PercentLiteralDelimiters:
285
- Description: 'Use `%`-literal delimiters consistently'
286
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
287
- Enabled: false
288
-
289
- Style/PerlBackrefs:
290
- Description: 'Avoid Perl-style regex back references.'
291
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
292
- Enabled: false
293
-
294
- Naming/PredicateName:
295
- Description: 'Check the names of predicate methods.'
296
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
297
- NamePrefixBlacklist:
298
- - is_
299
- Exclude:
300
- - spec/**/*
301
-
302
- Style/Proc:
303
- Description: 'Use proc instead of Proc.new.'
304
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
305
- Enabled: false
306
-
307
- Style/RaiseArgs:
308
- Description: 'Checks the arguments passed to raise/fail.'
309
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
310
- Enabled: false
311
-
312
- Style/RegexpLiteral:
313
- Description: 'Use / or %r around regular expressions.'
314
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
315
- Enabled: false
316
-
317
- Style/SelfAssignment:
318
- Description: >-
319
- Checks for places where self-assignment shorthand should have
320
- been used.
321
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
322
- Enabled: false
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ inherit_from:
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
323
5
 
324
- Style/SingleLineBlockParams:
325
- Description: 'Enforces the names of some block params.'
326
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
327
- Enabled: false
6
+ # local repo-specific modifications
7
+ # ...
328
8
 
329
- Style/SingleLineMethods:
330
- Description: 'Avoid single-line methods.'
331
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
332
- Enabled: false
333
-
334
- Style/SignalException:
335
- Description: 'Checks for proper usage of fail and raise.'
336
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
337
- Enabled: false
338
-
339
- Style/SpecialGlobalVars:
340
- Description: 'Avoid Perl-style global variables.'
341
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
342
- Enabled: false
343
-
344
- Style/StringLiterals:
345
- Description: 'Checks if uses of quotes match the configured preference.'
346
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
347
- EnforcedStyle: double_quotes
348
- Enabled: true
349
-
350
- Style/TrailingCommaInArguments:
351
- Description: 'Checks for trailing comma in argument lists.'
352
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
353
- EnforcedStyleForMultiline: comma
354
- SupportedStylesForMultiline:
355
- - comma
356
- - consistent_comma
357
- - no_comma
358
- Enabled: true
359
-
360
- Style/TrailingCommaInLiteral:
361
- Description: 'Checks for trailing comma in array and hash literals.'
362
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
363
- EnforcedStyleForMultiline: comma
364
- SupportedStylesForMultiline:
365
- - comma
366
- - consistent_comma
367
- - no_comma
368
- Enabled: true
369
-
370
- Style/TrivialAccessors:
371
- Description: 'Prefer attr_* methods to trivial readers/writers.'
372
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
373
- Enabled: false
374
-
375
- Style/VariableInterpolation:
376
- Description: >-
377
- Don't interpolate global, instance and class variables
378
- directly in strings.
379
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
380
- Enabled: false
381
-
382
- Style/WhenThen:
383
- Description: 'Use when x then ... for one-line cases.'
384
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
385
- Enabled: false
386
-
387
- Style/WhileUntilModifier:
388
- Description: >-
389
- Favor modifier while/until usage when you have a
390
- single-line body.
391
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
392
- Enabled: false
393
-
394
- Style/WordArray:
395
- Description: 'Use %w or %W for arrays of words.'
396
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
397
- Enabled: false
398
-
399
- # Layout
400
-
401
- Layout/AlignParameters:
402
- Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
403
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
404
- Enabled: false
405
-
406
- Layout/DotPosition:
407
- Description: 'Checks the position of the dot in multi-line method calls.'
408
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
409
- EnforcedStyle: trailing
410
-
411
- Layout/ExtraSpacing:
412
- Description: 'Do not use unnecessary spacing.'
413
- Enabled: true
414
-
415
- Layout/MultilineOperationIndentation:
416
- Description: >-
417
- Checks indentation of binary operations that span more than
418
- one line.
419
- Enabled: true
420
- EnforcedStyle: indented
421
-
422
- Layout/MultilineMethodCallIndentation:
423
- Description: >-
424
- Checks indentation of method calls with the dot operator
425
- that span more than one line.
426
- Enabled: true
427
- EnforcedStyle: indented
428
-
429
- Layout/InitialIndentation:
430
- Description: >-
431
- Checks the indentation of the first non-blank non-comment line in a file.
432
- Enabled: false
433
-
434
- # Lint
435
-
436
- Lint/AmbiguousOperator:
437
- Description: >-
438
- Checks for ambiguous operators in the first argument of a
439
- method invocation without parentheses.
440
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
441
- Enabled: false
442
-
443
- Lint/AmbiguousRegexpLiteral:
444
- Description: >-
445
- Checks for ambiguous regexp literals in the first argument of
446
- a method invocation without parenthesis.
447
- Enabled: false
448
-
449
- Lint/AssignmentInCondition:
450
- Description: "Don't use assignment in conditions."
451
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
452
- Enabled: false
453
-
454
- Lint/CircularArgumentReference:
455
- Description: "Don't refer to the keyword argument in the default value."
456
- Enabled: false
457
-
458
- Lint/ConditionPosition:
459
- Description: >-
460
- Checks for condition placed in a confusing position relative to
461
- the keyword.
462
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
463
- Enabled: false
464
-
465
- Lint/DeprecatedClassMethods:
466
- Description: 'Check for deprecated class method calls.'
467
- Enabled: false
468
-
469
- Lint/DuplicatedKey:
470
- Description: 'Check for duplicate keys in hash literals.'
471
- Enabled: false
472
-
473
- Lint/EachWithObjectArgument:
474
- Description: 'Check for immutable argument given to each_with_object.'
475
- Enabled: false
476
-
477
- Lint/ElseLayout:
478
- Description: 'Check for odd code arrangement in an else block.'
479
- Enabled: false
480
-
481
- Lint/FormatParameterMismatch:
482
- Description: 'The number of parameters to format/sprint must match the fields.'
483
- Enabled: false
484
-
485
- Lint/HandleExceptions:
486
- Description: "Don't suppress exception."
487
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
488
- Enabled: false
489
-
490
- Lint/LiteralInCondition:
491
- Description: 'Checks of literals used in conditions.'
492
- Enabled: false
493
-
494
- Lint/LiteralInInterpolation:
495
- Description: 'Checks for literals used in interpolation.'
496
- Enabled: false
497
-
498
- Lint/Loop:
499
- Description: >-
500
- Use Kernel#loop with break rather than begin/end/until or
501
- begin/end/while for post-loop tests.
502
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
503
- Enabled: false
504
-
505
- Lint/NestedMethodDefinition:
506
- Description: 'Do not use nested method definitions.'
507
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
508
- Enabled: false
509
-
510
- Lint/NonLocalExitFromIterator:
511
- Description: 'Do not use return in iterator to cause non-local exit.'
512
- Enabled: false
513
-
514
- Lint/ParenthesesAsGroupedExpression:
515
- Description: >-
516
- Checks for method calls with a space before the opening
517
- parenthesis.
518
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
519
- Enabled: false
520
-
521
- Lint/RequireParentheses:
522
- Description: >-
523
- Use parentheses in the method call to avoid confusion
524
- about precedence.
525
- Enabled: false
526
-
527
- Lint/UnderscorePrefixedVariableName:
528
- Description: 'Do not use prefix `_` for a variable that is used.'
529
- Enabled: false
530
-
531
- Lint/UnneededDisable:
532
- Description: >-
533
- Checks for rubocop:disable comments that can be removed.
534
- Note: this cop is not disabled when disabling all cops.
535
- It must be explicitly disabled.
536
- Enabled: false
537
-
538
- Lint/Void:
539
- Description: 'Possible use of operator/literal/variable in void context.'
540
- Enabled: false
541
-
542
- # Performance
543
-
544
- Performance/CaseWhenSplat:
545
- Description: >-
546
- Place `when` conditions that use splat at the end
547
- of the list of `when` branches.
548
- Enabled: false
549
-
550
- Performance/Count:
551
- Description: >-
552
- Use `count` instead of `select...size`, `reject...size`,
553
- `select...count`, `reject...count`, `select...length`,
554
- and `reject...length`.
555
- Enabled: false
556
-
557
- Performance/Detect:
558
- Description: >-
559
- Use `detect` instead of `select.first`, `find_all.first`,
560
- `select.last`, and `find_all.last`.
561
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
562
- Enabled: false
563
-
564
- Performance/FlatMap:
565
- Description: >-
566
- Use `Enumerable#flat_map`
567
- instead of `Enumerable#map...Array#flatten(1)`
568
- or `Enumberable#collect..Array#flatten(1)`
569
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
570
- Enabled: false
571
-
572
- Performance/ReverseEach:
573
- Description: 'Use `reverse_each` instead of `reverse.each`.'
574
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
575
- Enabled: false
576
-
577
- Performance/Sample:
578
- Description: >-
579
- Use `sample` instead of `shuffle.first`,
580
- `shuffle.last`, and `shuffle[Fixnum]`.
581
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
582
- Enabled: false
583
-
584
- Performance/Size:
585
- Description: >-
586
- Use `size` instead of `count` for counting
587
- the number of elements in `Array` and `Hash`.
588
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
589
- Enabled: false
590
-
591
- Performance/StringReplacement:
592
- Description: >-
593
- Use `tr` instead of `gsub` when you are replacing the same
594
- number of characters. Use `delete` instead of `gsub` when
595
- you are deleting characters.
596
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
597
- Enabled: false
598
-
599
- # Rails
600
-
601
- Rails/ActionFilter:
602
- Description: 'Enforces consistent use of action filter methods.'
603
- Enabled: false
604
-
605
- Rails/Date:
606
- Description: >-
607
- Checks the correct usage of date aware methods,
608
- such as Date.today, Date.current etc.
609
- Enabled: false
610
-
611
- Rails/FindBy:
612
- Description: 'Prefer find_by over where.first.'
613
- Enabled: false
614
-
615
- Rails/FindEach:
616
- Description: 'Prefer all.find_each over all.find.'
617
- Enabled: false
618
-
619
- Rails/HasAndBelongsToMany:
620
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
621
- Enabled: false
622
-
623
- Rails/Output:
624
- Description: 'Checks for calls to puts, print, etc.'
625
- Enabled: false
626
-
627
- Rails/ReadWriteAttribute:
628
- Description: >-
629
- Checks for read_attribute(:attr) and
630
- write_attribute(:attr, val).
631
- Enabled: false
632
-
633
- Rails/ScopeArgs:
634
- Description: 'Checks the arguments of ActiveRecord scopes.'
635
- Enabled: false
636
-
637
- Rails/TimeZone:
638
- Description: 'Checks the correct usage of time zone aware methods.'
639
- StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
640
- Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
641
- Enabled: false
642
-
643
- Rails/Validation:
644
- Description: 'Use validates :attribute, hash of validations.'
645
- Enabled: false
9
+ AllCops:
10
+ TargetRubyVersion: 2.5
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  # Temporarily use the development version
7
- gem "ribose", git: "https://github.com/riboseinc/ribose-ruby"
7
+ gem "ribose", git: "https://github.com/riboseinc/ribose-ruby", branch: "main"
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Ribose CLI
2
2
 
3
- [![Build
4
- Status](https://travis-ci.org/riboseinc/ribose-cli.svg?branch=master)](https://travis-ci.org/riboseinc/ribose-cli)
3
+ [![Build Status](https://github.com/riboseinc/ribose-cli/actions/workflows/test.yml/badge.svg)](https://github.com/riboseinc/ribose-cli/actions/workflows/test.yml)
5
4
  [![Code
6
5
  Climate](https://codeclimate.com/github/riboseinc/ribose-cli/badges/gpa.svg)](https://codeclimate.com/github/riboseinc/ribose-cli)
7
6
 
@@ -36,7 +35,7 @@ API Token and email using the following interface, This will store your Ribose
36
35
  configuration as `.riboserc` in the home directory.
37
36
 
38
37
  ```sh
39
- ribose config --token="YOUR_API_TOKEN" --email="youremail@example.com"
38
+ ribose config --password='YOUR_API_PASSWORD' --email='youremail@example.com'
40
39
  ```
41
40
 
42
41
  ### Spaces
data/bin/console CHANGED
@@ -7,8 +7,5 @@ require "ribose/cli"
7
7
  # with your gem easier. You can also use a different console, if you like.
8
8
 
9
9
  # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
10
+ require "pry"
11
+ Pry.start
@@ -1,9 +1,10 @@
1
1
  require "ribose"
2
2
  require "ribose/cli/rcfile"
3
3
 
4
- unless Ribose.configuration.api_token
4
+ unless Ribose.configuration.user_password
5
5
  Ribose.configure do |config|
6
- config.api_token = Ribose::CLI::RCFile.api_token
6
+ config.api_host = Ribose::CLI::RCFile.api_host
7
7
  config.user_email = Ribose::CLI::RCFile.user_email
8
+ config.user_password = Ribose::CLI::RCFile.user_password
8
9
  end
9
10
  end
@@ -37,12 +37,17 @@ module Ribose
37
37
  subcommand :join_space, Ribose::CLI::Commands::JoinSpace
38
38
 
39
39
  desc "config", "Configure API Key and User Email"
40
- option :token, required: true, desc: "Your API Token for Ribose"
40
+ option :token, required: false, desc: "Your API Token for Ribose"
41
41
  option :email, required: true, desc: "Your email address for Ribose"
42
+ option :password, required: true, desc: "Your API password for Ribose"
43
+ option :api_host, required: true, desc: "API host, eg: www.ribose.com"
42
44
 
43
45
  def config
44
46
  Ribose::CLI::RCFile.set(
45
- email: options[:email], token: options[:token],
47
+ token: options[:token],
48
+ email: options[:email],
49
+ password: options[:password],
50
+ api_host: options[:api_host],
46
51
  )
47
52
  end
48
53
 
@@ -25,7 +25,7 @@ module Ribose
25
25
  option :access, default: "open", desc: "The visiblity for the space"
26
26
 
27
27
  def add
28
- space = Ribose::Space.create(symbolize_keys(options))
28
+ space = Ribose::Space.create(**symbolize_keys(options))
29
29
  say("New Space created! Id: " + space.id)
30
30
  end
31
31
 
@@ -12,9 +12,11 @@ module Ribose
12
12
  @data = load_configuration
13
13
  end
14
14
 
15
- def set(token:, email:)
15
+ def set(email:, password:, token: nil, api_host: nil)
16
16
  data[:api_token] = token
17
17
  data[:user_email] = email
18
+ data[:user_password] = password
19
+ data[:api_host] = api_host
18
20
 
19
21
  write_api_details_to_file
20
22
  end
@@ -27,8 +29,16 @@ module Ribose
27
29
  new.data[:user_email]
28
30
  end
29
31
 
30
- def self.set(token:, email:)
31
- new.set(token: token, email: email)
32
+ def self.user_password
33
+ new.data[:user_password]
34
+ end
35
+
36
+ def self.api_host
37
+ ENV.fetch("RIBOSE_API_HOST", new.data[:api_host])
38
+ end
39
+
40
+ def self.set(email:, password:, token: nil, api_host: nil)
41
+ new.set(token: token, email: email, password: password, api_host: api_host)
32
42
  end
33
43
 
34
44
  private
@@ -1,5 +1,5 @@
1
1
  module Ribose
2
2
  module CLI
3
- VERSION = "0.3.2".freeze
3
+ VERSION = "0.5.0".freeze
4
4
  end
5
5
  end
data/lib/ribose/cli.rb CHANGED
@@ -10,11 +10,11 @@ module Ribose
10
10
  module CLI
11
11
  def self.start(arguments)
12
12
  Ribose::CLI::Command.start(arguments)
13
- rescue Ribose::Errors::Forbidden
13
+ rescue Ribose::Unauthorized, Ribose::Errors::Forbidden
14
14
  Thor::Shell::Basic.new.say(
15
15
  "Invalid: Missing API Configuration\n\n" \
16
16
  "Ribose API Token & Email are required for any of the CLI operation\n" \
17
- "You can set your API Key using `ribose config --token "" --email "" `",
17
+ "You can set your API Key using `ribose config --email email --password`",
18
18
  )
19
19
  end
20
20
  end
data/ribose-cli.gemspec CHANGED
@@ -17,17 +17,19 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.files = `git ls-files`.split("\n")
19
19
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
20
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
20
21
 
21
22
  spec.require_paths = ["lib"]
22
23
  spec.bindir = "bin"
23
24
  spec.executables = "ribose"
24
25
 
25
26
  spec.add_dependency "thor", "~> 0.19.4"
26
- spec.add_dependency "ribose", ">= 0.3.2"
27
+ spec.add_dependency "ribose", ">= 0.5"
27
28
  spec.add_dependency "terminal-table"
28
29
 
29
- spec.add_development_dependency "bundler", "~> 1.14"
30
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "pry"
31
+ spec.add_development_dependency "rake"
32
+ spec.add_development_dependency "bundler"
31
33
  spec.add_development_dependency "rspec", "~> 3.0"
32
- spec.add_development_dependency "webmock", "~> 2.0"
34
+ spec.add_development_dependency "webmock", "~> 3.0"
33
35
  end
@@ -3,11 +3,11 @@ require "spec_helper"
3
3
  RSpec.describe "Config" do
4
4
  it "allows us to set token and user email" do
5
5
  allow(File).to receive(:expand_path).and_return(fixtures_path)
6
- command = %w(config --token SECRET_TOKEN --email user-one@example.com)
6
+ command = %w(config --password SECRET_TOKEN --email user-one@example.com)
7
7
 
8
8
  Ribose::CLI.start(command)
9
9
 
10
- expect(Ribose::CLI::RCFile.api_token).to eq("SECRET_TOKEN")
10
+ expect(Ribose::CLI::RCFile.user_password).to eq("SECRET_TOKEN")
11
11
  expect(Ribose::CLI::RCFile.user_email).to eq("user-one@example.com")
12
12
  end
13
13
 
@@ -1,3 +1,4 @@
1
1
  ---
2
- :api_token: SECRET_TOKEN
2
+ :api_token:
3
3
  :user_email: user-one@example.com
4
+ :user_password: SECRET_TOKEN
@@ -6,12 +6,18 @@ RSpec.describe Ribose::CLI::RCFile do
6
6
  it "allows us to set API Token and User Email" do
7
7
  api_token = "SECRET_TOKEN"
8
8
  user_email = "user-one@example.com"
9
+ user_password = "SECRET_PASSWORD"
9
10
  allow(File).to receive(:expand_path).and_return(fixtures_path)
10
11
 
11
- Ribose::CLI::RCFile.set(token: api_token, email: user_email)
12
+ Ribose::CLI::RCFile.set(
13
+ token: api_token,
14
+ email: user_email,
15
+ password: user_password,
16
+ )
12
17
 
13
18
  expect(Ribose::CLI::RCFile.api_token).to eq(api_token)
14
19
  expect(Ribose::CLI::RCFile.user_email).to eq(user_email)
20
+ expect(Ribose::CLI::RCFile.user_password).to eq(user_password)
15
21
  end
16
22
  end
17
23
 
data/spec/spec_helper.rb CHANGED
@@ -15,8 +15,11 @@ RSpec.configure do |config|
15
15
 
16
16
  config.before :all do
17
17
  Ribose.configure do |ribose_config|
18
- ribose_config.api_token = ENV["RIBOSE_API_TOKEN"] || "SECRET_TOKEN"
18
+ ribose_config.api_host = ENV["RIBOSE_API_HOST"] || "www.ribose.com"
19
19
  ribose_config.user_email = ENV["RIBOSE_USER_EMAIL"] || "user@ribose.com"
20
+ ribose_config.user_password = ENV["RIBOSE_USER_PASSWORD"] || "SECRET_PASS"
21
+
22
+ ribose_config.client = Ribose::Client.new
20
23
  end
21
24
  end
22
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ribose-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2022-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.2
33
+ version: '0.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.2
40
+ version: '0.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: terminal-table
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -53,33 +53,47 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.14'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.14'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
81
88
  - !ruby/object:Gem::Version
82
- version: '10.0'
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rspec
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +114,14 @@ dependencies:
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '2.0'
117
+ version: '3.0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '2.0'
124
+ version: '3.0'
111
125
  description: The Ribose CLI
112
126
  email:
113
127
  - operations@ribose.com
@@ -116,11 +130,11 @@ executables:
116
130
  extensions: []
117
131
  extra_rdoc_files: []
118
132
  files:
133
+ - ".github/workflows/test.yml"
119
134
  - ".gitignore"
120
135
  - ".hound.yml"
121
136
  - ".rspec"
122
137
  - ".rubocop.yml"
123
- - ".travis.yml"
124
138
  - Gemfile
125
139
  - LICENSE.txt
126
140
  - README.md
@@ -162,7 +176,7 @@ homepage: https://github.com/riboseinc/ribose-cli
162
176
  licenses:
163
177
  - MIT
164
178
  metadata: {}
165
- post_install_message:
179
+ post_install_message:
166
180
  rdoc_options: []
167
181
  require_paths:
168
182
  - lib
@@ -170,16 +184,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - ">="
172
186
  - !ruby/object:Gem::Version
173
- version: '0'
187
+ version: 2.5.0
174
188
  required_rubygems_version: !ruby/object:Gem::Requirement
175
189
  requirements:
176
190
  - - ">="
177
191
  - !ruby/object:Gem::Version
178
192
  version: '0'
179
193
  requirements: []
180
- rubyforge_project:
181
- rubygems_version: 2.7.7
182
- signing_key:
194
+ rubygems_version: 3.2.3
195
+ signing_key:
183
196
  specification_version: 4
184
197
  summary: The Ribose CLI
185
198
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.0
5
- before_install: gem install bundler -v 1.14.6