ghtorrent 0.9 → 0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG +17 -2
- data/Gemfile.lock +14 -14
- data/bin/ght-log-analyzer +133 -0
- data/bin/ght-retrieve-one +6 -0
- data/lib/ghtorrent.rb +4 -0
- data/lib/ghtorrent/adapters/mongo_persister.rb +3 -2
- data/lib/ghtorrent/api_client.rb +107 -34
- data/lib/ghtorrent/command.rb +12 -4
- data/lib/ghtorrent/commands/ght_data_retrieval.rb +26 -34
- data/lib/ghtorrent/commands/ght_get_more_commits.rb +4 -3
- data/lib/ghtorrent/commands/ght_load.rb +3 -2
- data/lib/ghtorrent/commands/ght_retrieve_one.rb +80 -0
- data/lib/ghtorrent/commands/ght_retrieve_repo.rb +3 -3
- data/lib/ghtorrent/commands/ght_retrieve_repos.rb +57 -100
- data/lib/ghtorrent/commands/ght_retrieve_user.rb +6 -5
- data/lib/ghtorrent/ghtorrent.rb +188 -74
- data/lib/ghtorrent/migrations/016_add_actor_pull_request_history.rb +1 -1
- data/lib/ghtorrent/migrations/017_drop_forks_table.rb +24 -0
- data/lib/ghtorrent/migrations/018_drop_merged_user_from_pull_requests.rb +23 -0
- data/lib/ghtorrent/migrations/019_add_fake_to_users.rb +33 -0
- data/lib/ghtorrent/multiprocess_queue_client.rb +105 -0
- data/lib/ghtorrent/persister.rb +4 -1
- data/lib/ghtorrent/retriever.rb +115 -105
- data/lib/ghtorrent/settings.rb +6 -2
- data/lib/ghtorrent/transacted_ghtorrent.rb +9 -2
- data/lib/version.rb +1 -1
- metadata +55 -10
data/lib/ghtorrent/settings.rb
CHANGED
@@ -20,7 +20,6 @@ module GHTorrent
|
|
20
20
|
|
21
21
|
:mirror_urlbase => 'mirror.urlbase',
|
22
22
|
:mirror_persister => 'mirror.persister',
|
23
|
-
:mirror_commit_pages_new_repo => 'mirror.commit_pages_new_repo',
|
24
23
|
:mirror_history_pages_back => 'mirror.history_pages_back',
|
25
24
|
:uniq_id => 'mirror.uniq_id',
|
26
25
|
:user_agent => 'mirror.user_agent',
|
@@ -31,6 +30,7 @@ module GHTorrent
|
|
31
30
|
|
32
31
|
:github_username => 'mirror.username',
|
33
32
|
:github_passwd => 'mirror.passwd',
|
33
|
+
:github_token => 'mirror.token',
|
34
34
|
|
35
35
|
:respect_api_ratelimit => 'mirror.respect_api_ratelimit',
|
36
36
|
|
@@ -51,7 +51,6 @@ module GHTorrent
|
|
51
51
|
|
52
52
|
:mirror_urlbase => 'https://api.github.com/',
|
53
53
|
:mirror_persister => 'noop',
|
54
|
-
:mirror_commit_pages_new_repo => 3,
|
55
54
|
:mirror_history_pages_back => 1,
|
56
55
|
:uniq_id => 'ext_ref_id',
|
57
56
|
:user_agent => 'ghtorrent',
|
@@ -62,6 +61,7 @@ module GHTorrent
|
|
62
61
|
|
63
62
|
:github_username => 'foo',
|
64
63
|
:github_passwd => 'bar',
|
64
|
+
:github_token => '',
|
65
65
|
|
66
66
|
:respect_api_ratelimit => 'true',
|
67
67
|
|
@@ -97,6 +97,10 @@ module GHTorrent
|
|
97
97
|
}
|
98
98
|
end
|
99
99
|
|
100
|
+
def override_config(config_file, setting, new_value)
|
101
|
+
merge_config_values(config_file, {setting => new_value})
|
102
|
+
end
|
103
|
+
|
100
104
|
def settings
|
101
105
|
raise Exception.new('Unimplemented')
|
102
106
|
end
|
@@ -5,6 +5,13 @@ require 'ghtorrent/ghtorrent'
|
|
5
5
|
# item
|
6
6
|
class TransactedGhtorrent < GHTorrent::Mirror
|
7
7
|
|
8
|
+
def ensure_repo(owner, repo, commits = false, project_members = false,
|
9
|
+
watchers = false, forks = false, labels = false)
|
10
|
+
check_transaction do
|
11
|
+
super(owner, repo, commits, project_members, watchers, forks, labels)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
def ensure_commit(repo, sha, user, comments = true)
|
9
16
|
check_transaction do
|
10
17
|
super(repo, sha, user, comments)
|
@@ -24,8 +31,8 @@ class TransactedGhtorrent < GHTorrent::Mirror
|
|
24
31
|
end
|
25
32
|
|
26
33
|
def ensure_pull_request(owner, repo, pullreq_id,
|
27
|
-
|
28
|
-
|
34
|
+
comments = true, commits = true, history = true,
|
35
|
+
state = nil, actor = nil, created_at = nil)
|
29
36
|
check_transaction do
|
30
37
|
super(owner, repo, pullreq_id, comments, commits, history, state, actor, created_at)
|
31
38
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghtorrent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.10'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georgios Gousios
|
@@ -9,13 +9,16 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongo
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.9'
|
21
|
+
- - '>='
|
19
22
|
- !ruby/object:Gem::Version
|
20
23
|
version: 1.9.0
|
21
24
|
type: :runtime
|
@@ -23,6 +26,9 @@ dependencies:
|
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
28
|
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '1.9'
|
31
|
+
- - '>='
|
26
32
|
- !ruby/object:Gem::Version
|
27
33
|
version: 1.9.0
|
28
34
|
- !ruby/object:Gem::Dependency
|
@@ -30,6 +36,9 @@ dependencies:
|
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
38
|
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.9'
|
41
|
+
- - '>='
|
33
42
|
- !ruby/object:Gem::Version
|
34
43
|
version: 1.9.0
|
35
44
|
type: :runtime
|
@@ -37,6 +46,9 @@ dependencies:
|
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
38
47
|
requirements:
|
39
48
|
- - ~>
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '1.9'
|
51
|
+
- - '>='
|
40
52
|
- !ruby/object:Gem::Version
|
41
53
|
version: 1.9.0
|
42
54
|
- !ruby/object:Gem::Dependency
|
@@ -44,6 +56,9 @@ dependencies:
|
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|
45
57
|
requirements:
|
46
58
|
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.0'
|
61
|
+
- - '>='
|
47
62
|
- !ruby/object:Gem::Version
|
48
63
|
version: 2.0.0
|
49
64
|
type: :runtime
|
@@ -51,6 +66,9 @@ dependencies:
|
|
51
66
|
version_requirements: !ruby/object:Gem::Requirement
|
52
67
|
requirements:
|
53
68
|
- - ~>
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '2.0'
|
71
|
+
- - '>='
|
54
72
|
- !ruby/object:Gem::Version
|
55
73
|
version: 2.0.0
|
56
74
|
- !ruby/object:Gem::Dependency
|
@@ -58,6 +76,9 @@ dependencies:
|
|
58
76
|
requirement: !ruby/object:Gem::Requirement
|
59
77
|
requirements:
|
60
78
|
- - ~>
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '4.5'
|
81
|
+
- - '>='
|
61
82
|
- !ruby/object:Gem::Version
|
62
83
|
version: 4.5.0
|
63
84
|
type: :runtime
|
@@ -65,6 +86,9 @@ dependencies:
|
|
65
86
|
version_requirements: !ruby/object:Gem::Requirement
|
66
87
|
requirements:
|
67
88
|
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '4.5'
|
91
|
+
- - '>='
|
68
92
|
- !ruby/object:Gem::Version
|
69
93
|
version: 4.5.0
|
70
94
|
- !ruby/object:Gem::Dependency
|
@@ -72,6 +96,9 @@ dependencies:
|
|
72
96
|
requirement: !ruby/object:Gem::Requirement
|
73
97
|
requirements:
|
74
98
|
- - ~>
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '1.0'
|
101
|
+
- - '>='
|
75
102
|
- !ruby/object:Gem::Version
|
76
103
|
version: 1.0.0
|
77
104
|
type: :runtime
|
@@ -79,6 +106,9 @@ dependencies:
|
|
79
106
|
version_requirements: !ruby/object:Gem::Requirement
|
80
107
|
requirements:
|
81
108
|
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
111
|
+
- - '>='
|
82
112
|
- !ruby/object:Gem::Version
|
83
113
|
version: 1.0.0
|
84
114
|
- !ruby/object:Gem::Dependency
|
@@ -86,6 +116,9 @@ dependencies:
|
|
86
116
|
requirement: !ruby/object:Gem::Requirement
|
87
117
|
requirements:
|
88
118
|
- - ~>
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '2.14'
|
121
|
+
- - '>='
|
89
122
|
- !ruby/object:Gem::Version
|
90
123
|
version: 2.14.0
|
91
124
|
type: :development
|
@@ -93,6 +126,9 @@ dependencies:
|
|
93
126
|
version_requirements: !ruby/object:Gem::Requirement
|
94
127
|
requirements:
|
95
128
|
- - ~>
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '2.14'
|
131
|
+
- - '>='
|
96
132
|
- !ruby/object:Gem::Version
|
97
133
|
version: 2.14.0
|
98
134
|
- !ruby/object:Gem::Dependency
|
@@ -109,8 +145,9 @@ dependencies:
|
|
109
145
|
- - ~>
|
110
146
|
- !ruby/object:Gem::Version
|
111
147
|
version: '1.16'
|
112
|
-
description:
|
113
|
-
|
148
|
+
description: |-
|
149
|
+
A library and a collection of associated programs
|
150
|
+
to mirror and process Github data
|
114
151
|
email: gousiosg@gmail.com
|
115
152
|
executables:
|
116
153
|
- ght-data-retrieval
|
@@ -124,6 +161,7 @@ executables:
|
|
124
161
|
extensions: []
|
125
162
|
extra_rdoc_files: []
|
126
163
|
files:
|
164
|
+
- lib/ghtorrent.rb
|
127
165
|
- lib/ghtorrent/adapters/base_adapter.rb
|
128
166
|
- lib/ghtorrent/adapters/mongo_persister.rb
|
129
167
|
- lib/ghtorrent/adapters/noop_persister.rb
|
@@ -136,6 +174,7 @@ files:
|
|
136
174
|
- lib/ghtorrent/commands/ght_load.rb
|
137
175
|
- lib/ghtorrent/commands/ght_mirror_events.rb
|
138
176
|
- lib/ghtorrent/commands/ght_retrieve_dependents.rb
|
177
|
+
- lib/ghtorrent/commands/ght_retrieve_one.rb
|
139
178
|
- lib/ghtorrent/commands/ght_retrieve_repo.rb
|
140
179
|
- lib/ghtorrent/commands/ght_retrieve_repos.rb
|
141
180
|
- lib/ghtorrent/commands/ght_retrieve_user.rb
|
@@ -160,21 +199,26 @@ files:
|
|
160
199
|
- lib/ghtorrent/migrations/014_add_deleted_to_projects.rb
|
161
200
|
- lib/ghtorrent/migrations/015_fix_table_issue_labels.rb
|
162
201
|
- lib/ghtorrent/migrations/016_add_actor_pull_request_history.rb
|
202
|
+
- lib/ghtorrent/migrations/017_drop_forks_table.rb
|
203
|
+
- lib/ghtorrent/migrations/018_drop_merged_user_from_pull_requests.rb
|
204
|
+
- lib/ghtorrent/migrations/019_add_fake_to_users.rb
|
163
205
|
- lib/ghtorrent/migrations/mysql_defaults.rb
|
206
|
+
- lib/ghtorrent/multiprocess_queue_client.rb
|
164
207
|
- lib/ghtorrent/persister.rb
|
165
208
|
- lib/ghtorrent/retriever.rb
|
166
209
|
- lib/ghtorrent/settings.rb
|
167
210
|
- lib/ghtorrent/time.rb
|
168
211
|
- lib/ghtorrent/transacted_ghtorrent.rb
|
169
212
|
- lib/ghtorrent/utils.rb
|
170
|
-
- lib/ghtorrent.rb
|
171
213
|
- lib/version.rb
|
172
214
|
- bin/ght-data-retrieval
|
173
215
|
- bin/ght-get-more-commits
|
174
216
|
- bin/ght-load
|
217
|
+
- bin/ght-log-analyzer
|
175
218
|
- bin/ght-mirror-events
|
176
219
|
- bin/ght-process-event
|
177
220
|
- bin/ght-retrieve-dependents
|
221
|
+
- bin/ght-retrieve-one
|
178
222
|
- bin/ght-retrieve-repo
|
179
223
|
- bin/ght-retrieve-repos
|
180
224
|
- bin/ght-retrieve-user
|
@@ -183,12 +227,13 @@ files:
|
|
183
227
|
- Gemfile
|
184
228
|
- Gemfile.lock
|
185
229
|
- LICENSE
|
186
|
-
- Rakefile
|
187
230
|
- README.md
|
231
|
+
- Rakefile
|
188
232
|
- spec/api_client_spec.rb
|
189
233
|
- spec/spec_helper.rb
|
190
234
|
homepage: https://github.com/gousiosg/github-mirror
|
191
|
-
licenses:
|
235
|
+
licenses:
|
236
|
+
- BSD-2-Clause
|
192
237
|
metadata: {}
|
193
238
|
post_install_message:
|
194
239
|
rdoc_options:
|
@@ -197,17 +242,17 @@ require_paths:
|
|
197
242
|
- lib
|
198
243
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
244
|
requirements:
|
200
|
-
- -
|
245
|
+
- - '>='
|
201
246
|
- !ruby/object:Gem::Version
|
202
247
|
version: '0'
|
203
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
249
|
requirements:
|
205
|
-
- -
|
250
|
+
- - '>='
|
206
251
|
- !ruby/object:Gem::Version
|
207
252
|
version: '0'
|
208
253
|
requirements: []
|
209
254
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.
|
255
|
+
rubygems_version: 2.0.14
|
211
256
|
signing_key:
|
212
257
|
specification_version: 4
|
213
258
|
summary: Mirror and process Github data
|