ec2-rotate-volume-snapshots 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/ec2-rotate-volume-snapshots +2 -3
- data/ec2-rotate-volume-snapshots.gemspec +70 -0
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -59,8 +59,6 @@ if ARGV.empty?
|
|
59
59
|
end
|
60
60
|
volume_ids = ARGV
|
61
61
|
|
62
|
-
time_periods.freeze
|
63
|
-
|
64
62
|
ec2 = RightAws::Ec2.new(opts[:aws_access_key], opts[:aws_secret_access_key], :region => opts[:aws_region])
|
65
63
|
all_snapshots = ec2.describe_snapshots
|
66
64
|
|
@@ -71,7 +69,8 @@ volume_ids.each do |volume_id|
|
|
71
69
|
exit 1
|
72
70
|
end
|
73
71
|
|
74
|
-
|
72
|
+
# poor man's way to get a deep copy of our time_periods definition hash
|
73
|
+
periods = Marshal.load(Marshal.dump(time_periods))
|
75
74
|
|
76
75
|
snapshots_to_keep = {}
|
77
76
|
snapshots = all_snapshots.select {|ss| ss[:aws_volume_id] == volume_id }.sort {|a,b| a[:aws_started_at] <=> b[:aws_started_at] }
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ec2-rotate-volume-snapshots}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Zach Wily"]
|
12
|
+
s.date = %q{2010-12-30}
|
13
|
+
s.default_executable = %q{ec2-rotate-volume-snapshots}
|
14
|
+
s.description = %q{Provides a simple way to rotate EC2 snapshots with configurable retention periods.}
|
15
|
+
s.email = %q{zach@zwily.com}
|
16
|
+
s.executables = ["ec2-rotate-volume-snapshots"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"bin/ec2-rotate-volume-snapshots",
|
30
|
+
"ec2-rotate-volume-snapshots.gemspec",
|
31
|
+
"lib/.empty",
|
32
|
+
"test/helper.rb",
|
33
|
+
"test/test_ec2-rotate-volume-snapshots.rb"
|
34
|
+
]
|
35
|
+
s.homepage = %q{http://github.com/zwily/ec2-rotate-volume-snapshots}
|
36
|
+
s.licenses = ["MIT"]
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
s.rubygems_version = %q{1.3.7}
|
39
|
+
s.summary = %q{Amazon EC2 snapshot rotator}
|
40
|
+
s.test_files = [
|
41
|
+
"test/helper.rb",
|
42
|
+
"test/test_ec2-rotate-volume-snapshots.rb"
|
43
|
+
]
|
44
|
+
|
45
|
+
if s.respond_to? :specification_version then
|
46
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
+
s.add_runtime_dependency(%q<right_aws>, [">= 2.0.0"])
|
51
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
52
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
53
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
54
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<right_aws>, [">= 2.0.0"])
|
57
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
58
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
59
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
60
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
61
|
+
end
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<right_aws>, [">= 2.0.0"])
|
64
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
67
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2-rotate-volume-snapshots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Zach Wily
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-30 00:00:00 -07:00
|
19
19
|
default_executable: ec2-rotate-volume-snapshots
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- Rakefile
|
113
113
|
- VERSION
|
114
114
|
- bin/ec2-rotate-volume-snapshots
|
115
|
+
- ec2-rotate-volume-snapshots.gemspec
|
115
116
|
- lib/.empty
|
116
117
|
- test/helper.rb
|
117
118
|
- test/test_ec2-rotate-volume-snapshots.rb
|