git-trend 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +127 -111
- data/lib/git_trend/cli.rb +3 -2
- data/lib/git_trend/scraper.rb +3 -3
- data/lib/git_trend/version.rb +1 -1
- data/spec/git_trend/cli_spec.rb +29 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a464878ce9090fc21532a8972478054dc7308cf
|
4
|
+
data.tar.gz: 17813c0ea7583d0aee77dd88b9347ca5b1f72601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 229c8021b10721af8ed8f559df4f6a26d33445673c6a67306112450cc2f1929340bb579396483bb3f37bb9453ae45e2544e85a6adc986554ee098875d6928da9
|
7
|
+
data.tar.gz: eae8d69ca51b4d7d355b5ae74073b877cddfd67eb9996030bc5b779d055294d41f82920087c1ba1dd2b68e50bd8ac023c164b5d5bd5c83804ed58aa7cdced959
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -36,70 +36,70 @@ e.g.:
|
|
36
36
|
|
37
37
|
```
|
38
38
|
$ git trend
|
39
|
-
No. Name
|
40
|
-
---
|
41
|
-
1
|
42
|
-
2
|
43
|
-
3
|
44
|
-
4
|
45
|
-
5
|
46
|
-
6
|
47
|
-
7
|
48
|
-
8
|
49
|
-
9
|
50
|
-
10
|
51
|
-
11
|
52
|
-
12
|
53
|
-
13
|
54
|
-
14
|
55
|
-
15
|
56
|
-
16
|
57
|
-
17
|
58
|
-
18
|
59
|
-
19
|
60
|
-
20
|
61
|
-
21
|
62
|
-
22
|
63
|
-
23
|
64
|
-
24
|
65
|
-
25
|
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
|
68
|
+
### daily trending without description
|
69
69
|
|
70
|
-
git trend -
|
70
|
+
git trend --no-description
|
71
71
|
|
72
72
|
e.g.:
|
73
73
|
|
74
74
|
```
|
75
|
-
$
|
76
|
-
No. Name
|
77
|
-
---
|
78
|
-
1
|
79
|
-
2
|
80
|
-
3
|
81
|
-
4
|
82
|
-
5
|
83
|
-
6
|
84
|
-
7
|
85
|
-
8
|
86
|
-
9
|
87
|
-
10
|
88
|
-
11
|
89
|
-
12
|
90
|
-
13
|
91
|
-
14
|
92
|
-
15
|
93
|
-
16
|
94
|
-
17
|
95
|
-
18
|
96
|
-
19
|
97
|
-
20
|
98
|
-
21
|
99
|
-
22
|
100
|
-
23 google/cadvisor
|
101
|
-
24
|
102
|
-
25
|
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
|
116
|
-
2
|
117
|
-
3
|
118
|
-
4
|
119
|
-
5
|
120
|
-
6
|
121
|
-
7
|
122
|
-
8
|
123
|
-
9
|
124
|
-
10
|
125
|
-
11
|
126
|
-
12
|
127
|
-
13
|
128
|
-
14
|
129
|
-
15
|
130
|
-
16
|
131
|
-
17
|
132
|
-
18
|
133
|
-
19
|
134
|
-
20
|
135
|
-
21
|
136
|
-
22 plataformatec/devise Ruby
|
137
|
-
23
|
138
|
-
24
|
139
|
-
25
|
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
|
157
|
-
---
|
158
|
-
1
|
159
|
-
2
|
160
|
-
3
|
161
|
-
4
|
162
|
-
5
|
163
|
-
6
|
164
|
-
7
|
165
|
-
8
|
166
|
-
9
|
167
|
-
10
|
168
|
-
11
|
169
|
-
12
|
170
|
-
13
|
171
|
-
14
|
172
|
-
15
|
173
|
-
16
|
174
|
-
17
|
175
|
-
18
|
176
|
-
19
|
177
|
-
20
|
178
|
-
21
|
179
|
-
22 twbs/bootstrap
|
180
|
-
23
|
181
|
-
24
|
182
|
-
25
|
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.
|
36
|
+
languages = scraper.languages
|
36
37
|
render_languages(languages)
|
37
38
|
end
|
38
39
|
end
|
data/lib/git_trend/scraper.rb
CHANGED
@@ -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
|
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|
|
data/lib/git_trend/version.rb
CHANGED
data/spec/git_trend/cli_spec.rb
CHANGED
@@ -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.
|
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-
|
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:
|
194
|
+
post_install_message: Thanks for installing!
|
195
195
|
rdoc_options: []
|
196
196
|
require_paths:
|
197
197
|
- lib
|