cloudify 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,10 @@ module Cloudify
25
25
  end
26
26
 
27
27
  def local_files
28
- @local_files ||= Dir.glob("#{Rails.root.to_s}/public/**/*").map{ |f| Digest::MD5.hexdigest(File.read(f)) }
28
+ @local_files ||= Dir.glob("#{Rails.root.to_s}/public/**/*").map do |f|
29
+ next if File.directory?(f)
30
+ Digest::MD5.hexdigest(File.read(f))
31
+ end
29
32
  end
30
33
 
31
34
  def remote_files
@@ -37,14 +40,11 @@ module Cloudify
37
40
  Dir.glob("public/**/*").each do |file|
38
41
  if File.file?(file)
39
42
  remote_file = file.gsub("public/", "")
40
- begin
41
- obj = bucket.files.get(remote_file)
42
- rescue
43
- obj = nil
44
- end
45
- if !obj || (obj.etag != Digest::MD5.hexdigest(File.read(file)))
43
+ obj = bucket.files.head(remote_file)
44
+ get_file = File.open(file)
45
+ if !obj || (obj.etag != Digest::MD5.hexdigest(get_file.read))
46
46
  STDERR.print "U " + file
47
- f = bucket.files.create(:key => remote_file, :body => File.open(file), :public => true)
47
+ f = bucket.files.create(:key => remote_file, :body => get_file, :public => true)
48
48
  STDERR.puts " (" + f.etag + ")"
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module Cloudify
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-11-23 00:00:00.000000000Z
14
+ date: 2011-11-24 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec-rails
18
- requirement: &2152493660 !ruby/object:Gem::Requirement
18
+ requirement: &2152671840 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 2.7.0
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *2152493660
26
+ version_requirements: *2152671840
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mocha
29
- requirement: &2153372440 !ruby/object:Gem::Requirement
29
+ requirement: &2153546460 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 0.10.0
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *2153372440
37
+ version_requirements: *2153546460
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: ruby-debug19
40
- requirement: &2156002640 !ruby/object:Gem::Requirement
40
+ requirement: &2153648020 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *2156002640
48
+ version_requirements: *2153648020
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: fog
51
- requirement: &2156159240 !ruby/object:Gem::Requirement
51
+ requirement: &2160179900 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,7 +56,7 @@ dependencies:
56
56
  version: 1.0.0
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *2156159240
59
+ version_requirements: *2160179900
60
60
  description: Sync your assets hosts to Amazon, Google & Rackspace services
61
61
  email:
62
62
  - amed@tractical.com
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: 2880661111792885307
106
+ hash: -4128178571950917991
107
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  segments:
114
114
  - 0
115
- hash: 2880661111792885307
115
+ hash: -4128178571950917991
116
116
  requirements: []
117
117
  rubyforge_project: cloudify
118
118
  rubygems_version: 1.8.10