ebs_snapper 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/bin/ebs_snapper CHANGED
@@ -22,6 +22,7 @@ begin
22
22
  EbsSnapper::CLI.run
23
23
 
24
24
  exit 0
25
- rescue
25
+ rescue => e
26
+ $stderr.puts "Exception: #{e}\n" + e.backtrace().join("\n")
26
27
  exit 1
27
28
  end
data/ebs_snapper.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ["lib"]
17
17
  s.version = EbsSnapper::VERSION
18
18
 
19
- s.add_runtime_dependency "aws-sdk"
19
+ s.add_runtime_dependency "aws-sdk", "~> 1.11.3"
20
20
 
21
21
  s.add_development_dependency "rake"
22
22
  s.add_development_dependency "rspec"
@@ -23,6 +23,8 @@ class EbsSnapper::CLI
23
23
  opts = parse(ARGV)
24
24
  ebs = EbsSnapper::Ebs.new(opts[:aws])
25
25
  ebs.snapshot_and_purge
26
+ rescue => e
27
+ @logger.error "Exception: #{e}\n" + e.backtrace().join("\n")
26
28
  end
27
29
 
28
30
  def self.load_config(opts, filename)
@@ -76,7 +76,11 @@ class EbsSnapper::Ebs
76
76
  ts = snapshot.tags[@tag_name]
77
77
  if ttl.purge?(ts)
78
78
  @logger.info {"Purging #{vol_id} snapshot: #{snapshot.id}"}
79
- snapshot.delete
79
+ begin
80
+ snapshot.delete
81
+ rescue => e
82
+ @logger.error "Exception: #{e}\n" + e.backtrace().join("\n")
83
+ end
80
84
  end
81
85
  end
82
86
  end
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module EbsSnapper
16
- VERSION = "0.0.5"
16
+ VERSION = "0.0.6"
17
17
  end
data/spec/lib/ebs_spec.rb CHANGED
@@ -134,7 +134,7 @@ describe EbsSnapper::Ebs do
134
134
 
135
135
  snapshot = Object.new
136
136
  snapshot.should_receive(:tag).with(DEFAULT_TAG_NAME,
137
- hash_including(:value => RegexpMatcher.new(/^\d+/))) {true}
137
+ hash_including(:value => RSpec::Mocks::ArgumentMatchers::RegexpMatcher.new(/^\d+/))) {true}
138
138
 
139
139
  volume = OpenStruct.new
140
140
  volume.should_receive(:create_snapshot) {snapshot}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebs_snapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-23 00:00:00.000000000Z
12
+ date: 2013-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
16
- requirement: &2156528220 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 1.11.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2156528220
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.11.3
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rake
27
- requirement: &2156527680 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *2156527680
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &2156527140 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *2156527140
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: fakeweb
49
- requirement: &2156526600 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,7 +69,12 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *2156526600
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  description: Manage snapshots of EBS volumes
59
79
  email:
60
80
  - ultradns@neustar.biz
@@ -89,15 +109,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
109
  - - ! '>='
90
110
  - !ruby/object:Gem::Version
91
111
  version: '0'
112
+ segments:
113
+ - 0
114
+ hash: 2004562226822433963
92
115
  required_rubygems_version: !ruby/object:Gem::Requirement
93
116
  none: false
94
117
  requirements:
95
118
  - - ! '>='
96
119
  - !ruby/object:Gem::Version
97
120
  version: '0'
121
+ segments:
122
+ - 0
123
+ hash: 2004562226822433963
98
124
  requirements: []
99
125
  rubyforge_project:
100
- rubygems_version: 1.8.6
126
+ rubygems_version: 1.8.24
101
127
  signing_key:
102
128
  specification_version: 3
103
129
  summary: Manage snapshots of EBS volumes