repocrawler 0.1.10 → 0.1.11
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 +25 -0
- 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: beae48f48942aeb6c43177674ddf0616246f1307
|
4
|
+
data.tar.gz: d54e67b91e1cf32870c986a22aaf9513993b1c69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0b1560aa4ba5b83629af268d735ee5041083e5cd82655fd1e651c9e4dfd19e53befd519e99f199ea4f310d91c26251bbaebf9902cb0397e036664e09364a1f9
|
7
|
+
data.tar.gz: bd0cf5382f7dc0efe5e74b079f90c48b2b87d73e364f891f0c411cfeb96e7042f83dc3be5e0b239268af8b058221acd9ada241f3bbbfce96eb194511819a5884
|
data/lib/repocrawler/crawler.rb
CHANGED
@@ -80,6 +80,31 @@ module Repos
|
|
80
80
|
issues
|
81
81
|
end
|
82
82
|
|
83
|
+
# get commits history
|
84
|
+
def get_commits_history
|
85
|
+
commits_info = []
|
86
|
+
stop = false
|
87
|
+
page = 1
|
88
|
+
|
89
|
+
until stop
|
90
|
+
commits_fetch = HTTParty.get(@GITHUB_API_BASE_URL + "/commits?page=#{page}&access_token=#{@access_token}", headers: {
|
91
|
+
"User-Agent" => @user_agent
|
92
|
+
})
|
93
|
+
if commits_fetch.count === 0
|
94
|
+
stop = true
|
95
|
+
end
|
96
|
+
|
97
|
+
commits_fetch.each do |commit|
|
98
|
+
commits_info << {
|
99
|
+
"committer" => commit['commit']['committer']['name']
|
100
|
+
"created_at" => commit['commit']['committer']['date']
|
101
|
+
}
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
commits_info.reverse!
|
106
|
+
end
|
107
|
+
|
83
108
|
# get information of the closed issues
|
84
109
|
def get_issues_info
|
85
110
|
closed_issues = []
|
data/lib/repocrawler/version.rb
CHANGED