Robin Böning robinboening

View alchemy_environment_syncing.rb
1 2 3 4 5 6 7 8 9 10
# Example usage:
# cap staging sync_with:production
 
# File: config/deploy/staging.rb
namespace :sync_with do
desc "Sync with production system."
task :production do
run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake} sync_with:production"
end
end
View capistrano_deploy_from_tag.rb
1 2 3 4 5 6 7 8 9 10
def ask_for_tag
default_tag = `git tag`.split("\n").last
if default_tag == nil
puts "Please make sure you have pushed at least one tag. (git push origin --tags)"
exit!
else
tag = Capistrano::CLI.ui.ask "Tag to deploy (make sure to push the tag first): [#{default_tag}] "
tag = default_tag if tag.empty?
tag
end
View capistrano_logfile_watching.rb
1 2 3 4 5 6 7 8 9 10
namespace :logs do
desc "show last 100 lines of your remote logfile."
task :tail do
run "tail -n100 #{shared_path}/log/#{rails_env}.log"
end
 
desc "watch your logfile and see additional data being appended."
task :watch do
stream("tail -f #{shared_path}/log/#{rails_env}.log")
end
View capistrano_delete_remote_cache_task.rb
1 2 3 4 5 6
namespace :deploy do
desc "Removes the remote cache in order to deploy from a new remote repository"
task :delete_remote_cache, :except => { :no_release => true } do
run "cd #{shared_path}; rm -Rf cached-copy"
end
end
View player.rb
1 2 3 4 5 6 7 8 9 10
class Player
 
FULL_HEALTH = 20
 
def play_turn(warrior)
@warrior = warrior
if need_to_rest?
if able_to_rest?
warrior.rest!
View ruby_confs_2013.md

LoneStar RubyConf 2013

18.07.2013 - 20.07.2013

USA, Austin

RailsCamp Germany 2013

26.07.2013 - 28.07.2013

Something went wrong with that request. Please try again.