s3_meta_sync 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -1
- data/lib/s3_meta_sync/version.rb +1 -1
- data/lib/s3_meta_sync.rb +19 -5
- data.tar.gz.sig +0 -0
- metadata +7 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86108185353e54e6adf0bc50b1c5661b30056ab3
|
4
|
+
data.tar.gz: d0f3ecc3597c3d4095106e12cbc690f2486ed716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 587e5b34cf058fb84d488632eec7e0a3322c440395e7e24ca62d0741977beba613cea4b2a10fd2481c0e705a6239b32fbad2f6b06634859496552dac17d0a637
|
7
|
+
data.tar.gz: 4025e4bdf77f15b72d5922e6a1c3ab8ad2974090444bb860be8dfdad2e9f6e4df2bd14fd0bba6e1b097d96c414c1c5bb187a1bd0f341f24cb36f74d3f5bbe21c
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
%w1�"無%h%���x�2)1�D8��98zR���5�W�G1��:�ogx�崗����{��4X
|
2
|
+
YQm��C ���3��cL�8��Ƣ0�����f�[����*L�}�r��:���͏Q��X
|
data/lib/s3_meta_sync/version.rb
CHANGED
data/lib/s3_meta_sync.rb
CHANGED
@@ -76,7 +76,7 @@ module S3MetaSync
|
|
76
76
|
download_file(source, META_FILE, staging_area)
|
77
77
|
verify_integrity!(staging_area, destination)
|
78
78
|
delete_empty_folders(staging_area)
|
79
|
-
swap_in_directory(destination, staging_area)
|
79
|
+
self.class.swap_in_directory(destination, staging_area)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -85,10 +85,24 @@ module S3MetaSync
|
|
85
85
|
system "cp -R #{destination}/* #{dir} 2>/dev/null"
|
86
86
|
end
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
# almost atomic when destination and temp dir are not on the same device
|
89
|
+
def self.swap_in_directory(destination, dir)
|
90
|
+
next_dir = ".#{destination}-next"
|
91
|
+
delete = ".#{destination}-delete"
|
92
|
+
|
93
|
+
# clean up potential leftovers from last run
|
94
|
+
FileUtils.remove_dir(next_dir) if File.exist?(next_dir)
|
95
|
+
FileUtils.remove_dir(delete) if File.exist?(delete)
|
96
|
+
|
97
|
+
# move onto the same device
|
98
|
+
FileUtils.mv(dir, next_dir)
|
99
|
+
|
100
|
+
# swap
|
101
|
+
FileUtils.mv(destination, delete)
|
102
|
+
FileUtils.mv(next_dir, destination)
|
103
|
+
|
104
|
+
# cleanup old
|
105
|
+
FileUtils.remove_dir(delete)
|
92
106
|
end
|
93
107
|
|
94
108
|
def verify_integrity!(staging_area, destination)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_meta_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
@@ -30,20 +30,20 @@ cert_chain:
|
|
30
30
|
F5etKHZg0j3eHO31/i2HnswY04lqGImUu6aM5EnijFTB7PPW2KwKKM4+kKDYFdlw
|
31
31
|
/0WV1Ng2/Y6qsHwmqGg2VlYj2h4=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-03-
|
33
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: aws-sdk
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
description:
|
@@ -66,17 +66,17 @@ require_paths:
|
|
66
66
|
- lib
|
67
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
78
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
79
|
+
rubygems_version: 2.2.2
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: Sync folders with s3 using a metadata file and md5 diffs
|
metadata.gz.sig
CHANGED
Binary file
|