tapajos-slicehost-tools 0.0.8 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -5
- data/Rakefile +5 -5
- data/lib/slicehost-tools/resources.rb +1 -1
- data/lib/slicehost-tools/resources/dns.rb +6 -0
- data/lib/slicehost-tools/tools/slice.rb +4 -4
- data/slicehost-tools.gemspec +10 -8
- metadata +7 -5
data/README.markdown
CHANGED
@@ -10,8 +10,8 @@ I am not responsible if this eats your data or destroys your life. YOU HAVE BEEN
|
|
10
10
|
|
11
11
|
gem sources -a http://gems.github.com
|
12
12
|
|
13
|
-
sudo gem install
|
14
|
-
sudo gem install
|
13
|
+
sudo gem install thor
|
14
|
+
sudo gem install booster-slicehost-tools
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
@@ -38,7 +38,6 @@ slicehost-slice
|
|
38
38
|
apikey [APIKEY] set your Slicehost API Key and save it to ~/.slicehost-tools
|
39
39
|
help [TASK] describe available tasks or one specific task
|
40
40
|
|
41
|
-
##
|
41
|
+
## Contributing
|
42
42
|
|
43
|
-
|
44
|
-
Multiple Slicehost accounts? (not likely, but an idea)
|
43
|
+
Feel free to fork and send pull requests via github.
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake/gempackagetask'
|
|
4
4
|
|
5
5
|
gem_spec = Gem::Specification.new do |s|
|
6
6
|
s.name = %q{slicehost-tools}
|
7
|
-
s.version = "0.0.
|
7
|
+
s.version = "0.0.12"
|
8
8
|
|
9
9
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
10
10
|
|
@@ -12,16 +12,16 @@ gem_spec = Gem::Specification.new do |s|
|
|
12
12
|
s.authors = ["Cameron Cox", "Bobby Uhlenbrock", "Corey Martella"]
|
13
13
|
s.date = %q{2008-09-10}
|
14
14
|
s.summary = %q{tools utilizing the slicehost api}
|
15
|
-
s.email = %q{
|
15
|
+
s.email = %q{cameroncox@gmail.com}
|
16
16
|
s.executables = ["slicehost-dns", "slicehost-slice"]
|
17
17
|
s.extra_rdoc_files = ["README.markdown", "LICENSE"]
|
18
18
|
s.files = Dir['**/**'].reject{ |f| f =~ /pkg/i }
|
19
19
|
s.has_rdoc = false
|
20
|
-
s.homepage = %q{http://github.com/
|
20
|
+
s.homepage = %q{http://github.com/booster/slicehost-tools/}
|
21
21
|
s.require_paths = ["lib"]
|
22
22
|
s.rubygems_version = %q{1.1.1}
|
23
|
-
s.add_dependency("
|
24
|
-
s.add_dependency("activeresource", ">= 2.1.1")
|
23
|
+
s.add_dependency("thor", ">= 0.9.8")
|
24
|
+
s.add_dependency("activeresource", ">= 2.1.1")
|
25
25
|
end
|
26
26
|
|
27
27
|
Rake::GemPackageTask.new(gem_spec) do |p|
|
@@ -13,6 +13,12 @@ class Zone < Resource
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class Record < Resource
|
16
|
+
def to_zone_rr
|
17
|
+
options = { :name => name, :ttl => ttl, :type => type, :data => data }
|
18
|
+
options[:id] = id unless new_record?
|
19
|
+
self.class.to_zone_rr(options)
|
20
|
+
end
|
21
|
+
|
16
22
|
def self.to_zone_rr(options = {})
|
17
23
|
id = "; ID=#{options[:id]}" if options[:id]
|
18
24
|
"%-20s %-10s IN %-10s %-25s %s" % [options[:name], options[:ttl], options[:type], options[:data], id]
|
@@ -7,19 +7,19 @@ module Tools
|
|
7
7
|
|
8
8
|
desc "add [SLICE NAME]", "add a new slice"
|
9
9
|
method_options :force => :boolean
|
10
|
-
def add(slice_name
|
10
|
+
def add(slice_name)
|
11
11
|
images = ::Image.find(:all)
|
12
12
|
flavors = ::Flavor.find(:all)
|
13
13
|
|
14
|
-
puts "Available Images: "
|
15
|
-
image_id = select_image_from(images)
|
14
|
+
puts "Available Images: "
|
15
|
+
image_id = select_image_from(images)
|
16
16
|
|
17
17
|
puts "Available Flavors: "
|
18
18
|
flavor_id = select_flavor_from(flavors)
|
19
19
|
|
20
20
|
@add = false
|
21
21
|
# confirm you want to do this, it does cost money
|
22
|
-
unless
|
22
|
+
unless options[:force]
|
23
23
|
print "Are you sure you want do this? [y/N]: "
|
24
24
|
case STDIN.gets.chomp
|
25
25
|
when /y/i
|
data/slicehost-tools.gemspec
CHANGED
@@ -1,32 +1,34 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = %q{slicehost-tools}
|
3
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.12"
|
4
6
|
|
5
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
8
|
s.authors = ["Cameron Cox", "Bobby Uhlenbrock", "Corey Martella"]
|
7
9
|
s.date = %q{2008-09-10}
|
8
|
-
s.email = %q{
|
10
|
+
s.email = %q{cameroncox@gmail.com}
|
9
11
|
s.executables = ["slicehost-dns", "slicehost-slice"]
|
10
12
|
s.extra_rdoc_files = ["README.markdown", "LICENSE"]
|
11
13
|
s.files = ["bin", "bin/slicehost-dns", "bin/slicehost-slice", "lib", "lib/slicehost-tools", "lib/slicehost-tools/resources", "lib/slicehost-tools/resources/dns.rb", "lib/slicehost-tools/resources/slice.rb", "lib/slicehost-tools/resources.rb", "lib/slicehost-tools/tools", "lib/slicehost-tools/tools/dns.rb", "lib/slicehost-tools/tools/slice.rb", "lib/slicehost-tools/tools.rb", "lib/slicehost-tools.rb", "LICENSE", "Rakefile", "README.markdown", "slicehost-tools.gemspec"]
|
12
|
-
s.homepage = %q{http://github.com/
|
14
|
+
s.homepage = %q{http://github.com/booster/slicehost-tools/}
|
13
15
|
s.require_paths = ["lib"]
|
14
|
-
s.rubygems_version = %q{1.
|
16
|
+
s.rubygems_version = %q{1.3.1}
|
15
17
|
s.summary = %q{tools utilizing the slicehost api}
|
16
18
|
|
17
19
|
if s.respond_to? :specification_version then
|
18
20
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
19
21
|
s.specification_version = 2
|
20
22
|
|
21
|
-
if
|
22
|
-
s.add_runtime_dependency(%q<
|
23
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
24
|
+
s.add_runtime_dependency(%q<thor>, [">= 0.9.8"])
|
23
25
|
s.add_runtime_dependency(%q<activeresource>, [">= 2.1.1"])
|
24
26
|
else
|
25
|
-
s.add_dependency(%q<
|
27
|
+
s.add_dependency(%q<thor>, [">= 0.9.8"])
|
26
28
|
s.add_dependency(%q<activeresource>, [">= 2.1.1"])
|
27
29
|
end
|
28
30
|
else
|
29
|
-
s.add_dependency(%q<
|
31
|
+
s.add_dependency(%q<thor>, [">= 0.9.8"])
|
30
32
|
s.add_dependency(%q<activeresource>, [">= 2.1.1"])
|
31
33
|
end
|
32
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapajos-slicehost-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Cox
|
@@ -15,16 +15,18 @@ date: 2008-09-10 00:00:00 -07:00
|
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
|
-
name:
|
18
|
+
name: thor
|
19
|
+
type: :runtime
|
19
20
|
version_requirement:
|
20
21
|
version_requirements: !ruby/object:Gem::Requirement
|
21
22
|
requirements:
|
22
23
|
- - ">="
|
23
24
|
- !ruby/object:Gem::Version
|
24
|
-
version: 0.9.
|
25
|
+
version: 0.9.8
|
25
26
|
version:
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: activeresource
|
29
|
+
type: :runtime
|
28
30
|
version_requirement:
|
29
31
|
version_requirements: !ruby/object:Gem::Requirement
|
30
32
|
requirements:
|
@@ -33,7 +35,7 @@ dependencies:
|
|
33
35
|
version: 2.1.1
|
34
36
|
version:
|
35
37
|
description:
|
36
|
-
email:
|
38
|
+
email: cameroncox@gmail.com
|
37
39
|
executables:
|
38
40
|
- slicehost-dns
|
39
41
|
- slicehost-slice
|
@@ -62,7 +64,7 @@ files:
|
|
62
64
|
- README.markdown
|
63
65
|
- slicehost-tools.gemspec
|
64
66
|
has_rdoc: false
|
65
|
-
homepage: http://github.com/
|
67
|
+
homepage: http://github.com/booster/slicehost-tools/
|
66
68
|
post_install_message:
|
67
69
|
rdoc_options: []
|
68
70
|
|