Class: GHArchive::ForkEvent
- Inherits:
-
Event
- Object
- Event
- GHArchive::ForkEvent
show all
- Defined in:
- lib/gh-archive/events.rb
Constant Summary
Constants inherited
from Event
Event::IMPLEMENTATIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Event
#actor, #created_at, #initialize, #json, parse, #public?, #repo
Class Method Details
.fits?(json) ⇒ Boolean
216
217
218
|
# File 'lib/gh-archive/events.rb', line 216
def self.fits?(json)
return json['type'] == "ForkEvent"
end
|
Instance Method Details
#forkee_created_at ⇒ Object
248
249
250
|
# File 'lib/gh-archive/events.rb', line 248
def forkee_created_at
Time.parse(@payload['forkee']['created_at'])
end
|
#forkee_default_branch ⇒ Object
321
322
323
|
# File 'lib/gh-archive/events.rb', line 321
def forkee_default_branch
Time.parse(@payload['forkee']['default_branch'])
end
|
#forkee_description ⇒ Object
240
241
242
|
# File 'lib/gh-archive/events.rb', line 240
def forkee_description
@payload['forkee']['description']
end
|
#forkee_fork ⇒ Object
244
245
246
|
# File 'lib/gh-archive/events.rb', line 244
def forkee_fork
@payload['forkee']['fork']
end
|
#forkee_forks_count ⇒ Object
305
306
307
|
# File 'lib/gh-archive/events.rb', line 305
def forkee_forks_count
Time.parse(@payload['forkee']['forks_count'])
end
|
#forkee_full_name ⇒ Object
228
229
230
|
# File 'lib/gh-archive/events.rb', line 228
def forkee_full_name
@payload['forkee']['full_name']
end
|
#forkee_has_downloads ⇒ Object
293
294
295
|
# File 'lib/gh-archive/events.rb', line 293
def forkee_has_downloads
Time.parse(@payload['forkee']['has_downloads'])
end
|
#forkee_has_issues ⇒ Object
289
290
291
|
# File 'lib/gh-archive/events.rb', line 289
def forkee_has_issues
Time.parse(@payload['forkee']['has_issues'])
end
|
#forkee_has_pages ⇒ Object
301
302
303
|
# File 'lib/gh-archive/events.rb', line 301
def forkee_has_pages
Time.parse(@payload['forkee']['has_pages'])
end
|
#forkee_has_wiki ⇒ Object
297
298
299
|
# File 'lib/gh-archive/events.rb', line 297
def forkee_has_wiki
Time.parse(@payload['forkee']['has_wiki'])
end
|
#forkee_homepage ⇒ Object
269
270
271
|
# File 'lib/gh-archive/events.rb', line 269
def forkee_homepage
Time.parse(@payload['forkee']['homepage'])
end
|
#forkee_id ⇒ Object
220
221
222
|
# File 'lib/gh-archive/events.rb', line 220
def forkee_id
@payload['forkee']['id']
end
|
#forkee_language ⇒ Object
285
286
287
|
# File 'lib/gh-archive/events.rb', line 285
def forkee_language
Time.parse(@payload['forkee']['language'])
end
|
#forkee_mirror_url ⇒ Object
309
310
311
|
# File 'lib/gh-archive/events.rb', line 309
def forkee_mirror_url
Time.parse(@payload['forkee']['mirror_url'])
end
|
#forkee_name ⇒ Object
224
225
226
|
# File 'lib/gh-archive/events.rb', line 224
def forkee_name
@payload['forkee']['name']
end
|
#forkee_open_issues_count ⇒ Object
313
314
315
|
# File 'lib/gh-archive/events.rb', line 313
def forkee_open_issues_count
Time.parse(@payload['forkee']['open_issues_count'])
end
|
#forkee_owner ⇒ Object
232
233
234
|
# File 'lib/gh-archive/events.rb', line 232
def forkee_owner
User.new(@payload['forkee']['owner'])
end
|
#forkee_private ⇒ Object
236
237
238
|
# File 'lib/gh-archive/events.rb', line 236
def forkee_private
@payload['forkee']['private']
end
|
#forkee_public ⇒ Object
325
326
327
|
# File 'lib/gh-archive/events.rb', line 325
def forkee_public
Time.parse(@payload['forkee']['public'])
end
|
#forkee_pushed_at ⇒ Object
256
257
258
|
# File 'lib/gh-archive/events.rb', line 256
def forkee_pushed_at
Time.parse(@payload['forkee']['pushed_at'])
end
|
#forkee_size ⇒ Object
273
274
275
|
# File 'lib/gh-archive/events.rb', line 273
def forkee_size
Time.parse(@payload['forkee']['size'])
end
|
#forkee_stargazers_count ⇒ Object
277
278
279
|
# File 'lib/gh-archive/events.rb', line 277
def forkee_stargazers_count
Time.parse(@payload['forkee']['stargazers_count'])
end
|
#forkee_updated_at ⇒ Object
252
253
254
|
# File 'lib/gh-archive/events.rb', line 252
def forkee_updated_at
Time.parse(@payload['forkee']['updated_at'])
end
|
#forkee_urls ⇒ Object
260
261
262
263
264
265
266
267
|
# File 'lib/gh-archive/events.rb', line 260
def forkee_urls
{
'git' => @payload['forkee']['git_url'],
'ssh' => @payload['forkee']['ssh_url'],
'clone' => @payload['forkee']['clone_url'],
'svn' => @payload['forkee']['svn_url']
}
end
|
#forkee_watchers ⇒ Object
317
318
319
|
# File 'lib/gh-archive/events.rb', line 317
def forkee_watchers
Time.parse(@payload['forkee']['watchers'])
end
|
#forkee_watchers_count ⇒ Object
281
282
283
|
# File 'lib/gh-archive/events.rb', line 281
def forkee_watchers_count
Time.parse(@payload['forkee']['watchers_count'])
end
|