shnell 0.2.5 → 0.2.6

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/shnell +1 -0
  3. data/lib/backup.rb +8 -0
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
data/bin/shnell CHANGED
@@ -132,6 +132,7 @@ command :backup do |c|
132
132
  script = args.shift
133
133
 
134
134
  Filander.quiet = options.quiet
135
+ Backup.behavior = :backup
135
136
 
136
137
  if script == "all"
137
138
  pattern = args.shift
data/lib/backup.rb CHANGED
@@ -141,6 +141,14 @@ module Backup
141
141
  end
142
142
  end
143
143
 
144
+ def service(filename, &block)
145
+ if Backup.behavior == :restore
146
+ restore filename, &block
147
+ else
148
+ backup filename, &block
149
+ end
150
+ end
151
+
144
152
  def backup(filename, &block)
145
153
  BackupScript.backup filename, &block
146
154
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 5
9
- version: 0.2.5
8
+ - 6
9
+ version: 0.2.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Johannes J. Schmidt
@@ -41,8 +41,8 @@ dependencies:
41
41
  segments:
42
42
  - 0
43
43
  - 5
44
- - 0
45
- version: 0.5.0
44
+ - 3
45
+ version: 0.5.3
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
48
  description: Ease Server Setup and Configuration