static_sync 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,19 +12,24 @@ module StaticSync
12
12
  end
13
13
 
14
14
  def source
15
- self['local']['directory']
15
+ self.fetch('local', {})['directory']
16
+ end
17
+
18
+ def remote
19
+ self.fetch('remote', {})
16
20
  end
17
21
 
18
22
  def storage
19
23
  Fog::Storage.new({
20
- :provider => self['remote']['provider'],
21
- :aws_access_key_id => self['remote']['username'],
22
- :aws_secret_access_key => self['remote']['password']
24
+ :provider => self.remote['provider'],
25
+ :region => self.remote['region'],
26
+ :aws_access_key_id => self.remote['username'],
27
+ :aws_secret_access_key => self.remote['password']
23
28
  })
24
29
  end
25
30
 
26
31
  def storage_directory
27
- self['remote']['directory']
32
+ self.remote['directory']
28
33
  end
29
34
 
30
35
  def gzip
@@ -1,3 +1,3 @@
1
1
  module StaticSync
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/static_sync.rb CHANGED
@@ -3,7 +3,7 @@ require_relative "static_sync/config"
3
3
  require_relative "static_sync/storage"
4
4
 
5
5
  module StaticSync
6
- def self.upload
7
- Storage.new(Config.new.load).sync
6
+ def self.upload(config = {})
7
+ Storage.new(Config.new.load.merge(config)).sync
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: