git-trend 0.2.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/README.md +68 -75
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/{bin/git-trend → exe/git_trend} +0 -0
- data/git-trend.gemspec +2 -1
- data/lib/git_trend.rb +30 -5
- data/lib/git_trend/cli.rb +3 -2
- data/lib/git_trend/scraper.rb +13 -6
- data/lib/git_trend/version.rb +1 -1
- data/spec/git_trend/cli_spec.rb +450 -424
- data/spec/git_trend/scraper_spec.rb +4 -8
- data/spec/git_trend_spec.rb +82 -0
- data/spec/spec_helper.rb +14 -0
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 597638b20103fa0f93fe64b4715f9b0bc1a36c4a
|
4
|
+
data.tar.gz: 3b194423f73e884bdbd0692ad5e18176a733f3de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9f3622dcbddfb717aebf4c5e046639b80ff73772145c91ec9757c24b900aa52a2f086ddff014dafa470c7869bbb449c8eda91ebdc92a97c3d482bcd1019a575
|
7
|
+
data.tar.gz: 2a1913deb989b7919ffc839696c6648571f1085e73c30cbe6ca1fcc54719cc74e36b231630d464d78e41c313050f9c128ae07715c62231ad97c398d14a240f91
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -7,21 +7,73 @@
|
|
7
7
|
|
8
8
|
# git-trend
|
9
9
|
|
10
|
-
git-trend is a
|
10
|
+
`git-trend` is a gem that fetches [Trending repositories on GitHub](https://github.com/trending).
|
11
|
+
And this also work as a command line utility.
|
11
12
|
|
12
13
|
## Requirements
|
13
14
|
|
14
|
-
Ruby versions is
|
15
|
+
Ruby versions is 2.0 or later.
|
15
16
|
|
16
17
|
## Installation
|
18
|
+
Add this line to your application's Gemfile:
|
19
|
+
gem 'git-trend'
|
17
20
|
|
21
|
+
And then execute:
|
22
|
+
$bundle
|
23
|
+
|
24
|
+
Or install it yourself as:
|
18
25
|
$ gem install git-trend
|
19
26
|
|
20
|
-
## Usage
|
27
|
+
## Usage Of a gem
|
28
|
+
|
29
|
+
Require it if you haven't:
|
30
|
+
|
31
|
+
require 'git-trend'
|
32
|
+
|
33
|
+
### Fetch trending
|
34
|
+
|
35
|
+
repos = GitTrend.get
|
36
|
+
repos.each do |r|
|
37
|
+
puts "#{r.name} (#{r.star_count} stargazers)"
|
38
|
+
puts "--- #{r.description}\n\n"
|
39
|
+
end
|
40
|
+
|
41
|
+
# =>
|
42
|
+
# jayphelps/git-blame-someone-else (625 stargazers)
|
43
|
+
# --- Blame someone else for your bad code.
|
44
|
+
#
|
45
|
+
# FreeCodeCamp/FreeCodeCamp (574 stargazers)
|
46
|
+
# --- The http://FreeCodeCamp.com open source codebase and curriculum. Learn to # code and help nonprofits.
|
47
|
+
#
|
48
|
+
# p-e-w/maybe (519 stargazers)
|
49
|
+
# --- See what a program does before deciding whether you really want it to happen.
|
50
|
+
# ...
|
51
|
+
|
52
|
+
### Use language and since options
|
53
|
+
|
54
|
+
# language
|
55
|
+
GitTrend.get('ruby')
|
56
|
+
GitTrend.get(:ruby)
|
57
|
+
|
58
|
+
# since
|
59
|
+
GitTrend.get(since: :weekly)
|
60
|
+
GitTrend.get(since: :week)
|
61
|
+
GitTrend.get(since: :w)
|
62
|
+
|
63
|
+
# language and since
|
64
|
+
GitTrend.get('ruby', 'weekly')
|
65
|
+
GitTrend.get(:ruby, :weekly)
|
66
|
+
GitTrend.get(language: :ruby, since: :weekly)
|
67
|
+
|
68
|
+
### Show enable languages
|
69
|
+
|
70
|
+
GitTrend.languages
|
71
|
+
|
72
|
+
## Usage Of a command line tool
|
21
73
|
|
22
74
|
Use the git-trend as follows:
|
23
75
|
|
24
|
-
### daily trending
|
76
|
+
### Fetch daily trending
|
25
77
|
|
26
78
|
git trend
|
27
79
|
|
@@ -59,7 +111,7 @@ No. Name Lang Star Description
|
|
59
111
|
|
60
112
|
```
|
61
113
|
|
62
|
-
### daily trending without description
|
114
|
+
### Fetch daily trending without description
|
63
115
|
|
64
116
|
git trend --no-description
|
65
117
|
|
@@ -74,30 +126,11 @@ No. Name Lang Star
|
|
74
126
|
3 FezVrasta/bootstrap-material-design CSS 387
|
75
127
|
4 realm/realm-java Java 293
|
76
128
|
5 Aerolab/midnight.js JavaScript 226
|
77
|
-
|
78
|
-
7 jonathanslenders/python-prompt-toolkit Python 215
|
79
|
-
8 willianjusten/awesome-svg 130
|
80
|
-
9 usablica/intro.js JavaScript 105
|
81
|
-
10 simoncozens/sile C++ 102
|
82
|
-
11 sferik/t Ruby 85
|
83
|
-
12 realm/realm-cocoa Objective-C 83
|
84
|
-
13 mubix/shellshocker-pocs 67
|
85
|
-
14 hannob/bashcheck Shell 60
|
86
|
-
15 angular/angular.js JavaScript 46
|
87
|
-
16 kenwheeler/slick JavaScript 57
|
88
|
-
17 Squirrel/Squirrel.Windows C 57
|
89
|
-
18 jshint/fixmyjs JavaScript 56
|
90
|
-
19 plivo/sharq-server Python 52
|
91
|
-
20 marmelab/ng-admin JavaScript 49
|
92
|
-
21 twbs/bootstrap CSS 38
|
93
|
-
22 CyberAgent/AMBTableViewController Objective-C 48
|
94
|
-
23 google/cadvisor Go 48
|
95
|
-
24 vladikoff/chromeos-apk JavaScript 46
|
96
|
-
25 nhanaswigs/htmljs JavaScript 47
|
129
|
+
...
|
97
130
|
|
98
131
|
```
|
99
132
|
|
100
|
-
### daily trending by language
|
133
|
+
### Fetch daily trending by language
|
101
134
|
|
102
135
|
git trend -l
|
103
136
|
|
@@ -112,37 +145,19 @@ No. Name Lang Star Description
|
|
112
145
|
3 Homebrew/homebrew Ruby 23 The missing package manager for OS X.
|
113
146
|
4 ruby/ruby Ruby 12 The Ruby Programming Language
|
114
147
|
5 discourse/discourse Ruby 10 A platform for community discussion. Free, open, simple.
|
115
|
-
|
116
|
-
7 elasticsearch/logstash Ruby 10 logstash - logs/event transport, processing, management, search.
|
117
|
-
8 mitchellh/vagrant Ruby 10 Vagrant is a tool for building and distributing development environments.
|
118
|
-
9 increments/qiita-rb Ruby 10 Qiita API v2 client library and CLI tool, written in Ruby
|
119
|
-
10 gitlabhq/gitlabhq Ruby 8 Open source software to collaborate on code. Follow us on twitter @gitlabhq
|
120
|
-
11 jekyll/jekyll Ruby 7 Jekyll is a blog-aware, static site generator in Ruby
|
121
|
-
12 bbatsov/ruby-style-guide Ruby 9 A community-driven Ruby coding style guide
|
122
|
-
13 capistrano/capistrano Ruby 7 Remote multi-server automation tool
|
123
|
-
14 intridea/grape Ruby 8 An opinionated micro-framework for creating REST-like APIs in Ruby.
|
124
|
-
15 CocoaPods/CocoaPods Ruby 6 The Objective-C library dependency manager.
|
125
|
-
16 thoughtbot/laptop Ruby 6 A shell script which turns your Linux or Mac OS X laptop into an awesome development machine.
|
126
|
-
17 amatsuda/database_rewinder Ruby 7 minimalist's tiny and ultra-fast database cleaner
|
127
|
-
18 voltrb/volt Ruby 7 A ruby web framework where your ruby runs on both server and client
|
128
|
-
19 Homebrew/linuxbrew Ruby 6 A fork of Homebrew for Linux
|
129
|
-
20 davidcelis/spec-me-maybe Ruby 7 Introduces the `maybe` syntax to RSpec.
|
130
|
-
21 peter-murach/tty Ruby 6 Toolbox for developing CLI clients.
|
131
|
-
22 plataformatec/devise Ruby 6 Flexible authentication solution for Rails with Warden.
|
132
|
-
23 fluent/fluentd Ruby 6 Fluentd data collector
|
133
|
-
24 caskroom/homebrew-cask Ruby 5 A CLI workflow for the administration of Mac applications distributed as binaries
|
134
|
-
25 cantino/huginn Ruby 5 Build agents that monitor and act on your behalf. Your agents are standing by!
|
135
|
-
|
148
|
+
...
|
136
149
|
```
|
137
150
|
|
138
|
-
### weekly/monthly trending
|
151
|
+
### Fetch weekly/monthly trending
|
139
152
|
|
140
153
|
git trend -s weekly
|
154
|
+
git trend -s week
|
141
155
|
git trend -s w
|
142
156
|
|
143
157
|
or
|
144
158
|
|
145
159
|
git trend -s monthly
|
160
|
+
git trend -s month
|
146
161
|
git trend -s m
|
147
162
|
|
148
163
|
e.g.:
|
@@ -156,30 +171,10 @@ No. Name Lang Star Description
|
|
156
171
|
3 willianjusten/awesome-svg 1395 A curated list of SVG.
|
157
172
|
4 Aerolab/midnight.js JavaScript 1351 A jQuery plugin to switch fixed headers on the fly
|
158
173
|
5 alebcay/awesome-shell 743 A curated list of awesome command-line frameworks, toolkits, guides and gizmos. Inspired by awe...
|
159
|
-
|
160
|
-
7 vladikoff/chromeos-apk JavaScript 608 Run Android APKs in Chrome OS OR Chrome in OS X, Linux and Windows.
|
161
|
-
8 psaravan/JamsMusicPlayer Java 533 A free, powerful and elegant music player for Android.
|
162
|
-
9 reddit/reddit Python 553 the code that powers reddit.com
|
163
|
-
10 Alamofire/Alamofire Swift 559 Elegant HTTP Networking in Swift
|
164
|
-
11 vgvassilev/cling C++ 492 Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure...
|
165
|
-
12 shu223/iOS8-Sampler Objective-C 476 Code examples for the new functions of iOS 8.
|
166
|
-
13 yahoo/gifshot JavaScript 487 JavaScript library that can create animated GIFs from media streams, videos, or images
|
167
|
-
14 kenwheeler/slick JavaScript 439 the last carousel you'll ever need
|
168
|
-
15 sferik/t Ruby 420 A command-line power tool for Twitter.
|
169
|
-
16 angular/angular.js JavaScript 325 HTML enhanced for web apps
|
170
|
-
17 mieko/sr-captcha CSS 387 Article describing how the technical means by which Silk Road 1's captcha was broken.
|
171
|
-
18 sofish/wechat.js JavaScript 360 微信相关的 js 操作:分享、网络、菜单
|
172
|
-
19 robertdavidgraham/masscan C 345 TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes...
|
173
|
-
20 realm/realm-java Java 348 Realm is a mobile database: a replacement for SQLite & ORMs
|
174
|
-
21 humhub/humhub PHP 331 HumHub - Open Source Social Network
|
175
|
-
22 twbs/bootstrap CSS 259 The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first pr...
|
176
|
-
23 mechio/takana CoffeeScript 341 Takana lets you see your SCSS and CSS style changes live, in the browser, as you type them
|
177
|
-
24 davidtheclark/scalable-css-reading-list 331 Collected dispatches from The Quest for Scalable CSS
|
178
|
-
25 addyosmani/timing.js JavaScript 335 Navigation Timing API measurement helpers
|
179
|
-
|
174
|
+
...
|
180
175
|
```
|
181
176
|
|
182
|
-
### number of trending
|
177
|
+
### Fetch number of trending
|
183
178
|
|
184
179
|
git trend -n <number>
|
185
180
|
|
@@ -195,7 +190,7 @@ No. Name Lang Star Description
|
|
195
190
|
|
196
191
|
```
|
197
192
|
|
198
|
-
###
|
193
|
+
### Show enable languages
|
199
194
|
|
200
195
|
git trend languages
|
201
196
|
|
@@ -211,9 +206,7 @@ alloy
|
|
211
206
|
antlr
|
212
207
|
apex
|
213
208
|
applescript
|
214
|
-
|
215
|
-
.
|
216
|
-
.
|
209
|
+
...
|
217
210
|
```
|
218
211
|
|
219
212
|
## Tips
|
@@ -222,7 +215,7 @@ I use an alias command like below;
|
|
222
215
|
alias trend='g trend -n 10 && g trend -l ruby -n 5 && g trend -l JavaScript -n 5 && g trend -l objective-c -n 5 && g trend -l swift -n 3 && g trend -l php -n 3'
|
223
216
|
```
|
224
217
|
|
225
|
-
##
|
218
|
+
## Implementation of other language
|
226
219
|
|
227
220
|
* [andygrunwald/go-trending: Go library for accessing trending repositories and developers at Github.](https://github.com/andygrunwald/go-trending)
|
228
221
|
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'git_trend'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
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
|
data/bin/setup
ADDED
File without changes
|
data/git-trend.gemspec
CHANGED
@@ -28,7 +28,8 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.license = 'MIT'
|
29
29
|
|
30
30
|
spec.files = `git ls-files -z`.split("\x0")
|
31
|
-
spec.
|
31
|
+
spec.bindir = 'exe'
|
32
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
33
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
33
34
|
spec.require_paths = ['lib']
|
34
35
|
|
data/lib/git_trend.rb
CHANGED
@@ -1,11 +1,36 @@
|
|
1
1
|
require 'mb_string'
|
2
2
|
|
3
|
+
require 'git_trend/cli'
|
4
|
+
require 'git_trend/project'
|
5
|
+
require 'git_trend/scraper'
|
6
|
+
require 'git_trend/version'
|
7
|
+
|
3
8
|
module GitTrend
|
4
9
|
class ScrapeException < StandardError; end
|
5
10
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
+
# GitTrend.get
|
12
|
+
# GitTrend.get('ruby')
|
13
|
+
# GitTrend.get(:ruby)
|
14
|
+
#
|
15
|
+
# GitTrend.get(since: :weekly)
|
16
|
+
# GitTrend.get(since: :week)
|
17
|
+
# GitTrend.get(since: :w)
|
18
|
+
#
|
19
|
+
# GitTrend.get('ruby', 'weekly')
|
20
|
+
# GitTrend.get(:ruby, :weekly)
|
21
|
+
# GitTrend.get(language: :ruby, since: :weekly)
|
22
|
+
def self.get(*opts)
|
23
|
+
if opts[0].instance_of?(Hash)
|
24
|
+
hash = opts[0]
|
25
|
+
language = hash.key?(:language) ? hash[:language] : nil
|
26
|
+
since = hash.key?(:since) ? hash[:since] : nil
|
27
|
+
Scraper.new.get(language, since)
|
28
|
+
else
|
29
|
+
Scraper.new.get(*opts)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.languages
|
34
|
+
Scraper.new.languages
|
35
|
+
end
|
11
36
|
end
|
data/lib/git_trend/cli.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'thor'
|
2
|
+
require 'git_trend/rendering'
|
2
3
|
|
3
4
|
module GitTrend
|
4
5
|
class CLI < Thor
|
5
|
-
include
|
6
|
+
include Rendering
|
6
7
|
|
7
8
|
map '-v' => :version,
|
8
9
|
'--version' => :version
|
@@ -16,7 +17,7 @@ module GitTrend
|
|
16
17
|
|
17
18
|
desc :list, "\033[32m(DEFAULT COMMAND)\e[0m List Trending repository on github [-l, -s, -d]"
|
18
19
|
option :language, aliases: '-l', required: false, desc: 'Specify a language'
|
19
|
-
option :since, aliases: '-s', required: false, desc: 'Enable: [daily, weekly, monthly]'
|
20
|
+
option :since, aliases: '-s', required: false, desc: 'Enable: [d, day, daily, w, week, weekly, m, month, monthly]'
|
20
21
|
option :description, aliases: '-d', required: false, default: true, type: :boolean, desc: "\033[32m(DEFAULT OPTION)\e[0m Dislpay descriptions"
|
21
22
|
option :number, aliases: '-n', required: false, type: :numeric, desc: 'Number of lines'
|
22
23
|
option :help, aliases: '-h', required: false, type: :boolean
|
data/lib/git_trend/scraper.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
require 'mechanize'
|
3
2
|
require 'addressable/uri'
|
4
3
|
|
@@ -22,25 +21,33 @@ module GitTrend
|
|
22
21
|
end
|
23
22
|
|
24
23
|
def languages
|
25
|
-
languages = []
|
26
24
|
page = @agent.get(BASE_URL)
|
27
|
-
page.search('.language-filter-list + .select-menu span.select-menu-item-text').
|
28
|
-
|
29
|
-
languages << language if language
|
25
|
+
page.search('.language-filter-list + .select-menu span.select-menu-item-text').inject([]) do |languages, content|
|
26
|
+
languages << content.text if content.text
|
30
27
|
end
|
31
|
-
languages
|
32
28
|
end
|
33
29
|
|
34
30
|
private
|
35
31
|
|
36
32
|
def generate_url_for_get(language, since)
|
37
33
|
uri = Addressable::URI.parse(BASE_URL)
|
34
|
+
since = convert_url_param_since(since)
|
38
35
|
if language || since
|
39
36
|
uri.query_values = { l: language, since: since }.delete_if { |_k, v| v.nil? }
|
40
37
|
end
|
41
38
|
uri.to_s
|
42
39
|
end
|
43
40
|
|
41
|
+
def convert_url_param_since(since)
|
42
|
+
return unless since
|
43
|
+
case since.to_sym
|
44
|
+
when :d, :day, :daily then 'daily'
|
45
|
+
when :w, :week, :weekly then 'weekly'
|
46
|
+
when :m, :month, :monthly then 'monthly'
|
47
|
+
else ''
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
44
51
|
# Pattern 1: lang + stars
|
45
52
|
# Ruby • 24 stars today • Built by
|
46
53
|
# Pattern 2: only stars
|
data/lib/git_trend/version.rb
CHANGED
data/spec/git_trend/cli_spec.rb
CHANGED
@@ -1,27 +1,31 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
1
|
include GitTrend
|
2
|
+
RSpec.describe GitTrend::CLI do
|
3
|
+
shared_examples 'since daily ranking' do |since|
|
4
|
+
it 'display daily ranking' do
|
5
|
+
expect { cli.invoke(:list, [], since: since, description: false) }.to output(dummy_result_without_description).to_stdout
|
6
|
+
end
|
7
|
+
end
|
5
8
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
+
shared_examples 'since weekly ranking' do |since|
|
10
|
+
it 'display weekly ranking' do
|
11
|
+
expect { cli.invoke(:list, [], since: since, description: false) }.to output(dummy_weekly_result).to_stdout
|
12
|
+
end
|
9
13
|
end
|
10
|
-
end
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
@cli = CLI.new
|
15
|
+
shared_examples 'since monthly ranking' do |since|
|
16
|
+
it 'display monthly ranking' do
|
17
|
+
expect { cli.invoke(:list, [], since: since, description: false) }.to output(dummy_monthly_result).to_stdout
|
16
18
|
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#list' do
|
22
|
+
let(:cli) { CLI.new }
|
17
23
|
|
18
24
|
describe 'with -n option' do
|
19
25
|
context 'with 3' do
|
20
|
-
before
|
21
|
-
stub_request_get('trending')
|
22
|
-
end
|
26
|
+
before { stub_request_get('trending') }
|
23
27
|
let(:number) { 3 }
|
24
|
-
it 'display daily ranking
|
28
|
+
it 'display top 3 daily ranking' do
|
25
29
|
res = <<-'EOS'.unindent
|
26
30
|
|No. Name Lang Star
|
27
31
|
|--- ---------------------------------------- ---------- ------
|
@@ -30,26 +34,22 @@ RSpec.describe GitTrend::CLI do
|
|
30
34
|
| 3 FreeCodeCamp/FreeCodeCamp JavaScript 614
|
31
35
|
|
32
36
|
EOS
|
33
|
-
expect {
|
37
|
+
expect { cli.invoke(:list, [], number: number, description: false) }.to output(res).to_stdout
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
37
41
|
context 'with over 25' do
|
38
|
-
before
|
39
|
-
stub_request_get('trending')
|
40
|
-
end
|
42
|
+
before { stub_request_get('trending') }
|
41
43
|
let(:number) { 26 }
|
42
44
|
it 'display daily ranking' do
|
43
|
-
expect {
|
45
|
+
expect { cli.invoke(:list, [], number: number, description: false) }.to output(dummy_result_without_description).to_stdout
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
48
50
|
describe 'with -l option' do
|
49
51
|
context 'with ruby' do
|
50
|
-
before
|
51
|
-
stub_request_get("trending?l=#{language}")
|
52
|
-
end
|
52
|
+
before { stub_request_get("trending?l=#{language}") }
|
53
53
|
let(:language) { 'ruby' }
|
54
54
|
|
55
55
|
it 'display daily ranking by language' do
|
@@ -83,14 +83,12 @@ RSpec.describe GitTrend::CLI do
|
|
83
83
|
| 25 brandonhilkert/sucker_punch Ruby 7
|
84
84
|
|
85
85
|
EOS
|
86
|
-
expect {
|
86
|
+
expect { cli.invoke(:list, [], language: language, description: false) }.to output(res).to_stdout
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
90
|
context 'with objective-c++ (including + sign)' do
|
91
|
-
before
|
92
|
-
stub_request_get('trending?l=objective-c%2B%2B')
|
93
|
-
end
|
91
|
+
before { stub_request_get('trending?l=objective-c%2B%2B') }
|
94
92
|
let(:language) { 'objective-c++' }
|
95
93
|
|
96
94
|
it 'display daily ranking by language' do
|
@@ -124,95 +122,59 @@ RSpec.describe GitTrend::CLI do
|
|
124
122
|
| 25 ryanb93/Applefy Objective-C++ 0
|
125
123
|
|
126
124
|
EOS
|
127
|
-
expect {
|
125
|
+
expect { cli.invoke(:list, [], language: language, description: false) }.to output(res).to_stdout
|
128
126
|
end
|
129
127
|
end
|
130
128
|
end
|
131
129
|
|
132
130
|
describe 'with -s option' do
|
133
|
-
before { stub_request_get("trending?since=#{since}") }
|
134
|
-
|
135
131
|
context 'with no option' do
|
136
|
-
|
137
|
-
|
132
|
+
before { stub_request_get('trending?since=') }
|
133
|
+
include_examples 'since daily ranking', ''
|
138
134
|
end
|
139
135
|
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
describe 'since daily' do
|
137
|
+
before { stub_request_get('trending?since=daily') }
|
138
|
+
context 'with d' do
|
139
|
+
include_examples 'since daily ranking', 'd'
|
140
|
+
end
|
141
|
+
|
142
|
+
context 'with day' do
|
143
|
+
include_examples 'since daily ranking', 'day'
|
144
|
+
end
|
145
|
+
|
146
|
+
context 'with daily' do
|
147
|
+
include_examples 'since daily ranking', 'daily'
|
148
|
+
end
|
143
149
|
end
|
144
150
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|--- ---------------------------------------- ----------- ------
|
151
|
-
| 1 DrkSephy/es6-cheatsheet JavaScript 5143
|
152
|
-
| 2 FreeCodeCamp/FreeCodeCamp JavaScript 4555
|
153
|
-
| 3 Microsoft/CNTK C++ 3548
|
154
|
-
| 4 jiahaog/nativefier JavaScript 2593
|
155
|
-
| 5 HunterLarco/voxel.css CSS 2054
|
156
|
-
| 6 samshadwell/TrumpScript Python 1824
|
157
|
-
| 7 Yalantis/uCrop Java 1731
|
158
|
-
| 8 Soundnode/soundnode-app JavaScript 1230
|
159
|
-
| 9 tensorflow/tensorflow C++ 953
|
160
|
-
| 10 Jam3/devtool JavaScript 1170
|
161
|
-
| 11 KnuffApp/Knuff Objective-C 1136
|
162
|
-
| 12 brave/browser-laptop JavaScript 1030
|
163
|
-
| 13 nlf/dlite Go 1051
|
164
|
-
| 14 zquestz/s Go 971
|
165
|
-
| 15 milligram/milligram CSS 959
|
166
|
-
| 16 themattrix/bash-concurrent Shell 924
|
167
|
-
| 17 kragniz/json-sempai Python 871
|
168
|
-
| 18 loverajoel/jstips CSS 841
|
169
|
-
| 19 chinchang/hint.css CSS 816
|
170
|
-
| 20 hirak/prestissimo PHP 783
|
171
|
-
| 21 rdpeng/ProgrammingAssignment2 R 8
|
172
|
-
| 22 fengyuanchen/viewerjs JavaScript 729
|
173
|
-
| 23 vhf/free-programming-books 620
|
174
|
-
| 24 yamartino/pressure JavaScript 695
|
175
|
-
| 25 cdmedia/cms.js JavaScript 677
|
151
|
+
describe 'since weekly' do
|
152
|
+
before { stub_request_get('trending?since=weekly') }
|
153
|
+
context 'with w' do
|
154
|
+
include_examples 'since weekly ranking', 'w'
|
155
|
+
end
|
176
156
|
|
177
|
-
|
178
|
-
|
157
|
+
context 'with week' do
|
158
|
+
include_examples 'since weekly ranking', 'week'
|
159
|
+
end
|
160
|
+
|
161
|
+
context 'with weekly' do
|
162
|
+
include_examples 'since weekly ranking', 'weekly'
|
179
163
|
end
|
180
164
|
end
|
181
165
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|--- ------------------------------------------ ----------- ------
|
188
|
-
| 1 FreeCodeCamp/FreeCodeCamp JavaScript 15567
|
189
|
-
| 2 loverajoel/jstips CSS 7710
|
190
|
-
| 3 braydie/HowToBeAProgrammer 6786
|
191
|
-
| 4 DrkSephy/es6-cheatsheet JavaScript 5127
|
192
|
-
| 5 matryer/bitbar Objective-C 4946
|
193
|
-
| 6 Microsoft/ChakraCore JavaScript 4689
|
194
|
-
| 7 VerbalExpressions/JSVerbalExpressions JavaScript 4758
|
195
|
-
| 8 tldr-pages/tldr Shell 4193
|
196
|
-
| 9 jlevy/the-art-of-command-line 3966
|
197
|
-
| 10 mhinz/vim-galore VimL 4062
|
198
|
-
| 11 jiahaog/nativefier JavaScript 3932
|
199
|
-
| 12 jlevy/og-equity-compensation 3797
|
200
|
-
| 13 Microsoft/CNTK C++ 3537
|
201
|
-
| 14 hacksalot/HackMyResume JavaScript 3252
|
202
|
-
| 15 vhf/free-programming-books 2690
|
203
|
-
| 16 milligram/milligram CSS 2876
|
204
|
-
| 17 samshadwell/TrumpScript Python 2718
|
205
|
-
| 18 sindresorhus/awesome 2640
|
206
|
-
| 19 donnemartin/data-science-ipython-notebooks Python 2424
|
207
|
-
| 20 tensorflow/tensorflow C++ 2033
|
208
|
-
| 21 os-js/OS.js JavaScript 2357
|
209
|
-
| 22 JakeLin/IBAnimatable Swift 2345
|
210
|
-
| 23 viljamis/feature.js HTML 2239
|
211
|
-
| 24 facebook/react-native Java 1962
|
212
|
-
| 25 baidu-research/warp-ctc Cuda 1966
|
166
|
+
describe 'since monthly' do
|
167
|
+
before { stub_request_get('trending?since=monthly') }
|
168
|
+
context 'with m' do
|
169
|
+
include_examples 'since monthly ranking', 'm'
|
170
|
+
end
|
213
171
|
|
214
|
-
|
215
|
-
|
172
|
+
context 'with month' do
|
173
|
+
include_examples 'since monthly ranking', 'month'
|
174
|
+
end
|
175
|
+
|
176
|
+
context 'with monthly' do
|
177
|
+
include_examples 'since monthly ranking', 'monthly'
|
216
178
|
end
|
217
179
|
end
|
218
180
|
end
|
@@ -231,13 +193,13 @@ RSpec.describe GitTrend::CLI do
|
|
231
193
|
|
232
194
|
context 'with no option' do
|
233
195
|
it 'display daily ranking' do
|
234
|
-
expect {
|
196
|
+
expect { cli.invoke(:list, []) }.to output(dummy_result_no_options).to_stdout
|
235
197
|
end
|
236
198
|
end
|
237
199
|
|
238
200
|
context 'terminal width is enough' do
|
239
201
|
it 'display daily ranking with description' do
|
240
|
-
expect {
|
202
|
+
expect { cli.invoke(:list, [], description: true) }.to output(dummy_result_no_options).to_stdout
|
241
203
|
end
|
242
204
|
end
|
243
205
|
|
@@ -248,20 +210,18 @@ RSpec.describe GitTrend::CLI do
|
|
248
210
|
end
|
249
211
|
|
250
212
|
it 'display daily ranking about the same as no option' do
|
251
|
-
expect {
|
213
|
+
expect { cli.invoke(:list, [], description: true) }.to output(dummy_result_without_description).to_stdout
|
252
214
|
end
|
253
215
|
end
|
254
216
|
end
|
255
217
|
|
256
218
|
describe 'with -l and -s option' do
|
257
219
|
context 'with ruby and weekly' do
|
258
|
-
before
|
259
|
-
stub_request_get("trending?l=#{language}&since=#{since}")
|
260
|
-
end
|
220
|
+
before { stub_request_get("trending?l=#{language}&since=#{since}") }
|
261
221
|
let(:language) { 'ruby' }
|
262
222
|
let(:since) { 'weekly' }
|
263
223
|
|
264
|
-
it 'display
|
224
|
+
it 'display weekly ranking by language' do
|
265
225
|
res = <<-'EOS'.unindent
|
266
226
|
|No. Name Lang Star
|
267
227
|
|--- ---------------------------------------- ---------- ------
|
@@ -292,7 +252,7 @@ RSpec.describe GitTrend::CLI do
|
|
292
252
|
| 25 thoughtbot/administrate Ruby 48
|
293
253
|
|
294
254
|
EOS
|
295
|
-
expect {
|
255
|
+
expect { cli.invoke(:list, [], language: language, since: since, description: false) }.to output(res).to_stdout
|
296
256
|
end
|
297
257
|
end
|
298
258
|
end
|
@@ -305,328 +265,19 @@ RSpec.describe GitTrend::CLI do
|
|
305
265
|
stub_request_get('trending', 'trending_including_multibyte_characters')
|
306
266
|
end
|
307
267
|
it 'display daily ranking' do
|
308
|
-
expect {
|
268
|
+
expect { cli.invoke(:list, []) }.to output(dummy_result_no_options_with_multibyte_characters).to_stdout
|
309
269
|
end
|
310
270
|
end
|
311
271
|
end
|
312
272
|
end
|
313
273
|
|
314
274
|
describe '#languages' do
|
315
|
-
before
|
316
|
-
|
317
|
-
stub_request_get('trending')
|
318
|
-
end
|
275
|
+
before { stub_request_get('trending') }
|
276
|
+
let(:cli) { CLI.new }
|
319
277
|
|
320
278
|
context 'with no option' do
|
321
|
-
it 'display
|
322
|
-
|
323
|
-
|ABAP
|
324
|
-
|ActionScript
|
325
|
-
|Ada
|
326
|
-
|Agda
|
327
|
-
|AGS Script
|
328
|
-
|Alloy
|
329
|
-
|AMPL
|
330
|
-
|ANTLR
|
331
|
-
|ApacheConf
|
332
|
-
|Apex
|
333
|
-
|API Blueprint
|
334
|
-
|APL
|
335
|
-
|AppleScript
|
336
|
-
|Arc
|
337
|
-
|Arduino
|
338
|
-
|ASP
|
339
|
-
|AspectJ
|
340
|
-
|Assembly
|
341
|
-
|ATS
|
342
|
-
|Augeas
|
343
|
-
|AutoHotkey
|
344
|
-
|AutoIt
|
345
|
-
|Awk
|
346
|
-
|Batchfile
|
347
|
-
|Befunge
|
348
|
-
|Bison
|
349
|
-
|BitBake
|
350
|
-
|BlitzBasic
|
351
|
-
|BlitzMax
|
352
|
-
|Bluespec
|
353
|
-
|Boo
|
354
|
-
|Brainfuck
|
355
|
-
|Brightscript
|
356
|
-
|Bro
|
357
|
-
|C
|
358
|
-
|C#
|
359
|
-
|C++
|
360
|
-
|Cap'n Proto
|
361
|
-
|CartoCSS
|
362
|
-
|Ceylon
|
363
|
-
|Chapel
|
364
|
-
|Charity
|
365
|
-
|ChucK
|
366
|
-
|Cirru
|
367
|
-
|Clarion
|
368
|
-
|Clean
|
369
|
-
|Click
|
370
|
-
|CLIPS
|
371
|
-
|Clojure
|
372
|
-
|CMake
|
373
|
-
|COBOL
|
374
|
-
|CoffeeScript
|
375
|
-
|ColdFusion
|
376
|
-
|Common Lisp
|
377
|
-
|Component Pascal
|
378
|
-
|Cool
|
379
|
-
|Coq
|
380
|
-
|Crystal
|
381
|
-
|CSS
|
382
|
-
|Cucumber
|
383
|
-
|Cuda
|
384
|
-
|Cycript
|
385
|
-
|D
|
386
|
-
|Darcs Patch
|
387
|
-
|Dart
|
388
|
-
|Diff
|
389
|
-
|DIGITAL Command Language
|
390
|
-
|DM
|
391
|
-
|Dogescript
|
392
|
-
|DTrace
|
393
|
-
|Dylan
|
394
|
-
|E
|
395
|
-
|Eagle
|
396
|
-
|eC
|
397
|
-
|ECL
|
398
|
-
|Eiffel
|
399
|
-
|Elixir
|
400
|
-
|Elm
|
401
|
-
|Emacs Lisp
|
402
|
-
|EmberScript
|
403
|
-
|Erlang
|
404
|
-
|F#
|
405
|
-
|Factor
|
406
|
-
|Fancy
|
407
|
-
|Fantom
|
408
|
-
|FLUX
|
409
|
-
|Forth
|
410
|
-
|FORTRAN
|
411
|
-
|FreeMarker
|
412
|
-
|Frege
|
413
|
-
|Game Maker Language
|
414
|
-
|GAMS
|
415
|
-
|GAP
|
416
|
-
|GDScript
|
417
|
-
|Genshi
|
418
|
-
|Gettext Catalog
|
419
|
-
|GLSL
|
420
|
-
|Glyph
|
421
|
-
|Gnuplot
|
422
|
-
|Go
|
423
|
-
|Golo
|
424
|
-
|Gosu
|
425
|
-
|Grace
|
426
|
-
|Grammatical Framework
|
427
|
-
|Groff
|
428
|
-
|Groovy
|
429
|
-
|Hack
|
430
|
-
|Handlebars
|
431
|
-
|Harbour
|
432
|
-
|Haskell
|
433
|
-
|Haxe
|
434
|
-
|HCL
|
435
|
-
|HTML
|
436
|
-
|Hy
|
437
|
-
|HyPhy
|
438
|
-
|IDL
|
439
|
-
|Idris
|
440
|
-
|IGOR Pro
|
441
|
-
|Inform 7
|
442
|
-
|Inno Setup
|
443
|
-
|Io
|
444
|
-
|Ioke
|
445
|
-
|Isabelle
|
446
|
-
|J
|
447
|
-
|Jasmin
|
448
|
-
|Java
|
449
|
-
|JavaScript
|
450
|
-
|JFlex
|
451
|
-
|JSONiq
|
452
|
-
|Julia
|
453
|
-
|Jupyter Notebook
|
454
|
-
|KiCad
|
455
|
-
|Kit
|
456
|
-
|Kotlin
|
457
|
-
|KRL
|
458
|
-
|LabVIEW
|
459
|
-
|Lasso
|
460
|
-
|Lean
|
461
|
-
|Lex
|
462
|
-
|LilyPond
|
463
|
-
|Limbo
|
464
|
-
|Liquid
|
465
|
-
|LiveScript
|
466
|
-
|LLVM
|
467
|
-
|Logos
|
468
|
-
|Logtalk
|
469
|
-
|LOLCODE
|
470
|
-
|LookML
|
471
|
-
|LoomScript
|
472
|
-
|LSL
|
473
|
-
|Lua
|
474
|
-
|M
|
475
|
-
|Makefile
|
476
|
-
|Mako
|
477
|
-
|Markdown
|
478
|
-
|Mask
|
479
|
-
|Mathematica
|
480
|
-
|Matlab
|
481
|
-
|Max
|
482
|
-
|MAXScript
|
483
|
-
|Mercury
|
484
|
-
|Metal
|
485
|
-
|MiniD
|
486
|
-
|Mirah
|
487
|
-
|Modelica
|
488
|
-
|Modula-2
|
489
|
-
|Module Management System
|
490
|
-
|Monkey
|
491
|
-
|Moocode
|
492
|
-
|MoonScript
|
493
|
-
|MTML
|
494
|
-
|mupad
|
495
|
-
|Myghty
|
496
|
-
|NCL
|
497
|
-
|Nemerle
|
498
|
-
|nesC
|
499
|
-
|NetLinx
|
500
|
-
|NetLinx+ERB
|
501
|
-
|NetLogo
|
502
|
-
|NewLisp
|
503
|
-
|Nginx
|
504
|
-
|Nimrod
|
505
|
-
|Nit
|
506
|
-
|Nix
|
507
|
-
|NSIS
|
508
|
-
|Nu
|
509
|
-
|Objective-C
|
510
|
-
|Objective-C++
|
511
|
-
|Objective-J
|
512
|
-
|OCaml
|
513
|
-
|Omgrofl
|
514
|
-
|ooc
|
515
|
-
|Opa
|
516
|
-
|Opal
|
517
|
-
|OpenEdge ABL
|
518
|
-
|OpenSCAD
|
519
|
-
|Ox
|
520
|
-
|Oxygene
|
521
|
-
|Oz
|
522
|
-
|Pan
|
523
|
-
|Papyrus
|
524
|
-
|Parrot
|
525
|
-
|Pascal
|
526
|
-
|PAWN
|
527
|
-
|Perl
|
528
|
-
|Perl6
|
529
|
-
|PHP
|
530
|
-
|PicoLisp
|
531
|
-
|PigLatin
|
532
|
-
|Pike
|
533
|
-
|PLpgSQL
|
534
|
-
|PLSQL
|
535
|
-
|PogoScript
|
536
|
-
|Pony
|
537
|
-
|PostScript
|
538
|
-
|PowerShell
|
539
|
-
|Processing
|
540
|
-
|Prolog
|
541
|
-
|Propeller Spin
|
542
|
-
|Protocol Buffer
|
543
|
-
|Puppet
|
544
|
-
|Pure Data
|
545
|
-
|PureBasic
|
546
|
-
|PureScript
|
547
|
-
|Python
|
548
|
-
|QMake
|
549
|
-
|QML
|
550
|
-
|R
|
551
|
-
|Racket
|
552
|
-
|Ragel in Ruby Host
|
553
|
-
|RAML
|
554
|
-
|RDoc
|
555
|
-
|REALbasic
|
556
|
-
|Rebol
|
557
|
-
|Red
|
558
|
-
|Redcode
|
559
|
-
|RenderScript
|
560
|
-
|RobotFramework
|
561
|
-
|Rouge
|
562
|
-
|Ruby
|
563
|
-
|Rust
|
564
|
-
|SaltStack
|
565
|
-
|SAS
|
566
|
-
|Scala
|
567
|
-
|Scheme
|
568
|
-
|Scilab
|
569
|
-
|Self
|
570
|
-
|Shell
|
571
|
-
|ShellSession
|
572
|
-
|Shen
|
573
|
-
|Slash
|
574
|
-
|Smali
|
575
|
-
|Smalltalk
|
576
|
-
|Smarty
|
577
|
-
|SMT
|
578
|
-
|SourcePawn
|
579
|
-
|SQF
|
580
|
-
|SQL
|
581
|
-
|SQLPL
|
582
|
-
|Squirrel
|
583
|
-
|Stan
|
584
|
-
|Standard ML
|
585
|
-
|Stata
|
586
|
-
|SuperCollider
|
587
|
-
|Swift
|
588
|
-
|SystemVerilog
|
589
|
-
|Tcl
|
590
|
-
|Tea
|
591
|
-
|TeX
|
592
|
-
|Thrift
|
593
|
-
|Turing
|
594
|
-
|TXL
|
595
|
-
|TypeScript
|
596
|
-
|UnrealScript
|
597
|
-
|UrWeb
|
598
|
-
|Vala
|
599
|
-
|VCL
|
600
|
-
|Verilog
|
601
|
-
|VHDL
|
602
|
-
|VimL
|
603
|
-
|Visual Basic
|
604
|
-
|Volt
|
605
|
-
|Vue
|
606
|
-
|Web Ontology Language
|
607
|
-
|WebIDL
|
608
|
-
|wisp
|
609
|
-
|X10
|
610
|
-
|xBase
|
611
|
-
|XC
|
612
|
-
|XML
|
613
|
-
|Xojo
|
614
|
-
|XPages
|
615
|
-
|XProc
|
616
|
-
|XQuery
|
617
|
-
|XS
|
618
|
-
|XSLT
|
619
|
-
|Xtend
|
620
|
-
|Yacc
|
621
|
-
|Zephir
|
622
|
-
|Zimpl
|
623
|
-
|
|
624
|
-
|300 languages
|
625
|
-
|you can get only selected language list with '-l' option.
|
626
|
-
|if languages is unknown, you can specify 'unkown'.
|
627
|
-
|
|
628
|
-
EOS
|
629
|
-
expect { @cli.languages }.to output(res).to_stdout
|
279
|
+
it 'display languages' do
|
280
|
+
expect { cli.languages }.to output(dummy_languages).to_stdout
|
630
281
|
end
|
631
282
|
end
|
632
283
|
end
|
@@ -637,7 +288,6 @@ RSpec.describe GitTrend::CLI do
|
|
637
288
|
url = Scraper::BASE_HOST.dup
|
638
289
|
url << "/#{stub_url}" if stub_url
|
639
290
|
uri = URI.parse(url)
|
640
|
-
|
641
291
|
stub_file = stub_file_name || stub_url
|
642
292
|
stub_request(:get, uri)
|
643
293
|
.to_return(
|
@@ -744,4 +394,380 @@ RSpec.describe GitTrend::CLI do
|
|
744
394
|
|
745
395
|
EOS
|
746
396
|
end
|
397
|
+
|
398
|
+
def dummy_weekly_result
|
399
|
+
<<-'EOS'.unindent
|
400
|
+
|No. Name Lang Star
|
401
|
+
|--- ---------------------------------------- ----------- ------
|
402
|
+
| 1 DrkSephy/es6-cheatsheet JavaScript 5143
|
403
|
+
| 2 FreeCodeCamp/FreeCodeCamp JavaScript 4555
|
404
|
+
| 3 Microsoft/CNTK C++ 3548
|
405
|
+
| 4 jiahaog/nativefier JavaScript 2593
|
406
|
+
| 5 HunterLarco/voxel.css CSS 2054
|
407
|
+
| 6 samshadwell/TrumpScript Python 1824
|
408
|
+
| 7 Yalantis/uCrop Java 1731
|
409
|
+
| 8 Soundnode/soundnode-app JavaScript 1230
|
410
|
+
| 9 tensorflow/tensorflow C++ 953
|
411
|
+
| 10 Jam3/devtool JavaScript 1170
|
412
|
+
| 11 KnuffApp/Knuff Objective-C 1136
|
413
|
+
| 12 brave/browser-laptop JavaScript 1030
|
414
|
+
| 13 nlf/dlite Go 1051
|
415
|
+
| 14 zquestz/s Go 971
|
416
|
+
| 15 milligram/milligram CSS 959
|
417
|
+
| 16 themattrix/bash-concurrent Shell 924
|
418
|
+
| 17 kragniz/json-sempai Python 871
|
419
|
+
| 18 loverajoel/jstips CSS 841
|
420
|
+
| 19 chinchang/hint.css CSS 816
|
421
|
+
| 20 hirak/prestissimo PHP 783
|
422
|
+
| 21 rdpeng/ProgrammingAssignment2 R 8
|
423
|
+
| 22 fengyuanchen/viewerjs JavaScript 729
|
424
|
+
| 23 vhf/free-programming-books 620
|
425
|
+
| 24 yamartino/pressure JavaScript 695
|
426
|
+
| 25 cdmedia/cms.js JavaScript 677
|
427
|
+
|
428
|
+
EOS
|
429
|
+
end
|
430
|
+
|
431
|
+
def dummy_monthly_result
|
432
|
+
<<-'EOS'.unindent
|
433
|
+
|No. Name Lang Star
|
434
|
+
|--- ------------------------------------------ ----------- ------
|
435
|
+
| 1 FreeCodeCamp/FreeCodeCamp JavaScript 15567
|
436
|
+
| 2 loverajoel/jstips CSS 7710
|
437
|
+
| 3 braydie/HowToBeAProgrammer 6786
|
438
|
+
| 4 DrkSephy/es6-cheatsheet JavaScript 5127
|
439
|
+
| 5 matryer/bitbar Objective-C 4946
|
440
|
+
| 6 Microsoft/ChakraCore JavaScript 4689
|
441
|
+
| 7 VerbalExpressions/JSVerbalExpressions JavaScript 4758
|
442
|
+
| 8 tldr-pages/tldr Shell 4193
|
443
|
+
| 9 jlevy/the-art-of-command-line 3966
|
444
|
+
| 10 mhinz/vim-galore VimL 4062
|
445
|
+
| 11 jiahaog/nativefier JavaScript 3932
|
446
|
+
| 12 jlevy/og-equity-compensation 3797
|
447
|
+
| 13 Microsoft/CNTK C++ 3537
|
448
|
+
| 14 hacksalot/HackMyResume JavaScript 3252
|
449
|
+
| 15 vhf/free-programming-books 2690
|
450
|
+
| 16 milligram/milligram CSS 2876
|
451
|
+
| 17 samshadwell/TrumpScript Python 2718
|
452
|
+
| 18 sindresorhus/awesome 2640
|
453
|
+
| 19 donnemartin/data-science-ipython-notebooks Python 2424
|
454
|
+
| 20 tensorflow/tensorflow C++ 2033
|
455
|
+
| 21 os-js/OS.js JavaScript 2357
|
456
|
+
| 22 JakeLin/IBAnimatable Swift 2345
|
457
|
+
| 23 viljamis/feature.js HTML 2239
|
458
|
+
| 24 facebook/react-native Java 1962
|
459
|
+
| 25 baidu-research/warp-ctc Cuda 1966
|
460
|
+
|
461
|
+
EOS
|
462
|
+
end
|
463
|
+
|
464
|
+
def dummy_languages
|
465
|
+
<<-'EOS'.unindent
|
466
|
+
|ABAP
|
467
|
+
|ActionScript
|
468
|
+
|Ada
|
469
|
+
|Agda
|
470
|
+
|AGS Script
|
471
|
+
|Alloy
|
472
|
+
|AMPL
|
473
|
+
|ANTLR
|
474
|
+
|ApacheConf
|
475
|
+
|Apex
|
476
|
+
|API Blueprint
|
477
|
+
|APL
|
478
|
+
|AppleScript
|
479
|
+
|Arc
|
480
|
+
|Arduino
|
481
|
+
|ASP
|
482
|
+
|AspectJ
|
483
|
+
|Assembly
|
484
|
+
|ATS
|
485
|
+
|Augeas
|
486
|
+
|AutoHotkey
|
487
|
+
|AutoIt
|
488
|
+
|Awk
|
489
|
+
|Batchfile
|
490
|
+
|Befunge
|
491
|
+
|Bison
|
492
|
+
|BitBake
|
493
|
+
|BlitzBasic
|
494
|
+
|BlitzMax
|
495
|
+
|Bluespec
|
496
|
+
|Boo
|
497
|
+
|Brainfuck
|
498
|
+
|Brightscript
|
499
|
+
|Bro
|
500
|
+
|C
|
501
|
+
|C#
|
502
|
+
|C++
|
503
|
+
|Cap'n Proto
|
504
|
+
|CartoCSS
|
505
|
+
|Ceylon
|
506
|
+
|Chapel
|
507
|
+
|Charity
|
508
|
+
|ChucK
|
509
|
+
|Cirru
|
510
|
+
|Clarion
|
511
|
+
|Clean
|
512
|
+
|Click
|
513
|
+
|CLIPS
|
514
|
+
|Clojure
|
515
|
+
|CMake
|
516
|
+
|COBOL
|
517
|
+
|CoffeeScript
|
518
|
+
|ColdFusion
|
519
|
+
|Common Lisp
|
520
|
+
|Component Pascal
|
521
|
+
|Cool
|
522
|
+
|Coq
|
523
|
+
|Crystal
|
524
|
+
|CSS
|
525
|
+
|Cucumber
|
526
|
+
|Cuda
|
527
|
+
|Cycript
|
528
|
+
|D
|
529
|
+
|Darcs Patch
|
530
|
+
|Dart
|
531
|
+
|Diff
|
532
|
+
|DIGITAL Command Language
|
533
|
+
|DM
|
534
|
+
|Dogescript
|
535
|
+
|DTrace
|
536
|
+
|Dylan
|
537
|
+
|E
|
538
|
+
|Eagle
|
539
|
+
|eC
|
540
|
+
|ECL
|
541
|
+
|Eiffel
|
542
|
+
|Elixir
|
543
|
+
|Elm
|
544
|
+
|Emacs Lisp
|
545
|
+
|EmberScript
|
546
|
+
|Erlang
|
547
|
+
|F#
|
548
|
+
|Factor
|
549
|
+
|Fancy
|
550
|
+
|Fantom
|
551
|
+
|FLUX
|
552
|
+
|Forth
|
553
|
+
|FORTRAN
|
554
|
+
|FreeMarker
|
555
|
+
|Frege
|
556
|
+
|Game Maker Language
|
557
|
+
|GAMS
|
558
|
+
|GAP
|
559
|
+
|GDScript
|
560
|
+
|Genshi
|
561
|
+
|Gettext Catalog
|
562
|
+
|GLSL
|
563
|
+
|Glyph
|
564
|
+
|Gnuplot
|
565
|
+
|Go
|
566
|
+
|Golo
|
567
|
+
|Gosu
|
568
|
+
|Grace
|
569
|
+
|Grammatical Framework
|
570
|
+
|Groff
|
571
|
+
|Groovy
|
572
|
+
|Hack
|
573
|
+
|Handlebars
|
574
|
+
|Harbour
|
575
|
+
|Haskell
|
576
|
+
|Haxe
|
577
|
+
|HCL
|
578
|
+
|HTML
|
579
|
+
|Hy
|
580
|
+
|HyPhy
|
581
|
+
|IDL
|
582
|
+
|Idris
|
583
|
+
|IGOR Pro
|
584
|
+
|Inform 7
|
585
|
+
|Inno Setup
|
586
|
+
|Io
|
587
|
+
|Ioke
|
588
|
+
|Isabelle
|
589
|
+
|J
|
590
|
+
|Jasmin
|
591
|
+
|Java
|
592
|
+
|JavaScript
|
593
|
+
|JFlex
|
594
|
+
|JSONiq
|
595
|
+
|Julia
|
596
|
+
|Jupyter Notebook
|
597
|
+
|KiCad
|
598
|
+
|Kit
|
599
|
+
|Kotlin
|
600
|
+
|KRL
|
601
|
+
|LabVIEW
|
602
|
+
|Lasso
|
603
|
+
|Lean
|
604
|
+
|Lex
|
605
|
+
|LilyPond
|
606
|
+
|Limbo
|
607
|
+
|Liquid
|
608
|
+
|LiveScript
|
609
|
+
|LLVM
|
610
|
+
|Logos
|
611
|
+
|Logtalk
|
612
|
+
|LOLCODE
|
613
|
+
|LookML
|
614
|
+
|LoomScript
|
615
|
+
|LSL
|
616
|
+
|Lua
|
617
|
+
|M
|
618
|
+
|Makefile
|
619
|
+
|Mako
|
620
|
+
|Markdown
|
621
|
+
|Mask
|
622
|
+
|Mathematica
|
623
|
+
|Matlab
|
624
|
+
|Max
|
625
|
+
|MAXScript
|
626
|
+
|Mercury
|
627
|
+
|Metal
|
628
|
+
|MiniD
|
629
|
+
|Mirah
|
630
|
+
|Modelica
|
631
|
+
|Modula-2
|
632
|
+
|Module Management System
|
633
|
+
|Monkey
|
634
|
+
|Moocode
|
635
|
+
|MoonScript
|
636
|
+
|MTML
|
637
|
+
|mupad
|
638
|
+
|Myghty
|
639
|
+
|NCL
|
640
|
+
|Nemerle
|
641
|
+
|nesC
|
642
|
+
|NetLinx
|
643
|
+
|NetLinx+ERB
|
644
|
+
|NetLogo
|
645
|
+
|NewLisp
|
646
|
+
|Nginx
|
647
|
+
|Nimrod
|
648
|
+
|Nit
|
649
|
+
|Nix
|
650
|
+
|NSIS
|
651
|
+
|Nu
|
652
|
+
|Objective-C
|
653
|
+
|Objective-C++
|
654
|
+
|Objective-J
|
655
|
+
|OCaml
|
656
|
+
|Omgrofl
|
657
|
+
|ooc
|
658
|
+
|Opa
|
659
|
+
|Opal
|
660
|
+
|OpenEdge ABL
|
661
|
+
|OpenSCAD
|
662
|
+
|Ox
|
663
|
+
|Oxygene
|
664
|
+
|Oz
|
665
|
+
|Pan
|
666
|
+
|Papyrus
|
667
|
+
|Parrot
|
668
|
+
|Pascal
|
669
|
+
|PAWN
|
670
|
+
|Perl
|
671
|
+
|Perl6
|
672
|
+
|PHP
|
673
|
+
|PicoLisp
|
674
|
+
|PigLatin
|
675
|
+
|Pike
|
676
|
+
|PLpgSQL
|
677
|
+
|PLSQL
|
678
|
+
|PogoScript
|
679
|
+
|Pony
|
680
|
+
|PostScript
|
681
|
+
|PowerShell
|
682
|
+
|Processing
|
683
|
+
|Prolog
|
684
|
+
|Propeller Spin
|
685
|
+
|Protocol Buffer
|
686
|
+
|Puppet
|
687
|
+
|Pure Data
|
688
|
+
|PureBasic
|
689
|
+
|PureScript
|
690
|
+
|Python
|
691
|
+
|QMake
|
692
|
+
|QML
|
693
|
+
|R
|
694
|
+
|Racket
|
695
|
+
|Ragel in Ruby Host
|
696
|
+
|RAML
|
697
|
+
|RDoc
|
698
|
+
|REALbasic
|
699
|
+
|Rebol
|
700
|
+
|Red
|
701
|
+
|Redcode
|
702
|
+
|RenderScript
|
703
|
+
|RobotFramework
|
704
|
+
|Rouge
|
705
|
+
|Ruby
|
706
|
+
|Rust
|
707
|
+
|SaltStack
|
708
|
+
|SAS
|
709
|
+
|Scala
|
710
|
+
|Scheme
|
711
|
+
|Scilab
|
712
|
+
|Self
|
713
|
+
|Shell
|
714
|
+
|ShellSession
|
715
|
+
|Shen
|
716
|
+
|Slash
|
717
|
+
|Smali
|
718
|
+
|Smalltalk
|
719
|
+
|Smarty
|
720
|
+
|SMT
|
721
|
+
|SourcePawn
|
722
|
+
|SQF
|
723
|
+
|SQL
|
724
|
+
|SQLPL
|
725
|
+
|Squirrel
|
726
|
+
|Stan
|
727
|
+
|Standard ML
|
728
|
+
|Stata
|
729
|
+
|SuperCollider
|
730
|
+
|Swift
|
731
|
+
|SystemVerilog
|
732
|
+
|Tcl
|
733
|
+
|Tea
|
734
|
+
|TeX
|
735
|
+
|Thrift
|
736
|
+
|Turing
|
737
|
+
|TXL
|
738
|
+
|TypeScript
|
739
|
+
|UnrealScript
|
740
|
+
|UrWeb
|
741
|
+
|Vala
|
742
|
+
|VCL
|
743
|
+
|Verilog
|
744
|
+
|VHDL
|
745
|
+
|VimL
|
746
|
+
|Visual Basic
|
747
|
+
|Volt
|
748
|
+
|Vue
|
749
|
+
|Web Ontology Language
|
750
|
+
|WebIDL
|
751
|
+
|wisp
|
752
|
+
|X10
|
753
|
+
|xBase
|
754
|
+
|XC
|
755
|
+
|XML
|
756
|
+
|Xojo
|
757
|
+
|XPages
|
758
|
+
|XProc
|
759
|
+
|XQuery
|
760
|
+
|XS
|
761
|
+
|XSLT
|
762
|
+
|Xtend
|
763
|
+
|Yacc
|
764
|
+
|Zephir
|
765
|
+
|Zimpl
|
766
|
+
|
|
767
|
+
|300 languages
|
768
|
+
|you can get only selected language list with '-l' option.
|
769
|
+
|if languages is unknown, you can specify 'unkown'.
|
770
|
+
|
|
771
|
+
EOS
|
772
|
+
end
|
747
773
|
end
|