Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ianha/LastResort
Browse files Browse the repository at this point in the history
  • Loading branch information
shyndman committed May 3, 2012
2 parents bd2a7da + 755d02d commit 0767a29
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/last-resort
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ command :new do |c|
end
end

desc 'Describe run here'
arg_name 'Describe arguments to run here'
desc 'Run the last-resort server'
command :run do |c|
c.action do |global_options, options, args|
LastResort::Commands.run_heroku_or_rackup
end
end

Expand Down
13 changes: 13 additions & 0 deletions lib/last-resort/commands.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'launchy'
require 'config'

module LastResort
class Commands
Expand Down Expand Up @@ -141,5 +142,17 @@ def self.create_env
puts 'In order to run your project, you must modify the .env to include the domain name of your server.'.yellow
end
end

# ====== RUN

def self.run_heroku_or_rackup
begin
LastResort::Config::populate_env_if_required
rescue
puts 'Make sure to run "last-resort run" from a last-resort project'.yellow
return
end

end
end
end

0 comments on commit 0767a29

Please sign in to comment.