datapimp 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/datapimp/clients/amazon.rb +12 -3
- data/lib/datapimp/sync/s3_bucket.rb +8 -0
- data/lib/datapimp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1325ced1223cabf053ff41fa0ba066501ef4a856
|
|
4
|
+
data.tar.gz: e62c4cc014fa65f116456c956f8a104344c6c97c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a7f8c0563c16059d3f91553a9d12e71be6e603813af41d47877861473e15a56876d19f655c75e1c8265e886f495eb40d48f040df20b9873888b2d6b869b1677
|
|
7
|
+
data.tar.gz: 8b48ac5efb76ffb01b2244aeccb49c2c9281f10e9d5ff890ff4953e14422b0ed1033368d8556cb5cd471c90391d713e26e0ab2d1dba7682e9199960aedd8e59c
|
|
@@ -14,7 +14,7 @@ module Datapimp
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def aws_region
|
|
17
|
-
options[:aws_region] || options[:region] || Datapimp.config.aws_region || "us-
|
|
17
|
+
options[:aws_region] || options[:region] || Datapimp.config.aws_region || "us-east-1"
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def storage
|
|
@@ -33,7 +33,6 @@ module Datapimp
|
|
|
33
33
|
path_style: true
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
@storage
|
|
38
37
|
end
|
|
39
38
|
|
|
@@ -41,7 +40,17 @@ module Datapimp
|
|
|
41
40
|
@cdn ||= Fog::CDN.new({
|
|
42
41
|
provider: 'AWS',
|
|
43
42
|
aws_access_key_id: aws_access_key_id,
|
|
44
|
-
aws_secret_access_key: aws_secret_access_key
|
|
43
|
+
aws_secret_access_key: aws_secret_access_key,
|
|
44
|
+
region: aws_region
|
|
45
|
+
})
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def compute
|
|
49
|
+
@compute ||= Fog::Compute.new({
|
|
50
|
+
provider: 'AWS',
|
|
51
|
+
aws_access_key_id: aws_access_key_id,
|
|
52
|
+
aws_secret_access_key: aws_secret_access_key,
|
|
53
|
+
region: aws_region
|
|
45
54
|
})
|
|
46
55
|
end
|
|
47
56
|
|
|
@@ -122,7 +122,15 @@ module Datapimp
|
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
def run_pull_action(options={})
|
|
125
|
+
directories = Datapimp::Sync.amazon.storage.directories
|
|
126
|
+
bucket = directories.get(remote)
|
|
127
|
+
|
|
128
|
+
bucket.files.each do |file|
|
|
129
|
+
local_file = local_path.join(file.key)
|
|
130
|
+
next if local_file.exist? && file.etag == Digest::MD5.hexdigest(local_file.read)
|
|
125
131
|
|
|
132
|
+
local_file.open("w+") {|fh| log("Updating docs entry") ;fh.write(file.body) }
|
|
133
|
+
end
|
|
126
134
|
end
|
|
127
135
|
|
|
128
136
|
def run_create_action(options={})
|
data/lib/datapimp/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: datapimp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.24
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Soeder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|