class Lono::Configset::S3File::Item
Holds metadata about the item in the regsitry.
Attributes
configset[R]
name[R]
root[R]
Public Class Methods
new(name, options={})
click to toggle source
# File lib/lono/configset/s3_file/item.rb, line 7 def initialize(name, options={}) @name, @options = name, options @blueprint = options[:blueprint] @configset = options[:configset] @root = options[:root] @type = options[:type] || 'file' end
Public Instance Methods
output_path()
click to toggle source
# File lib/lono/configset/s3_file/item.rb, line 19 def output_path "#{Lono.config.output_path}/#{@blueprint}/configsets/#{@configset}/files/#{@name}" end
replacement_value()
click to toggle source
# File lib/lono/configset/s3_file/item.rb, line 23 def replacement_value aws_data = AwsData.new # # "https://s3.amazonaws.com/#{Lono::S3::Bucket.name}/#{s3_path}" # "https://lono-bucket-12di8xz5sy72z.s3-us-west-2.amazonaws.com/stuff/s3-antivirus.tgz" # # us-east-1 is special case: # # "https://lono-bucket-12di8xz5sy72z.s3.amazonaws.com/stuff/s3-antivirus.tgz" # region = "" region = "-#{aws_data.region}" unless aws_data.region == "us-east-1" "https://#{Lono::S3::Bucket.name}.s3#{region}.amazonaws.com/#{s3_path}" end
src_path()
click to toggle source
# File lib/lono/configset/s3_file/item.rb, line 15 def src_path "#{@root}/lib/files" end