Class: HowIs::Sources::Travis

Inherits:
Object
  • Object
show all
Defined in:
lib/how_is/sources/travis.rb

Overview

Fetches metadata about CI builds from travis-ci.org.

Instance Method Summary collapse

Constructor Details

#initialize(repository, end_date) ⇒ Travis

Returns a new instance of Travis.

Parameters:

  • repository (String)

    GitHub repository name, of the format user/repo.

  • end_date (String)

    End date for the report being generated.



11
12
13
14
15
# File 'lib/how_is/sources/travis.rb', line 11

def initialize(repository, end_date)
  @repository = repository
  # TODO: Do something with end_date.
  # TODO: Figure out Default Branch of the repo
end

Instance Method Details

#buildsObject



17
18
19
# File 'lib/how_is/sources/travis.rb', line 17

def builds
  JSON.parse(fetch_builds)
end