git-trend 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 061a2e4cffbd2cfa25529a5765d458215102ce53
4
- data.tar.gz: f49d4d8ac30608e28e838e9bf5f2c585aea587c0
3
+ metadata.gz: 0bc80e2666fb3d6a37e64f619bb1ccc22e74516b
4
+ data.tar.gz: e42df530102a7ce0f1952e6a2d3c80cc680858da
5
5
  SHA512:
6
- metadata.gz: d43d894c47c36d228c030c64c681a84b1467aa750f3632e606d336aad4a86604835cb2a3ef296019ce801d7536ec463827821fd9b8394f82037e6f4135b8659f
7
- data.tar.gz: 2bd04010ac17bc8b5e55e8b221553d231d9a8baee8faf9c902d13c3449b35ee38b5584b22262c2067a38e75d979c9c76f8591c0c6b00110f52b487f9ba203234
6
+ metadata.gz: 21046f4da96051712499ead5313cef33a56fd2c1941febfded3fa5b26c4294ea303d6e1889114a0da15ad588deb3f1296ac2a1831e9c7a3417af295563598fd9
7
+ data.tar.gz: 037627a05e72916240fdfbce59ab267ed8f286440613399cd04fcaab08345bc61999f0cd27d98e46aa411d57fffe9a09f848262b45e29b651bf34d1fc8ebd5c8
@@ -1,3 +1,6 @@
1
+ ## v0.1.3
2
+ * The `descript` option of `list` command was changed into the default. [3602272]
3
+
1
4
  ## v0.1.2
2
5
 
3
6
  * Fix travis ci error #24 [6752e1d]
@@ -17,7 +17,7 @@ module GitTrend
17
17
  desc :list, "\033[32m(DEFAULT COMMAND)\e[0m List Trending repository on github [-l, -s, -d]"
18
18
  option :language, aliases: '-l', required: false, desc: 'Specify a language'
19
19
  option :since, aliases: '-s', required: false, desc: 'Enable: [daily, weekly, monthly]'
20
- option :description, aliases: '-d', required: false, type: :boolean, desc: 'Dislpay descriptions'
20
+ option :description, aliases: '-d', required: false, default: true, type: :boolean, desc: "\033[32m(DEFAULT OPTION)\e[0m Dislpay descriptions"
21
21
  option :help, aliases: '-h', required: false, type: :boolean
22
22
  def list
23
23
  help(:list) and return if options[:help]
@@ -1,3 +1,3 @@
1
1
  module GitTrend
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -5,7 +5,7 @@ include GitTrend
5
5
 
6
6
  RSpec.shared_examples_for 'since daily ranking' do
7
7
  it 'display daily ranking' do
8
- expect { @cli.invoke(:list, [], since: since) }.to output(dummy_result_no_options).to_stdout
8
+ expect { @cli.invoke(:list, [], since: since, description: false) }.to output(dummy_result_without_description).to_stdout
9
9
  end
10
10
  end
11
11
 
@@ -16,16 +16,6 @@ RSpec.describe GitTrend::CLI do
16
16
  @cli = CLI.new
17
17
  end
18
18
 
19
- context 'with no option' do
20
- before do
21
- stub_request_get('trending')
22
- end
23
-
24
- it 'display daily ranking' do
25
- expect { @cli.list }.to output(dummy_result_no_options).to_stdout
26
- end
27
- end
28
-
29
19
  describe 'with -l option' do
30
20
  context 'with ruby' do
31
21
  before do
@@ -63,7 +53,7 @@ RSpec.describe GitTrend::CLI do
63
53
  | 24 tenderlove/the_metal Ruby 6
64
54
  | 25 bbatsov/rubocop Ruby 5
65
55
  EOS
66
- expect { @cli.invoke(:list, [], language: language) }.to output(res).to_stdout
56
+ expect { @cli.invoke(:list, [], language: language, description: false) }.to output(res).to_stdout
67
57
  end
68
58
  end
69
59
 
@@ -103,7 +93,7 @@ RSpec.describe GitTrend::CLI do
103
93
  | 24 Smartype/iOS_VPNPlugIn Objective-C++ 0
104
94
  | 25 swift2js/swift2js Objective-C++ 0
105
95
  EOS
106
- expect { @cli.invoke(:list, [], language: language) }.to output(res).to_stdout
96
+ expect { @cli.invoke(:list, [], language: language, description: false) }.to output(res).to_stdout
107
97
  end
108
98
  end
109
99
  end
@@ -153,7 +143,7 @@ RSpec.describe GitTrend::CLI do
153
143
  | 24 meteor/meteor JavaScript 362
154
144
  | 25 Netflix/Scumblr Ruby 305
155
145
  EOS
156
- expect { @cli.invoke(:list, [], since: since) }.to output(res).to_stdout
146
+ expect { @cli.invoke(:list, [], since: since, description: false) }.to output(res).to_stdout
157
147
  end
158
148
  end
159
149
 
@@ -189,68 +179,43 @@ RSpec.describe GitTrend::CLI do
189
179
  | 24 driftyco/ionic JavaScript 1007
190
180
  | 25 fians/marka CSS 989
191
181
  EOS
192
- expect { @cli.invoke(:list, [], since: since) }.to output(res).to_stdout
182
+ expect { @cli.invoke(:list, [], since: since, description: false) }.to output(res).to_stdout
193
183
  end
194
184
  end
195
185
  end
196
186
 
197
- describe 'with -d option' do
198
-
187
+ describe 'with -d option (or with no option)' do
199
188
  after do
200
189
  ENV['COLUMNS'] = nil
201
190
  ENV['LINES'] = nil
202
191
  end
203
192
 
204
- context 'terminal width is enough' do
205
- before do
206
- stub_request_get('trending')
207
- ENV['COLUMNS'] = '140'
208
- ENV['LINES'] = '40'
193
+ before do
194
+ stub_request_get('trending')
195
+ ENV['COLUMNS'] = '140'
196
+ ENV['LINES'] = '40'
197
+ end
198
+
199
+ context 'with no option' do
200
+ it 'display daily ranking' do
201
+ expect { @cli.invoke(:list, []) }.to output(dummy_result_no_options).to_stdout
209
202
  end
203
+ end
210
204
 
205
+ context 'terminal width is enough' do
211
206
  it 'display daily ranking with description' do
212
- res = <<-'EOS'.unindent
213
- |No. Name Lang Star Description
214
- |--- ------------------------------------------ ----------- ------ --------------------------------------------------------------------------
215
- | 1 gionkunz/chartist-js JavaScript 363 Simple responsive charts
216
- | 2 kitematic/kitematic JavaScript 327 Simple Docker App management for Mac OS X.
217
- | 3 tmux-plugins/tmux-resurrect Shell 217 Persists tmux environment across system restarts.
218
- | 4 rxin/db-readings 210 Readings in Databases
219
- | 5 daimajia/AndroidSwipeLayout Java 172 The Most Powerful Swipe Layout!
220
- | 6 tylertreat/chan C 126 Pure C implementation of Go channels.
221
- | 7 AllThingsSmitty/must-watch-css 93 A useful list of must-watch videos about CSS.
222
- | 8 masayuki0812/c3 JavaScript 85 A D3-based reusable chart library
223
- | 9 fouber/page-monitor JavaScript 74 capture webpage and diff the dom change with phantomjs
224
- | 10 gogits/gogs Go 71 Gogs(Go Git Service) is a painless self-hosted Git Service written in G...
225
- | 11 facebook/flux JavaScript 72 Application Architecture for Building User Interfaces
226
- | 12 twbs/bootstrap CSS 55 The most popular front-end framework for developing responsive, mobile ...
227
- | 13 luster-io/impulse JavaScript 68 Dynamics Physics Interactions for the Mobile Web
228
- | 14 lawloretienne/QuickReturn Java 65 Showcases QuickReturn view as a header, footer, and both header and foo...
229
- | 15 angular/angular.js JavaScript 53 HTML enhanced for web apps
230
- | 16 wisk/medusa C 60 An open source interactive disassembler
231
- | 17 ochococo/Design-Patterns-In-Swift Swift 60 Design Patterns implemented in Swift
232
- | 18 cwRichardKim/RKSwipeBetweenViewControllers Objective-C 59 Swipe between ViewControllers like in the Spotify or Twitter app with a...
233
- | 19 google/web-starter-kit CSS 59 Google Web Starter Kit (Beta)
234
- | 20 syncthing/syncthing Go 49 Open Source Continuous File Synchronization
235
- | 21 ruslanskorb/RSKImageCropper Objective-C 46 An image cropper for iOS like in the Contacts app with support for land...
236
- | 22 kyze8439690/ResideLayout Java 44 An Android Layout which has a same function like https://github.com/rom...
237
- | 23 ParsePlatform/f8DeveloperConferenceApp Java 41
238
- | 24 chriskiehl/Gooey Python 41 Turn (almost) any command line program into a full GUI application with...
239
- | 25 discourse/discourse Ruby 41 A platform for community discussion. Free, open, simple.
240
- EOS
241
- expect { @cli.invoke(:list, [], description: 'description') }.to output(res).to_stdout
207
+ expect { @cli.invoke(:list, [], description: true) }.to output(dummy_result_no_options).to_stdout
242
208
  end
243
209
  end
244
210
 
245
211
  context 'terminal width is tiny' do
246
212
  before do
247
- stub_request_get('trending')
248
213
  ENV['COLUMNS'] = '85' # it is not enough for description.
249
214
  ENV['LINES'] = '40'
250
215
  end
251
216
 
252
217
  it 'display daily ranking about the same as no option' do
253
- expect { @cli.invoke(:list, [], description: 'description') }.to output(dummy_result_no_options).to_stdout
218
+ expect { @cli.invoke(:list, [], description: true) }.to output(dummy_result_without_description).to_stdout
254
219
  end
255
220
  end
256
221
  end
@@ -293,7 +258,7 @@ RSpec.describe GitTrend::CLI do
293
258
  | 24 junegunn/fzf Ruby 41
294
259
  | 25 imathis/octopress Ruby 36
295
260
  EOS
296
- expect { @cli.invoke(:list, [], language: language, since: since) }.to output(res).to_stdout
261
+ expect { @cli.invoke(:list, [], language: language, since: since, description: false) }.to output(res).to_stdout
297
262
  end
298
263
  end
299
264
  end
@@ -535,7 +500,7 @@ RSpec.describe GitTrend::CLI do
535
500
  body: load_http_stub(stub_url))
536
501
  end
537
502
 
538
- def dummy_result_no_options
503
+ def dummy_result_without_description
539
504
  <<-'EOS'.unindent
540
505
  |No. Name Lang Star
541
506
  |--- ------------------------------------------ ----------- ------
@@ -566,4 +531,36 @@ RSpec.describe GitTrend::CLI do
566
531
  | 25 discourse/discourse Ruby 41
567
532
  EOS
568
533
  end
534
+
535
+ def dummy_result_no_options
536
+ <<-'EOS'.unindent
537
+ |No. Name Lang Star Description
538
+ |--- ------------------------------------------ ----------- ------ --------------------------------------------------------------------------
539
+ | 1 gionkunz/chartist-js JavaScript 363 Simple responsive charts
540
+ | 2 kitematic/kitematic JavaScript 327 Simple Docker App management for Mac OS X.
541
+ | 3 tmux-plugins/tmux-resurrect Shell 217 Persists tmux environment across system restarts.
542
+ | 4 rxin/db-readings 210 Readings in Databases
543
+ | 5 daimajia/AndroidSwipeLayout Java 172 The Most Powerful Swipe Layout!
544
+ | 6 tylertreat/chan C 126 Pure C implementation of Go channels.
545
+ | 7 AllThingsSmitty/must-watch-css 93 A useful list of must-watch videos about CSS.
546
+ | 8 masayuki0812/c3 JavaScript 85 A D3-based reusable chart library
547
+ | 9 fouber/page-monitor JavaScript 74 capture webpage and diff the dom change with phantomjs
548
+ | 10 gogits/gogs Go 71 Gogs(Go Git Service) is a painless self-hosted Git Service written in G...
549
+ | 11 facebook/flux JavaScript 72 Application Architecture for Building User Interfaces
550
+ | 12 twbs/bootstrap CSS 55 The most popular front-end framework for developing responsive, mobile ...
551
+ | 13 luster-io/impulse JavaScript 68 Dynamics Physics Interactions for the Mobile Web
552
+ | 14 lawloretienne/QuickReturn Java 65 Showcases QuickReturn view as a header, footer, and both header and foo...
553
+ | 15 angular/angular.js JavaScript 53 HTML enhanced for web apps
554
+ | 16 wisk/medusa C 60 An open source interactive disassembler
555
+ | 17 ochococo/Design-Patterns-In-Swift Swift 60 Design Patterns implemented in Swift
556
+ | 18 cwRichardKim/RKSwipeBetweenViewControllers Objective-C 59 Swipe between ViewControllers like in the Spotify or Twitter app with a...
557
+ | 19 google/web-starter-kit CSS 59 Google Web Starter Kit (Beta)
558
+ | 20 syncthing/syncthing Go 49 Open Source Continuous File Synchronization
559
+ | 21 ruslanskorb/RSKImageCropper Objective-C 46 An image cropper for iOS like in the Contacts app with support for land...
560
+ | 22 kyze8439690/ResideLayout Java 44 An Android Layout which has a same function like https://github.com/rom...
561
+ | 23 ParsePlatform/f8DeveloperConferenceApp Java 41
562
+ | 24 chriskiehl/Gooey Python 41 Turn (almost) any command line program into a full GUI application with...
563
+ | 25 discourse/discourse Ruby 41 A platform for community discussion. Free, open, simple.
564
+ EOS
565
+ end
569
566
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-trend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - rochefort
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2014-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor