coral_backup 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b233b4d3c592438bd77271ed6327a6817a10d90
4
- data.tar.gz: 1d2b304154bee8de69a706a84220b5ce5957570f
3
+ metadata.gz: 752115cf8b3be6b927bfeba663127b68a490551b
4
+ data.tar.gz: e6f654c71d79ed67c51bff88795bb394a743285a
5
5
  SHA512:
6
- metadata.gz: 7017e286c0423852151822243860c57739ac924e7fcf41555b4d7ad7dc42bb8231742d7978180ea7e4870d77c16245c1b1fe1cf0e72f886c185466e44107bd64
7
- data.tar.gz: 1e17234b53844be28540ec5a28176c55467a8239121c8ed235b016ca448b1badc2f3b484305076639258048ce704f09838f507e7085f9a8a58fe04d1633cfbb3
6
+ metadata.gz: 1609b2e3dcbe6f2ed902c3c8c60011795e0475475fd7ed0cc068c26e6394b498b028eb9c6f8cd51be6b97b273c56e1ae5432d907eff54d53de6e71b055a682a8
7
+ data.tar.gz: f18e7221357aabe46e77d9ddf472eef6531a3e03ca826ebf1e86b01be2618bc9849dc71f633536c070c4fcd4d87d6f7dd1fc0592f8932f32cefaa610c4f5ae4b
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Coral Backup
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/coral_backup.svg)](http://badge.fury.io/rb/coral_backup)
4
+ [![Build Status](https://travis-ci.org/Tatzyr/coral_backup.svg?branch=master)](https://travis-ci.org/Tatzyr/coral_backup)
5
+ [![Dependency Status](https://gemnasium.com/Tatzyr/coral_backup.svg)](https://gemnasium.com/Tatzyr/coral_backup)
6
+
3
7
  Coral Backup creates incremental backups of files that can be restored at a later date.
4
8
 
5
9
  ![run](https://cloud.githubusercontent.com/assets/1025461/8147090/2d8be3bc-1299-11e5-8c46-50127cf74246.gif)
@@ -23,7 +27,8 @@ $ gem install coral_backup
23
27
 
24
28
  ### Options
25
29
 
26
- * `-d`, `--dry-run`: Show what would have been backed up, but do not back them up
30
+ * `-d`, `--dry-run`, `--no-dry-run`: Show what would have been backed up, but do not back them up
31
+ * `-t`, `--updating-time`, `--no-updating-time`: Update time when backup is finished
27
32
 
28
33
  ### Demo
29
34
 
@@ -72,7 +72,8 @@ module CoralBackup
72
72
 
73
73
  map run: :__run
74
74
  desc "run <ACTION>", "Run the backup action"
75
- option :"dry-run", :type => :boolean, aliases: :d, desc: "Show what would have been backed up, but do not back them up"
75
+ option :"dry-run", type: :boolean, aliases: :d, desc: "Show what would have been backed up, but do not back them up"
76
+ option :"updating-time", type: :boolean, default: true, aliases: :t, desc: "Update time when backup is finished"
76
77
  def __run(action_name)
77
78
  unless rsync_version.split(".").first.to_i >= 3
78
79
  warn "ERROR: rsync version must be larger than 3.X.X"
@@ -83,12 +84,13 @@ module CoralBackup
83
84
  data = @settings.action_data(action_name)
84
85
 
85
86
  destination = data[:destination]
86
- dryrun = options[:"dry-run"]
87
+ dry_run = options[:"dry-run"]
88
+ updating_time = options[:"updating-time"]
87
89
  exclusions = data[:exclusions]
88
90
  source = data[:source]
89
91
 
90
92
  args = ["rsync", "-rlptgoxS", "--delete", "-X", "--progress", "--stats"]
91
- args << "--dry-run" if dryrun
93
+ args << "--dry-run" if dry_run
92
94
 
93
95
  new_destination = File.expand_path("#{action_name} backup #{Time.now.strftime("%F-%H%M%S")}", destination)
94
96
  old_destination =
@@ -122,7 +124,7 @@ module CoralBackup
122
124
 
123
125
  system(args.flatten.shelljoin)
124
126
 
125
- @settings.update_time(action_name, time) unless dryrun
127
+ @settings.update_time(action_name, time) if !dry_run && updating_time
126
128
  end
127
129
 
128
130
 
@@ -1,3 +1,3 @@
1
1
  module CoralBackup
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coral_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OTSUKA Tatsuya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor