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
$ rvm install 1.9.2 --trace &> /tmp/rvm.log | |
1.9.2 --trace | |
rvm 1.9.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/] | |
+ /scripts/cli : __rvm_parse_args() 693 > [[ -n '' ]] | |
+ /scripts/cli : __rvm_parse_args() 694 > export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ /scripts/cli : __rvm_parse_args() 694 > PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ /scripts/cli : __rvm_parse_args() 722 > [[ -z install ]] | |
+ /scripts/cli : __rvm_parse_args() 724 > [[ 0 -eq 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
__rvm_ps1 () { | |
if [ ! -f ~/.rvm/bin/rvm-prompt ]; then | |
exit 0 | |
fi | |
RVM_VERSION=$(~/.rvm/bin/rvm-prompt) | |
FMT="%s" | |
if ([ -f "$(pwd)/Rakefile" ] || | |
[ "$(find . -maxdepth 1 -name '*.rb' | head -n1)" != "" ]) && | |
[ ! -z "$RVM_VERSION" ]; then | |
if [ -n "$1" ]; then |
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
# First parameter is a bash printf formatting string | |
# From second till fifth parameter, rvm-prompt format parameters | |
__ruby_ps1 () { | |
if [ ! -f ./Rakefile ] && | |
[ "$(find -maxdepth 1 -name '*.rb' | head -n1)" == "" ]; then | |
exit 1 | |
fi | |
if [ -f ~/.rvm/bin/rvm-prompt ]; then | |
rst=$(~/.rvm/bin/rvm-prompt $2 $3 $4 $5) | |
fi |
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
module ActionView | |
module Helpers | |
module FormHelper | |
def email_field(object_name, method, options = {}) | |
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("email", options) | |
end | |
def url_field(object_name, method, options = {}) | |
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("url", options) | |
end | |
def search_field(object_name, method, options = {}) |
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 ActiveRecord::Base | |
def self.find_by_sample(sample) | |
columns = self.columns.reject {|column| %w(id created_at updated_at).include?(column.name) } | |
cond_str, cond_val = [], [] | |
columns.each do |column| | |
value = sample.send(column.name) | |
next if value.nil? | |
cond_str << "#{column.name}=?" | |
cond_val << value | |
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
class Test | |
class << self | |
attr_accessor :count | |
end | |
@count = 0 | |
def initialize | |
self.class.count += 1 | |
end | |
end | |
NewerOlder