dust-deploy 0.13.9 → 0.13.10

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.
data/changelog.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =============
3
3
 
4
+ 0.13.10
5
+ ------------
6
+
7
+ - improves duplicity status
8
+
9
+
4
10
  0.13.9
5
11
  ------------
6
12
 
@@ -76,17 +76,21 @@ class Duplicity < Recipe
76
76
  "--archive-dir #{config['archive']} " +
77
77
  "#{File.join(config['backend'], config['directory'])}"
78
78
 
79
- cmd << " |tail -n3 |head -n1" unless options.long?
79
+ cmd << " |tail -n3 |head -n1"
80
80
 
81
81
  ret = @node.exec cmd
82
82
 
83
83
  # check exit code and stdout shouldn't be empty
84
84
  msg.parse_result( (ret[:exit_code] == 0 and ret[:stdout].length > 0) )
85
85
 
86
- if options.long?
87
- @node.messages.add(ret[:stdout], :indent => 0)
86
+ # parse backup type, date and number of sets
87
+ m = ret[:stdout].match(/^\s+([a-zA-Z]+)\s+(\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+(\d+)$/)
88
+
89
+ if m
90
+ type, date, sets = m[1..3]
91
+ @node.messages.add("Last backup: #{type} (#{sets} sets) on #{date}", :indent => 2).ok
88
92
  else
89
- @node.messages.add("\t" + ret[:stdout].sub(/^\s+([a-zA-Z]+)\s+(\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+(\d+)$/, 'Last backup: \1 (\3 sets) on \2'), :indent => 0)
93
+ @node.messages.add('could not get backup chain', :indent => 2).failed
90
94
  end
91
95
 
92
96
  end
data/lib/dust/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dust
2
- VERSION = "0.13.9"
2
+ VERSION = "0.13.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dust-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.9
4
+ version: 0.13.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-15 00:00:00.000000000 Z
12
+ date: 2012-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json