Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Centralize all notions of the domain of Rudy to Rudy::Huxtable.domain

  • Loading branch information...
commit 8c4aa6c36d79bb136c963efd0737ec3b8b3be5ea 1 parent 96c4778
@Fluxx Fluxx authored
Showing with 6 additions and 5 deletions.
  1. +1 −1  lib/rudy.rb
  2. +4 −3 lib/rudy/huxtable.rb
  3. +1 −1  lib/rudy/metadata.rb
View
2  lib/rudy.rb
@@ -65,7 +65,7 @@ def sysinfo; Rudy.sysinfo; end
# SimpleDB accepts dashes in the domain name on creation and with the query syntax.
# However, with select syntax it says: "The specified query expression syntax is not valid"
- DOMAIN = "rudy_state".freeze
+ DEFAULT_DOMAIN = "rudy_state".freeze
DELIM = '-'.freeze
CONFIG_DIR = File.join(Rudy.sysinfo.home, '.rudy').freeze
View
7 lib/rudy/huxtable.rb
@@ -48,16 +48,17 @@ def self.reset_global; @@global = Rudy::Global.new; end
def self.create_domain
@sdb = Rudy::AWS::SDB.new(@@global.accesskey, @@global.secretkey, @@global.region)
- @sdb.create_domain Rudy::DEFAULT_DOMAIN
+ @sdb.create_domain self.domain
end
def self.domain_exists?
@sdb = Rudy::AWS::SDB.new(@@global.accesskey, @@global.secretkey, @@global.region)
- (@sdb.list_domains || []).member? Rudy::DEFAULT_DOMAIN
+ (@sdb.list_domains || []).member? self.domain
end
def self.domain
- Rudy::DEFAULT_DOMAIN
+ name = @@global.project.to_s.gsub(/\W/, '_').downcase
+ [name, Rudy::DEFAULT_DOMAIN].join('_')
end
# Puts +msg+ to +@@logger+
View
2  lib/rudy/metadata.rb
@@ -7,7 +7,7 @@ module Metadata
COMMON_FIELDS = [:region, :zone, :environment, :role].freeze
@@rsdb = nil
- @@domain = Rudy::DEFAULT_DOMAIN
+ @@domain = Rudy::Huxtable.domain
#
def self.get_rclass(rtype)
Please sign in to comment.
Something went wrong with that request. Please try again.