repocrawler 0.1.24 → 0.1.25
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 +4 -4
- data/lib/repocrawler/crawler.rb +3 -1
- data/lib/repocrawler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71fcb28a975578875f78d5446a6fa03f9a17c004
|
4
|
+
data.tar.gz: c10650cda3d655e6cae34c3b88b85ae845878a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf161110c2ebdfa02b0e894589caa919d092ad700d253b5686a7e9dd8eec42bb7375d644cde6accaf0849a75c10a2e3ec4163d97169c0b75151b2d0fcb3d56eb
|
7
|
+
data.tar.gz: 1758338f0bf4070b8d16046709ceb24f7394441baf54a88ff5f72b230e6e79af090f4c94a262f120d04247435d5e4e4435a3060e9e0f2f4360373733ce7a8f56
|
data/lib/repocrawler/crawler.rb
CHANGED
@@ -251,12 +251,14 @@ module Repos
|
|
251
251
|
# check if the project has test
|
252
252
|
# TODO: recursively search
|
253
253
|
def get_test
|
254
|
+
has_test = 0;
|
255
|
+
|
254
256
|
contents = HTTParty.get(@GITHUB_API_BASE_URL + "/contents?access_token=#{@access_token}", headers: {
|
255
257
|
"User-Agent" => @user_agent
|
256
258
|
})
|
257
259
|
|
258
260
|
if contents.is_a?(Hash) && contents['message'] === 'Not Found'
|
259
|
-
return
|
261
|
+
return has_test
|
260
262
|
else
|
261
263
|
contents.select do |content|
|
262
264
|
(content['name'] === 'spec' || content['name'] === 'test') && content['type'] === 'dir' ? has_test = 1 : has_test = 0
|
data/lib/repocrawler/version.rb
CHANGED