Class: Rocketwheel::Command::Manifest

Inherits:
Thor::CoreExt::HashWithIndifferentAccess
  • Object
show all
Defined in:
lib/rocketwheel/command/manifest.rb

Defined Under Namespace

Classes: S3Config, TransloaditConfig

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_file(path) ⇒ Object



10
11
12
# File 'lib/rocketwheel/command/manifest.rb', line 10

def self.from_file(path)
  new(YAML.load(File.open(path)))
end

Instance Method Details

#metaObject



33
34
35
# File 'lib/rocketwheel/command/manifest.rb', line 33

def meta
  @meta ||= self.fetch('meta', Hash.new)
end

#player_optionsObject



29
30
31
# File 'lib/rocketwheel/command/manifest.rb', line 29

def player_options
  @player_options ||= self.fetch('player', Hash.new)
end

#playlistObject



25
26
27
# File 'lib/rocketwheel/command/manifest.rb', line 25

def playlist
  @playlist = self.fetch('playlist', [])
end

#s3Object



18
19
20
21
22
23
# File 'lib/rocketwheel/command/manifest.rb', line 18

def s3
  @s3 ||= begin
    config = self.fetch('s3', Hash.new)
    S3Config.new(config['key'], config['secret'], config['bucket'], config['path'].to_s)
  end
end

#transloaditObject



37
38
39
40
41
42
# File 'lib/rocketwheel/command/manifest.rb', line 37

def transloadit
  @transloadit ||= begin
    config = self.fetch('transloadit', Hash.new)
    TransloaditConfig.new(config['key'], config['secret'], config['steps'])
  end
end

#versionObject



14
15
16
# File 'lib/rocketwheel/command/manifest.rb', line 14

def version
  @version ||= self.fetch('version', Player.latest_version)
end