Module: PlayTime

Defined in:
lib/play_time.rb,
lib/play_time/apk.rb,
lib/play_time/track.rb,
lib/play_time/client.rb,
lib/play_time/runner.rb,
lib/play_time/upload.rb,
lib/play_time/promote.rb,
lib/play_time/version.rb,
lib/play_time/configuration.rb

Defined Under Namespace

Classes: Apk, Client, Configuration, Promote, Runner, Track, Upload

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.config_pathObject



10
11
12
# File 'lib/play_time.rb', line 10

def config_path
  ENV['PLAY_TIME_CONFIG_PATH'] || Configuration::DEFAULT_CONFIG
end

.configurationObject



14
15
16
# File 'lib/play_time.rb', line 14

def configuration
  @configuration ||= Configuration.new(YAML.load(open(config_path).read))
end

.installObject



26
27
28
29
30
31
32
33
# File 'lib/play_time.rb', line 26

def install
  if Configuration.exists?
    puts "You already have a config file in #{config_path}!"
  else
    puts "Generating a new config file: #{config_path}"
    Configuration.create_config('config', config_path)
  end
end

.promote(track, version_code) ⇒ Object



22
23
24
# File 'lib/play_time.rb', line 22

def promote(track, version_code)
  Promote.promote(track, version_code)
end

.upload(track) ⇒ Object



18
19
20
# File 'lib/play_time.rb', line 18

def upload(track)
  Upload.upload(track)
end