class AssetSync::InstallGenerator

Public Class Methods

source_root() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 10
def self.source_root
  @source_root ||= File.join(File.dirname(__FILE__), 'templates')
end

Public Instance Methods

app_name() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 50
def app_name
  @app_name ||= Rails.application.is_a?(Rails::Application) && Rails.application.class.name.sub(/::Application$/, "").downcase
end
aws?() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 14
def aws?
  options[:provider] == 'AWS'
end
aws_access_key_id() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 26
def aws_access_key_id
  "<%= ENV['AWS_ACCESS_KEY_ID'] %>"
end
aws_secret_access_key() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 30
def aws_secret_access_key
  "<%= ENV['AWS_SECRET_ACCESS_KEY'] %>"
end
generate_config() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 54
def generate_config
  if options[:use_yml]
    template "asset_sync.yml", "config/asset_sync.yml"
  end
end
generate_initializer() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 60
def generate_initializer
  unless options[:use_yml]
    template "asset_sync.rb", "config/initializers/asset_sync.rb"
  end
end
google?() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 18
def google?
  options[:provider] == 'Google'
end
google_storage_access_key_id() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 34
def google_storage_access_key_id
  "<%= ENV['GOOGLE_STORAGE_ACCESS_KEY_ID'] %>"
end
google_storage_secret_access_key() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 38
def google_storage_secret_access_key
  "<%= ENV['GOOGLE_STORAGE_SECRET_ACCESS_KEY'] %>"
end
rackspace?() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 22
def rackspace?
  options[:provider] == 'Rackspace'
end
rackspace_api_key() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 46
def rackspace_api_key
  "<%= ENV['RACKSPACE_API_KEY'] %>"
end
rackspace_username() click to toggle source
# File lib/generators/asset_sync/install_generator.rb, line 42
def rackspace_username
  "<%= ENV['RACKSPACE_USERNAME'] %>"
end