Class: GHArchive::ForkEvent

Inherits:
Event
  • Object
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

Constructor Details

This class inherits a constructor from GHArchive::Event

Class Method Details

.fits?(json) ⇒ Boolean

Returns:

  • (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_atObject



248
249
250
# File 'lib/gh-archive/events.rb', line 248

def forkee_created_at
    Time.parse(@payload['forkee']['created_at'])
end

#forkee_default_branchObject



321
322
323
# File 'lib/gh-archive/events.rb', line 321

def forkee_default_branch
    Time.parse(@payload['forkee']['default_branch'])
end

#forkee_descriptionObject



240
241
242
# File 'lib/gh-archive/events.rb', line 240

def forkee_description
    @payload['forkee']['description']
end

#forkee_forkObject



244
245
246
# File 'lib/gh-archive/events.rb', line 244

def forkee_fork
    @payload['forkee']['fork']
end

#forkee_forks_countObject



305
306
307
# File 'lib/gh-archive/events.rb', line 305

def forkee_forks_count
    Time.parse(@payload['forkee']['forks_count'])
end

#forkee_full_nameObject



228
229
230
# File 'lib/gh-archive/events.rb', line 228

def forkee_full_name
    @payload['forkee']['full_name']
end

#forkee_has_downloadsObject



293
294
295
# File 'lib/gh-archive/events.rb', line 293

def forkee_has_downloads
    Time.parse(@payload['forkee']['has_downloads'])
end

#forkee_has_issuesObject



289
290
291
# File 'lib/gh-archive/events.rb', line 289

def forkee_has_issues
    Time.parse(@payload['forkee']['has_issues'])
end

#forkee_has_pagesObject



301
302
303
# File 'lib/gh-archive/events.rb', line 301

def forkee_has_pages
    Time.parse(@payload['forkee']['has_pages'])
end

#forkee_has_wikiObject



297
298
299
# File 'lib/gh-archive/events.rb', line 297

def forkee_has_wiki
    Time.parse(@payload['forkee']['has_wiki'])
end

#forkee_homepageObject



269
270
271
# File 'lib/gh-archive/events.rb', line 269

def forkee_homepage
    Time.parse(@payload['forkee']['homepage'])
end

#forkee_idObject



220
221
222
# File 'lib/gh-archive/events.rb', line 220

def forkee_id
    @payload['forkee']['id']
end

#forkee_languageObject



285
286
287
# File 'lib/gh-archive/events.rb', line 285

def forkee_language
    Time.parse(@payload['forkee']['language'])
end

#forkee_mirror_urlObject



309
310
311
# File 'lib/gh-archive/events.rb', line 309

def forkee_mirror_url
    Time.parse(@payload['forkee']['mirror_url'])
end

#forkee_nameObject



224
225
226
# File 'lib/gh-archive/events.rb', line 224

def forkee_name
    @payload['forkee']['name']
end

#forkee_open_issues_countObject



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_ownerObject



232
233
234
# File 'lib/gh-archive/events.rb', line 232

def forkee_owner
    User.new(@payload['forkee']['owner'])
end

#forkee_privateObject



236
237
238
# File 'lib/gh-archive/events.rb', line 236

def forkee_private
    @payload['forkee']['private']
end

#forkee_publicObject



325
326
327
# File 'lib/gh-archive/events.rb', line 325

def forkee_public
    Time.parse(@payload['forkee']['public'])
end

#forkee_pushed_atObject



256
257
258
# File 'lib/gh-archive/events.rb', line 256

def forkee_pushed_at
    Time.parse(@payload['forkee']['pushed_at'])
end

#forkee_sizeObject



273
274
275
# File 'lib/gh-archive/events.rb', line 273

def forkee_size
    Time.parse(@payload['forkee']['size'])
end

#forkee_stargazers_countObject



277
278
279
# File 'lib/gh-archive/events.rb', line 277

def forkee_stargazers_count
    Time.parse(@payload['forkee']['stargazers_count'])
end

#forkee_updated_atObject



252
253
254
# File 'lib/gh-archive/events.rb', line 252

def forkee_updated_at
    Time.parse(@payload['forkee']['updated_at'])
end

#forkee_urlsObject



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_watchersObject



317
318
319
# File 'lib/gh-archive/events.rb', line 317

def forkee_watchers
    Time.parse(@payload['forkee']['watchers'])
end

#forkee_watchers_countObject



281
282
283
# File 'lib/gh-archive/events.rb', line 281

def forkee_watchers_count
    Time.parse(@payload['forkee']['watchers_count'])
end