static_sync 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,12 +11,16 @@ module StaticSync
11
11
  self.fetch('cache', {})
12
12
  end
13
13
 
14
+ def remote
15
+ self.fetch('remote', {})
16
+ end
17
+
14
18
  def source
15
19
  self.fetch('local', {})['directory']
16
20
  end
17
21
 
18
- def remote
19
- self.fetch('remote', {})
22
+ def target
23
+ self.remote['directory']
20
24
  end
21
25
 
22
26
  def storage
@@ -29,10 +33,6 @@ module StaticSync
29
33
  })
30
34
  end
31
35
 
32
- def storage_directory
33
- self.remote['directory']
34
- end
35
-
36
36
  def gzip
37
37
  self.fetch('gzip', true)
38
38
  end
@@ -17,6 +17,7 @@ module StaticSync
17
17
  remote_directory.files.each do |file|
18
18
  remote_keys << [file.key, file.etag]
19
19
  end
20
+ log.info("Synching #{@config.source} to #{@config.target}.") if @config.log
20
21
  Dir.chdir(@config.source) do
21
22
  local_filtered_files.each do |file|
22
23
  current_file = @meta.for(file)
@@ -32,6 +33,7 @@ module StaticSync
32
33
  end
33
34
  end
34
35
  end
36
+ log.info("Synching done.") if @config.log
35
37
  end
36
38
  end
37
39
 
@@ -50,11 +52,11 @@ module StaticSync
50
52
  end
51
53
 
52
54
  def remote_directory
53
- @config.storage.directories.new(:key => @config.storage_directory)
55
+ @config.storage.directories.new(:key => @config.target)
54
56
  end
55
57
 
56
58
  def verify_remote_directory
57
- @config.storage.get_bucket(@config.storage_directory)
59
+ @config.storage.get_bucket(@config.target)
58
60
  end
59
61
 
60
62
  def log
@@ -1,3 +1,3 @@
1
1
  module StaticSync
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  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.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-05 00:00:00.000000000 Z
12
+ date: 2013-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
@@ -104,3 +104,4 @@ test_files:
104
104
  - spec/meta/compression_spec.rb
105
105
  - spec/meta_spec.rb
106
106
  - spec/storage_spec.rb
107
+ has_rdoc: false