lib/shelly/app.rb in shelly-0.3.8 vs lib/shelly/app.rb in shelly-0.4.0.pre
- old
+ new
@@ -7,12 +7,12 @@
DATABASE_KINDS = %w(postgresql mongodb redis)
DATABASE_CHOICES = DATABASE_KINDS + %w(none)
SERVER_SIZES = %w(small large)
attr_accessor :code_name, :databases, :ruby_version, :environment,
- :git_url, :domains, :web_server_ip, :size, :thin, :redeem_code,
- :content, :organization, :zone_name
+ :git_url, :domains, :web_server_ip, :size, :thin, :content,
+ :organization_name, :zone_name
def initialize(code_name = nil, content = nil)
self.code_name = code_name
self.content = content
end
@@ -60,12 +60,11 @@
system("git remote rm shelly > /dev/null 2>&1")
end
def create
attributes = {:code_name => code_name,
- :redeem_code => redeem_code,
- :organization_name => organization,
+ :organization_name => organization_name,
:zone_name => zone_name}
response = shelly.create_app(attributes)
assign_attributes(response)
end
@@ -162,14 +161,10 @@
def deployment(deployment_id)
shelly.deployment(code_name, deployment_id)
end
- def self.code_name_from_dir_name
- "#{File.basename(Dir.pwd)}".downcase.dasherize
- end
-
def configs
@configs ||= shelly.app_configs(code_name)
end
def user_configs
@@ -251,10 +246,10 @@
def to_s
code_name
end
def edit_billing_url
- "#{shelly.shellyapp_url}/organizations/#{organization || code_name}/edit"
+ "#{shelly.shellyapp_url}/organizations/#{organization_name || attributes['organization']['name']}/edit"
end
def open
Launchy.open("http://#{attributes["domain"]}")
end