git-trend 1.0.2 → 1.1.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/.rubocop.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/README.md +2 -2
- data/Rakefile +2 -2
- data/bin/console +3 -3
- data/exe/git-trend +2 -2
- data/git-trend.gemspec +26 -26
- data/lib/git-trend.rb +1 -1
- data/lib/git_trend.rb +5 -5
- data/lib/git_trend/cli.rb +12 -12
- data/lib/git_trend/project.rb +9 -1
- data/lib/git_trend/rendering.rb +63 -63
- data/lib/git_trend/scraper.rb +32 -49
- data/lib/git_trend/version.rb +1 -1
- data/spec/fixtures/trending/index +2788 -0
- data/spec/fixtures/trending/ruby +2815 -0
- data/spec/fixtures/trending/ruby?since=weekly +2808 -0
- data/spec/fixtures/trending?since= +1 -0
- data/spec/fixtures/trending?since=daily +1 -0
- data/spec/fixtures/trending?since=monthly +1 -0
- data/spec/fixtures/trending?since=weekly +1786 -1348
- data/spec/git_trend/cli_spec.rb +260 -322
- data/spec/git_trend/scraper_spec.rb +11 -11
- data/spec/git_trend_spec.rb +24 -24
- data/spec/spec_helper.rb +11 -11
- metadata +30 -33
- data/spec/fixtures/trending +0 -2334
- data/spec/fixtures/trending?l=objective-c%2B%2B +0 -2294
- data/spec/fixtures/trending?l=ruby +0 -2366
- data/spec/fixtures/trending?l=ruby&since=weekly +0 -2358
- data/spec/fixtures/trending?since= +0 -2334
- data/spec/fixtures/trending?since=daily +0 -2334
- data/spec/fixtures/trending?since=monthly +0 -2357
- data/spec/fixtures/trending_including_multibyte_characters +0 -3027
data/spec/git_trend/cli_spec.rb
CHANGED
@@ -1,125 +1,87 @@
|
|
1
|
+
# rubocop:disable Style/TrailingWhitespace
|
1
2
|
include GitTrend
|
2
3
|
RSpec.describe GitTrend::CLI do
|
3
|
-
shared_examples
|
4
|
-
it
|
4
|
+
shared_examples "since daily ranking" do |since|
|
5
|
+
it "display daily ranking" do
|
5
6
|
expect { cli.invoke(:list, [], since: since, description: false) }.to output(dummy_result_without_description).to_stdout
|
6
7
|
end
|
7
8
|
end
|
8
9
|
|
9
|
-
shared_examples
|
10
|
-
it
|
10
|
+
shared_examples "since weekly ranking" do |since|
|
11
|
+
it "display weekly ranking" do
|
11
12
|
expect { cli.invoke(:list, [], since: since, description: false) }.to output(dummy_weekly_result).to_stdout
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
15
|
-
shared_examples
|
16
|
-
it
|
16
|
+
shared_examples "since monthly ranking" do |since|
|
17
|
+
it "display monthly ranking" do
|
17
18
|
expect { cli.invoke(:list, [], since: since, description: false) }.to output(dummy_monthly_result).to_stdout
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
21
|
-
describe
|
22
|
+
describe "#list" do
|
22
23
|
let(:cli) { CLI.new }
|
23
24
|
|
24
|
-
describe
|
25
|
-
context
|
26
|
-
before { stub_request_get(
|
25
|
+
describe "with -n option" do
|
26
|
+
context "with 3" do
|
27
|
+
before { stub_request_get("trending") }
|
27
28
|
let(:number) { 3 }
|
28
|
-
it
|
29
|
+
it "display top 3 daily ranking" do
|
29
30
|
res = <<-'EOS'.unindent
|
30
31
|
|No. Name Lang Star
|
31
32
|
|--- ---------------------------------------- ---------- ------
|
32
|
-
| 1
|
33
|
-
| 2
|
34
|
-
| 3 FreeCodeCamp/FreeCodeCamp JavaScript
|
33
|
+
| 1 Bilibili/flv.js JavaScript 3782
|
34
|
+
| 2 drathier/stack-overflow-import Python 589
|
35
|
+
| 3 FreeCodeCamp/FreeCodeCamp JavaScript 191056
|
35
36
|
|
36
37
|
EOS
|
37
38
|
expect { cli.invoke(:list, [], number: number, description: false) }.to output(res).to_stdout
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
41
|
-
context
|
42
|
-
before { stub_request_get(
|
42
|
+
context "with over 25" do
|
43
|
+
before { stub_request_get("trending") }
|
43
44
|
let(:number) { 26 }
|
44
|
-
it
|
45
|
+
it "display daily ranking" do
|
45
46
|
expect { cli.invoke(:list, [], number: number, description: false) }.to output(dummy_result_without_description).to_stdout
|
46
47
|
end
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
50
|
-
describe
|
51
|
-
context
|
52
|
-
before { stub_request_get("trending
|
53
|
-
let(:language) {
|
51
|
+
describe "with -l option" do
|
52
|
+
context "with ruby" do
|
53
|
+
before { stub_request_get("trending/#{language}") }
|
54
|
+
let(:language) { "ruby" }
|
54
55
|
|
55
|
-
it
|
56
|
+
it "display daily ranking by language" do
|
56
57
|
res = <<-'EOS'.unindent
|
57
58
|
|No. Name Lang Star
|
58
59
|
|--- ---------------------------------------- ---------- ------
|
59
|
-
| 1
|
60
|
-
| 2
|
61
|
-
| 3 Homebrew/
|
62
|
-
| 4
|
63
|
-
| 5
|
64
|
-
| 6
|
65
|
-
| 7
|
66
|
-
| 8 discourse/discourse Ruby
|
67
|
-
| 9
|
68
|
-
| 10 caskroom/homebrew-cask Ruby
|
69
|
-
| 11
|
70
|
-
| 12
|
71
|
-
| 13
|
72
|
-
| 14
|
73
|
-
| 15
|
74
|
-
| 16
|
75
|
-
| 17
|
76
|
-
| 18
|
77
|
-
| 19
|
78
|
-
| 20
|
79
|
-
| 21
|
80
|
-
| 22
|
81
|
-
| 23
|
82
|
-
| 24
|
83
|
-
| 25
|
84
|
-
|
85
|
-
EOS
|
86
|
-
expect { cli.invoke(:list, [], language: language, description: false) }.to output(res).to_stdout
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
context 'with objective-c++ (including + sign)' do
|
91
|
-
before { stub_request_get('trending?l=objective-c%2B%2B') }
|
92
|
-
let(:language) { 'objective-c++' }
|
93
|
-
|
94
|
-
it 'display daily ranking by language' do
|
95
|
-
res = <<-'EOS'.unindent
|
96
|
-
|No. Name Lang Star
|
97
|
-
|--- ---------------------------------------- ------------- ------
|
98
|
-
| 1 facebook/pop Objective-C++ 0
|
99
|
-
| 2 facebook/componentkit Objective-C++ 0
|
100
|
-
| 3 rsms/fb-mac-messenger Objective-C++ 0
|
101
|
-
| 4 johnno1962/Xtrace Objective-C++ 0
|
102
|
-
| 5 pivotal/cedar Objective-C++ 0
|
103
|
-
| 6 rogual/neovim-dot-app Objective-C++ 0
|
104
|
-
| 7 mousebird/WhirlyGlobe Objective-C++ 0
|
105
|
-
| 8 deanm/plask Objective-C++ 0
|
106
|
-
| 9 jerols/PopTut Objective-C++ 0
|
107
|
-
| 10 fjolnir/Tranquil Objective-C++ 0
|
108
|
-
| 11 otaviocc/OCBorghettiView Objective-C++ 0
|
109
|
-
| 12 jxd001/POPdemo Objective-C++ 0
|
110
|
-
| 13 foundry/OpenCVSwiftStitch Objective-C++ 0
|
111
|
-
| 14 couchdeveloper/RXPromise Objective-C++ 0
|
112
|
-
| 15 petegoodliffe/PGMidi Objective-C++ 0
|
113
|
-
| 16 opensource-apple/objc4 Objective-C++ 0
|
114
|
-
| 17 giladno/UICoreTextView Objective-C++ 0
|
115
|
-
| 18 iolate/SimulateTouch Objective-C++ 0
|
116
|
-
| 19 otaviocc/NHCalendarActivity Objective-C++ 0
|
117
|
-
| 20 belkevich/nsdate-calendar Objective-C++ 0
|
118
|
-
| 21 pivotal/PivotalCoreKit Objective-C++ 0
|
119
|
-
| 22 openpeer/opios Objective-C++ 0
|
120
|
-
| 23 swift2js/swift2js Objective-C++ 0
|
121
|
-
| 24 Smartype/iOS_VPNPlugIn Objective-C++ 0
|
122
|
-
| 25 ryanb93/Applefy Objective-C++ 0
|
60
|
+
| 1 webgradus/kms Ruby 115
|
61
|
+
| 2 shakacode/react_on_rails Ruby 2111
|
62
|
+
| 3 Homebrew/brew Ruby 4409
|
63
|
+
| 4 rails/rails Ruby 33266
|
64
|
+
| 5 jondot/awesome-react-native Ruby 8260
|
65
|
+
| 6 fastlane/fastlane Ruby 12056
|
66
|
+
| 7 mitchellh/vagrant Ruby 13443
|
67
|
+
| 8 discourse/discourse Ruby 19670
|
68
|
+
| 9 jekyll/jekyll Ruby 27457
|
69
|
+
| 10 caskroom/homebrew-cask Ruby 9882
|
70
|
+
| 11 Thibaut/devdocs Ruby 10699
|
71
|
+
| 12 rapid7/metasploit-framework Ruby 6996
|
72
|
+
| 13 CocoaPods/CocoaPods Ruby 8715
|
73
|
+
| 14 rails-api/active_model_serializers Ruby 3837
|
74
|
+
| 15 kilimchoi/engineering-blogs Ruby 8631
|
75
|
+
| 16 plataformatec/devise Ruby 16116
|
76
|
+
| 17 gettalong/hexapdf Ruby 300
|
77
|
+
| 18 Gargron/mastodon Ruby 824
|
78
|
+
| 19 mperham/sidekiq Ruby 6826
|
79
|
+
| 20 bkeepers/dotenv Ruby 3691
|
80
|
+
| 21 skywinder/github-changelog-generator Ruby 2655
|
81
|
+
| 22 gitlabhq/gitlabhq Ruby 18633
|
82
|
+
| 23 Tim9Liu9/TimLiu-iOS Ruby 4830
|
83
|
+
| 24 elastic/logstash Ruby 6637
|
84
|
+
| 25 shakacode/react-webpack-rails-tutorial Ruby 1118
|
123
85
|
|
124
86
|
EOS
|
125
87
|
expect { cli.invoke(:list, [], language: language, description: false) }.to output(res).to_stdout
|
@@ -127,156 +89,143 @@ RSpec.describe GitTrend::CLI do
|
|
127
89
|
end
|
128
90
|
end
|
129
91
|
|
130
|
-
describe
|
131
|
-
context
|
132
|
-
before { stub_request_get(
|
133
|
-
include_examples
|
92
|
+
describe "with -s option" do
|
93
|
+
context "with no option" do
|
94
|
+
before { stub_request_get("trending?since=") }
|
95
|
+
include_examples "since daily ranking", ""
|
134
96
|
end
|
135
97
|
|
136
|
-
describe
|
137
|
-
before { stub_request_get(
|
138
|
-
context
|
139
|
-
include_examples
|
98
|
+
describe "since daily" do
|
99
|
+
before { stub_request_get("trending?since=daily") }
|
100
|
+
context "with d" do
|
101
|
+
include_examples "since daily ranking", "d"
|
140
102
|
end
|
141
103
|
|
142
|
-
context
|
143
|
-
include_examples
|
104
|
+
context "with day" do
|
105
|
+
include_examples "since daily ranking", "day"
|
144
106
|
end
|
145
107
|
|
146
|
-
context
|
147
|
-
include_examples
|
108
|
+
context "with daily" do
|
109
|
+
include_examples "since daily ranking", "daily"
|
148
110
|
end
|
149
111
|
end
|
150
112
|
|
151
|
-
describe
|
152
|
-
before { stub_request_get(
|
153
|
-
context
|
154
|
-
include_examples
|
113
|
+
describe "since weekly" do
|
114
|
+
before { stub_request_get("trending?since=weekly") }
|
115
|
+
context "with w" do
|
116
|
+
include_examples "since weekly ranking", "w"
|
155
117
|
end
|
156
118
|
|
157
|
-
context
|
158
|
-
include_examples
|
119
|
+
context "with week" do
|
120
|
+
include_examples "since weekly ranking", "week"
|
159
121
|
end
|
160
122
|
|
161
|
-
context
|
162
|
-
include_examples
|
123
|
+
context "with weekly" do
|
124
|
+
include_examples "since weekly ranking", "weekly"
|
163
125
|
end
|
164
126
|
end
|
165
127
|
|
166
|
-
describe
|
167
|
-
before { stub_request_get(
|
168
|
-
context
|
169
|
-
include_examples
|
128
|
+
describe "since monthly" do
|
129
|
+
before { stub_request_get("trending?since=monthly") }
|
130
|
+
context "with m" do
|
131
|
+
include_examples "since monthly ranking", "m"
|
170
132
|
end
|
171
133
|
|
172
|
-
context
|
173
|
-
include_examples
|
134
|
+
context "with month" do
|
135
|
+
include_examples "since monthly ranking", "month"
|
174
136
|
end
|
175
137
|
|
176
|
-
context
|
177
|
-
include_examples
|
138
|
+
context "with monthly" do
|
139
|
+
include_examples "since monthly ranking", "monthly"
|
178
140
|
end
|
179
141
|
end
|
180
142
|
end
|
181
143
|
|
182
|
-
describe
|
144
|
+
describe "with -d option (or with no option)" do
|
183
145
|
after do
|
184
|
-
ENV[
|
185
|
-
ENV[
|
146
|
+
ENV["COLUMNS"] = nil
|
147
|
+
ENV["LINES"] = nil
|
186
148
|
end
|
187
149
|
|
188
150
|
before do
|
189
|
-
stub_request_get(
|
190
|
-
ENV[
|
191
|
-
ENV[
|
151
|
+
stub_request_get("trending")
|
152
|
+
ENV["COLUMNS"] = "140"
|
153
|
+
ENV["LINES"] = "40"
|
192
154
|
end
|
193
155
|
|
194
|
-
context
|
195
|
-
it
|
156
|
+
context "with no option" do
|
157
|
+
it "display daily ranking" do
|
196
158
|
expect { cli.invoke(:list, []) }.to output(dummy_result_no_options).to_stdout
|
197
159
|
end
|
198
160
|
end
|
199
161
|
|
200
|
-
context
|
201
|
-
it
|
162
|
+
context "terminal width is enough" do
|
163
|
+
it "display daily ranking with description" do
|
202
164
|
expect { cli.invoke(:list, [], description: true) }.to output(dummy_result_no_options).to_stdout
|
203
165
|
end
|
204
166
|
end
|
205
167
|
|
206
|
-
context
|
168
|
+
context "terminal width is tiny" do
|
207
169
|
before do
|
208
|
-
ENV[
|
209
|
-
ENV[
|
170
|
+
ENV["COLUMNS"] = "83" # it is not enough for description.
|
171
|
+
ENV["LINES"] = "40"
|
210
172
|
end
|
211
173
|
|
212
|
-
it
|
174
|
+
it "display daily ranking about the same as no option" do
|
213
175
|
expect { cli.invoke(:list, [], description: true) }.to output(dummy_result_without_description).to_stdout
|
214
176
|
end
|
215
177
|
end
|
216
178
|
end
|
217
179
|
|
218
|
-
describe
|
219
|
-
context
|
220
|
-
before { stub_request_get("trending
|
221
|
-
let(:language) {
|
222
|
-
let(:since) {
|
180
|
+
describe "with -l and -s option" do
|
181
|
+
context "with ruby and weekly" do
|
182
|
+
before { stub_request_get("trending/#{language}?since=#{since}") }
|
183
|
+
let(:language) { "ruby" }
|
184
|
+
let(:since) { "weekly" }
|
223
185
|
|
224
|
-
it
|
186
|
+
it "display weekly ranking by language" do
|
225
187
|
res = <<-'EOS'.unindent
|
226
188
|
|No. Name Lang Star
|
227
189
|
|--- ---------------------------------------- ---------- ------
|
228
|
-
| 1 Homebrew/
|
229
|
-
| 2
|
230
|
-
| 3
|
231
|
-
| 4
|
232
|
-
| 5
|
233
|
-
| 6
|
234
|
-
| 7
|
235
|
-
| 8
|
236
|
-
| 9
|
237
|
-
| 10
|
238
|
-
| 11
|
239
|
-
| 12
|
240
|
-
| 13
|
241
|
-
| 14
|
242
|
-
| 15
|
243
|
-
| 16
|
244
|
-
| 17
|
245
|
-
| 18 ruby/ruby Ruby
|
246
|
-
| 19
|
247
|
-
| 20
|
248
|
-
| 21
|
249
|
-
| 22
|
250
|
-
| 23
|
251
|
-
| 24
|
252
|
-
| 25
|
190
|
+
| 1 Homebrew/brew Ruby 4410
|
191
|
+
| 2 fastlane/fastlane Ruby 12057
|
192
|
+
| 3 jondot/awesome-react-native Ruby 8262
|
193
|
+
| 4 iberianpig/fusuma Ruby 129
|
194
|
+
| 5 rails/rails Ruby 33266
|
195
|
+
| 6 jekyll/jekyll Ruby 27459
|
196
|
+
| 7 Gargron/mastodon Ruby 826
|
197
|
+
| 8 gettalong/hexapdf Ruby 303
|
198
|
+
| 9 Tim9Liu9/TimLiu-iOS Ruby 4830
|
199
|
+
| 10 rapid7/metasploit-framework Ruby 6996
|
200
|
+
| 11 mitchellh/vagrant Ruby 13443
|
201
|
+
| 12 discourse/discourse Ruby 19671
|
202
|
+
| 13 cookpad/kuroko2 Ruby 85
|
203
|
+
| 14 shakacode/react_on_rails Ruby 2114
|
204
|
+
| 15 caskroom/homebrew-cask Ruby 9883
|
205
|
+
| 16 Thibaut/devdocs Ruby 10699
|
206
|
+
| 17 plataformatec/devise Ruby 16116
|
207
|
+
| 18 ruby/ruby Ruby 10880
|
208
|
+
| 19 sass/sass Ruby 8825
|
209
|
+
| 20 logstash-plugins/logstash-patterns-core Ruby 420
|
210
|
+
| 21 webgradus/kms Ruby 117
|
211
|
+
| 22 CocoaPods/CocoaPods Ruby 8715
|
212
|
+
| 23 Homebrew/homebrew-core Ruby 979
|
213
|
+
| 24 cantino/huginn Ruby 15035
|
214
|
+
| 25 twbs/bootstrap-sass Ruby 11486
|
253
215
|
|
254
216
|
EOS
|
255
217
|
expect { cli.invoke(:list, [], language: language, since: since, description: false) }.to output(res).to_stdout
|
256
218
|
end
|
257
219
|
end
|
258
220
|
end
|
259
|
-
|
260
|
-
describe 'without options' do
|
261
|
-
context 'with multibyte chracters' do
|
262
|
-
before do
|
263
|
-
ENV['COLUMNS'] = '140'
|
264
|
-
ENV['LINES'] = '40'
|
265
|
-
stub_request_get('trending', 'trending_including_multibyte_characters')
|
266
|
-
end
|
267
|
-
it 'display daily ranking' do
|
268
|
-
expect { cli.invoke(:list, []) }.to output(dummy_result_no_options_with_multibyte_characters).to_stdout
|
269
|
-
end
|
270
|
-
end
|
271
|
-
end
|
272
221
|
end
|
273
222
|
|
274
|
-
describe
|
275
|
-
before { stub_request_get(
|
223
|
+
describe "#languages" do
|
224
|
+
before { stub_request_get("trending") }
|
276
225
|
let(:cli) { CLI.new }
|
277
226
|
|
278
|
-
context
|
279
|
-
it
|
227
|
+
context "with no option" do
|
228
|
+
it "display languages" do
|
280
229
|
expect { cli.languages }.to output(dummy_languages).to_stdout
|
281
230
|
end
|
282
231
|
end
|
@@ -284,185 +233,153 @@ RSpec.describe GitTrend::CLI do
|
|
284
233
|
|
285
234
|
private
|
286
235
|
|
287
|
-
def stub_request_get(
|
236
|
+
def stub_request_get(stub_url_path, stub_file_name = nil)
|
288
237
|
url = Scraper::BASE_HOST.dup
|
289
|
-
url << "/#{
|
238
|
+
url << "/#{stub_url_path}" if stub_url_path
|
290
239
|
uri = URI.parse(url)
|
291
|
-
stub_file = stub_file_name ||
|
240
|
+
stub_file = stub_file_name || stub_url_path
|
292
241
|
stub_request(:get, uri)
|
293
242
|
.to_return(
|
294
243
|
status: 200,
|
295
|
-
headers: { content_type:
|
244
|
+
headers: { content_type: "text/html" },
|
296
245
|
body: load_http_stub(stub_file))
|
297
246
|
end
|
298
247
|
|
299
248
|
def dummy_result_without_description
|
300
249
|
<<-'EOS'.unindent
|
301
|
-
|No. Name Lang
|
302
|
-
|--- ----------------------------------------
|
303
|
-
| 1
|
304
|
-
| 2
|
305
|
-
| 3 FreeCodeCamp/FreeCodeCamp JavaScript
|
306
|
-
| 4
|
307
|
-
| 5
|
308
|
-
| 6
|
309
|
-
| 7
|
310
|
-
| 8
|
311
|
-
| 9
|
312
|
-
| 10
|
313
|
-
| 11
|
314
|
-
| 12
|
315
|
-
| 13
|
316
|
-
| 14
|
317
|
-
| 15
|
318
|
-
| 16
|
319
|
-
| 17
|
320
|
-
| 18
|
321
|
-
| 19
|
322
|
-
| 20
|
323
|
-
| 21
|
324
|
-
| 22
|
325
|
-
| 23
|
326
|
-
| 24
|
327
|
-
| 25
|
250
|
+
|No. Name Lang Star
|
251
|
+
|--- ---------------------------------------- ----------- ------
|
252
|
+
| 1 Bilibili/flv.js JavaScript 3782
|
253
|
+
| 2 drathier/stack-overflow-import Python 589
|
254
|
+
| 3 FreeCodeCamp/FreeCodeCamp JavaScript 191056
|
255
|
+
| 4 alexjc/neural-enhance Python 4380
|
256
|
+
| 5 mzabriskie/axios JavaScript 7565
|
257
|
+
| 6 airbnb/knowledge-repo Python 621
|
258
|
+
| 7 skatejs/skatejs JavaScript 1482
|
259
|
+
| 8 UFreedom/FloatingView Java 304
|
260
|
+
| 9 verekia/js-stack-from-scratch JavaScript 7684
|
261
|
+
| 10 portainer/portainer JavaScript 463
|
262
|
+
| 11 CISOfy/lynis Shell 1480
|
263
|
+
| 12 vuejs/vue JavaScript 32676
|
264
|
+
| 13 th0r/webpack-bundle-analyzer JavaScript 1438
|
265
|
+
| 14 thunderrise/android-TNRAnimationHelper Java 487
|
266
|
+
| 15 Jasonette/JASONETTE-iOS Objective-C 164
|
267
|
+
| 16 justjavac/awesome-wechat-weapp JavaScript 3859
|
268
|
+
| 17 yarnpkg/yarn JavaScript 18470
|
269
|
+
| 18 jwasham/google-interview-university 19524
|
270
|
+
| 19 lengstrom/fast-style-transfer Python 1654
|
271
|
+
| 20 FreeCodeCampChina/freecodecamp.cn CSS 3016
|
272
|
+
| 21 minoca/os C 1616
|
273
|
+
| 22 facebook/react JavaScript 53230
|
274
|
+
| 23 sqreen/awesome-nodejs-projects 1454
|
275
|
+
| 24 tensorflow/tensorflow C++ 36152
|
276
|
+
| 25 andyxialm/TyperEditText Java 110
|
328
277
|
|
329
278
|
EOS
|
330
279
|
end
|
331
280
|
|
332
281
|
def dummy_result_no_options
|
333
282
|
<<-'EOS'.unindent
|
334
|
-
|No. Name Lang
|
335
|
-
|--- ----------------------------------------
|
336
|
-
| 1
|
337
|
-
| 2
|
338
|
-
| 3 FreeCodeCamp/FreeCodeCamp JavaScript
|
339
|
-
| 4
|
340
|
-
| 5
|
341
|
-
| 6
|
342
|
-
| 7
|
343
|
-
| 8
|
344
|
-
| 9
|
345
|
-
| 10
|
346
|
-
| 11
|
347
|
-
| 12
|
348
|
-
| 13
|
349
|
-
| 14
|
350
|
-
| 15
|
351
|
-
| 16
|
352
|
-
| 17
|
353
|
-
| 18
|
354
|
-
| 19
|
355
|
-
| 20
|
356
|
-
| 21
|
357
|
-
| 22
|
358
|
-
| 23
|
359
|
-
| 24
|
360
|
-
| 25
|
361
|
-
|
362
|
-
EOS
|
363
|
-
end
|
364
|
-
|
365
|
-
def dummy_result_no_options_with_multibyte_characters
|
366
|
-
<<-'EOS'.unindent
|
367
|
-
|No. Name Lang Star Description
|
368
|
-
|--- ---------------------------------------- ---------- ------ -----------------------------------------------------------------------------
|
369
|
-
| 1 apple/swift C++ 1487 The Swift Programming Language
|
370
|
-
| 2 hashcat/hashcat C 383 Advanced CPU-based password recovery utility
|
371
|
-
| 3 airbnb/reagent JavaScript 416 JavaScript Testing utilities for React
|
372
|
-
| 4 FreeCodeCamp/FreeCodeCamp JavaScript 381 The http://FreeCodeCamp.com open source codebase and curriculum. Learn to ...
|
373
|
-
| 5 diafygi/acme-tiny Python 311 A tiny script to issue and renew TLS certs from Let's Encrypt
|
374
|
-
| 6 letsencrypt/letsencrypt Python 300 This Let's Encrypt repo is an ACME client that can obtain certs and extens...
|
375
|
-
| 7 twitter/labella.js JavaScript 248 Placing labels on a timeline without overlap.
|
376
|
-
| 8 LeaVerou/bliss HTML 228 Blissful JavaScript
|
377
|
-
| 9 nathancahill/Split.js JavaScript 217 Lightweight, unopinionated utility for adjustable split views
|
378
|
-
| 10 hashcat/oclHashcat C 194 World's fastest and most advanced GPGPU-based password recovery utility
|
379
|
-
| 11 apple/swift-package-manager Swift 190 The Package Manager for the Swift Programming Language
|
380
|
-
| 12 documentationjs/documentation JavaScript 177 beautiful, flexible, powerful js docs
|
381
|
-
| 13 HospitalRun/hospitalrun-frontend JavaScript 167 Ember front end for HospitalRun
|
382
|
-
| 14 NARKOZ/hacker-scripts JavaScript 139 Based on a true story
|
383
|
-
| 15 apple/swift-evolution 140
|
384
|
-
| 16 MaximAbramchuck/awesome-interviews 139 A curated awesome list of lists of interview questions. Feel free to contr...
|
385
|
-
| 17 adleroliveira/dreamjs JavaScript 136 A lightweight json data generator.
|
386
|
-
| 18 huytd/swift-http Swift 125 HTTP Implementation for Swift on Linux and Mac OS X
|
387
|
-
| 19 diafygi/gethttpsforfree JavaScript 118 Source code for https://gethttpsforfree.com/
|
388
|
-
| 20 apple/swift-corelibs-foundation C 93 The Foundation Project, providing core utilities, internationalization, an...
|
389
|
-
| 21 xenolf/lego Go 100 Let's Encrypt client and ACME library written in Go
|
390
|
-
| 22 fengyuanchen/cropperjs JavaScript 95 JavaScript image cropper.
|
391
|
-
| 23 proflin/CoolplaySpark 85 酷玩 Spark
|
392
|
-
| 24 incrediblesound/story-graph JavaScript 87 The Graph that Generates Stories
|
393
|
-
| 25 geeeeeeeeek/WeChatLuckyMoney Java 75 微信抢红包插件, an Android app that helps you snatch virtual red envelopes...
|
283
|
+
|No. Name Lang Star Description
|
284
|
+
|--- ---------------------------------------- ----------- ------ ----------------------------------------------------------------------------
|
285
|
+
| 1 Bilibili/flv.js JavaScript 3782 HTML5 FLV Player
|
286
|
+
| 2 drathier/stack-overflow-import Python 589 Import arbitrary code from Stack Overflow as Python modules.
|
287
|
+
| 3 FreeCodeCamp/FreeCodeCamp JavaScript 191056 The https://FreeCodeCamp.com open source codebase and curriculum. Learn t...
|
288
|
+
| 4 alexjc/neural-enhance Python 4380 Super Resolution for images using deep learning.
|
289
|
+
| 5 mzabriskie/axios JavaScript 7565 Promise based HTTP client for the browser and node.js
|
290
|
+
| 6 airbnb/knowledge-repo Python 621 A next-generation curated knowledge sharing platform for data scientists ...
|
291
|
+
| 7 skatejs/skatejs JavaScript 1482 SkateJS is a web component library designed to give you an augmentation o...
|
292
|
+
| 8 UFreedom/FloatingView Java 304 FloatingView can make the target view floating above the anchor view with...
|
293
|
+
| 9 verekia/js-stack-from-scratch JavaScript 7684 Step-by-step tutorial to build a modern JavaScript stack from scratch
|
294
|
+
| 10 portainer/portainer JavaScript 463 Simple management UI for Docker
|
295
|
+
| 11 CISOfy/lynis Shell 1480 Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. ...
|
296
|
+
| 12 vuejs/vue JavaScript 32676 Simple yet powerful library for building modern web interfaces.
|
297
|
+
| 13 th0r/webpack-bundle-analyzer JavaScript 1438 Webpack plugin and CLI utility that represents bundle content as convenie...
|
298
|
+
| 14 thunderrise/android-TNRAnimationHelper Java 487 This is a library that contains practical animations: Rotation, Flip, Hor...
|
299
|
+
| 15 Jasonette/JASONETTE-iOS Objective-C 164 📡 Native App over HTTP
|
300
|
+
| 16 justjavac/awesome-wechat-weapp JavaScript 3859 微信小程序开发资源汇总 wechat weapp
|
301
|
+
| 17 yarnpkg/yarn JavaScript 18470 📦🐈 Fast, reliable, and secure dependency management.
|
302
|
+
| 18 jwasham/google-interview-university 19524 A complete daily plan for studying to become a Google software engineer.
|
303
|
+
| 19 lengstrom/fast-style-transfer Python 1654 Fast Style Transfer in TensorFlow
|
304
|
+
| 20 FreeCodeCampChina/freecodecamp.cn CSS 3016 看源码请到Code,提问请到Issues,提交代码请到Pull requests,看学习心得请到...
|
305
|
+
| 21 minoca/os C 1616 Minoca operating system
|
306
|
+
| 22 facebook/react JavaScript 53230 A declarative, efficient, and flexible JavaScript library for building us...
|
307
|
+
| 23 sqreen/awesome-nodejs-projects 1454 Curated list of awesome open-source applications made with Node.js
|
308
|
+
| 24 tensorflow/tensorflow C++ 36152 Computation using data flow graphs for scalable machine learning
|
309
|
+
| 25 andyxialm/TyperEditText Java 110 Typewriter
|
394
310
|
|
395
311
|
EOS
|
396
312
|
end
|
397
313
|
|
398
314
|
def dummy_weekly_result
|
399
315
|
<<-'EOS'.unindent
|
400
|
-
|No. Name
|
401
|
-
|---
|
402
|
-
| 1
|
403
|
-
| 2
|
404
|
-
| 3
|
405
|
-
| 4
|
406
|
-
| 5
|
407
|
-
| 6
|
408
|
-
| 7
|
409
|
-
| 8
|
410
|
-
| 9
|
411
|
-
| 10
|
412
|
-
| 11
|
413
|
-
| 12
|
414
|
-
| 13
|
415
|
-
| 14
|
416
|
-
| 15
|
417
|
-
| 16
|
418
|
-
| 17
|
419
|
-
| 18
|
420
|
-
| 19
|
421
|
-
| 20
|
422
|
-
| 21
|
423
|
-
| 22
|
424
|
-
| 23
|
425
|
-
| 24
|
426
|
-
| 25
|
316
|
+
|No. Name Lang Star
|
317
|
+
|--- ---------------------------------------------- ---------- ------
|
318
|
+
| 1 verekia/js-stack-from-scratch JavaScript 7704
|
319
|
+
| 2 alexjc/neural-enhance Python 4401
|
320
|
+
| 3 FreeCodeCamp/FreeCodeCamp JavaScript 191088
|
321
|
+
| 4 witheve/Eve JavaScript 4896
|
322
|
+
| 5 Bilibili/flv.js JavaScript 3796
|
323
|
+
| 6 lengstrom/fast-style-transfer Python 1663
|
324
|
+
| 7 VoLuong/Begin-Latex-in-minutes 1652
|
325
|
+
| 8 minoca/os C 1622
|
326
|
+
| 9 sqreen/awesome-nodejs-projects 1455
|
327
|
+
| 10 th0r/webpack-bundle-analyzer JavaScript 1446
|
328
|
+
| 11 blue-yonder/tsfresh Python 1419
|
329
|
+
| 12 zeit/next.js JavaScript 5191
|
330
|
+
| 13 GoogleChrome/lighthouse JavaScript 3962
|
331
|
+
| 14 jwasham/google-interview-university 19533
|
332
|
+
| 15 mas-cli/mas Swift 2261
|
333
|
+
| 16 mattrajca/sudo-touchid C 884
|
334
|
+
| 17 songrotek/Deep-Learning-Papers-Reading-Roadmap Python 7241
|
335
|
+
| 18 yarnpkg/yarn JavaScript 18477
|
336
|
+
| 19 ImmortalZ/TransitionHelper Java 790
|
337
|
+
| 20 the-control-group/voyager PHP 818
|
338
|
+
| 21 vuejs/vue JavaScript 32693
|
339
|
+
| 22 jobbole/awesome-programming-books 821
|
340
|
+
| 23 tensorflow/tensorflow C++ 36159
|
341
|
+
| 24 BelooS/ChipsLayoutManager Java 714
|
342
|
+
| 25 krisk/Fuse JavaScript 3369
|
427
343
|
|
428
344
|
EOS
|
429
345
|
end
|
430
346
|
|
431
347
|
def dummy_monthly_result
|
432
348
|
<<-'EOS'.unindent
|
433
|
-
|No. Name
|
434
|
-
|---
|
435
|
-
| 1
|
436
|
-
| 2
|
437
|
-
| 3
|
438
|
-
| 4
|
439
|
-
| 5
|
440
|
-
| 6
|
441
|
-
| 7
|
442
|
-
| 8
|
443
|
-
| 9
|
444
|
-
| 10
|
445
|
-
| 11
|
446
|
-
| 12
|
447
|
-
| 13
|
448
|
-
| 14
|
449
|
-
| 15
|
450
|
-
| 16
|
451
|
-
| 17
|
452
|
-
| 18
|
453
|
-
| 19
|
454
|
-
| 20
|
455
|
-
| 21
|
456
|
-
| 22
|
457
|
-
| 23
|
458
|
-
| 24
|
459
|
-
| 25
|
349
|
+
|No. Name Lang Star
|
350
|
+
|--- ---------------------------------------------- ---------- ------
|
351
|
+
| 1 verekia/js-stack-from-scratch JavaScript 7704
|
352
|
+
| 2 alexjc/neural-enhance Python 4401
|
353
|
+
| 3 FreeCodeCamp/FreeCodeCamp JavaScript 191088
|
354
|
+
| 4 witheve/Eve JavaScript 4896
|
355
|
+
| 5 Bilibili/flv.js JavaScript 3796
|
356
|
+
| 6 lengstrom/fast-style-transfer Python 1663
|
357
|
+
| 7 VoLuong/Begin-Latex-in-minutes 1652
|
358
|
+
| 8 minoca/os C 1622
|
359
|
+
| 9 sqreen/awesome-nodejs-projects 1455
|
360
|
+
| 10 th0r/webpack-bundle-analyzer JavaScript 1446
|
361
|
+
| 11 blue-yonder/tsfresh Python 1419
|
362
|
+
| 12 zeit/next.js JavaScript 5191
|
363
|
+
| 13 GoogleChrome/lighthouse JavaScript 3962
|
364
|
+
| 14 jwasham/google-interview-university 19533
|
365
|
+
| 15 mas-cli/mas Swift 2261
|
366
|
+
| 16 mattrajca/sudo-touchid C 884
|
367
|
+
| 17 songrotek/Deep-Learning-Papers-Reading-Roadmap Python 7241
|
368
|
+
| 18 yarnpkg/yarn JavaScript 18477
|
369
|
+
| 19 ImmortalZ/TransitionHelper Java 790
|
370
|
+
| 20 the-control-group/voyager PHP 818
|
371
|
+
| 21 vuejs/vue JavaScript 32693
|
372
|
+
| 22 jobbole/awesome-programming-books 821
|
373
|
+
| 23 tensorflow/tensorflow C++ 36159
|
374
|
+
| 24 BelooS/ChipsLayoutManager Java 714
|
375
|
+
| 25 krisk/Fuse JavaScript 3369
|
460
376
|
|
461
377
|
EOS
|
462
378
|
end
|
463
379
|
|
464
380
|
def dummy_languages
|
465
381
|
<<-'EOS'.unindent
|
382
|
+
|1C Enterprise
|
466
383
|
|ABAP
|
467
384
|
|ActionScript
|
468
385
|
|Ada
|
@@ -521,6 +438,9 @@ RSpec.describe GitTrend::CLI do
|
|
521
438
|
|Cool
|
522
439
|
|Coq
|
523
440
|
|Crystal
|
441
|
+
|Csound
|
442
|
+
|Csound Document
|
443
|
+
|Csound Score
|
524
444
|
|CSS
|
525
445
|
|Cucumber
|
526
446
|
|Cuda
|
@@ -543,11 +463,13 @@ RSpec.describe GitTrend::CLI do
|
|
543
463
|
|Elm
|
544
464
|
|Emacs Lisp
|
545
465
|
|EmberScript
|
466
|
+
|EQ
|
546
467
|
|Erlang
|
547
468
|
|F#
|
548
469
|
|Factor
|
549
470
|
|Fancy
|
550
471
|
|Fantom
|
472
|
+
|Filebench WML
|
551
473
|
|FLUX
|
552
474
|
|Forth
|
553
475
|
|FORTRAN
|
@@ -556,6 +478,8 @@ RSpec.describe GitTrend::CLI do
|
|
556
478
|
|Game Maker Language
|
557
479
|
|GAMS
|
558
480
|
|GAP
|
481
|
+
|GCC Machine Description
|
482
|
+
|GDB
|
559
483
|
|GDScript
|
560
484
|
|Genshi
|
561
485
|
|Gettext Catalog
|
@@ -575,6 +499,7 @@ RSpec.describe GitTrend::CLI do
|
|
575
499
|
|Haskell
|
576
500
|
|Haxe
|
577
501
|
|HCL
|
502
|
+
|HLSL
|
578
503
|
|HTML
|
579
504
|
|Hy
|
580
505
|
|HyPhy
|
@@ -615,6 +540,7 @@ RSpec.describe GitTrend::CLI do
|
|
615
540
|
|LSL
|
616
541
|
|Lua
|
617
542
|
|M
|
543
|
+
|M4
|
618
544
|
|Makefile
|
619
545
|
|Mako
|
620
546
|
|Markdown
|
@@ -633,6 +559,8 @@ RSpec.describe GitTrend::CLI do
|
|
633
559
|
|Monkey
|
634
560
|
|Moocode
|
635
561
|
|MoonScript
|
562
|
+
|MQL4
|
563
|
+
|MQL5
|
636
564
|
|MTML
|
637
565
|
|mupad
|
638
566
|
|Myghty
|
@@ -678,6 +606,8 @@ RSpec.describe GitTrend::CLI do
|
|
678
606
|
|PogoScript
|
679
607
|
|Pony
|
680
608
|
|PostScript
|
609
|
+
|POV-Ray SDL
|
610
|
+
|PowerBuilder
|
681
611
|
|PowerShell
|
682
612
|
|Processing
|
683
613
|
|Prolog
|
@@ -699,10 +629,13 @@ RSpec.describe GitTrend::CLI do
|
|
699
629
|
|Rebol
|
700
630
|
|Red
|
701
631
|
|Redcode
|
632
|
+
|Ren'Py
|
702
633
|
|RenderScript
|
634
|
+
|REXX
|
703
635
|
|RobotFramework
|
704
636
|
|Rouge
|
705
637
|
|Ruby
|
638
|
+
|RUNOFF
|
706
639
|
|Rust
|
707
640
|
|SaltStack
|
708
641
|
|SAS
|
@@ -723,6 +656,7 @@ RSpec.describe GitTrend::CLI do
|
|
723
656
|
|SQL
|
724
657
|
|SQLPL
|
725
658
|
|Squirrel
|
659
|
+
|SRecode Template
|
726
660
|
|Stan
|
727
661
|
|Standard ML
|
728
662
|
|Stata
|
@@ -731,11 +665,15 @@ RSpec.describe GitTrend::CLI do
|
|
731
665
|
|SystemVerilog
|
732
666
|
|Tcl
|
733
667
|
|Tea
|
668
|
+
|Terra
|
734
669
|
|TeX
|
735
670
|
|Thrift
|
671
|
+
|TI Program
|
672
|
+
|TLA
|
736
673
|
|Turing
|
737
674
|
|TXL
|
738
675
|
|TypeScript
|
676
|
+
|Uno
|
739
677
|
|UnrealScript
|
740
678
|
|UrWeb
|
741
679
|
|Vala
|
@@ -764,7 +702,7 @@ RSpec.describe GitTrend::CLI do
|
|
764
702
|
|Zephir
|
765
703
|
|Zimpl
|
766
704
|
|
|
767
|
-
|
|
705
|
+
|322 languages
|
768
706
|
|you can get only selected language list with '-l' option.
|
769
707
|
|if languages is unknown, you can specify 'unkown'.
|
770
708
|
|
|