class AssetS3::Base
Constants
- DEFAULT_ASSET_PATHS
Public Class Methods
absolute_path(path)
click to toggle source
# File lib/asset_s3.rb, line 22 def self.absolute_path(path) File.join(path_prefix, path) end
asset_paths()
click to toggle source
# File lib/asset_s3.rb, line 18 def self.asset_paths @@asset_paths end
asset_paths=(paths)
click to toggle source
# File lib/asset_s3.rb, line 14 def self.asset_paths=(paths) @@asset_paths = paths end
assets()
click to toggle source
# File lib/asset_s3.rb, line 26 def self.assets asset_paths.inject([]) do |assets, path| path = absolute_path(path) assets << path if File.exists?(path) && !File.directory?(path) assets += Dir.glob("#{path}/**/*").inject([]) do |m, file| m << file unless File.directory?(file) m end end end
fingerprint(path)
click to toggle source
# File lib/asset_s3.rb, line 37 def self.fingerprint(path) path.gsub(path_prefix, "") end
path_prefix()
click to toggle source
# File lib/asset_s3.rb, line 10 def self.path_prefix File.join(Rails.root, "public") end