Module: MetaRake::Publisher::Freight::ClassMethods

Defined in:
lib/metarake/publisher/freight.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#freight_commandObject

Command to run Freight (default: “freight”)



16
17
18
# File 'lib/metarake/publisher/freight.rb', line 16

def freight_command
  @freight_command
end

#freight_conf_pathObject

Path of Freight configuration file



10
11
12
# File 'lib/metarake/publisher/freight.rb', line 10

def freight_conf_path
  @freight_conf_path
end

#freight_distroObject

Distribution to use when publishing to / searching in the Freight repository



13
14
15
# File 'lib/metarake/publisher/freight.rb', line 13

def freight_distro
  @freight_distro
end

Instance Method Details

#freight_varlibHash



19
20
21
22
23
24
25
26
27
# File 'lib/metarake/publisher/freight.rb', line 19

def freight_varlib
  @freight_varlib ||=
    begin
      raise "#{self}.freight_conf_path is not set" unless freight_conf_path
      conf = Mixlib::ShellOut.new('env', '-i', '/bin/sh', '-c', ". #{freight_conf_path} ; echo $VARLIB")
      conf.run_command.error!
      conf.stdout.strip
    end
end