how_is 18.0.5 → 18.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0fe6931c53afc7a6ca5209183d6d4ddf2a41536
4
- data.tar.gz: 26ab3fc1cc6e59140f676854374d924077f8ba5f
3
+ metadata.gz: 12f40c2d14b7dbee11526ad2f15bd79ad3a40098
4
+ data.tar.gz: 2a6af70ce9d9b881c4ad31fde73b9c7558e78023
5
5
  SHA512:
6
- metadata.gz: 5b3fac9bf9e322b0d884d105609048b6d7a5223a9d5c14bf5960484296629486670ab96e4b00e78a98510babb2778a45026c9824305ddfc8583d0b534ebe7a78
7
- data.tar.gz: 7bac0632ad9fb15984dca5b37d2d97421e8d3c648981720e830a1da02636b566254afb387ee805d668eff1d517555e1682f18150090096fb8be6ccc2e5794274
6
+ metadata.gz: ba87d6976df416f2be30c93023ef7082c7d815a8cd90a475dcca11041b296c263d547b3176c4ef57700ad19defef13c7377cadc2e18079e5a92cdd91ce0d57b7
7
+ data.tar.gz: 1b699cce4a95ed0bc1bbd946b8728c53c85393bf069ecdb7099955d8662cc97812b7d2704636e6f3a171d7b6f0cba4fdf24d33097beaa068247fd8b6c1d44096
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## [v18.1.0](https://github.com/how-is/how_is/tree/v18.1.0) (2017-08-06)
4
+ [Full Changelog](https://github.com/how-is/how_is/compare/v18.0.5...v18.1.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Replace Pulse scraping with API calls [\#187](https://github.com/how-is/how_is/pull/187) ([duckinator](https://github.com/duckinator))
9
+
3
10
  ## [v18.0.5](https://github.com/how-is/how_is/tree/v18.0.5) (2017-08-06)
4
11
  [Full Changelog](https://github.com/how-is/how_is/compare/v18.0.4...v18.0.5)
5
12
 
@@ -11,6 +18,7 @@
11
18
 
12
19
  **Merged pull requests:**
13
20
 
21
+ - version bump -- v18.0.5 [\#188](https://github.com/how-is/how_is/pull/188) ([duckinator](https://github.com/duckinator))
14
22
  - re-add Gemfile.lock to .gitignore [\#186](https://github.com/how-is/how_is/pull/186) ([duckinator](https://github.com/duckinator))
15
23
  - List new contributors during period [\#184](https://github.com/how-is/how_is/pull/184) ([olleolleolle](https://github.com/olleolleolle))
16
24
  - Remove Gemfile.lock. [\#183](https://github.com/how-is/how_is/pull/183) ([duckinator](https://github.com/duckinator))
@@ -335,4 +343,4 @@
335
343
 
336
344
 
337
345
 
338
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
346
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Rakefile CHANGED
@@ -3,7 +3,6 @@
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
5
  require "timecop"
6
- require "./spec/vcr_helper.rb"
7
6
  require "how_is"
8
7
 
9
8
  RSpec::Core::RakeTask.new(:spec) do |t|
@@ -27,6 +26,8 @@ class HelperFunctions
27
26
  end
28
27
 
29
28
  def self.generate_report(repository, format)
29
+ require "./spec/vcr_helper.rb"
30
+
30
31
  freeze_time do
31
32
  report = nil
32
33
 
@@ -71,16 +72,18 @@ namespace :generate_reports do
71
72
  end
72
73
 
73
74
  desc "List new contributors. Lists committers with no earlier commits then "\
74
- "given since_date (as %Y-%m-%d). Defaults to first of current month."
75
- task :new_contributors, [:user, :repo, :since_date] => [] do |_t, args|
75
+ "given start_date (as %Y-%m-%d). Defaults to first of current month."
76
+ task :new_contributors, [:user, :repo, :start_date] => [] do |_t, args|
76
77
  require "how_is/contributions"
77
78
  user = args[:user] || "how-is"
78
79
  repo = args[:repo] || "how_is"
79
- since_date = args[:since_date] || Time.now.strftime("%Y-%m-01")
80
+ start_date = args[:start_date] || Time.now.strftime("%Y-%m-01")
81
+
82
+ contributions = HowIs::Contributions.new(start_date: start_date,
83
+ user: user,
84
+ repo: repo)
80
85
 
81
86
  puts "New committers:"
82
- puts Contributions.new(github: Github.new(auto_pagination: true),
83
- since_date: since_date,
84
- user: user,
85
- repo: repo).new_contributors
87
+ puts contributions.summary
88
+ puts contributions.new_contributors
86
89
  end
@@ -75,4 +75,239 @@ http_interactions:
75
75
  commit","tree":{"sha":"8286e548e330cfe01efcf7189f4df1fa53e777a7","url":"https://api.github.com/repos/how-is/example-repository/git/trees/8286e548e330cfe01efcf7189f4df1fa53e777a7"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/3794aa1c4b76623748faf280abe5760b76823162","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162/comments","author":null,"committer":null,"parents":[{"sha":"9e29405efa433529b86722542b8fb4b34dfd9edd","url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","html_url":"https://github.com/how-is/example-repository/commit/9e29405efa433529b86722542b8fb4b34dfd9edd"}]}]'
76
76
  http_version:
77
77
  recorded_at: Sat, 05 Aug 2017 21:05:34 GMT
78
+ - request:
79
+ method: get
80
+ uri: https://api.github.com/repos/how-is/example-repository/commits?since=2017-08-01
81
+ body:
82
+ encoding: US-ASCII
83
+ string: ''
84
+ headers:
85
+ Accept:
86
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
87
+ Accept-Charset:
88
+ - utf-8
89
+ User-Agent:
90
+ - Github API Ruby Gem 0.17.0
91
+ Accept-Encoding:
92
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
93
+ response:
94
+ status:
95
+ code: 200
96
+ message: OK
97
+ headers:
98
+ Server:
99
+ - GitHub.com
100
+ Date:
101
+ - Sun, 06 Aug 2017 11:59:36 GMT
102
+ Content-Type:
103
+ - application/json; charset=utf-8
104
+ Transfer-Encoding:
105
+ - chunked
106
+ Status:
107
+ - 200 OK
108
+ X-Ratelimit-Limit:
109
+ - '60'
110
+ X-Ratelimit-Remaining:
111
+ - '53'
112
+ X-Ratelimit-Reset:
113
+ - '1502024144'
114
+ Cache-Control:
115
+ - public, max-age=60, s-maxage=60
116
+ Vary:
117
+ - Accept
118
+ Etag:
119
+ - W/"c4e64de253131e8983284594017e505c"
120
+ Last-Modified:
121
+ - Sat, 05 Aug 2017 20:39:01 GMT
122
+ X-Github-Media-Type:
123
+ - github.v3; format=json
124
+ Access-Control-Expose-Headers:
125
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
126
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
127
+ Access-Control-Allow-Origin:
128
+ - "*"
129
+ Content-Security-Policy:
130
+ - default-src 'none'
131
+ Strict-Transport-Security:
132
+ - max-age=31536000; includeSubdomains; preload
133
+ X-Content-Type-Options:
134
+ - nosniff
135
+ X-Frame-Options:
136
+ - deny
137
+ X-Xss-Protection:
138
+ - 1; mode=block
139
+ X-Runtime-Rack:
140
+ - '0.039385'
141
+ X-Github-Request-Id:
142
+ - 9E8E:1896:1744691:2CC0D3E:598704A8
143
+ body:
144
+ encoding: ASCII-8BIT
145
+ string: '[{"sha":"40c01ab6ebec6cbd8ad9e521a732f941c169e557","commit":{"author":{"name":"Ellen
146
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"committer":{"name":"Ellen
147
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"message":"meep","tree":{"sha":"6911e0637822f44b83f04f47821adab56fdbc0b9","url":"https://api.github.com/repos/how-is/example-repository/git/trees/6911e0637822f44b83f04f47821adab56fdbc0b9"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","html_url":"https://github.com/how-is/example-repository/commit/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557/comments","author":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"committer":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"parents":[{"sha":"3794aa1c4b76623748faf280abe5760b76823162","url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162"}]},{"sha":"3794aa1c4b76623748faf280abe5760b76823162","commit":{"author":{"name":"fake
148
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"committer":{"name":"fake
149
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"message":"test
150
+ commit","tree":{"sha":"8286e548e330cfe01efcf7189f4df1fa53e777a7","url":"https://api.github.com/repos/how-is/example-repository/git/trees/8286e548e330cfe01efcf7189f4df1fa53e777a7"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/3794aa1c4b76623748faf280abe5760b76823162","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162/comments","author":null,"committer":null,"parents":[{"sha":"9e29405efa433529b86722542b8fb4b34dfd9edd","url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","html_url":"https://github.com/how-is/example-repository/commit/9e29405efa433529b86722542b8fb4b34dfd9edd"}]}]'
151
+ http_version:
152
+ recorded_at: Sun, 06 Aug 2017 11:59:36 GMT
153
+ - request:
154
+ method: get
155
+ uri: https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557
156
+ body:
157
+ encoding: US-ASCII
158
+ string: ''
159
+ headers:
160
+ Accept:
161
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
162
+ Accept-Charset:
163
+ - utf-8
164
+ User-Agent:
165
+ - Github API Ruby Gem 0.17.0
166
+ Authorization:
167
+ - Basic ZHVja2luYXRvcjo5MTgyNzc3ZmYzYzAwNjc5NTE5M2E1NzBjZGFjMzI2YjY0NDU5ZGM5"
168
+ Accept-Encoding:
169
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
170
+ response:
171
+ status:
172
+ code: 200
173
+ message: OK
174
+ headers:
175
+ Server:
176
+ - GitHub.com
177
+ Date:
178
+ - Sun, 06 Aug 2017 14:38:46 GMT
179
+ Content-Type:
180
+ - application/json; charset=utf-8
181
+ Transfer-Encoding:
182
+ - chunked
183
+ Status:
184
+ - 200 OK
185
+ X-Ratelimit-Limit:
186
+ - '5000'
187
+ X-Ratelimit-Remaining:
188
+ - '4267'
189
+ X-Ratelimit-Reset:
190
+ - '1502032380'
191
+ Cache-Control:
192
+ - private, max-age=60, s-maxage=60
193
+ Vary:
194
+ - Accept, Authorization, Cookie, X-GitHub-OTP
195
+ Etag:
196
+ - W/"bd5838b7415002651312599a6ef25d69"
197
+ Last-Modified:
198
+ - Sat, 05 Aug 2017 20:39:01 GMT
199
+ X-Oauth-Scopes:
200
+ - ''
201
+ X-Accepted-Oauth-Scopes:
202
+ - ''
203
+ X-Github-Media-Type:
204
+ - github.v3; format=json
205
+ Access-Control-Expose-Headers:
206
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
207
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
208
+ Access-Control-Allow-Origin:
209
+ - "*"
210
+ Content-Security-Policy:
211
+ - default-src 'none'
212
+ Strict-Transport-Security:
213
+ - max-age=31536000; includeSubdomains; preload
214
+ X-Content-Type-Options:
215
+ - nosniff
216
+ X-Frame-Options:
217
+ - deny
218
+ X-Xss-Protection:
219
+ - 1; mode=block
220
+ X-Runtime-Rack:
221
+ - '0.038322'
222
+ X-Github-Request-Id:
223
+ - BF04:189C:147E7B6:343A31C:598729F5
224
+ body:
225
+ encoding: ASCII-8BIT
226
+ string: '{"sha":"40c01ab6ebec6cbd8ad9e521a732f941c169e557","commit":{"author":{"name":"Ellen
227
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"committer":{"name":"Ellen
228
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"message":"meep","tree":{"sha":"6911e0637822f44b83f04f47821adab56fdbc0b9","url":"https://api.github.com/repos/how-is/example-repository/git/trees/6911e0637822f44b83f04f47821adab56fdbc0b9"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","html_url":"https://github.com/how-is/example-repository/commit/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557/comments","author":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"committer":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"parents":[{"sha":"3794aa1c4b76623748faf280abe5760b76823162","url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162"}],"stats":{"total":2,"additions":1,"deletions":1},"files":[{"sha":"1573b3cd673938ed5f9ee8c41952c77b456ffab9","filename":"README.md","status":"modified","additions":1,"deletions":1,"changes":2,"blob_url":"https://github.com/how-is/example-repository/blob/40c01ab6ebec6cbd8ad9e521a732f941c169e557/README.md","raw_url":"https://github.com/how-is/example-repository/raw/40c01ab6ebec6cbd8ad9e521a732f941c169e557/README.md","contents_url":"https://api.github.com/repos/how-is/example-repository/contents/README.md?ref=40c01ab6ebec6cbd8ad9e521a732f941c169e557","patch":"@@
229
+ -1,3 +1,3 @@\n # example-repository\n \n-Example repository for testing how_is.\n+An
230
+ example repository for testing how_is."}]}'
231
+ http_version:
232
+ recorded_at: Sun, 06 Aug 2017 14:38:46 GMT
233
+ - request:
234
+ method: get
235
+ uri: https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162
236
+ body:
237
+ encoding: US-ASCII
238
+ string: ''
239
+ headers:
240
+ Accept:
241
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
242
+ Accept-Charset:
243
+ - utf-8
244
+ User-Agent:
245
+ - Github API Ruby Gem 0.17.0
246
+ Authorization:
247
+ - Basic ZHVja2luYXRvcjo5MTgyNzc3ZmYzYzAwNjc5NTE5M2E1NzBjZGFjMzI2YjY0NDU5ZGM5"
248
+ Accept-Encoding:
249
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
250
+ response:
251
+ status:
252
+ code: 200
253
+ message: OK
254
+ headers:
255
+ Server:
256
+ - GitHub.com
257
+ Date:
258
+ - Sun, 06 Aug 2017 14:38:46 GMT
259
+ Content-Type:
260
+ - application/json; charset=utf-8
261
+ Transfer-Encoding:
262
+ - chunked
263
+ Status:
264
+ - 200 OK
265
+ X-Ratelimit-Limit:
266
+ - '5000'
267
+ X-Ratelimit-Remaining:
268
+ - '4266'
269
+ X-Ratelimit-Reset:
270
+ - '1502032380'
271
+ Cache-Control:
272
+ - private, max-age=60, s-maxage=60
273
+ Vary:
274
+ - Accept, Authorization, Cookie, X-GitHub-OTP
275
+ Etag:
276
+ - W/"525a26315dba9559a411b937118bfbf6"
277
+ Last-Modified:
278
+ - Sat, 05 Aug 2017 20:23:10 GMT
279
+ X-Oauth-Scopes:
280
+ - ''
281
+ X-Accepted-Oauth-Scopes:
282
+ - ''
283
+ X-Github-Media-Type:
284
+ - github.v3; format=json
285
+ Access-Control-Expose-Headers:
286
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
287
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
288
+ Access-Control-Allow-Origin:
289
+ - "*"
290
+ Content-Security-Policy:
291
+ - default-src 'none'
292
+ Strict-Transport-Security:
293
+ - max-age=31536000; includeSubdomains; preload
294
+ X-Content-Type-Options:
295
+ - nosniff
296
+ X-Frame-Options:
297
+ - deny
298
+ X-Xss-Protection:
299
+ - 1; mode=block
300
+ X-Runtime-Rack:
301
+ - '0.023286'
302
+ X-Github-Request-Id:
303
+ - 800C:189C:147E7C7:343A349:598729F6
304
+ body:
305
+ encoding: ASCII-8BIT
306
+ string: '{"sha":"3794aa1c4b76623748faf280abe5760b76823162","commit":{"author":{"name":"fake
307
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"committer":{"name":"fake
308
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"message":"test
309
+ commit","tree":{"sha":"8286e548e330cfe01efcf7189f4df1fa53e777a7","url":"https://api.github.com/repos/how-is/example-repository/git/trees/8286e548e330cfe01efcf7189f4df1fa53e777a7"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/3794aa1c4b76623748faf280abe5760b76823162","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162/comments","author":null,"committer":null,"parents":[{"sha":"9e29405efa433529b86722542b8fb4b34dfd9edd","url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","html_url":"https://github.com/how-is/example-repository/commit/9e29405efa433529b86722542b8fb4b34dfd9edd"}],"stats":{"total":1,"additions":1,"deletions":0},"files":[{"sha":"a69ca6962d2a86d7c5a041338938e0b4fe6bf515","filename":"README.md","status":"modified","additions":1,"deletions":0,"changes":1,"blob_url":"https://github.com/how-is/example-repository/blob/3794aa1c4b76623748faf280abe5760b76823162/README.md","raw_url":"https://github.com/how-is/example-repository/raw/3794aa1c4b76623748faf280abe5760b76823162/README.md","contents_url":"https://api.github.com/repos/how-is/example-repository/contents/README.md?ref=3794aa1c4b76623748faf280abe5760b76823162","patch":"@@
310
+ -1,2 +1,3 @@\n # example-repository\n+\n Example repository for testing how_is."}]}'
311
+ http_version:
312
+ recorded_at: Sun, 06 Aug 2017 14:38:46 GMT
78
313
  recorded_with: VCR 3.0.3
@@ -216,4 +216,380 @@ http_interactions:
216
216
  string: "[]"
217
217
  http_version:
218
218
  recorded_at: Sat, 05 Aug 2017 21:08:51 GMT
219
+ - request:
220
+ method: get
221
+ uri: https://api.github.com/repos/how-is/example-repository/commits?since=2017-08-01
222
+ body:
223
+ encoding: US-ASCII
224
+ string: ''
225
+ headers:
226
+ Accept:
227
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
228
+ Accept-Charset:
229
+ - utf-8
230
+ User-Agent:
231
+ - Github API Ruby Gem 0.17.0
232
+ Accept-Encoding:
233
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
234
+ response:
235
+ status:
236
+ code: 200
237
+ message: OK
238
+ headers:
239
+ Server:
240
+ - GitHub.com
241
+ Date:
242
+ - Sun, 06 Aug 2017 11:59:36 GMT
243
+ Content-Type:
244
+ - application/json; charset=utf-8
245
+ Transfer-Encoding:
246
+ - chunked
247
+ Status:
248
+ - 200 OK
249
+ X-Ratelimit-Limit:
250
+ - '60'
251
+ X-Ratelimit-Remaining:
252
+ - '52'
253
+ X-Ratelimit-Reset:
254
+ - '1502024144'
255
+ Cache-Control:
256
+ - public, max-age=60, s-maxage=60
257
+ Vary:
258
+ - Accept
259
+ Etag:
260
+ - W/"c4e64de253131e8983284594017e505c"
261
+ Last-Modified:
262
+ - Sat, 05 Aug 2017 20:39:01 GMT
263
+ X-Github-Media-Type:
264
+ - github.v3; format=json
265
+ Access-Control-Expose-Headers:
266
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
267
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
268
+ Access-Control-Allow-Origin:
269
+ - "*"
270
+ Content-Security-Policy:
271
+ - default-src 'none'
272
+ Strict-Transport-Security:
273
+ - max-age=31536000; includeSubdomains; preload
274
+ X-Content-Type-Options:
275
+ - nosniff
276
+ X-Frame-Options:
277
+ - deny
278
+ X-Xss-Protection:
279
+ - 1; mode=block
280
+ X-Runtime-Rack:
281
+ - '0.042484'
282
+ X-Github-Request-Id:
283
+ - CDDE:1890:D29ED0:1BB8C19:598704A8
284
+ body:
285
+ encoding: ASCII-8BIT
286
+ string: '[{"sha":"40c01ab6ebec6cbd8ad9e521a732f941c169e557","commit":{"author":{"name":"Ellen
287
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"committer":{"name":"Ellen
288
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"message":"meep","tree":{"sha":"6911e0637822f44b83f04f47821adab56fdbc0b9","url":"https://api.github.com/repos/how-is/example-repository/git/trees/6911e0637822f44b83f04f47821adab56fdbc0b9"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","html_url":"https://github.com/how-is/example-repository/commit/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557/comments","author":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"committer":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"parents":[{"sha":"3794aa1c4b76623748faf280abe5760b76823162","url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162"}]},{"sha":"3794aa1c4b76623748faf280abe5760b76823162","commit":{"author":{"name":"fake
289
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"committer":{"name":"fake
290
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"message":"test
291
+ commit","tree":{"sha":"8286e548e330cfe01efcf7189f4df1fa53e777a7","url":"https://api.github.com/repos/how-is/example-repository/git/trees/8286e548e330cfe01efcf7189f4df1fa53e777a7"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/3794aa1c4b76623748faf280abe5760b76823162","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162/comments","author":null,"committer":null,"parents":[{"sha":"9e29405efa433529b86722542b8fb4b34dfd9edd","url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","html_url":"https://github.com/how-is/example-repository/commit/9e29405efa433529b86722542b8fb4b34dfd9edd"}]}]'
292
+ http_version:
293
+ recorded_at: Sun, 06 Aug 2017 11:59:36 GMT
294
+ - request:
295
+ method: get
296
+ uri: https://api.github.com/repos/how-is/example-repository/commits?author=me@duckie.co&until=2017-08-01
297
+ body:
298
+ encoding: US-ASCII
299
+ string: ''
300
+ headers:
301
+ Accept:
302
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
303
+ Accept-Charset:
304
+ - utf-8
305
+ User-Agent:
306
+ - Github API Ruby Gem 0.17.0
307
+ Accept-Encoding:
308
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
309
+ response:
310
+ status:
311
+ code: 200
312
+ message: OK
313
+ headers:
314
+ Server:
315
+ - GitHub.com
316
+ Date:
317
+ - Sun, 06 Aug 2017 11:59:36 GMT
318
+ Content-Type:
319
+ - application/json; charset=utf-8
320
+ Transfer-Encoding:
321
+ - chunked
322
+ Status:
323
+ - 200 OK
324
+ X-Ratelimit-Limit:
325
+ - '60'
326
+ X-Ratelimit-Remaining:
327
+ - '51'
328
+ X-Ratelimit-Reset:
329
+ - '1502024144'
330
+ Cache-Control:
331
+ - public, max-age=60, s-maxage=60
332
+ Vary:
333
+ - Accept
334
+ Etag:
335
+ - W/"63ec50619f12827a37594ae87db65a6d"
336
+ Last-Modified:
337
+ - Sun, 07 Aug 2016 03:52:54 GMT
338
+ X-Github-Media-Type:
339
+ - github.v3; format=json
340
+ Access-Control-Expose-Headers:
341
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
342
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
343
+ Access-Control-Allow-Origin:
344
+ - "*"
345
+ Content-Security-Policy:
346
+ - default-src 'none'
347
+ Strict-Transport-Security:
348
+ - max-age=31536000; includeSubdomains; preload
349
+ X-Content-Type-Options:
350
+ - nosniff
351
+ X-Frame-Options:
352
+ - deny
353
+ X-Xss-Protection:
354
+ - 1; mode=block
355
+ X-Runtime-Rack:
356
+ - '0.038186'
357
+ X-Github-Request-Id:
358
+ - 9E92:189C:1366C1A:315DCFB:598704A8
359
+ body:
360
+ encoding: ASCII-8BIT
361
+ string: '[{"sha":"9e29405efa433529b86722542b8fb4b34dfd9edd","commit":{"author":{"name":"Ellen
362
+ Marie Dash","email":"me@duckie.co","date":"2016-08-07T03:52:54Z"},"committer":{"name":"Ellen
363
+ Marie Dash","email":"me@duckie.co","date":"2016-08-07T03:52:54Z"},"message":"Initial
364
+ commit","tree":{"sha":"7bee2a10cc8c7c036d5006fa0aacadd869d09c4e","url":"https://api.github.com/repos/how-is/example-repository/git/trees/7bee2a10cc8c7c036d5006fa0aacadd869d09c4e"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","html_url":"https://github.com/how-is/example-repository/commit/9e29405efa433529b86722542b8fb4b34dfd9edd","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd/comments","author":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"committer":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"parents":[]}]'
365
+ http_version:
366
+ recorded_at: Sun, 06 Aug 2017 11:59:36 GMT
367
+ - request:
368
+ method: get
369
+ uri: https://api.github.com/repos/how-is/example-repository/commits?author=fake@duckinator.net&until=2017-08-01
370
+ body:
371
+ encoding: US-ASCII
372
+ string: ''
373
+ headers:
374
+ Accept:
375
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
376
+ Accept-Charset:
377
+ - utf-8
378
+ User-Agent:
379
+ - Github API Ruby Gem 0.17.0
380
+ Accept-Encoding:
381
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
382
+ response:
383
+ status:
384
+ code: 200
385
+ message: OK
386
+ headers:
387
+ Server:
388
+ - GitHub.com
389
+ Date:
390
+ - Sun, 06 Aug 2017 11:59:37 GMT
391
+ Content-Type:
392
+ - application/json; charset=utf-8
393
+ Content-Length:
394
+ - '2'
395
+ Status:
396
+ - 200 OK
397
+ X-Ratelimit-Limit:
398
+ - '60'
399
+ X-Ratelimit-Remaining:
400
+ - '50'
401
+ X-Ratelimit-Reset:
402
+ - '1502024144'
403
+ Cache-Control:
404
+ - public, max-age=60, s-maxage=60
405
+ Vary:
406
+ - Accept
407
+ Etag:
408
+ - '"fafd06a937c504cece6726ba7201b0a1"'
409
+ X-Github-Media-Type:
410
+ - github.v3; format=json
411
+ Access-Control-Expose-Headers:
412
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
413
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
414
+ Access-Control-Allow-Origin:
415
+ - "*"
416
+ Content-Security-Policy:
417
+ - default-src 'none'
418
+ Strict-Transport-Security:
419
+ - max-age=31536000; includeSubdomains; preload
420
+ X-Content-Type-Options:
421
+ - nosniff
422
+ X-Frame-Options:
423
+ - deny
424
+ X-Xss-Protection:
425
+ - 1; mode=block
426
+ X-Runtime-Rack:
427
+ - '0.028240'
428
+ X-Github-Request-Id:
429
+ - CDE2:189C:1366C26:315DD21:598704A9
430
+ body:
431
+ encoding: UTF-8
432
+ string: "[]"
433
+ http_version:
434
+ recorded_at: Sun, 06 Aug 2017 11:59:37 GMT
435
+ - request:
436
+ method: get
437
+ uri: https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557
438
+ body:
439
+ encoding: US-ASCII
440
+ string: ''
441
+ headers:
442
+ Accept:
443
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
444
+ Accept-Charset:
445
+ - utf-8
446
+ User-Agent:
447
+ - Github API Ruby Gem 0.17.0
448
+ Authorization:
449
+ - Basic ZHVja2luYXRvcjo5MTgyNzc3ZmYzYzAwNjc5NTE5M2E1NzBjZGFjMzI2YjY0NDU5ZGM5"
450
+ Accept-Encoding:
451
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
452
+ response:
453
+ status:
454
+ code: 200
455
+ message: OK
456
+ headers:
457
+ Server:
458
+ - GitHub.com
459
+ Date:
460
+ - Sun, 06 Aug 2017 14:38:47 GMT
461
+ Content-Type:
462
+ - application/json; charset=utf-8
463
+ Transfer-Encoding:
464
+ - chunked
465
+ Status:
466
+ - 200 OK
467
+ X-Ratelimit-Limit:
468
+ - '5000'
469
+ X-Ratelimit-Remaining:
470
+ - '4265'
471
+ X-Ratelimit-Reset:
472
+ - '1502032380'
473
+ Cache-Control:
474
+ - private, max-age=60, s-maxage=60
475
+ Vary:
476
+ - Accept, Authorization, Cookie, X-GitHub-OTP
477
+ Etag:
478
+ - W/"bd5838b7415002651312599a6ef25d69"
479
+ Last-Modified:
480
+ - Sat, 05 Aug 2017 20:39:01 GMT
481
+ X-Oauth-Scopes:
482
+ - ''
483
+ X-Accepted-Oauth-Scopes:
484
+ - ''
485
+ X-Github-Media-Type:
486
+ - github.v3; format=json
487
+ Access-Control-Expose-Headers:
488
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
489
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
490
+ Access-Control-Allow-Origin:
491
+ - "*"
492
+ Content-Security-Policy:
493
+ - default-src 'none'
494
+ Strict-Transport-Security:
495
+ - max-age=31536000; includeSubdomains; preload
496
+ X-Content-Type-Options:
497
+ - nosniff
498
+ X-Frame-Options:
499
+ - deny
500
+ X-Xss-Protection:
501
+ - 1; mode=block
502
+ X-Runtime-Rack:
503
+ - '0.031465'
504
+ X-Github-Request-Id:
505
+ - BF08:189C:147E83D:343A4AA:598729F7
506
+ body:
507
+ encoding: ASCII-8BIT
508
+ string: '{"sha":"40c01ab6ebec6cbd8ad9e521a732f941c169e557","commit":{"author":{"name":"Ellen
509
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"committer":{"name":"Ellen
510
+ Marie Dash","email":"me@duckie.co","date":"2017-08-05T20:39:01Z"},"message":"meep","tree":{"sha":"6911e0637822f44b83f04f47821adab56fdbc0b9","url":"https://api.github.com/repos/how-is/example-repository/git/trees/6911e0637822f44b83f04f47821adab56fdbc0b9"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557","html_url":"https://github.com/how-is/example-repository/commit/40c01ab6ebec6cbd8ad9e521a732f941c169e557","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/40c01ab6ebec6cbd8ad9e521a732f941c169e557/comments","author":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"committer":{"login":"duckinator","id":39698,"avatar_url":"https://avatars3.githubusercontent.com/u/39698?v=4","gravatar_id":"","url":"https://api.github.com/users/duckinator","html_url":"https://github.com/duckinator","followers_url":"https://api.github.com/users/duckinator/followers","following_url":"https://api.github.com/users/duckinator/following{/other_user}","gists_url":"https://api.github.com/users/duckinator/gists{/gist_id}","starred_url":"https://api.github.com/users/duckinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckinator/subscriptions","organizations_url":"https://api.github.com/users/duckinator/orgs","repos_url":"https://api.github.com/users/duckinator/repos","events_url":"https://api.github.com/users/duckinator/events{/privacy}","received_events_url":"https://api.github.com/users/duckinator/received_events","type":"User","site_admin":false},"parents":[{"sha":"3794aa1c4b76623748faf280abe5760b76823162","url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162"}],"stats":{"total":2,"additions":1,"deletions":1},"files":[{"sha":"1573b3cd673938ed5f9ee8c41952c77b456ffab9","filename":"README.md","status":"modified","additions":1,"deletions":1,"changes":2,"blob_url":"https://github.com/how-is/example-repository/blob/40c01ab6ebec6cbd8ad9e521a732f941c169e557/README.md","raw_url":"https://github.com/how-is/example-repository/raw/40c01ab6ebec6cbd8ad9e521a732f941c169e557/README.md","contents_url":"https://api.github.com/repos/how-is/example-repository/contents/README.md?ref=40c01ab6ebec6cbd8ad9e521a732f941c169e557","patch":"@@
511
+ -1,3 +1,3 @@\n # example-repository\n \n-Example repository for testing how_is.\n+An
512
+ example repository for testing how_is."}]}'
513
+ http_version:
514
+ recorded_at: Sun, 06 Aug 2017 14:38:47 GMT
515
+ - request:
516
+ method: get
517
+ uri: https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162
518
+ body:
519
+ encoding: US-ASCII
520
+ string: ''
521
+ headers:
522
+ Accept:
523
+ - application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
524
+ Accept-Charset:
525
+ - utf-8
526
+ User-Agent:
527
+ - Github API Ruby Gem 0.17.0
528
+ Authorization:
529
+ - Basic ZHVja2luYXRvcjo5MTgyNzc3ZmYzYzAwNjc5NTE5M2E1NzBjZGFjMzI2YjY0NDU5ZGM5"
530
+ Accept-Encoding:
531
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
532
+ response:
533
+ status:
534
+ code: 200
535
+ message: OK
536
+ headers:
537
+ Server:
538
+ - GitHub.com
539
+ Date:
540
+ - Sun, 06 Aug 2017 14:38:47 GMT
541
+ Content-Type:
542
+ - application/json; charset=utf-8
543
+ Transfer-Encoding:
544
+ - chunked
545
+ Status:
546
+ - 200 OK
547
+ X-Ratelimit-Limit:
548
+ - '5000'
549
+ X-Ratelimit-Remaining:
550
+ - '4264'
551
+ X-Ratelimit-Reset:
552
+ - '1502032380'
553
+ Cache-Control:
554
+ - private, max-age=60, s-maxage=60
555
+ Vary:
556
+ - Accept, Authorization, Cookie, X-GitHub-OTP
557
+ Etag:
558
+ - W/"525a26315dba9559a411b937118bfbf6"
559
+ Last-Modified:
560
+ - Sat, 05 Aug 2017 20:23:10 GMT
561
+ X-Oauth-Scopes:
562
+ - ''
563
+ X-Accepted-Oauth-Scopes:
564
+ - ''
565
+ X-Github-Media-Type:
566
+ - github.v3; format=json
567
+ Access-Control-Expose-Headers:
568
+ - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
569
+ X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
570
+ Access-Control-Allow-Origin:
571
+ - "*"
572
+ Content-Security-Policy:
573
+ - default-src 'none'
574
+ Strict-Transport-Security:
575
+ - max-age=31536000; includeSubdomains; preload
576
+ X-Content-Type-Options:
577
+ - nosniff
578
+ X-Frame-Options:
579
+ - deny
580
+ X-Xss-Protection:
581
+ - 1; mode=block
582
+ X-Runtime-Rack:
583
+ - '0.032538'
584
+ X-Github-Request-Id:
585
+ - 8010:189C:147E855:343A4E2:598729F7
586
+ body:
587
+ encoding: ASCII-8BIT
588
+ string: '{"sha":"3794aa1c4b76623748faf280abe5760b76823162","commit":{"author":{"name":"fake
589
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"committer":{"name":"fake
590
+ author","email":"fake@duckinator.net","date":"2017-08-05T20:23:10Z"},"message":"test
591
+ commit","tree":{"sha":"8286e548e330cfe01efcf7189f4df1fa53e777a7","url":"https://api.github.com/repos/how-is/example-repository/git/trees/8286e548e330cfe01efcf7189f4df1fa53e777a7"},"url":"https://api.github.com/repos/how-is/example-repository/git/commits/3794aa1c4b76623748faf280abe5760b76823162","comment_count":0},"url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162","html_url":"https://github.com/how-is/example-repository/commit/3794aa1c4b76623748faf280abe5760b76823162","comments_url":"https://api.github.com/repos/how-is/example-repository/commits/3794aa1c4b76623748faf280abe5760b76823162/comments","author":null,"committer":null,"parents":[{"sha":"9e29405efa433529b86722542b8fb4b34dfd9edd","url":"https://api.github.com/repos/how-is/example-repository/commits/9e29405efa433529b86722542b8fb4b34dfd9edd","html_url":"https://github.com/how-is/example-repository/commit/9e29405efa433529b86722542b8fb4b34dfd9edd"}],"stats":{"total":1,"additions":1,"deletions":0},"files":[{"sha":"a69ca6962d2a86d7c5a041338938e0b4fe6bf515","filename":"README.md","status":"modified","additions":1,"deletions":0,"changes":1,"blob_url":"https://github.com/how-is/example-repository/blob/3794aa1c4b76623748faf280abe5760b76823162/README.md","raw_url":"https://github.com/how-is/example-repository/raw/3794aa1c4b76623748faf280abe5760b76823162/README.md","contents_url":"https://api.github.com/repos/how-is/example-repository/contents/README.md?ref=3794aa1c4b76623748faf280abe5760b76823162","patch":"@@
592
+ -1,2 +1,3 @@\n # example-repository\n+\n Example repository for testing how_is."}]}'
593
+ http_version:
594
+ recorded_at: Sun, 06 Aug 2017 14:38:47 GMT
219
595
  recorded_with: VCR 3.0.3
@@ -1,20 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "how_is/fetcher"
4
+
3
5
  class HowIs
4
- # Investigates who is a new committer since given date
6
+ # Fetch information about who has contributed to a repository during a given
7
+ # period.
8
+ #
9
+ # Usage:
5
10
  #
6
- # # /repos/:owner/:repo/commits?since=<start date for the report>
11
+ # github = Github.new()
12
+ # c = HowIs::Contributions.new(github: github, start_date: '2017-07-01', user: 'how-is', repo: 'how_is')
13
+ # c.commits #=> All commits during July 2017.
14
+ # c.contributors #=> All contributors during July 2017.
15
+ # c.new_contributors #=> New contributors during July 2017.
7
16
  class Contributions
8
- # @param github [Github] configured github client
9
- # @param since_date [String] A value which fits Repos.Commits "since" and
10
- # "until" fields. This supports many formats, for
11
- # example a timestamp in ISO 8601 format:
12
- # YYYY-MM-DDTHH:MM:SSZ.
13
- # @param user [String] GitHub user of repository
14
- # @param repo [String] GitHub repository name
15
- def initialize(github:, since_date:, user:, repo:)
17
+ # Returns an object that fetches contributor information about a particular
18
+ # repository for a month-long period starting on +start_date+.
19
+ #
20
+ # @param github [Github] Github client instance.
21
+ # @param start_date [String] Date in the format YYYY-MM-DD. The first date
22
+ # to include commits from.
23
+ # @param user [String] GitHub user of repository.
24
+ # @param repo [String] GitHub repository name.
25
+ def initialize(github: Fetcher.default_github_instance, start_date:, user:, repo:)
16
26
  @github = github
17
- @since_date = since_date
27
+
28
+ # IMPL. DETAIL: The external API uses "start_date" so it's clearer,
29
+ # but internally we use "since_date" to match GitHub's API.
30
+
31
+ @since_date = Date.strptime(start_date, "%Y-%m-%d")
32
+
33
+ d = @since_date.day
34
+ m = @since_date.month
35
+ y = @since_date.year
36
+ @until_date = Date.new(y, m + 1, d)
37
+
18
38
  @user = user
19
39
  @repo = repo
20
40
  end
@@ -24,7 +44,8 @@ class HowIs
24
44
  # @return [Hash{String => Hash] Committers keyed by GitHub login name
25
45
  def new_contributors
26
46
  # author: GitHub login, name or email by which to filter by commit author.
27
- all_contributors.select do |email, _committer|
47
+ @new_contributors ||= contributors.select do |email, _committer|
48
+ # Returns true if +email+ never wrote a commit for +@repo+ before +@since_date+.
28
49
  @github.repos.commits.list(user: @user,
29
50
  repo: @repo,
30
51
  until: @since_date,
@@ -32,15 +53,105 @@ class HowIs
32
53
  end
33
54
  end
34
55
 
35
- # @return [Hash{String => Hash}] Author information keyed by author's email
36
- def all_contributors
56
+ # @return [Hash{String => Hash}] Author information keyed by author's email.
57
+ def contributors
37
58
  commits.map { |api_response|
38
59
  [api_response.commit.author.email, api_response.commit.author.to_h]
39
60
  }.to_h
40
61
  end
41
62
 
42
63
  def commits
43
- @github.repos.commits.list(user: @user, repo: @repo, since: @since_date)
64
+ return @commits if defined?(@commits)
65
+
66
+ commits = @github.repos.commits.list(user: @user, repo: @repo, since: @since_date)
67
+
68
+ # The commits list endpoint doesn't include all commit data, e.g. stats.
69
+ # So, we make N requests here, where N == number of commits returned,
70
+ # and then we die a bit inside.
71
+ @commits = commits.map { |c| commit(c.sha) }
72
+ end
73
+
74
+ def commit(sha)
75
+ @commit ||= {}
76
+ @commit[sha] ||= @github.repos.commits.get(user: @user, repo: @repo, sha: sha)
77
+ end
78
+
79
+ def changes
80
+ if @stats.nil? || @changed_files.nil?
81
+ @stats = {
82
+ "total" => 0,
83
+ "additions" => 0,
84
+ "deletions" => 0,
85
+ }
86
+
87
+ @changed_files = []
88
+
89
+ commits.map do |commit|
90
+ commit.stats.each do |k, v|
91
+ @stats[k] += v
92
+ end
93
+
94
+ @changed_files += commit.files.map { |file| file["filename"] }
95
+ end
96
+
97
+ @changed_files.sort.uniq!
98
+ end
99
+
100
+ {"stats" => @stats, "files" => @changed_files}
101
+ end
102
+
103
+ # TODO: Don't hard-code the default branch.
104
+ def default_branch
105
+ "master"
106
+ end
107
+
108
+ def changed_files
109
+ changes["files"]
110
+ end
111
+
112
+ def additions_count
113
+ changes["stats"]["additions"]
114
+ end
115
+
116
+ def deletions_count
117
+ changes["stats"]["deletions"]
118
+ end
119
+
120
+ def compare_url
121
+ since_timestamp = @since_date.to_time.to_i
122
+ until_timestamp = @until_date.to_time.to_i
123
+ "https://github.com/#{@user}/#{@repo}/compare/#{default_branch}@%7B#{since_timestamp}%7D...#{default_branch}@%7B#{until_timestamp}%7D"
124
+ end
125
+
126
+ def pretty_start_date
127
+ @since_date.strftime("%b %d, %Y")
128
+ end
129
+
130
+ def pretty_end_date
131
+ @until_date.strftime("%b %d, %Y")
132
+ end
133
+
134
+ def summary(start_text: nil)
135
+ # TODO: Pulse has information about _all_ branches. Do we want that?
136
+ # If we do, we'd need to pass a branch name as the 'sha' parameter
137
+ # to /repos/:owner/:repo/commits.
138
+ # https://developer.github.com/v3/repos/commits/
139
+
140
+ start_text ||= "From #{pretty_start_date} through #{pretty_end_date}"
141
+
142
+ "#{start_text}, #{@user}/#{@repo} gained "\
143
+ "<a href=\"#{compare_url}\">#{pluralize('new commit', commits.length)}</a>, " \
144
+ "contributed by #{pluralize('author', contributors.length)}. There " \
145
+ "#{(additions_count == 1) ? 'was' : 'were'} " \
146
+ "#{pluralize('addition', additions_count)} and " \
147
+ "#{pluralize('deletion', deletions_count)} across " \
148
+ "#{pluralize('file', changed_files.length)}."
149
+ end
150
+
151
+ private
152
+
153
+ def pluralize(string, number)
154
+ "#{number} #{string}#{(number == 1) ? '' : 's'}"
44
155
  end
45
156
  end
46
157
  end
@@ -4,12 +4,22 @@ require "contracts"
4
4
  require "github_api"
5
5
  require "how_is/pulse"
6
6
 
7
+ C ||= Contracts
8
+
7
9
  class HowIs
8
10
  ##
9
11
  # Fetches data from GitHub.
10
12
  class Fetcher
11
13
  include Contracts::Core
12
14
 
15
+ # TODO: Fix this bullshit.
16
+ # :nodoc:
17
+ def self.default_github_instance
18
+ Github.new(auto_pagination: true) do |config|
19
+ config.basic_auth = ENV["HOWIS_BASIC_AUTH"] if ENV["HOWIS_BASIC_AUTH"]
20
+ end
21
+ end
22
+
13
23
  ##
14
24
  # Standardized representation for fetcher results.
15
25
  #
@@ -35,7 +45,7 @@ class HowIs
35
45
  def call(repository,
36
46
  github = nil,
37
47
  pulse = nil)
38
- github ||= Github.new(auto_pagination: true)
48
+ github ||= self.class.default_github_instance
39
49
  pulse ||= HowIs::Pulse.new(repository)
40
50
  user, repo = repository.split("/", 2)
41
51
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class HowIs
4
- VERSION = "18.0.5"
4
+ VERSION = "18.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: how_is
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.0.5
4
+ version: 18.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ellen Marie Dash