lib/shelly/app.rb in shelly-0.4.42 vs lib/shelly/app.rb in shelly-0.5.0
- old
+ new
@@ -9,14 +9,15 @@
include ::Shellwords
DATABASE_KINDS = %w(postgresql mysql mongodb redis)
DATABASE_CHOICES = DATABASE_KINDS + %w(none)
SERVER_SIZES = %w(small large)
+ REGIONS = %w(EU NA)
attr_accessor :code_name, :databases, :ruby_version, :environment,
:git_url, :domains, :web_server_ip, :size, :thin,
- :organization_name, :zone, :usage, :traffic
+ :organization_name, :zone, :region, :usage, :traffic
def initialize(code_name = nil)
self.code_name = code_name
end
@@ -69,11 +70,12 @@
end
def create
attributes = {:code_name => code_name,
:organization_name => organization_name,
- :zone => zone}
+ :zone => zone,
+ :region => @region}
response = shelly.create_app(attributes)
assign_attributes(response)
end
def create_cloudfile
@@ -275,9 +277,13 @@
attributes["web_server_ip"]
end
def git_info
attributes["git_info"]
+ end
+
+ def region
+ attributes['region'] || @region
end
def state
attributes["state"]
end