Sha256: 0d58f88d09988864bb24b7b4936744206ea75e8f2ccb11e3dc3295e7812f4d1c

Contents?: true

Size: 607 Bytes

Versions: 40

Compression:

Stored size: 607 Bytes

Contents

module Bizside
  module Configurations
    module Storage

      def storage
        if @storage.nil?
          configfile = ENV['STORAGE_CONFIG_FILE'] ? ENV['STORAGE_CONFIG_FILE'] : default_configfile

          if File.exist?(configfile)
            config = ERB.new(File.read(configfile), 0, '-').result
            @storage = Bizside::Config.new(YAML.load(config)[Bizside.env])
          else
            @storage = Bizside::Config.new
          end
        end

        @storage
      end

      private

      def default_configfile
        File.join('config', 'aws.yml')
      end

    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
bizside-2.3.9 lib/bizside/configurations/storage.rb
bizside-3.0.3 lib/bizside/configurations/storage.rb
bizside-2.3.8 lib/bizside/configurations/storage.rb
bizside-3.0.2 lib/bizside/configurations/storage.rb
bizside-3.0.1 lib/bizside/configurations/storage.rb
bizside-3.0.0 lib/bizside/configurations/storage.rb
bizside-2.3.7 lib/bizside/configurations/storage.rb
bizside-2.3.6 lib/bizside/configurations/storage.rb
bizside-2.3.5 lib/bizside/configurations/storage.rb
bizside-2.3.4 lib/bizside/configurations/storage.rb
bizside-2.3.3 lib/bizside/configurations/storage.rb
bizside-2.3.2 lib/bizside/configurations/storage.rb
bizside-2.3.1 lib/bizside/configurations/storage.rb
bizside-2.3.0 lib/bizside/configurations/storage.rb
bizside-2.2.3 lib/bizside/configurations/storage.rb
bizside-2.2.2 lib/bizside/configurations/storage.rb
bizside-2.2.1 lib/bizside/configurations/storage.rb
bizside-2.2.0 lib/bizside/configurations/storage.rb
bizside-2.1.12 lib/bizside/configurations/storage.rb
bizside-2.1.11 lib/bizside/configurations/storage.rb