Sha256: a523a9b1b639f1bb720377d77eac5b8bb8ef6f603899a021eddff4d472645a6e

Contents?: true

Size: 1002 Bytes

Versions: 14

Compression:

Stored size: 1002 Bytes

Contents

#!/usr/bin/ruby
# This software code is made available "AS IS" without warranties of any        
# kind.  You may copy, display, modify and redistribute the software            
# code either by itself or as incorporated into your code; provided that        
# you do not remove any proprietary notices.  Your use of this software         
# code is at your own risk and you waive any claim against the author
# with respect to your use of this software code. 
# (c) 2007 alastair brunton
#
# modified to search out the yaml in several places, thanks wkharold.
require 'yaml'

module S3Config
  
  confpath = ["#{ENV['S3CONF']}", "#{ENV['HOME']}/.s3conf", "/etc/s3conf"]
  
  confpath.each do |path|
    if File.exists?(path) and File.directory?(path) and File.exists?("#{path}/s3config.yml")
      config = YAML.load_file("#{path}/s3config.yml")
      config.each_pair do |key, value|
        eval("$#{key.upcase} = '#{value}'")
      end
      break
    end
  end
    
end

Version data entries

14 entries across 14 versions & 7 rubygems

Version Path
frahugo-s3sync-1.4.1 lib/s3sync/s3config.rb
mgreenly-s3sync-1.2.4 lib/s3sync/s3config.rb
s3sync-cf-0.0.1 lib/s3sync/s3config.rb
s3sync-cf-0.0.0 lib/s3sync/s3config.rb
frahugo-s3sync-1.3.8 lib/s3sync/s3config.rb
aproxacs-s3sync-1.3.6 lib/s3sync/s3config.rb
aproxacs-s3sync-1.3.5 lib/s3sync/s3config.rb
aproxacs-s3sync-1.3.4 lib/s3sync/s3config.rb
aproxacs-s3sync-1.3.3 lib/s3sync/s3config.rb
moserp-s3sync-1.2.6.1 lib/s3config.rb
moserp-s3sync-1.2.6 lib/s3config.rb
s3-sync-1.2.7 lib/s3sync/s3config.rb
s3-sync-1.2.6 lib/s3sync/s3config.rb
s3sync-1.2.5 lib/s3config.rb