booster-slicehost-tools 0.0.6 → 0.0.9

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/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.6"
7
+ s.version = "0.0.9"
8
8
 
9
9
  s.specification_version = 2 if s.respond_to? :specification_version=
10
10
 
@@ -17,7 +17,7 @@ gem_spec = Gem::Specification.new do |s|
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/uhlenbrock/slicehost-tools/}
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
23
  s.add_dependency("wycats-thor", ">= 0.9.2")
@@ -28,4 +28,15 @@ Rake::GemPackageTask.new(gem_spec) do |p|
28
28
  p.gem_spec = gem_spec
29
29
  p.need_tar = true
30
30
  p.need_zip = true
31
- end
31
+ end
32
+
33
+ namespace :gem do
34
+ namespace :spec do
35
+ desc "Update slicehost-tools.gemspec"
36
+ task :generate do
37
+ File.open("slicehost-tools.gemspec", "w") do |f|
38
+ f.puts(gem_spec.to_ruby)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -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]
@@ -2,7 +2,7 @@
2
2
  if File.exists? File.join(ENV['HOME'], ".slicehost-tools")
3
3
  load File.join(ENV['HOME'], ".slicehost-tools")
4
4
  else
5
- require File.dirname(File.join(__FILE__, "tools"))
5
+ require File.expand_path(File.dirname(__FILE__) + "/tools")
6
6
  Tools::Default.start(['apikey'])
7
7
  exit
8
8
  end
@@ -44,7 +44,7 @@ module Tools
44
44
  zone = Zone.find(:first, :params => { :origin => "#{domain}." })
45
45
  end
46
46
 
47
- Record.new( :record_type => 'CNAME', :zone_id => zone.id, :name => "mail.", :data => "ghs.google.com." ).save
47
+ Record.new( :record_type => 'CNAME', :zone_id => zone.id, :name => "mail", :data => "ghs.google.com." ).save
48
48
  Record.new( :record_type => 'MX', :zone_id => zone.id, :name => "#{domain}.", :data => "ASPMX.L.GOOGLE.COM.", :aux => "1" ).save
49
49
  Record.new( :record_type => 'MX', :zone_id => zone.id, :name => "#{domain}.", :data => "ALT1.ASPMX.L.GOOGLE.COM.", :aux => "5" ).save
50
50
  Record.new( :record_type => 'MX', :zone_id => zone.id, :name => "#{domain}.", :data => "ALT2.ASPMX.L.GOOGLE.COM.", :aux => "5" ).save
@@ -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, opts)
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
- flavor_id = select_flavor_from(flavors)
18
+ flavor_id = select_flavor_from(flavosrs)
19
19
 
20
20
  @add = false
21
21
  # confirm you want to do this, it does cost money
22
- unless opts[:force]
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
@@ -1,21 +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.6"
4
-
5
- s.specification_version = 2 if s.respond_to? :specification_version=
6
-
5
+ s.version = "0.0.9"
6
+
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Cameron Cox", "Bobby Uhlenbrock", "Corey Martella"]
9
9
  s.date = %q{2008-09-10}
10
- s.summary = %q{tools utilizing the slicehost api}
11
10
  s.email = %q{bobby@uhlenbrock.us}
12
11
  s.executables = ["slicehost-dns", "slicehost-slice"]
13
12
  s.extra_rdoc_files = ["README.markdown", "LICENSE"]
14
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"]
15
- # s.has_rdoc = false
16
- s.homepage = %q{http://github.com/uhlenbrock/slicehost-tools/}
14
+ s.homepage = %q{http://github.com/booster/slicehost-tools/}
17
15
  s.require_paths = ["lib"]
18
- s.rubygems_version = %q{1.1.1}
19
- s.add_dependency("wycats-thor", ">= 0.9.2")
20
- s.add_dependency("activeresource", ">= 2.1.1")
16
+ s.rubygems_version = %q{1.3.1}
17
+ s.summary = %q{tools utilizing the slicehost api}
18
+
19
+ if s.respond_to? :specification_version then
20
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
21
+ s.specification_version = 2
22
+
23
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
24
+ s.add_runtime_dependency(%q<wycats-thor>, [">= 0.9.2"])
25
+ s.add_runtime_dependency(%q<activeresource>, [">= 2.1.1"])
26
+ else
27
+ s.add_dependency(%q<wycats-thor>, [">= 0.9.2"])
28
+ s.add_dependency(%q<activeresource>, [">= 2.1.1"])
29
+ end
30
+ else
31
+ s.add_dependency(%q<wycats-thor>, [">= 0.9.2"])
32
+ s.add_dependency(%q<activeresource>, [">= 2.1.1"])
33
+ end
21
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booster-slicehost-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Cox
@@ -16,6 +16,7 @@ default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: wycats-thor
19
+ type: :runtime
19
20
  version_requirement:
20
21
  version_requirements: !ruby/object:Gem::Requirement
21
22
  requirements:
@@ -25,6 +26,7 @@ dependencies:
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:
@@ -62,7 +64,7 @@ files:
62
64
  - README.markdown
63
65
  - slicehost-tools.gemspec
64
66
  has_rdoc: false
65
- homepage: http://github.com/uhlenbrock/slicehost-tools/
67
+ homepage: http://github.com/booster/slicehost-tools/
66
68
  post_install_message:
67
69
  rdoc_options: []
68
70