This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "#{File.dirname(__FILE__)}/../vendor/gems/environment" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rails::Boot | |
def run | |
load_initializer | |
extend_environment | |
Rails::Initializer.run(:set_load_path) | |
end | |
def extend_environment | |
Rails::Initializer.class_eval do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem bundle | |
Calculating dependencies... | |
Updating source: http://gems.rubyforge.org | |
Downloading actionmailer-2.3.5.gem | |
Downloading actionpack-2.3.5.gem | |
Downloading activerecord-2.3.5.gem | |
Downloading activeresource-2.3.5.gem | |
Downloading activesupport-2.3.5.gem | |
Downloading addressable-2.1.1.gem | |
Downloading data_objects-0.10.0.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
namespace :bundler do | |
task :symlink_gems do | |
shared_gems = File.join(shared_path, 'vendor/gems') | |
release_gems = "#{release_path}/vendor/gems/" | |
%w(cache gems specifications).each do |sub_dir| | |
shared_sub_dir = File.join(shared_gems, sub_dir) | |
run("mkdir -p #{shared_sub_dir} && mkdir -p #{release_gems} && ln -s #{shared_sub_dir} #{release_gems}/#{sub_dir}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'melbourne' | |
'class Test; end'.to_ast # => #<Melbourne::AST::Class:0x10176dc28 @line=1, @body=#<Melbourne::AST::EmptyBody:0x10176db88 @line=1>, @name=#<Melbourne::AST::ClassName:0x10176dbb0 @line=1, @name=:Test, @superclass=#<Melbourne::AST::Nil:0x10176dbd8 @line=1>>, @superclass=#<Melbourne::AST::Nil:0x10176dbd8 @line=1>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install highlight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'simplabs/highlight' | |
Simplabs::Highlight.highlight(:ruby, 'class Test; end') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install reportable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# which branch does contain the given commit | |
git branch --contains d590f2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Purchase < ActiveRecord::Base | |
belongs_to :product | |
def product=(product) | |
write_attribute(:product_id, product) | |
freeze_product_data | |
product | |
end |