lib/shelly/app.rb in shelly-0.0.39 vs lib/shelly/app.rb in shelly-0.0.40

- old
+ new

@@ -1,16 +1,17 @@ require 'erb' require 'launchy' -require "shelly/backup" module Shelly class App < Model DATABASE_KINDS = %w(postgresql mongodb redis none) attr_accessor :code_name, :databases, :ruby_version, :environment, - :git_url, :domains, :web_server_ip, :mail_server_ip + :git_url, :domains + autoload :Backup, "shelly/backup" + def initialize(code_name = nil) self.code_name = code_name end def add_git_remote @@ -96,10 +97,14 @@ def self.guess_code_name File.basename(Dir.pwd) end + def ips + shelly.app_ips(code_name) + end + def users shelly.app_users(code_name) end def configs @@ -126,21 +131,9 @@ shelly.app_update_config(code_name, path, content) end def delete_config(path) shelly.app_delete_config(code_name, path) - end - - def attributes - @attributes ||= shelly.app(code_name) - end - - def web_server_ip - attributes["web_server_ip"] - end - - def mail_server_ip - attributes["mail_server_ip"] end def open_billing_page url = "#{shelly.shellyapp_url}/login?api_key=#{current_user.token}&return_to=/apps/#{code_name}/edit_billing" Launchy.open(url)