git-trend 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bc80e2666fb3d6a37e64f619bb1ccc22e74516b
4
- data.tar.gz: e42df530102a7ce0f1952e6a2d3c80cc680858da
3
+ metadata.gz: 1a464878ce9090fc21532a8972478054dc7308cf
4
+ data.tar.gz: 17813c0ea7583d0aee77dd88b9347ca5b1f72601
5
5
  SHA512:
6
- metadata.gz: 21046f4da96051712499ead5313cef33a56fd2c1941febfded3fa5b26c4294ea303d6e1889114a0da15ad588deb3f1296ac2a1831e9c7a3417af295563598fd9
7
- data.tar.gz: 037627a05e72916240fdfbce59ab267ed8f286440613399cd04fcaab08345bc61999f0cd27d98e46aa411d57fffe9a09f848262b45e29b651bf34d1fc8ebd5c8
6
+ metadata.gz: 229c8021b10721af8ed8f559df4f6a26d33445673c6a67306112450cc2f1929340bb579396483bb3f37bb9453ae45e2544e85a6adc986554ee098875d6928da9
7
+ data.tar.gz: eae8d69ca51b4d7d355b5ae74073b877cddfd67eb9996030bc5b779d055294d41f82920087c1ba1dd2b68e50bd8ac023c164b5d5bd5c83804ed58aa7cdced959
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.1.4
2
+ * Add number option #3 [7cff5b4]
3
+
1
4
  ## v0.1.3
2
5
  * The `descript` option of `list` command was changed into the default. [3602272]
3
6
 
data/README.md CHANGED
@@ -36,70 +36,70 @@ e.g.:
36
36
 
37
37
  ```
38
38
  $ git trend
39
- No. Name Lang Star
40
- --- -------------------------------------------------- ------------ ------
41
- 1 lafikl/steady.js JavaScript 435
42
- 2 rpicard/explore-flask Python 316
43
- 3 dc-js/dc.js JavaScript 289
44
- 4 watilde/beeplay JavaScript 272
45
- 5 grant/swift-cheat-sheet 263
46
- 6 tictail/bounce.js CSS 260
47
- 7 jessepollak/card CSS 225
48
- 8 prat0318/json_resume Ruby 195
49
- 9 addyosmani/psi JavaScript 201
50
- 10 fullstackio/FlappySwift Swift 168
51
- 11 PythonJS/PythonJS JavaScript 185
52
- 12 numbbbbb/the-swift-programming-language-in-chinese JavaScript 137
53
- 13 maxpow4h/swiftz Swift 134
54
- 14 andlabs/ui Go 116
55
- 15 interagent/http-api-design 100
56
- 16 dotcloud/docker Go 98
57
- 17 dwightwatson/validating PHP 99
58
- 18 daneden/animate.css CSS 92
59
- 19 daimajia/AndroidImageSlider Java 87
60
- 20 austinzheng/swift-2048 Swift 73
61
- 21 Flolagale/mailin Python 77
62
- 22 hiphopapp/hiphop CoffeeScript 71
63
- 23 jas/swift-playground-builder JavaScript 62
64
- 24 medyo/dynamicbox Java 59
65
- 25 twbs/bootstrap CSS 46
39
+ No. Name Lang Star Description
40
+ --- ---------------------------------------- ----------- ------ ---------------------------------------------------------------------------------------------------
41
+ 1 reddit/reddit Python 528 the code that powers reddit.com
42
+ 2 yahoo/gifshot JavaScript 485 JavaScript library that can create animated GIFs from media streams, videos, or images
43
+ 3 FezVrasta/bootstrap-material-design CSS 387 Material design theme for Bootstrap 3
44
+ 4 realm/realm-java Java 293 Realm is a mobile database: a replacement for SQLite & ORMs
45
+ 5 Aerolab/midnight.js JavaScript 226 A jQuery plugin to switch fixed headers on the fly
46
+ 6 alebcay/awesome-shell 220 A curated list of awesome command-line frameworks, toolkits, guides and gizmos. Inspired by awes...
47
+ 7 jonathanslenders/python-prompt-toolkit Python 215 Library for building powerful interactive command lines in Python
48
+ 8 willianjusten/awesome-svg 130 A curated list of SVG.
49
+ 9 usablica/intro.js JavaScript 105 A better way for new feature introduction and step-by-step users guide for your website and proj...
50
+ 10 simoncozens/sile C++ 102 Simon's Improved Layout Engine
51
+ 11 sferik/t Ruby 85 A command-line power tool for Twitter.
52
+ 12 realm/realm-cocoa Objective-C 83 Realm is a mobile database: a replacement for Core Data & SQLite
53
+ 13 mubix/shellshocker-pocs 67 Collection of Proof of Concepts and Potential Targets for #ShellShocker
54
+ 14 hannob/bashcheck Shell 60 test script for shellshocker and related vulnerabilities
55
+ 15 angular/angular.js JavaScript 46 HTML enhanced for web apps
56
+ 16 kenwheeler/slick JavaScript 57 the last carousel you'll ever need
57
+ 17 Squirrel/Squirrel.Windows C 57 An installation and update framework for Windows desktop apps
58
+ 18 jshint/fixmyjs JavaScript 56 Automatically fix silly lint errors.
59
+ 19 plivo/sharq-server Python 52 A flexible rate limited queueing system
60
+ 20 marmelab/ng-admin JavaScript 49 Add an AngularJS admin GUI to any RESTful API
61
+ 21 twbs/bootstrap CSS 38 The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first pro...
62
+ 22 CyberAgent/AMBTableViewController Objective-C 48 Storyboard and Prototype Cells-centric block-based UITableView controller to manage complex layo...
63
+ 23 google/cadvisor Go 48 Analyzes resource usage and performance characteristics of running containers.
64
+ 24 vladikoff/chromeos-apk JavaScript 46 Run Android APKs in Chrome OS OR Chrome in OS X, Linux and Windows.
65
+ 25 nhanaswigs/htmljs JavaScript 47 HTML render engine and data binding (MVVM)
66
66
  ```
67
67
 
68
- ### daily trending with description
68
+ ### daily trending without description
69
69
 
70
- git trend -d
70
+ git trend --no-description
71
71
 
72
72
  e.g.:
73
73
 
74
74
  ```
75
- $ g trend -d
76
- No. Name Lang Star Description
77
- --- -------------------------------------------------- ----------- ------ ----------------------------------------------------------------------------
78
- 1 hummingbird-me/hummingbird JavaScript 535 Probably the coolest anime discovery platform around.
79
- 2 google/flatbuffers Shell 272 Memory Efficient Serialization Library
80
- 3 jakubroztocil/httpie Python 248 HTTPie is a command line HTTP client, a user-friendly cURL replacement.
81
- 4 mephux/komanda JavaScript 199 IRC for people who write code
82
- 5 burocratik/outdated-browser JavaScript 188 A simple tool to identify and upgrade old browsers.
83
- 6 numbbbbb/the-swift-programming-language-in-chinese Python 140 中文版 Apple 官方 Swift 教程《The Swift Programming Language》
84
- 7 pocketjoso/penthouse JavaScript 146 Critical Path CSS Generator
85
- 8 estiens/world_cup_json Ruby 126 Rails backend for a scraper that outputs World Cup data as JSON
86
- 9 medialab/artoo JavaScript 126 The client-side scraping companion.
87
- 10 justjavac/Google-IPs 97 Google 全球 IP 地址库
88
- 11 thusfresh/switchboard Erlang 114 Switchboard Server
89
- 12 greatfire/wiki 97
90
- 13 montagejs/collections JavaScript 96 This package contains JavaScript implementations of common data structure...
91
- 14 thumbtack/angular-smarty JavaScript 94 Autocomplete UI written with Angular JS.
92
- 15 Vestorly/torii JavaScript 91 A set of clean abstractions for authentication in Ember.js
93
- 16 angular/angular.js JavaScript 68 HTML enhanced for web apps
94
- 17 urish/angular-moment JavaScript 79 Angular.JS directives for Moment.JS (timeago alternative)
95
- 18 mattdonnelly/Swifter Swift 76 A Twitter framework for iOS & OS X written in Swift
96
- 19 nimbly/angular-formly JavaScript 72 AngularJS directive which takes JSON representing a form and renders to H...
97
- 20 julianshapiro/velocity JavaScript 71 Accelerated JavaScript animation.
98
- 21 GoogleCloudPlatform/kubernetes Go 64 Container Cluster Manager
99
- 22 twbs/bootstrap CSS 45 The most popular front-end framework for developing responsive, mobile fi...
100
- 23 google/cadvisor Go 58 Analyzes resource usage and performance characteristics of running contai...
101
- 24 CartoDB/odyssey.js JavaScript 57 Making it easy to merge map and narrative
102
- 25 ra1028/RACollectionViewReorderableTripletLayout Objective-C 55 The custom collectionView layout that can perform reordering of cells by ...
75
+ $ git trend --no-description
76
+ No. Name Lang Star
77
+ --- ---------------------------------------- ----------- ------
78
+ 1 reddit/reddit Python 528
79
+ 2 yahoo/gifshot JavaScript 485
80
+ 3 FezVrasta/bootstrap-material-design CSS 387
81
+ 4 realm/realm-java Java 293
82
+ 5 Aerolab/midnight.js JavaScript 226
83
+ 6 alebcay/awesome-shell 220
84
+ 7 jonathanslenders/python-prompt-toolkit Python 215
85
+ 8 willianjusten/awesome-svg 130
86
+ 9 usablica/intro.js JavaScript 105
87
+ 10 simoncozens/sile C++ 102
88
+ 11 sferik/t Ruby 85
89
+ 12 realm/realm-cocoa Objective-C 83
90
+ 13 mubix/shellshocker-pocs 67
91
+ 14 hannob/bashcheck Shell 60
92
+ 15 angular/angular.js JavaScript 46
93
+ 16 kenwheeler/slick JavaScript 57
94
+ 17 Squirrel/Squirrel.Windows C 57
95
+ 18 jshint/fixmyjs JavaScript 56
96
+ 19 plivo/sharq-server Python 52
97
+ 20 marmelab/ng-admin JavaScript 49
98
+ 21 twbs/bootstrap CSS 38
99
+ 22 CyberAgent/AMBTableViewController Objective-C 48
100
+ 23 google/cadvisor Go 48
101
+ 24 vladikoff/chromeos-apk JavaScript 46
102
+ 25 nhanaswigs/htmljs JavaScript 47
103
103
  ```
104
104
 
105
105
  ### daily trending by language
@@ -110,33 +110,33 @@ e.g.:
110
110
 
111
111
  ```
112
112
  $ git trend -l ruby
113
- No. Name Lang Star
114
- --- ---------------------------------------- ---------- ------
115
- 1 prat0318/json_resume Ruby 199
116
- 2 dawn/dawn Ruby 51
117
- 3 etsy/nagios-herald Ruby 27
118
- 4 Homebrew/homebrew Ruby 13
119
- 5 CanCanCommunity/cancancan Ruby 16
120
- 6 venmo/synx Ruby 16
121
- 7 joenorton/rubyretriever Ruby 14
122
- 8 jekyll/jekyll Ruby 10
123
- 9 rapid7/metasploit-framework Ruby 9
124
- 10 discourse/discourse Ruby 9
125
- 11 torben/FlappyMotion Ruby 10
126
- 12 rails/rails Ruby 6
127
- 13 visionmedia/commander Ruby 9
128
- 14 interagent/prmd Ruby 9
129
- 15 opf/openproject Ruby 9
130
- 16 mitchellh/vagrant Ruby 8
131
- 17 twbs/bootstrap-sass Ruby 8
132
- 18 sass/sass Ruby 7
133
- 19 github/hub Ruby 8
134
- 20 gitlabhq/gitlabhq Ruby 5
135
- 21 CocoaPods/CocoaPods Ruby 7
136
- 22 plataformatec/devise Ruby 5
137
- 23 wbailey/claws Ruby 7
138
- 24 guard/guard Ruby 6
139
- 25 jordansissel/fpm Ruby 6
113
+ No. Name Lang Star Description
114
+ --- ---------------------------------------- ---------- ------ ----------------------------------------------------------------------------------------------------
115
+ 1 sferik/t Ruby 78 A command-line power tool for Twitter.
116
+ 2 rails/rails Ruby 26 Ruby on Rails
117
+ 3 Homebrew/homebrew Ruby 23 The missing package manager for OS X.
118
+ 4 ruby/ruby Ruby 12 The Ruby Programming Language
119
+ 5 discourse/discourse Ruby 10 A platform for community discussion. Free, open, simple.
120
+ 6 diaspora/diaspora Ruby 12 Distributed and contextual social networking
121
+ 7 elasticsearch/logstash Ruby 10 logstash - logs/event transport, processing, management, search.
122
+ 8 mitchellh/vagrant Ruby 10 Vagrant is a tool for building and distributing development environments.
123
+ 9 increments/qiita-rb Ruby 10 Qiita API v2 client library and CLI tool, written in Ruby
124
+ 10 gitlabhq/gitlabhq Ruby 8 Open source software to collaborate on code. Follow us on twitter @gitlabhq
125
+ 11 jekyll/jekyll Ruby 7 Jekyll is a blog-aware, static site generator in Ruby
126
+ 12 bbatsov/ruby-style-guide Ruby 9 A community-driven Ruby coding style guide
127
+ 13 capistrano/capistrano Ruby 7 Remote multi-server automation tool
128
+ 14 intridea/grape Ruby 8 An opinionated micro-framework for creating REST-like APIs in Ruby.
129
+ 15 CocoaPods/CocoaPods Ruby 6 The Objective-C library dependency manager.
130
+ 16 thoughtbot/laptop Ruby 6 A shell script which turns your Linux or Mac OS X laptop into an awesome development machine.
131
+ 17 amatsuda/database_rewinder Ruby 7 minimalist's tiny and ultra-fast database cleaner
132
+ 18 voltrb/volt Ruby 7 A ruby web framework where your ruby runs on both server and client
133
+ 19 Homebrew/linuxbrew Ruby 6 A fork of Homebrew for Linux
134
+ 20 davidcelis/spec-me-maybe Ruby 7 Introduces the `maybe` syntax to RSpec.
135
+ 21 peter-murach/tty Ruby 6 Toolbox for developing CLI clients.
136
+ 22 plataformatec/devise Ruby 6 Flexible authentication solution for Rails with Warden.
137
+ 23 fluent/fluentd Ruby 6 Fluentd data collector
138
+ 24 caskroom/homebrew-cask Ruby 5 A CLI workflow for the administration of Mac applications distributed as binaries
139
+ 25 cantino/huginn Ruby 5 Build agents that monitor and act on your behalf. Your agents are standing by!
140
140
  ```
141
141
 
142
142
  ### weekly/monthly trending
@@ -153,33 +153,49 @@ e.g.:
153
153
 
154
154
  ```
155
155
  $ git trend -s weekly
156
- No. Name Lang Star
157
- --- -------------------------------------------------- ---------- ------
158
- 1 numbbbbb/the-swift-programming-language-in-chinese JavaScript 4161
159
- 2 justjavac/Google-IPs 1499
160
- 3 tictail/bounce.js CSS 1779
161
- 4 grant/swift-cheat-sheet JavaScript 1432
162
- 5 GoogleCloudPlatform/kubernetes Go 1224
163
- 6 jessepollak/card CSS 1109
164
- 7 facebook/Haxl Haskell 1003
165
- 8 greatfire/wiki 845
166
- 9 docker/libchan Go 945
167
- 10 lafikl/steady.js JavaScript 783
168
- 11 dotcloud/docker Go 660
169
- 12 fullstackio/FlappySwift Swift 603
170
- 13 docker/libswarm Go 691
171
- 14 uutils/coreutils Rust 610
172
- 15 watilde/beeplay JavaScript 542
173
- 16 dmytrodanylyk/circular-progress-button Java 510
174
- 17 mooz/percol Python 511
175
- 18 fengsp/plan Python 496
176
- 19 interagent/http-api-design 481
177
- 20 rpicard/explore-flask Python 477
178
- 21 jdorn/json-editor JavaScript 387
179
- 22 twbs/bootstrap CSS 288
180
- 23 google/cadvisor Go 371
181
- 24 irssi/irssi C 351
182
- 25 mbostock/d3 JavaScript 288
156
+ No. Name Lang Star Description
157
+ --- ---------------------------------------- ------------ ------ --------------------------------------------------------------------------------------------------
158
+ 1 FezVrasta/bootstrap-material-design CSS 2821 Material design theme for Bootstrap 3
159
+ 2 slackhq/SlackTextViewController Objective-C 1526 A drop-in UIViewController subclass with a growing text input view and other useful messaging f...
160
+ 3 willianjusten/awesome-svg 1395 A curated list of SVG.
161
+ 4 Aerolab/midnight.js JavaScript 1351 A jQuery plugin to switch fixed headers on the fly
162
+ 5 alebcay/awesome-shell 743 A curated list of awesome command-line frameworks, toolkits, guides and gizmos. Inspired by awe...
163
+ 6 jonathanslenders/python-prompt-toolkit Python 670 Library for building powerful interactive command lines in Python
164
+ 7 vladikoff/chromeos-apk JavaScript 608 Run Android APKs in Chrome OS OR Chrome in OS X, Linux and Windows.
165
+ 8 psaravan/JamsMusicPlayer Java 533 A free, powerful and elegant music player for Android.
166
+ 9 reddit/reddit Python 553 the code that powers reddit.com
167
+ 10 Alamofire/Alamofire Swift 559 Elegant HTTP Networking in Swift
168
+ 11 vgvassilev/cling C++ 492 Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure...
169
+ 12 shu223/iOS8-Sampler Objective-C 476 Code examples for the new functions of iOS 8.
170
+ 13 yahoo/gifshot JavaScript 487 JavaScript library that can create animated GIFs from media streams, videos, or images
171
+ 14 kenwheeler/slick JavaScript 439 the last carousel you'll ever need
172
+ 15 sferik/t Ruby 420 A command-line power tool for Twitter.
173
+ 16 angular/angular.js JavaScript 325 HTML enhanced for web apps
174
+ 17 mieko/sr-captcha CSS 387 Article describing how the technical means by which Silk Road 1's captcha was broken.
175
+ 18 sofish/wechat.js JavaScript 360 微信相关的 js 操作:分享、网络、菜单
176
+ 19 robertdavidgraham/masscan C 345 TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes...
177
+ 20 realm/realm-java Java 348 Realm is a mobile database: a replacement for SQLite & ORMs
178
+ 21 humhub/humhub PHP 331 HumHub - Open Source Social Network
179
+ 22 twbs/bootstrap CSS 259 The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first pr...
180
+ 23 mechio/takana CoffeeScript 341 Takana lets you see your SCSS and CSS style changes live, in the browser, as you type them
181
+ 24 davidtheclark/scalable-css-reading-list 331 Collected dispatches from The Quest for Scalable CSS
182
+ 25 addyosmani/timing.js JavaScript 335 Navigation Timing API measurement helpers
183
+ ```
184
+
185
+ ### number of trendings
186
+
187
+ git trend -n <number>
188
+
189
+ e.g.:
190
+
191
+ ```
192
+ $ git trend -n 3
193
+ No. Name Lang Star Description
194
+ --- ---------------------------------------- ---------- ------ -----------------------------------------------------
195
+ 1 mozilla/metrics-graphics JavaScript 1005 A library optimized for concise, principled data g...
196
+ 2 breach/thrust C++ 574 Chromium-based cross-platform / cross-language app...
197
+ 3 dotnet/corefx C# 538 This repository contains the foundational librarie...
198
+
183
199
  ```
184
200
 
185
201
  ### show languages
data/lib/git_trend/cli.rb CHANGED
@@ -18,11 +18,12 @@ module GitTrend
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
20
  option :description, aliases: '-d', required: false, default: true, type: :boolean, desc: "\033[32m(DEFAULT OPTION)\e[0m Dislpay descriptions"
21
+ option :number, aliases: '-n', required: false, type: :numeric, desc: 'Number of lines'
21
22
  option :help, aliases: '-h', required: false, type: :boolean
22
23
  def list
23
24
  help(:list) and return if options[:help]
24
25
  scraper = Scraper.new
25
- projects = scraper.get(options[:language], options[:since])
26
+ projects = scraper.get(options[:language], options[:since], options[:number])
26
27
  render(projects, !!options[:description])
27
28
  rescue => e
28
29
  say "An unexpected #{e.class} has occurred.", :red
@@ -32,7 +33,7 @@ module GitTrend
32
33
  desc :languages, 'Show selectable languages'
33
34
  def languages
34
35
  scraper = Scraper.new
35
- languages = scraper.list_languages
36
+ languages = scraper.languages
36
37
  render_languages(languages)
37
38
  end
38
39
  end
@@ -14,7 +14,7 @@ module GitTrend
14
14
  @agent.set_proxy(proxy.host, proxy.port, proxy.user, proxy.password) if proxy
15
15
  end
16
16
 
17
- def get(language = nil, since = nil)
17
+ def get(language = nil, since = nil, number = nil)
18
18
  projects = []
19
19
  page = @agent.get(generate_url_for_get(language, since))
20
20
 
@@ -27,10 +27,10 @@ module GitTrend
27
27
  projects << project
28
28
  end
29
29
  fail ScrapeException if projects.empty?
30
- projects
30
+ projects[0...number]
31
31
  end
32
32
 
33
- def list_languages
33
+ def languages
34
34
  languages = []
35
35
  page = @agent.get(BASE_URL)
36
36
  page.search('div.select-menu-item a').each do |content|
@@ -1,3 +1,3 @@
1
1
  module GitTrend
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -16,6 +16,35 @@ RSpec.describe GitTrend::CLI do
16
16
  @cli = CLI.new
17
17
  end
18
18
 
19
+ describe 'with -n option' do
20
+ context 'with 3' do
21
+ before do
22
+ stub_request_get('trending')
23
+ end
24
+ let(:number) { 3 }
25
+ it 'display daily ranking top 3' do
26
+ res = <<-'EOS'.unindent
27
+ |No. Name Lang Star
28
+ |--- ---------------------------------------- ---------- ------
29
+ | 1 gionkunz/chartist-js JavaScript 363
30
+ | 2 kitematic/kitematic JavaScript 327
31
+ | 3 tmux-plugins/tmux-resurrect Shell 217
32
+ EOS
33
+ expect { @cli.invoke(:list, [], number: number, description: false) }.to output(res).to_stdout
34
+ end
35
+ end
36
+
37
+ context 'with over 25' do
38
+ before do
39
+ stub_request_get('trending')
40
+ end
41
+ let(:number) { 26 }
42
+ it 'display daily ranking' do
43
+ expect { @cli.invoke(:list, [], number: number, description: false) }.to output(dummy_result_without_description).to_stdout
44
+ end
45
+ end
46
+ end
47
+
19
48
  describe 'with -l option' do
20
49
  context 'with ruby' do
21
50
  before do
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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - rochefort
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-01 00:00:00.000000000 Z
11
+ date: 2014-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -191,7 +191,7 @@ homepage: https://github.com/rochefort/git-trend
191
191
  licenses:
192
192
  - MIT
193
193
  metadata: {}
194
- post_install_message: "\U0001F37A Thanks for installing!"
194
+ post_install_message: Thanks for installing!
195
195
  rdoc_options: []
196
196
  require_paths:
197
197
  - lib