Sha256: 9e04c3199f5ef40793f4686143488c547091f982c6f706cf42f79a5773b19e27

Contents?: true

Size: 634 Bytes

Versions: 10

Compression:

Stored size: 634 Bytes

Contents

# see http://stackoverflow.com/questions/20734766/rails-mountable-engine-how-should-apps-set-configuration-variables
module GlacierOnRails
  class Config
    class << self
      cattr_accessor :attached_files_directory, :aws_region, :profile_name
      self.attached_files_directory = nil
      self.aws_region = 'us-east-1'
      self.profile_name = 'default'

      def orphan_files_directory
        @@orphan_files_directory
      end

      def orphan_files_directory=(path)
        FileUtils.mkdir path unless File.exists? path
        @@orphan_files_directory = path
      end

      alias_method :setup, :tap
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
glacier_on_rails-1.0.0 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.9 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.8 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.7 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.6 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.5 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.4 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.3 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9.2 lib/glacier_on_rails/config.rb
glacier_on_rails-0.9 lib/glacier_on_rails/config.rb