module Flubber::App

Constants

APP_INFO_LOCATION
S3_BUCKET_NAME

Public Class Methods

bundles_public_url() click to toggle source
# File lib/app.rb, line 39
def self.bundles_public_url
  @bundles_public_url ||= \
    "https://#{S3_BUCKET_NAME}.s3.amazonaws.com/#{uuid}/#{name}"
end
id() click to toggle source
# File lib/app.rb, line 18
def self.id
  file = File.open(APP_INFO_LOCATION)
  lines = file.readlines.map(&:chomp)
  file.close
  lines[0]
end
name() click to toggle source
# File lib/app.rb, line 25
def self.name
  file = File.open(APP_INFO_LOCATION)
  lines = file.readlines.map(&:chomp)
  file.close
  lines[1]
end
set(flubber_app) click to toggle source
# File lib/app.rb, line 6
def self.set(flubber_app)
  file = File.open(APP_INFO_LOCATION, "w+")
  file.puts "#{flubber_app["id"]}"
  file.puts "#{flubber_app["name"].downcase.gsub(" ", "-").gsub(/\s+/, "")}"
  file.puts "#{flubber_app["uuid"]}"
  file.close
end
set?() click to toggle source
# File lib/app.rb, line 14
def self.set?
  File.exists?(APP_INFO_LOCATION)
end
uuid() click to toggle source
# File lib/app.rb, line 32
def self.uuid
  file = File.open(APP_INFO_LOCATION)
  lines = file.readlines.map(&:chomp)
  file.close
  lines[2]
end