lib/shelly/app.rb in shelly-0.0.49.pre vs lib/shelly/app.rb in shelly-0.0.49

- old
+ new

@@ -11,20 +11,16 @@ def initialize(code_name = nil) self.code_name = code_name end def add_git_remote - system("git remote rm #{code_name} > /dev/null 2>&1") - system("git remote add #{code_name} #{git_url}") + system("git remote rm production > /dev/null 2>&1") + system("git remote add production #{git_url}") end - def git_remote_exist? - IO.popen("git remote").read.include?(code_name) - end - def remove_git_remote - system("git remote rm #{code_name} > /dev/null 2>&1") + system("git remote rm production > /dev/null 2>&1") end def generate_cloudfile @email = current_user.email template = File.read(cloudfile_template_path) @@ -104,22 +100,10 @@ def cloudfile_path File.join(Dir.pwd, "Cloudfile") end def self.guess_code_name - guessed = nil - if Cloudfile.present? - clouds = Cloudfile.new.clouds - if clouds.grep(/staging/) - guessed = "production" - production_clouds = clouds.grep(/production/) - production_clouds.sort.each do |cloud| - cloud =~ /production(\d*)/ - guessed = "production#{$1.to_i+1}" - end - end - end - "#{File.basename(Dir.pwd)}-#{guessed || 'staging'}" + File.basename(Dir.pwd) end def users shelly.app_users(code_name) end