Skip to content

Instantly share code, notes, and snippets.

View spastorino's full-sized avatar

Santiago Pastorino spastorino

View GitHub Profile
➜ myapp bundle update
Updating git://github.com/rails/sass-rails.git
Updating git://github.com/rails/coffee-rails.git
Fetching dependency information from the API at http://rubygems.org/......
Fetching dependency information from the API at http://rubygems.org/.
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0.rc5) from source at /Users/santiago/WyeWorks/Projs/rails
Using bcrypt-ruby (2.1.4)
Using builder (3.0.0)
@spastorino
spastorino / gist:1128180
Created August 5, 2011 18:32
rails-test.log
➜ actionpack git:(3-1-stable) ✗ rake
/Users/santiago/.rvm/rubies/rbx-2.0.0pre/bin/rbx -w -I"lib:test" -I"/Users/santiago/.rvm/gems/rbx-2.0.0pre/gems/rake-0.9.2/lib" "/Users/santiago/.rvm/gems/rbx-2.0.0pre/gems/rake-0.9.2/lib/rake/rake_test_loader.rb" "test/abstract/abstract_controller_test.rb" "test/abstract/callbacks_test.rb" "test/abstract/collector_test.rb" "test/abstract/helper_test.rb" "test/abstract/layouts_test.rb" "test/abstract/render_test.rb" "test/abstract/translation_test.rb" "test/controller/action_pack_assertions_test.rb" "test/controller/addresses_render_test.rb" "test/controller/assert_select_test.rb" "test/controller/base_test.rb" "test/controller/caching_test.rb" "test/controller/capture_test.rb" "test/controller/content_type_test.rb" "test/controller/default_url_options_with_filter_test.rb" "test/controller/deprecation/deprecated_base_methods_test.rb" "test/controller/filters_test.rb" "test/controller/flash_hash_test.rb" "test/controller/flash_test.rb" "test/controller/force_ssl_test.rb" "
@spastorino
spastorino / gist:1110692
Created July 28, 2011 00:50
sass-rails.patch
diff --git a/lib/sass/rails/monkey_patches.rb b/lib/sass/rails/monkey_patches.rb
index 40c3d3c..03cf9ae 100644
--- a/lib/sass/rails/monkey_patches.rb
+++ b/lib/sass/rails/monkey_patches.rb
@@ -1,36 +1,3 @@
module Sass::Rails::SassContext
attr_accessor :sass_config
end
-
-module Sass::Rails::SprocketsConfig
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
diff --git a/lib/i18n/backend/fallbacks.rb b/lib/i18n/backend/fallbacks.rb
index 70c2c04..f50e92e 100644
--- a/lib/i18n/backend/fallbacks.rb
+++ b/lib/i18n/backend/fallbacks.rb
@@ -60,7 +60,7 @@ module I18n
end
def find_first_string_or_lambda_default(defaults)
- defaults.each_with_index { |default, ix| return ix if String === default || Proc === default }
+ defaults.each_with_index { |default, ix| return ix unless default.is_a? Symbol }
➜ /tmp ruby ~/WyeWorks/Projs/rails/bin/rails new myapp --dev
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js
@spastorino
spastorino / gist:1045739
Created June 24, 2011 21:34
Rails-master-rbx-2.0.0.pre.output
/Users/santiago/.rvm/rubies/rbx-2.0.0pre/bin/rbx -w -I"lib:test" -I"/Users/santiago/.rvm/gems/rbx-2.0.0pre/gems/rake-0.9.2/lib" "/Users/santiago/.rvm/gems/rbx-2.0.0pre/gems/rake-0.9.2/lib/rake/rake_test_loader.rb" "test/**/*_test.rb"
An exception occurred running /Users/santiago/.rvm/gems/rbx-2.0.0pre/gems/rake-0.9.2/lib/rake/rake_test_loader.rb
undefined method `to_time' on an instance of Time. (NoMethodError)
Backtrace:
 Kernel(Time)#to_time (method_missing) at kernel/delta/kernel.rb:79
Time#<=> (compare_with_coercion) at lib/active_support/core_ext/time
/calculations.rb:310
 Comparable(Time)#> at kernel/common/comparable.rb:58
 Rubinius::CodeLoader#load_file at kernel/delta/codeloader.rb:135
@spastorino
spastorino / gist:1040508
Created June 22, 2011 16:43
Rails rake output
Loaded suite /Users/santiago/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
Finished in 0.001963 seconds.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
Test run options: --seed 45687
Loaded suite /Users/santiago/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
@spastorino
spastorino / gist:1040272
Created June 22, 2011 14:58
turn.output
➜ financial git:(master) ✗ rake
Loaded suite /Users/santiago/.rvm/gems/ruby-head@global/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
Finished in 0.004258 seconds.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
Loaded suite /Users/santiago/.rvm/gems/ruby-head@global/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 8f97eb7..df450cc 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -255,7 +255,7 @@ module ActionView
# simple_format("<span>I'm allowed!</span> It's true.", {}, :sanitize => false)
# # => "<p><span>I'm allowed!</span> It's true.</p>"
def simple_format(text, html_options={}, options={})
- text = ''.html_safe if text.nil?
+ text = '' if text.nil?