gems-cli 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +18 -450
- data/.travis.yml +3 -3
- data/CHANGELOG +4 -0
- data/CONTRIBUTING.md +1 -1
- data/README.md +43 -4
- data/Rakefile +1 -0
- data/gems-cli.gemspec +13 -12
- data/lib/gems-cli/paginator.rb +2 -2
- data/lib/gems-cli/version.rb +1 -1
- data/spec/gems-cli/paginator_spec.rb +3 -3
- metadata +94 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23ce14f24029b2b9b436310a9109cab534b25c23
|
4
|
+
data.tar.gz: db93650f7a3b9fc88dd03f37bbe6bd6b1d12e48d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c95adf52841e8fafcfb8233d5797b232213f2f22a73cfcc7aaa0a51926fa49cb9bce68ba1a28cd5d62080a7e4960b601ff782088a540f04bb66e66cb378eb8d
|
7
|
+
data.tar.gz: b854b7639a2c769665840f1272eaafdecba0a67514dc95bfbd0a2f431081f0230d9439621d1469c148d122401675f164f4834527fc05bac36777434822e3850b
|
data/.rubocop.yml
CHANGED
@@ -1,481 +1,49 @@
|
|
1
|
-
# Cops (the rules) are based off of the Ruby community style-guide
|
2
|
-
# https://github.com/bbatsov/ruby-style-guide
|
3
|
-
|
4
1
|
AllCops:
|
5
|
-
RunRailsCops: true
|
6
2
|
Exclude:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- Gemfile
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
# Cop supports --auto-correct.
|
16
|
-
Lint/BlockAlignment:
|
17
|
-
Enabled: true
|
18
|
-
|
19
|
-
Lint/ConditionPosition:
|
20
|
-
Enabled: false
|
3
|
+
- 'bin/**/*'
|
4
|
+
- 'log/**/*'
|
5
|
+
- 'Gemfile'
|
6
|
+
- 'Rakefile'
|
7
|
+
- '*.gemspec'
|
8
|
+
- 'spec/spec_helper.rb'
|
9
|
+
TargetRubyVersion: 2.2
|
21
10
|
|
22
|
-
|
23
|
-
Lint/DefEndAlignment:
|
24
|
-
Enabled: false
|
25
|
-
|
26
|
-
# Cop supports --auto-correct.
|
27
|
-
Lint/DeprecatedClassMethods:
|
28
|
-
Enabled: false
|
29
|
-
|
30
|
-
Lint/ElseLayout:
|
31
|
-
Enabled: false
|
32
|
-
|
33
|
-
# Configuration parameters: AlignWith, SupportedStyles.
|
34
|
-
Lint/EndAlignment:
|
35
|
-
Enabled: false
|
36
|
-
|
37
|
-
Lint/HandleExceptions:
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
Lint/ParenthesesAsGroupedExpression:
|
41
|
-
Enabled: false
|
42
|
-
|
43
|
-
Lint/ShadowingOuterLocalVariable:
|
44
|
-
Enabled: false
|
45
|
-
|
46
|
-
# Cop supports --auto-correct.
|
47
|
-
Lint/SpaceBeforeFirstArg:
|
48
|
-
Enabled: true
|
49
|
-
|
50
|
-
# Cop supports --auto-correct.
|
51
|
-
Lint/StringConversionInInterpolation:
|
52
|
-
Enabled: true
|
53
|
-
|
54
|
-
# Cop supports --auto-correct.
|
55
|
-
Lint/UnusedBlockArgument:
|
56
|
-
Enabled: true
|
57
|
-
|
58
|
-
# Cop supports --auto-correct.
|
59
|
-
Lint/UnusedMethodArgument:
|
60
|
-
Enabled: true
|
61
|
-
|
62
|
-
Lint/UselessAccessModifier:
|
63
|
-
Enabled: false
|
64
|
-
|
65
|
-
Lint/UselessAssignment:
|
66
|
-
Enabled: false
|
67
|
-
|
68
|
-
Lint/Void:
|
11
|
+
Documentation:
|
69
12
|
Enabled: false
|
70
13
|
|
71
14
|
Metrics/AbcSize:
|
72
|
-
Max: 140
|
73
|
-
|
74
|
-
# Configuration parameters: CountComments.
|
75
|
-
Metrics/ClassLength:
|
76
|
-
Max: 800
|
77
|
-
|
78
|
-
Metrics/CyclomaticComplexity:
|
79
|
-
Max: 26
|
80
|
-
|
81
|
-
# Configuration parameters: AllowURI, URISchemes.
|
82
|
-
Metrics/LineLength:
|
83
|
-
AllowURI: true
|
84
|
-
Max: 90
|
85
|
-
|
86
|
-
# Configuration parameters: CountComments.
|
87
|
-
Metrics/MethodLength:
|
88
|
-
Max: 90
|
89
|
-
|
90
|
-
# Configuration parameters: CountKeywordArgs.
|
91
|
-
Metrics/ParameterLists:
|
92
|
-
Max: 7
|
93
|
-
|
94
|
-
Metrics/PerceivedComplexity:
|
95
|
-
Max: 22
|
96
|
-
|
97
|
-
# Cop supports --auto-correct.
|
98
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, Include.
|
99
|
-
Rails/ActionFilter:
|
100
|
-
Enabled: true
|
101
|
-
|
102
|
-
# Configuration parameters: Include.
|
103
|
-
Rails/HasAndBelongsToMany:
|
104
|
-
Enabled: false
|
105
|
-
|
106
|
-
# Configuration parameters: Include.
|
107
|
-
Rails/Output:
|
108
|
-
Enabled: false
|
109
|
-
|
110
|
-
# Configuration parameters: Include.
|
111
|
-
Rails/ScopeArgs:
|
112
|
-
Enabled: false
|
113
|
-
|
114
|
-
# Configuration parameters: Include.
|
115
|
-
Rails/Validation:
|
116
|
-
Enabled: false
|
117
|
-
|
118
|
-
# Cop supports --auto-correct.
|
119
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
120
|
-
Style/AccessModifierIndentation:
|
121
|
-
Enabled: true
|
122
|
-
|
123
|
-
Style/AccessorMethodName:
|
124
15
|
Enabled: false
|
125
16
|
|
126
|
-
|
127
|
-
Style/AlignArray:
|
128
|
-
Enabled: true
|
129
|
-
|
130
|
-
# Cop supports --auto-correct.
|
131
|
-
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
132
|
-
Style/AlignHash:
|
133
|
-
Enabled: true
|
134
|
-
|
135
|
-
# Cop supports --auto-correct.
|
136
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
137
|
-
Style/AlignParameters:
|
138
|
-
Enabled: true
|
139
|
-
|
140
|
-
# Cop supports --auto-correct.
|
141
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
142
|
-
Style/AndOr:
|
143
|
-
Enabled: true
|
144
|
-
|
145
|
-
Style/AsciiComments:
|
146
|
-
Enabled: false
|
147
|
-
|
148
|
-
# Cop supports --auto-correct.
|
149
|
-
Style/BlockComments:
|
150
|
-
Enabled: true
|
151
|
-
|
152
|
-
# Cop supports --auto-correct.
|
153
|
-
Style/BlockEndNewline:
|
154
|
-
Enabled: false
|
155
|
-
|
156
|
-
# Cop supports --auto-correct.
|
157
|
-
Style/Blocks:
|
158
|
-
Enabled: false
|
159
|
-
|
160
|
-
# Cop supports --auto-correct.
|
161
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
162
|
-
Style/BracesAroundHashParameters:
|
163
|
-
Enabled: true
|
164
|
-
|
165
|
-
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
|
166
|
-
Style/CaseIndentation:
|
167
|
-
Enabled: false
|
168
|
-
|
169
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
170
|
-
Style/ClassAndModuleChildren:
|
171
|
-
Enabled: false
|
172
|
-
|
173
|
-
# Cop supports --auto-correct.
|
174
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
175
|
-
Style/ClassCheck:
|
176
|
-
Enabled: true
|
177
|
-
|
178
|
-
Style/ClassVars:
|
179
|
-
Enabled: false
|
180
|
-
|
181
|
-
# Cop supports --auto-correct.
|
182
|
-
Style/ColonMethodCall:
|
183
|
-
Enabled: true
|
184
|
-
|
185
|
-
# Configuration parameters: Keywords.
|
186
|
-
Style/CommentAnnotation:
|
17
|
+
Metrics/ClassLength:
|
187
18
|
Enabled: false
|
188
19
|
|
189
|
-
|
190
|
-
Style/CommentIndentation:
|
191
|
-
Enabled: true
|
192
|
-
|
193
|
-
# Cop supports --auto-correct.
|
194
|
-
Style/DefWithParentheses:
|
195
|
-
Enabled: true
|
196
|
-
|
197
|
-
# Cop supports --auto-correct.
|
198
|
-
Style/DeprecatedHashMethods:
|
199
|
-
Enabled: true
|
200
|
-
|
201
|
-
Style/Documentation:
|
20
|
+
Metrics/MethodLength:
|
202
21
|
Enabled: false
|
203
22
|
|
204
|
-
|
205
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
206
|
-
Style/DotPosition:
|
207
|
-
EnforcedStyle: trailing
|
208
|
-
Enabled: true
|
209
|
-
|
210
|
-
Style/DoubleNegation:
|
23
|
+
Style/Alias:
|
211
24
|
Enabled: false
|
212
25
|
|
213
|
-
|
214
|
-
Style/ElseAlignment:
|
215
|
-
Enabled: true
|
216
|
-
|
217
|
-
# Cop supports --auto-correct.
|
218
|
-
Style/EmptyLines:
|
219
|
-
Enabled: true
|
220
|
-
|
221
|
-
# Cop supports --auto-correct.
|
222
|
-
Style/EmptyLinesAroundAccessModifier:
|
223
|
-
Enabled: true
|
224
|
-
|
225
|
-
# Cop supports --auto-correct.
|
226
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
227
|
-
Style/EmptyLinesAroundClassBody:
|
228
|
-
Enabled: true
|
229
|
-
|
230
|
-
# Cop supports --auto-correct.
|
231
|
-
Style/EmptyLinesAroundMethodBody:
|
232
|
-
Enabled: true
|
233
|
-
|
234
|
-
# Cop supports --auto-correct.
|
235
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
236
|
-
Style/EmptyLinesAroundModuleBody:
|
237
|
-
Enabled: true
|
238
|
-
|
239
|
-
# Cop supports --auto-correct.
|
240
|
-
Style/EmptyLiteral:
|
241
|
-
Enabled: true
|
242
|
-
|
243
|
-
Style/EndOfLine:
|
26
|
+
Style/BlockDelimiters:
|
244
27
|
Enabled: false
|
245
28
|
|
246
29
|
Style/FileName:
|
247
|
-
|
248
|
-
|
249
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
250
|
-
Style/FormatString:
|
251
|
-
Enabled: false
|
252
|
-
|
253
|
-
# Configuration parameters: MinBodyLength.
|
254
|
-
Style/GuardClause:
|
255
|
-
Enabled: false
|
256
|
-
|
257
|
-
# Cop supports --auto-correct.
|
258
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
259
|
-
Style/HashSyntax:
|
260
|
-
Enabled: true
|
261
|
-
|
262
|
-
# Configuration parameters: MaxLineLength.
|
263
|
-
Style/IfUnlessModifier:
|
264
|
-
Enabled: false
|
265
|
-
|
266
|
-
# Cop supports --auto-correct.
|
267
|
-
Style/IndentArray:
|
268
|
-
Enabled: true
|
269
|
-
|
270
|
-
# Cop supports --auto-correct.
|
271
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
272
|
-
Style/IndentHash:
|
273
|
-
Enabled: true
|
274
|
-
|
275
|
-
# Cop supports --auto-correct.
|
276
|
-
Style/IndentationConsistency:
|
277
|
-
Enabled: true
|
278
|
-
|
279
|
-
# Cop supports --auto-correct.
|
280
|
-
# Configuration parameters: Width.
|
281
|
-
Style/IndentationWidth:
|
282
|
-
Enabled: true
|
30
|
+
Exclude:
|
31
|
+
- 'lib/gems-cli.rb'
|
283
32
|
|
284
33
|
Style/Lambda:
|
285
34
|
Enabled: false
|
286
35
|
|
287
|
-
|
288
|
-
# Configuration parameters: SupportedStyles.
|
289
|
-
Style/LambdaCall:
|
36
|
+
Style/MultilineBlockChain:
|
290
37
|
Enabled: false
|
291
|
-
EnforcedStyle: braces
|
292
38
|
|
293
|
-
|
294
|
-
Style/LeadingCommentSpace:
|
295
|
-
Enabled: true
|
296
|
-
|
297
|
-
# Cop supports --auto-correct.
|
298
|
-
Style/LineEndConcatenation:
|
299
|
-
Enabled: false
|
300
|
-
|
301
|
-
# Cop supports --auto-correct.
|
302
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
303
|
-
Style/MethodDefParentheses:
|
304
|
-
Enabled: true
|
305
|
-
# Valid values are: require_parentheses, require_no_parentheses
|
306
|
-
EnforcedStyle: require_no_parentheses
|
307
|
-
|
308
|
-
# Cop supports --auto-correct.
|
309
|
-
Style/MultilineBlockLayout:
|
310
|
-
Enabled: false
|
311
|
-
|
312
|
-
# Cop supports --auto-correct.
|
313
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
314
|
-
Style/MultilineOperationIndentation:
|
315
|
-
Enabled: false
|
316
|
-
|
317
|
-
Style/MultilineTernaryOperator:
|
39
|
+
Style/RaiseArgs:
|
318
40
|
Enabled: false
|
319
41
|
|
320
|
-
# Cop supports --auto-correct.
|
321
|
-
Style/NegatedIf:
|
322
|
-
Enabled: true
|
323
|
-
|
324
|
-
# Cop supports --auto-correct.
|
325
|
-
Style/NumericLiterals:
|
326
|
-
MinDigits: 10
|
327
|
-
|
328
|
-
# Cop supports --auto-correct.
|
329
|
-
# Configuration parameters: AllowSafeAssignment.
|
330
|
-
Style/ParenthesesAroundCondition:
|
331
|
-
Enabled: true
|
332
|
-
|
333
|
-
# Cop supports --auto-correct.
|
334
|
-
# Configuration parameters: PreferredDelimiters.
|
335
|
-
Style/PercentLiteralDelimiters:
|
336
|
-
Enabled: false
|
337
|
-
|
338
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist.
|
339
|
-
Style/PredicateName:
|
340
|
-
Enabled: false
|
341
|
-
|
342
|
-
# Cop supports --auto-correct.
|
343
42
|
Style/RedundantBegin:
|
344
43
|
Enabled: false
|
345
44
|
|
346
|
-
|
347
|
-
# Configuration parameters: AllowMultipleReturnValues.
|
348
|
-
Style/RedundantReturn:
|
349
|
-
Enabled: true
|
350
|
-
|
351
|
-
# Cop supports --auto-correct.
|
352
|
-
Style/RedundantSelf:
|
353
|
-
Enabled: false
|
354
|
-
|
355
|
-
Style/RescueModifier:
|
356
|
-
Enabled: false
|
357
|
-
|
358
|
-
Style/SelfAssignment:
|
359
|
-
Enabled: false
|
360
|
-
|
361
|
-
# Cop supports --auto-correct.
|
362
|
-
# Configuration parameters: AllowAsExpressionSeparator.
|
363
|
-
Style/Semicolon:
|
364
|
-
Enabled: false
|
365
|
-
|
366
|
-
# Cop supports --auto-correct.
|
367
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
368
|
-
Style/SignalException:
|
369
|
-
Enabled: false
|
370
|
-
|
371
|
-
# Configuration parameters: Methods.
|
372
|
-
Style/SingleLineBlockParams:
|
373
|
-
Enabled: false
|
374
|
-
|
375
|
-
Style/SingleLineMethods:
|
376
|
-
Enabled: false
|
377
|
-
|
378
|
-
# Cop supports --auto-correct.
|
379
|
-
Style/SingleSpaceBeforeFirstArg:
|
45
|
+
Style/SpecialGlobalVars:
|
380
46
|
Enabled: false
|
381
47
|
|
382
|
-
|
383
|
-
Style/SpaceAfterColon:
|
48
|
+
TrailingBlankLines:
|
384
49
|
Enabled: false
|
385
|
-
|
386
|
-
# Cop supports --auto-correct.
|
387
|
-
Style/SpaceAfterComma:
|
388
|
-
Enabled: false
|
389
|
-
|
390
|
-
# Cop supports --auto-correct.
|
391
|
-
Style/SpaceAfterControlKeyword:
|
392
|
-
Enabled: false
|
393
|
-
|
394
|
-
# Cop supports --auto-correct.
|
395
|
-
Style/SpaceAfterMethodName:
|
396
|
-
Enabled: false
|
397
|
-
|
398
|
-
# Cop supports --auto-correct.
|
399
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
400
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
401
|
-
Enabled: false
|
402
|
-
|
403
|
-
# Cop supports --auto-correct.
|
404
|
-
Style/SpaceAroundOperators:
|
405
|
-
Enabled: false
|
406
|
-
|
407
|
-
# Cop supports --auto-correct.
|
408
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
409
|
-
Style/SpaceBeforeBlockBraces:
|
410
|
-
Enabled: false
|
411
|
-
|
412
|
-
# Cop supports --auto-correct.
|
413
|
-
Style/SpaceBeforeComma:
|
414
|
-
Enabled: false
|
415
|
-
|
416
|
-
# Cop supports --auto-correct.
|
417
|
-
Style/SpaceBeforeModifierKeyword:
|
418
|
-
Enabled: false
|
419
|
-
|
420
|
-
# Cop supports --auto-correct.
|
421
|
-
Style/SpaceBeforeSemicolon:
|
422
|
-
Enabled: false
|
423
|
-
|
424
|
-
# Cop supports --auto-correct.
|
425
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
426
|
-
Style/SpaceInsideBlockBraces:
|
427
|
-
Enabled: false
|
428
|
-
|
429
|
-
# Cop supports --auto-correct.
|
430
|
-
Style/SpaceInsideBrackets:
|
431
|
-
Enabled: false
|
432
|
-
|
433
|
-
# Cop supports --auto-correct.
|
434
|
-
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
435
|
-
Style/SpaceInsideHashLiteralBraces:
|
436
|
-
Enabled: false
|
437
|
-
|
438
|
-
# Cop supports --auto-correct.
|
439
|
-
Style/SpaceInsideParens:
|
440
|
-
Enabled: false
|
441
|
-
|
442
|
-
# Cop supports --auto-correct.
|
443
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
444
|
-
Style/StringLiterals:
|
445
|
-
EnforcedStyle: single_quotes
|
446
|
-
Enabled: true
|
447
|
-
|
448
|
-
# Cop supports --auto-correct.
|
449
|
-
# Configuration parameters: IgnoredMethods.
|
450
|
-
Style/SymbolProc:
|
451
|
-
Enabled: false
|
452
|
-
|
453
|
-
# Cop supports --auto-correct.
|
454
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
455
|
-
Style/TrailingBlankLines:
|
456
|
-
Enabled: true
|
457
|
-
|
458
|
-
# Cop supports --auto-correct.
|
459
|
-
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
460
|
-
Style/TrailingComma:
|
461
|
-
Enabled: false
|
462
|
-
|
463
|
-
# Cop supports --auto-correct.
|
464
|
-
Style/TrailingWhitespace:
|
465
|
-
Enabled: true
|
466
|
-
|
467
|
-
Style/UnlessElse:
|
468
|
-
Enabled: false
|
469
|
-
|
470
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
471
|
-
Style/VariableName:
|
472
|
-
Enabled: false
|
473
|
-
|
474
|
-
# Cop supports --auto-correct.
|
475
|
-
Style/WhenThen:
|
476
|
-
Enabled: false
|
477
|
-
|
478
|
-
# Cop supports --auto-correct.
|
479
|
-
# Configuration parameters: WordRegex.
|
480
|
-
Style/WordArray:
|
481
|
-
MinSize: 25
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -7,3 +7,7 @@ Version 0.1.0: adds pagination to search results
|
|
7
7
|
Version 0.1.1: require at least ruby 1.9
|
8
8
|
|
9
9
|
Version 0.1.4: update gemspec, remove rdoc for yard, add some more documentation
|
10
|
+
|
11
|
+
Version 0.1.7: add support for getting gem versions
|
12
|
+
|
13
|
+
Version 0.1.8: update gem dependencies; clean out unused file
|
data/CONTRIBUTING.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
1. `git clone git@github.com:chaserx/gems-cli.git`
|
4
4
|
1. Create a branch to add your feature/fix a bug: `git checkout -b my-new-feature`.
|
5
5
|
1. Add your feature/fix while following the [style guide](http://learning-things.cirrusmio.com/style-guides/ruby.html).
|
6
|
-
1. Check your style with
|
6
|
+
1. Check your style with rubocop `bundle exec rubocop`.
|
7
7
|
1. Commit and push your changes to the branch to Github.
|
8
8
|
1. [Create a new Pull Request](https://github.com/chaserx/gems-cli/compare).
|
9
9
|
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ gem install gems-cli
|
|
19
19
|
`gems search chase` or `gems s chase`
|
20
20
|
|
21
21
|
```bash
|
22
|
-
Running search for chase...
|
22
|
+
Running your search for chase...
|
23
23
|
0: gem 'purchase', '~> 1.0.15'
|
24
24
|
1: gem 'fuel_purchase', '~> 0.0.14'
|
25
25
|
2: gem 'enju_purchase_request', '~> 0.0.14'
|
@@ -27,8 +27,32 @@ Running search for chase...
|
|
27
27
|
4: gem 'zombie-chaser', '~> 0.1.0'
|
28
28
|
5: gem 'exemplor-chaser', '~> 0.0.2'
|
29
29
|
6: gem 'rail_chaser', '~> 0.0.3'
|
30
|
-
|
31
|
-
|
30
|
+
Page: 1/2
|
31
|
+
|
32
|
+
Select from 0..6, (n)ext, (p)revious, (m)ore versions, or (q)uit #=> m
|
33
|
+
0: gem 'purchase', '~> 1.0.15'
|
34
|
+
0a: gem 'purchase', '~> 1.0.14'
|
35
|
+
0b: gem 'purchase', '~> 1.0.13'
|
36
|
+
0c: gem 'purchase', '~> 1.0.12'
|
37
|
+
1: gem 'fuel_purchase', '~> 0.0.14'
|
38
|
+
1a: gem 'fuel_purchase', '~> 0.0.13'
|
39
|
+
1b: gem 'fuel_purchase', '~> 0.0.12'
|
40
|
+
1c: gem 'fuel_purchase', '~> 0.0.11'
|
41
|
+
2: gem 'enju_purchase_request', '~> 0.0.14'
|
42
|
+
2a: gem 'enju_purchase_request', '~> 0.1.0.pre12'
|
43
|
+
2b: gem 'enju_purchase_request', '~> 0.1.0.pre11'
|
44
|
+
2c: gem 'enju_purchase_request', '~> 0.1.0.pre10'
|
45
|
+
3: gem 'chaser', '~> 0.0.3'
|
46
|
+
3a: gem 'chaser', '~> 0.0.2'
|
47
|
+
3b: gem 'chaser', '~> 0.0.1'
|
48
|
+
4: gem 'zombie-chaser', '~> 0.1.0'
|
49
|
+
4a: gem 'zombie-chaser', '~> 0.0.3'
|
50
|
+
4b: gem 'zombie-chaser', '~> 0.0.2'
|
51
|
+
4c: gem 'zombie-chaser', '~> 0.0.1'
|
52
|
+
5: gem 'exemplor-chaser', '~> 0.0.2'
|
53
|
+
6: gem 'rail_chaser', '~> 0.0.3'
|
54
|
+
6a: gem 'rail_chaser', '~> 0.0.2'
|
55
|
+
Page: 1/2
|
32
56
|
|
33
57
|
Select from 0..9, (n)ext, (p)revious, or (q)uit #=> 0
|
34
58
|
Copied purchase to your clipboard!
|
@@ -40,8 +64,23 @@ pbpaste #=> gem 'purchase', '~> 1.0.15'
|
|
40
64
|
|
41
65
|
## TODO
|
42
66
|
|
43
|
-
- needs [Aruba](https://github.com/cucumber/aruba) tests for the CLI itself.
|
67
|
+
- needs [Aruba](https://github.com/cucumber/aruba) or similar tests for the CLI itself.
|
44
68
|
|
45
69
|
## Contributing
|
46
70
|
|
47
71
|
Pull requests welcome! Please see the [contribution guide](CONTRIBUTING.md).
|
72
|
+
|
73
|
+
## Development
|
74
|
+
|
75
|
+
First, install development dependencies with `bundle install`.
|
76
|
+
|
77
|
+
Run tests with `bundle exec rspec`.
|
78
|
+
|
79
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
80
|
+
|
81
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
|
82
|
+
|
83
|
+
## Many thanks to the following contributors
|
84
|
+
|
85
|
+
- [moneypenney](https://github.com/moneypenny)
|
86
|
+
- [jdickey](https://github.com/jdickey)
|
data/Rakefile
CHANGED
data/gems-cli.gemspec
CHANGED
@@ -20,19 +20,20 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.require_paths << 'lib'
|
21
21
|
s.bindir = 'bin'
|
22
22
|
s.executables << 'gems'
|
23
|
-
s.required_ruby_version = '>= 2.
|
23
|
+
s.required_ruby_version = '>= 2.1.9'
|
24
24
|
s.post_install_message = "Thanks for installing! \ngems-cli usage: `gems s chase`"
|
25
25
|
|
26
|
-
s.add_development_dependency '
|
27
|
-
s.add_development_dependency '
|
28
|
-
s.add_development_dependency '
|
29
|
-
s.add_development_dependency '
|
30
|
-
s.add_development_dependency '
|
26
|
+
s.add_development_dependency 'bundler', '~> 1.11'
|
27
|
+
s.add_development_dependency 'rake', '~> 10.4', '>= 10.4.2'
|
28
|
+
s.add_development_dependency 'rspec', '~> 3.1' # '>= 3.1.0' would be redundant
|
29
|
+
s.add_development_dependency 'yard', '~> 0.8', '>= 0.8.7.6'
|
30
|
+
s.add_development_dependency 'simplecov', '~> 0.11', '>= 0.11.2'
|
31
|
+
s.add_development_dependency 'rubocop', '~> 0.40.0'
|
31
32
|
|
32
|
-
s.add_runtime_dependency 'gli', '2.12.2'
|
33
|
-
s.add_runtime_dependency 'gems', '0.8.3'
|
34
|
-
s.add_runtime_dependency 'highline', '1.6.21'
|
35
|
-
s.add_runtime_dependency 'clipboard', '1.0.5'
|
36
|
-
s.add_runtime_dependency 'rainbow', '2.0.0'
|
37
|
-
s.add_runtime_dependency 'will_paginate', '3.0.
|
33
|
+
s.add_runtime_dependency 'gli', '~> 2.12', '>= 2.12.2'
|
34
|
+
s.add_runtime_dependency 'gems', '~> 0.8', '>= 0.8.3'
|
35
|
+
s.add_runtime_dependency 'highline', '~> 1.6', '>= 1.6.21'
|
36
|
+
s.add_runtime_dependency 'clipboard', '~> 1.0', '>= 1.0.5'
|
37
|
+
s.add_runtime_dependency 'rainbow', '~> 2.0', '>= 2.0.0'
|
38
|
+
s.add_runtime_dependency 'will_paginate', '~> 3.0', '>= 3.0.3'
|
38
39
|
end
|
data/lib/gems-cli/paginator.rb
CHANGED
@@ -4,7 +4,7 @@ class Paginator
|
|
4
4
|
attr_reader :pages, :total_entries
|
5
5
|
attr_accessor :ary, :per_page, :page, :paged_results
|
6
6
|
|
7
|
-
def initialize
|
7
|
+
def initialize(args = {})
|
8
8
|
@ary = args[:ary] || []
|
9
9
|
@page = 1
|
10
10
|
@per_page = args[:per_page] || 10
|
@@ -13,7 +13,7 @@ class Paginator
|
|
13
13
|
@pages = @paged_results.total_pages
|
14
14
|
end
|
15
15
|
|
16
|
-
def []
|
16
|
+
def [](*args)
|
17
17
|
@ary[*args]
|
18
18
|
end
|
19
19
|
|
data/lib/gems-cli/version.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'gems-cli/paginator'
|
3
3
|
|
4
4
|
describe Paginator do
|
5
|
-
subject { Paginator.new(ary: (1..100).to_a)}
|
5
|
+
subject { Paginator.new(ary: (1..100).to_a) }
|
6
6
|
|
7
7
|
describe '#first_page?' do
|
8
8
|
it 'returns true if on the first page' do
|
@@ -48,7 +48,7 @@ describe Paginator do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
context 'when on page 2' do
|
51
|
-
subject { Paginator.new(ary: (1..100).to_a, page: 2)}
|
51
|
+
subject { Paginator.new(ary: (1..100).to_a, page: 2) }
|
52
52
|
|
53
53
|
before { subject.next_page }
|
54
54
|
|
@@ -76,7 +76,7 @@ describe Paginator do
|
|
76
76
|
end
|
77
77
|
|
78
78
|
context 'when on page 2' do
|
79
|
-
subject { Paginator.new(ary: (1..100).to_a, page: 2)}
|
79
|
+
subject { Paginator.new(ary: (1..100).to_a, page: 2) }
|
80
80
|
|
81
81
|
it 'returns 1..10' do
|
82
82
|
expect(subject.current_page).to eq((1..10).to_a)
|
metadata
CHANGED
@@ -1,48 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gems-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chase Southard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 10.
|
33
|
+
version: '10.4'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 10.4.2
|
20
37
|
type: :development
|
21
38
|
prerelease: false
|
22
39
|
version_requirements: !ruby/object:Gem::Requirement
|
23
40
|
requirements:
|
24
41
|
- - "~>"
|
25
42
|
- !ruby/object:Gem::Version
|
26
|
-
version: 10.
|
43
|
+
version: '10.4'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 10.4.2
|
27
47
|
- !ruby/object:Gem::Dependency
|
28
48
|
name: rspec
|
29
49
|
requirement: !ruby/object:Gem::Requirement
|
30
50
|
requirements:
|
31
51
|
- - "~>"
|
32
52
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.1
|
53
|
+
version: '3.1'
|
34
54
|
type: :development
|
35
55
|
prerelease: false
|
36
56
|
version_requirements: !ruby/object:Gem::Requirement
|
37
57
|
requirements:
|
38
58
|
- - "~>"
|
39
59
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.1
|
60
|
+
version: '3.1'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
62
|
name: yard
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
45
65
|
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.8'
|
68
|
+
- - ">="
|
46
69
|
- !ruby/object:Gem::Version
|
47
70
|
version: 0.8.7.6
|
48
71
|
type: :development
|
@@ -50,6 +73,9 @@ dependencies:
|
|
50
73
|
version_requirements: !ruby/object:Gem::Requirement
|
51
74
|
requirements:
|
52
75
|
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0.8'
|
78
|
+
- - ">="
|
53
79
|
- !ruby/object:Gem::Version
|
54
80
|
version: 0.8.7.6
|
55
81
|
- !ruby/object:Gem::Dependency
|
@@ -58,112 +84,154 @@ dependencies:
|
|
58
84
|
requirements:
|
59
85
|
- - "~>"
|
60
86
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
87
|
+
version: '0.11'
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 0.11.2
|
62
91
|
type: :development
|
63
92
|
prerelease: false
|
64
93
|
version_requirements: !ruby/object:Gem::Requirement
|
65
94
|
requirements:
|
66
95
|
- - "~>"
|
67
96
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
97
|
+
version: '0.11'
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 0.11.2
|
69
101
|
- !ruby/object:Gem::Dependency
|
70
102
|
name: rubocop
|
71
103
|
requirement: !ruby/object:Gem::Requirement
|
72
104
|
requirements:
|
73
105
|
- - "~>"
|
74
106
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
107
|
+
version: 0.40.0
|
76
108
|
type: :development
|
77
109
|
prerelease: false
|
78
110
|
version_requirements: !ruby/object:Gem::Requirement
|
79
111
|
requirements:
|
80
112
|
- - "~>"
|
81
113
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
114
|
+
version: 0.40.0
|
83
115
|
- !ruby/object:Gem::Dependency
|
84
116
|
name: gli
|
85
117
|
requirement: !ruby/object:Gem::Requirement
|
86
118
|
requirements:
|
87
|
-
- -
|
119
|
+
- - "~>"
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '2.12'
|
122
|
+
- - ">="
|
88
123
|
- !ruby/object:Gem::Version
|
89
124
|
version: 2.12.2
|
90
125
|
type: :runtime
|
91
126
|
prerelease: false
|
92
127
|
version_requirements: !ruby/object:Gem::Requirement
|
93
128
|
requirements:
|
94
|
-
- -
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.12'
|
132
|
+
- - ">="
|
95
133
|
- !ruby/object:Gem::Version
|
96
134
|
version: 2.12.2
|
97
135
|
- !ruby/object:Gem::Dependency
|
98
136
|
name: gems
|
99
137
|
requirement: !ruby/object:Gem::Requirement
|
100
138
|
requirements:
|
101
|
-
- -
|
139
|
+
- - "~>"
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0.8'
|
142
|
+
- - ">="
|
102
143
|
- !ruby/object:Gem::Version
|
103
144
|
version: 0.8.3
|
104
145
|
type: :runtime
|
105
146
|
prerelease: false
|
106
147
|
version_requirements: !ruby/object:Gem::Requirement
|
107
148
|
requirements:
|
108
|
-
- -
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0.8'
|
152
|
+
- - ">="
|
109
153
|
- !ruby/object:Gem::Version
|
110
154
|
version: 0.8.3
|
111
155
|
- !ruby/object:Gem::Dependency
|
112
156
|
name: highline
|
113
157
|
requirement: !ruby/object:Gem::Requirement
|
114
158
|
requirements:
|
115
|
-
- -
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '1.6'
|
162
|
+
- - ">="
|
116
163
|
- !ruby/object:Gem::Version
|
117
164
|
version: 1.6.21
|
118
165
|
type: :runtime
|
119
166
|
prerelease: false
|
120
167
|
version_requirements: !ruby/object:Gem::Requirement
|
121
168
|
requirements:
|
122
|
-
- -
|
169
|
+
- - "~>"
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '1.6'
|
172
|
+
- - ">="
|
123
173
|
- !ruby/object:Gem::Version
|
124
174
|
version: 1.6.21
|
125
175
|
- !ruby/object:Gem::Dependency
|
126
176
|
name: clipboard
|
127
177
|
requirement: !ruby/object:Gem::Requirement
|
128
178
|
requirements:
|
129
|
-
- -
|
179
|
+
- - "~>"
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '1.0'
|
182
|
+
- - ">="
|
130
183
|
- !ruby/object:Gem::Version
|
131
184
|
version: 1.0.5
|
132
185
|
type: :runtime
|
133
186
|
prerelease: false
|
134
187
|
version_requirements: !ruby/object:Gem::Requirement
|
135
188
|
requirements:
|
136
|
-
- -
|
189
|
+
- - "~>"
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '1.0'
|
192
|
+
- - ">="
|
137
193
|
- !ruby/object:Gem::Version
|
138
194
|
version: 1.0.5
|
139
195
|
- !ruby/object:Gem::Dependency
|
140
196
|
name: rainbow
|
141
197
|
requirement: !ruby/object:Gem::Requirement
|
142
198
|
requirements:
|
143
|
-
- -
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '2.0'
|
202
|
+
- - ">="
|
144
203
|
- !ruby/object:Gem::Version
|
145
204
|
version: 2.0.0
|
146
205
|
type: :runtime
|
147
206
|
prerelease: false
|
148
207
|
version_requirements: !ruby/object:Gem::Requirement
|
149
208
|
requirements:
|
150
|
-
- -
|
209
|
+
- - "~>"
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: '2.0'
|
212
|
+
- - ">="
|
151
213
|
- !ruby/object:Gem::Version
|
152
214
|
version: 2.0.0
|
153
215
|
- !ruby/object:Gem::Dependency
|
154
216
|
name: will_paginate
|
155
217
|
requirement: !ruby/object:Gem::Requirement
|
156
218
|
requirements:
|
157
|
-
- -
|
219
|
+
- - "~>"
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '3.0'
|
222
|
+
- - ">="
|
158
223
|
- !ruby/object:Gem::Version
|
159
|
-
version: 3.0.
|
224
|
+
version: 3.0.3
|
160
225
|
type: :runtime
|
161
226
|
prerelease: false
|
162
227
|
version_requirements: !ruby/object:Gem::Requirement
|
163
228
|
requirements:
|
164
|
-
- -
|
229
|
+
- - "~>"
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '3.0'
|
232
|
+
- - ">="
|
165
233
|
- !ruby/object:Gem::Version
|
166
|
-
version: 3.0.
|
234
|
+
version: 3.0.3
|
167
235
|
description: |
|
168
236
|
Search rubygems.org from the command line.
|
169
237
|
Then you can copy formatted gem details for your Gemfile.
|
@@ -204,7 +272,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
272
|
requirements:
|
205
273
|
- - ">="
|
206
274
|
- !ruby/object:Gem::Version
|
207
|
-
version:
|
275
|
+
version: 2.1.9
|
208
276
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
277
|
requirements:
|
210
278
|
- - ">="
|
@@ -212,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
280
|
version: '0'
|
213
281
|
requirements: []
|
214
282
|
rubyforge_project:
|
215
|
-
rubygems_version: 2.
|
283
|
+
rubygems_version: 2.5.1
|
216
284
|
signing_key:
|
217
285
|
specification_version: 4
|
218
286
|
summary: Search rubygems.org from the command line. Copy formatted gem details for
|