Class: S3gb

Inherits:
Object
  • Object
show all
Defined in:
lib/s3gb.rb,
lib/s3gb/base.rb,
lib/s3gb/jgit.rb,
lib/s3gb/s3fs.rb

Defined Under Namespace

Classes: Base, JGit, S3fs

Class Method Summary collapse

Class Method Details

.buildObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/s3gb.rb', line 4

def self.build
  config = YAML.load(File.read(File.expand_path('~/.s3gb/config.yml')))

  strategy = case config['strategy'].downcase
  when 'jgit', nil then
    require 's3gb/jgit'
    JGit
  when 's3fs' then
    require 's3gb/s3fs'
    S3fs
  end

  strategy.new config
end