ssync 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ssync
2
2
 
3
- __Ssync__, an optimised S3 sync tool using the power of *nix!
3
+ __Ssync__, an optimised S3 sync tool using the power of Unix!
4
4
 
5
5
  ## Requirements
6
6
 
@@ -19,7 +19,7 @@ __Ssync__, an optimised S3 sync tool using the power of *nix!
19
19
  To configure, run `ssync setup` and follow the prompts, you'll
20
20
  need your AWS keys, the local file path you want to back up, the bucket name
21
21
  to back up to, and any extra options to pass into find (i.e. for ignoring
22
- filepaths etc). It'll write the config to `~/.ssync.yml`.
22
+ filepaths etc). It'll write the config to `~/.ssync/my-s3-bucket.yml`.
23
23
 
24
24
  ## Synchronisation
25
25
 
@@ -32,11 +32,13 @@ or `ssync sync --force` to force a checksum comparison.
32
32
 
33
33
  If you would like to sync to more than one S3 buckets, you may do so by:
34
34
 
35
- ssync setup s3-bucket-name-1
36
- ssync sync s3-bucket-name-1
35
+ ssync setup my-s3-bucket
36
+ ssync sync my-s3-bucket
37
37
 
38
- ssync setup s3-bucket-name-2
39
- ssync sync s3-bucket-name-2
38
+ ssync setup another-s3-bucket
39
+ ssync sync another-s3-bucket
40
+
41
+ Running `ssync setup` and `ssync sync` without any bucket names defaults to using the last bucket you used.
40
42
 
41
43
  ## Why?
42
44
 
@@ -46,7 +48,7 @@ That's where S3 is nice.
46
48
 
47
49
  We tried [s3sync](http://www.s3sync.net/) but it blew our server load (we do in excess of
48
50
  500,000 requests a day (page views, not including hits for images and what not,
49
- and the server needs to stay responsive). The secret sauce is using the *nix
51
+ and the server needs to stay responsive). The secret sauce is using the Unix
50
52
  `find`, `xargs` and `openssl` commands to generate md5 checksums for comparison.
51
53
  Seems to work quite well for us (we have almost 90,000 files to compare).
52
54
 
@@ -27,12 +27,19 @@ module Ssync
27
27
  end
28
28
 
29
29
  def run!
30
+ util_check!
30
31
  pre_run_check!
31
32
  perform_action!
32
33
  end
33
34
 
34
35
  private
35
36
 
37
+ def util_check!
38
+ %w{find xargs openssl}.each do |util|
39
+ e! "You do not have '#{util}' installed on your operating system." if `which #{util}`.empty?
40
+ end
41
+ end
42
+
36
43
  def pre_run_check!
37
44
  if action_eq?(:sync) && !config_exists?(default_config_path) && !config_exists?
38
45
  e! "Cannot run the sync, there is no Ssync configuration, try 'ssync setup' to create one first."
@@ -1,3 +1,3 @@
1
1
  module Ssync
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Fred Wu