Skip to content

Commit

Permalink
deOMGifying Railties, Active Support, and Action Pack
Browse files Browse the repository at this point in the history
  • Loading branch information
mikel authored and jeremy committed Jan 31, 2010
1 parent b3a0282 commit 2ebea1c
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 66 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/testing.rb
Expand Up @@ -4,7 +4,7 @@ module Testing

include RackDelegation

# OMG MEGA HAX
# TODO: Clean this up
def process_with_new_base_test(request, response)
@_request = request
@_response = response
Expand Down
3 changes: 1 addition & 2 deletions actionpack/lib/action_view/template/resolver.rb
Expand Up @@ -141,8 +141,7 @@ def initialize(path, options = {})
end
end

# OMG HAX
# TODO: remove hax
# TODO: remove hack
class FileSystemResolverWithFallback < Resolver
def initialize(path, options = {})
super(options)
Expand Down
18 changes: 9 additions & 9 deletions actionpack/test/abstract/layouts_test.rb
Expand Up @@ -13,7 +13,7 @@ class Base < AbstractController::Base
"layouts/hello_override.erb" => "With Override <%= yield %>",
"layouts/abstract_controller_tests/layouts/with_string_implied_child.erb" =>
"With Implied <%= yield %>",
"layouts/omg.erb" => "OMGHI2U <%= yield %>",
"layouts/overwrite.erb" => "Overwrite <%= yield %>",
"layouts/with_false_layout.erb" => "False Layout <%= yield %>"
)]
end
Expand Down Expand Up @@ -42,7 +42,7 @@ def overwrite_false
end

def overwrite_string
render :_template => ActionView::Template::Text.new("Hello string!"), :layout => "omg"
render :_template => ActionView::Template::Text.new("Hello string!"), :layout => "overwrite"
end

def overwrite_skip
Expand All @@ -68,7 +68,7 @@ class WithChildOfImplied < WithStringImpliedChild
end

class WithProc < Base
layout proc { |c| "omg" }
layout proc { |c| "overwrite" }

def index
render :_template => ActionView::Template::Text.new("Hello proc!")
Expand All @@ -83,7 +83,7 @@ def index
end
private
def hello
"omg"
"overwrite"
end
end

Expand Down Expand Up @@ -122,7 +122,7 @@ def objekt
end

class WithSymbolAndNoMethod < Base
layout :omg_no_method
layout :no_method

def index
render :_template => ActionView::Template::Text.new("Hello boom!")
Expand Down Expand Up @@ -175,7 +175,7 @@ class TestBase < ActiveSupport::TestCase
test "when layout is overwriten by string in render, render new layout" do
controller = WithString.new
controller.process(:overwrite_string)
assert_equal "OMGHI2U Hello string!", controller.response_body
assert_equal "Overwrite Hello string!", controller.response_body
end

test "when layout is overwriten by false in render, render no layout" do
Expand Down Expand Up @@ -209,13 +209,13 @@ class TestBase < ActiveSupport::TestCase
test "when layout is specified as a proc, call it and use the layout returned" do
controller = WithProc.new
controller.process(:index)
assert_equal "OMGHI2U Hello proc!", controller.response_body
assert_equal "Overwrite Hello proc!", controller.response_body
end

test "when layout is specified as a symbol, call the requested method and use the layout returned" do
controller = WithSymbol.new
controller.process(:index)
assert_equal "OMGHI2U Hello symbol!", controller.response_body
assert_equal "Overwrite Hello symbol!", controller.response_body
end

test "when layout is specified as a symbol and the method returns nil, don't use a layout" do
Expand Down Expand Up @@ -266,7 +266,7 @@ class TestBase < ActiveSupport::TestCase
test "raises an exception when specifying layout true" do
assert_raises ArgumentError do
Object.class_eval do
class ::BadOmgFailLolLayout < AbstractControllerTests::Layouts::Base
class ::BadFailLayout < AbstractControllerTests::Layouts::Base
layout true
end
end
Expand Down
6 changes: 3 additions & 3 deletions actionpack/test/controller/filters_test.rb
Expand Up @@ -435,7 +435,7 @@ def filter_two
end

def non_yielding_filter
@filters << "zomg it didn't yield"
@filters << "it didn't yield"
@filter_return_value
end

Expand Down Expand Up @@ -465,14 +465,14 @@ def test_after_filters_are_not_run_if_around_filter_returns_false
controller = NonYieldingAroundFilterController.new
controller.instance_variable_set "@filter_return_value", false
test_process(controller, "index")
assert_equal ["filter_one", "zomg it didn't yield"], controller.assigns['filters']
assert_equal ["filter_one", "it didn't yield"], controller.assigns['filters']
end

def test_after_filters_are_not_run_if_around_filter_does_not_yield
controller = NonYieldingAroundFilterController.new
controller.instance_variable_set "@filter_return_value", true
test_process(controller, "index")
assert_equal ["filter_one", "zomg it didn't yield"], controller.assigns['filters']
assert_equal ["filter_one", "it didn't yield"], controller.assigns['filters']
end

def test_added_filter_to_inheritance_graph
Expand Down
28 changes: 14 additions & 14 deletions actionpack/test/controller/new_base/render_action_test.rb
Expand Up @@ -119,9 +119,9 @@ class BasicController < ::ApplicationController
# Set the view path to an application view structure with layouts
self.view_paths = self.view_paths = [ActionView::FixtureResolver.new(
"render_action_with_application_layout/basic/hello_world.html.erb" => "Hello World!",
"render_action_with_application_layout/basic/hello.html.builder" => "xml.p 'Omg'",
"layouts/application.html.erb" => "OHAI <%= yield %> KTHXBAI",
"layouts/greetings.html.erb" => "Greetings <%= yield %> Bai",
"render_action_with_application_layout/basic/hello.html.builder" => "xml.p 'Hello'",
"layouts/application.html.erb" => "Hi <%= yield %> OK, Bye",
"layouts/greetings.html.erb" => "Greetings <%= yield %> Bye",
"layouts/builder.html.builder" => "xml.html do\n xml << yield\nend"
)]

Expand Down Expand Up @@ -156,14 +156,14 @@ class LayoutTest < Rack::TestCase
test "rendering implicit application.html.erb as layout" do
get "/render_action_with_application_layout/basic/hello_world"

assert_body "OHAI Hello World! KTHXBAI"
assert_body "Hi Hello World! OK, Bye"
assert_status 200
end

test "rendering with layout => true" do
get "/render_action_with_application_layout/basic/hello_world_with_layout"

assert_body "OHAI Hello World! KTHXBAI"
assert_body "Hi Hello World! OK, Bye"
assert_status 200
end

Expand All @@ -184,7 +184,7 @@ class LayoutTest < Rack::TestCase
test "rendering with layout => 'greetings'" do
get "/render_action_with_application_layout/basic/hello_world_with_custom_layout"

assert_body "Greetings Hello World! Bai"
assert_body "Greetings Hello World! Bye"
assert_status 200
end
end
Expand All @@ -194,7 +194,7 @@ class TestLayout < Rack::TestCase

test "builder works with layouts" do
get :with_builder_and_layout
assert_response "<html>\n<p>Omg</p>\n</html>\n"
assert_response "<html>\n<p>Hello</p>\n</html>\n"
end
end

Expand All @@ -204,7 +204,7 @@ module RenderActionWithControllerLayout
class BasicController < ActionController::Base
self.view_paths = self.view_paths = [ActionView::FixtureResolver.new(
"render_action_with_controller_layout/basic/hello_world.html.erb" => "Hello World!",
"layouts/render_action_with_controller_layout/basic.html.erb" => "With Controller Layout! <%= yield %> KTHXBAI"
"layouts/render_action_with_controller_layout/basic.html.erb" => "With Controller Layout! <%= yield %> Bye"
)]

def hello_world
Expand Down Expand Up @@ -234,14 +234,14 @@ class ControllerLayoutTest < Rack::TestCase
test "render hello_world and implicitly use <controller_path>.html.erb as a layout." do
get "/render_action_with_controller_layout/basic/hello_world"

assert_body "With Controller Layout! Hello World! KTHXBAI"
assert_body "With Controller Layout! Hello World! Bye"
assert_status 200
end

test "rendering with layout => true" do
get "/render_action_with_controller_layout/basic/hello_world_with_layout"

assert_body "With Controller Layout! Hello World! KTHXBAI"
assert_body "With Controller Layout! Hello World! Bye"
assert_status 200
end

Expand All @@ -265,8 +265,8 @@ module RenderActionWithBothLayouts
class BasicController < ActionController::Base
self.view_paths = [ActionView::FixtureResolver.new({
"render_action_with_both_layouts/basic/hello_world.html.erb" => "Hello World!",
"layouts/application.html.erb" => "OHAI <%= yield %> KTHXBAI",
"layouts/render_action_with_both_layouts/basic.html.erb" => "With Controller Layout! <%= yield %> KTHXBAI"
"layouts/application.html.erb" => "Oh Hi <%= yield %> Bye",
"layouts/render_action_with_both_layouts/basic.html.erb" => "With Controller Layout! <%= yield %> Bye"
})]

def hello_world
Expand All @@ -292,14 +292,14 @@ class ControllerLayoutTest < Rack::TestCase
test "rendering implicitly use <controller_path>.html.erb over application.html.erb as a layout" do
get "/render_action_with_both_layouts/basic/hello_world"

assert_body "With Controller Layout! Hello World! KTHXBAI"
assert_body "With Controller Layout! Hello World! Bye"
assert_status 200
end

test "rendering with layout => true" do
get "/render_action_with_both_layouts/basic/hello_world_with_layout"

assert_body "With Controller Layout! Hello World! KTHXBAI"
assert_body "With Controller Layout! Hello World! Bye"
assert_status 200
end

Expand Down
20 changes: 10 additions & 10 deletions actionpack/test/controller/new_base/render_layout_test.rb
Expand Up @@ -3,10 +3,10 @@
module ControllerLayouts
class ImplicitController < ::ApplicationController
self.view_paths = [ActionView::FixtureResolver.new(
"layouts/application.html.erb" => "OMG <%= yield %> KTHXBAI",
"layouts/application.html.erb" => "Main <%= yield %> Layout",
"layouts/override.html.erb" => "Override! <%= yield %>",
"basic.html.erb" => "Hello world!",
"controller_layouts/implicit/layout_false.html.erb" => "hai(layout_false.html.erb)"
"controller_layouts/implicit/layout_false.html.erb" => "hi(layout_false.html.erb)"
)]

def index
Expand All @@ -27,7 +27,7 @@ def builder_override

class ImplicitNameController < ::ApplicationController
self.view_paths = [ActionView::FixtureResolver.new(
"layouts/controller_layouts/implicit_name.html.erb" => "OMGIMPLICIT <%= yield %> KTHXBAI",
"layouts/controller_layouts/implicit_name.html.erb" => "Implicit <%= yield %> Layout",
"basic.html.erb" => "Hello world!"
)]

Expand All @@ -40,14 +40,14 @@ class RenderLayoutTest < Rack::TestCase
test "rendering a normal template, but using the implicit layout" do
get "/controller_layouts/implicit/index"

assert_body "OMG Hello world! KTHXBAI"
assert_body "Main Hello world! Layout"
assert_status 200
end

test "rendering a normal template, but using an implicit NAMED layout" do
get "/controller_layouts/implicit_name/index"

assert_body "OMGIMPLICIT Hello world! KTHXBAI"
assert_body "Implicit Hello world! Layout"
assert_status 200
end

Expand All @@ -63,15 +63,15 @@ class LayoutOptionsTest < Rack::TestCase

test "rendering with :layout => false leaves out the implicit layout" do
get :layout_false
assert_response "hai(layout_false.html.erb)"
assert_response "hi(layout_false.html.erb)"
end
end

class MismatchFormatController < ::ApplicationController
self.view_paths = [ActionView::FixtureResolver.new(
"layouts/application.html.erb" => "<html><%= yield %></html>",
"controller_layouts/mismatch_format/index.js.rjs" => "page[:test].omg",
"controller_layouts/mismatch_format/implicit.rjs" => "page[:test].omg"
"controller_layouts/mismatch_format/index.js.rjs" => "page[:test].ext",
"controller_layouts/mismatch_format/implicit.rjs" => "page[:test].ext"
)]

def explicit
Expand All @@ -84,12 +84,12 @@ class MismatchFormatTest < Rack::TestCase

test "if JS is selected, an HTML template is not also selected" do
get :index, "format" => "js"
assert_response "$(\"test\").omg();"
assert_response "$(\"test\").ext();"
end

test "if JS is implicitly selected, an HTML template is not also selected" do
get :implicit
assert_response "$(\"test\").omg();"
assert_response "$(\"test\").ext();"
end

test "if an HTML template is explicitly provides for a JS template, an error is raised" do
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/controller/new_base/render_partial_test.rb
Expand Up @@ -5,7 +5,7 @@ module RenderPartial
class BasicController < ActionController::Base

self.view_paths = [ActionView::FixtureResolver.new(
"render_partial/basic/_basic.html.erb" => "OMG!",
"render_partial/basic/_basic.html.erb" => "BasicPartial!",
"render_partial/basic/basic.html.erb" => "<%= @test_unchanged = 'goodbye' %><%= render :partial => 'basic' %><%= @test_unchanged %>"
)]

Expand All @@ -20,7 +20,7 @@ class TestPartial < Rack::TestCase

test "rendering a partial in ActionView doesn't pull the ivars again from the controller" do
get :changing
assert_response("goodbyeOMG!goodbye")
assert_response("goodbyeBasicPartial!goodbye")
end
end

Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/controller/subscriber_test.rb
Expand Up @@ -13,7 +13,7 @@ def redirector
end

def data_sender
send_data "cool data", :filename => "omg.txt"
send_data "cool data", :filename => "file.txt"
end

def xfile_sender
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_send_data
wait

assert_equal 3, logs.size
assert_match /Sent data omg\.txt/, logs[1]
assert_match /Sent data file\.txt/, logs[1]
end

def test_send_file
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/dispatch/mime_type_test.rb
Expand Up @@ -23,15 +23,15 @@ class MimeTypeTest < ActiveSupport::TestCase
end

# Accept header send with user HTTP_USER_AGENT: Sunrise/0.42j (Windows XP)
test "parse crappy broken acceptlines" do
test "parse broken acceptlines" do
accept = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/*,,*/*;q=0.5"
expect = [Mime::HTML, Mime::XML, "image/*", Mime::TEXT, Mime::ALL]
assert_equal expect, Mime::Type.parse(accept).collect { |c| c.to_s }
end

# Accept header send with user HTTP_USER_AGENT: Mozilla/4.0
# (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)
test "parse crappy broken acceptlines2" do
test "parse other broken acceptlines" do
accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, , pronto/1.00.00, sslvpn/1.00.00.00, */*"
expect = ['image/gif', 'image/x-xbitmap', 'image/jpeg','image/pjpeg', 'application/x-shockwave-flash', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/msword', 'pronto/1.00.00', 'sslvpn/1.00.00.00', Mime::ALL ]
assert_equal expect, Mime::Type.parse(accept).collect { |c| c.to_s }
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/template/html-scanner/sanitizer_test.rb
Expand Up @@ -48,7 +48,7 @@ def test_sanitize_script
assert_sanitized "a b c<script language=\"Javascript\">blah blah blah</script>d e f", "a b cd e f"
end

# fucked
# TODO: Clean up
def test_sanitize_js_handlers
raw = %{onthis="do that" <a href="#" onclick="hello" name="foo" onbogus="remove me">hello</a>}
assert_sanitized raw, %{onthis="do that" <a name="foo" href="#">hello</a>}
Expand Down Expand Up @@ -193,7 +193,7 @@ def test_should_not_fall_for_ridiculous_hack
assert_sanitized img_hack, "<img>"
end

# fucked
# TODO: Clean up
def test_should_sanitize_attributes
assert_sanitized %(<SPAN title="'><script>alert()</script>">blah</SPAN>), %(<span title="'&gt;&lt;script&gt;alert()&lt;/script&gt;">blah</span>)
end
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/template/subscriber_test.rb
Expand Up @@ -33,15 +33,15 @@ def test_render_file_template
end

def test_render_text_template
@view.render(:text => "OMG")
@view.render(:text => "TEXT")
wait

assert_equal 1, @logger.logged(:info).size
assert_match /Rendered text template/, @logger.logged(:info).last
end

def test_render_inline_template
@view.render(:inline => "<%= 'OMG' %>")
@view.render(:inline => "<%= 'TEXT' %>")
wait

assert_equal 1, @logger.logged(:info).size
Expand Down

63 comments on commit 2ebea1c

@judofyr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROFLMAO!

@nocksock
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOLWTF?!

@topfunky
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that Rails is now ready for the enterprise?

@y8
Copy link

@y8 y8 commented on 2ebea1c Jan 31, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOLWY? :(

@zmack
Copy link
Contributor

@zmack zmack commented on 2ebea1c Jan 31, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMGHI

@ELLIOTTCABLE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ΩG

@chalkers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@topfunky - if these were kept in it'd show that it was ALREADY enterprise ready!

@jm
Copy link
Contributor

@jm jm commented on 2ebea1c Jan 31, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@topfunky - Plainly not. I don't see anything about the addition of an "OMGFactoryFactory" class or something of that sort.

@hallucinations
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROFLAMAO!

@grimen
Copy link

@grimen grimen commented on 2ebea1c Jan 31, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish this was like the last commit before Rails 3 frozen; that would have been so awesome. B)

@gilesbowkett
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol zomg lmao

@mikel
Copy link
Member Author

@mikel mikel commented on 2ebea1c Jan 31, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grimen, I tried to hold off till the last minute :)

@mislav
Copy link
Member

@mislav mislav commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic.

@kaichen
Copy link
Contributor

@kaichen kaichen commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ω

@geomic
Copy link

@geomic geomic commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anything, you should've left OMGIMPLICIT <%= yield %> KTHXBAI

:P Hilarious!

@edendevelopment
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, this diff is so funny to read! I actually considered taking the Lighthouse ticket to do this on the Rails Bug Mash day, but i didn't, so it's nice to see the result. Good work!

My favourite bit was the BadOmgFailLolLayout.

@aimeerivers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, that last comment was me, not edendevelopment. FAIL AIMEE logged in on the wrong username.

@namxam
Copy link

@namxam namxam commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove it… coding is so much more fun like this ;)

@tukan
Copy link
Contributor

@tukan tukan commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic fail... let's build enterprise so?

@markbao
Copy link

@markbao markbao commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome diff. This is exactly how I write code.

@vilcans
Copy link

@vilcans vilcans commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good riddance. It's more important for code to be simple and clear than "fun" to read (which is not so fun when you're trying to understand difficult code).

@windock
Copy link
Contributor

@windock windock commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll all die.

@benlovell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little part of me just died with this commit.

@kef
Copy link

@kef kef commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zOMG - a kitteh died for each change this commit.

@windock
Copy link
Contributor

@windock windock commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You made it on top of hacker news. Congratz.

@paukul
Copy link
Contributor

@paukul paukul commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

benlovell: "A little part of me just died with this commit."
I second that

@lukaszkorecki
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Revert. revert, revert!"

@jjulian
Copy link

@jjulian jjulian commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're all growns up.

@mrb
Copy link

@mrb mrb commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classic.

@rkh
Copy link
Contributor

@rkh rkh commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fork rails, those changes are in-acceptable!

@wfarr
Copy link
Contributor

@wfarr wfarr commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I demand omghax!

@valo
Copy link

@valo valo commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a milestone in the Rails' history ROFL

@mishawagon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You damn atheists! There is no hope for you in the afterlife.

@jacqui
Copy link

@jacqui jacqui commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just spilled out a little for my fallen OmgOmgz :(

@jpsilvashy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow... The problem is that nobody would actually consider "Hi hello, ok thanks thanks bye" and improvement over "OHAI, KTHXBAI" would they?

@JonGretar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like with some features that have been taken out of Rails core... Can we expect this to be released as a plugin instead?

@artagnon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert !defined?(OmgOmg) really made me laugh!

@grimen
Copy link

@grimen grimen commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonGretar: act_as_omg

@pboling
Copy link
Contributor

@pboling pboling commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For everyone but vilcans:
If you need to get a fix for LOLcode every now and then, and can no longer get it from Rails Core... check out my gem CsvPirate, written entirely in Pirate:
http://github.com/pboling/csv_pirate

Yes, I admit, the code is confusing... because few people speak pirate anymore. But whose fault is that?

@gtd
Copy link
Contributor

@gtd gtd commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm utterly indifferent, but just wanted to join in on the hog-piling fun: death to LOL

@ceritium
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMGWTFBBQ!

@tcoxon
Copy link

@tcoxon tcoxon commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aw, such a shame...

@byllc
Copy link

@byllc byllc commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are going to replace juvenile at least replace it with clever

@dnsco
Copy link

@dnsco dnsco commented on 2ebea1c Feb 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my vote is for a revert.

@carllerche
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope people don't git blame the removed lines...

@solidsnack
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore the LOLz.

@seydar
Copy link

@seydar seydar commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd like the lolz back in my tests please

@postmodern
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LOLz are in the mind of the loller.

@jimgreer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They fucking took out the zOMGs?!

@luikore
Copy link

@luikore luikore commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inhuman slaughter ... You should use "o#{109.chr}g" etc from now on.

@kronn
Copy link

@kronn kronn commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG -> FAIL? #FAIL?

Yo Dawg, I heard u liek memes so i put a FAIL in your RAILS so u can scale while u remove OMG?

@radar
Copy link
Contributor

@radar radar commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refuse to use Rails 3 until all these are put back.

Reasoning?

"omg" is shorter than "overwrite" and so the loading of the framework will be quicker, right? :)

@galex
Copy link

@galex galex commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahah :D

@raldred
Copy link

@raldred raldred commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great read, many lennys

@mikel
Copy link
Member Author

@mikel mikel commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radar,
yes, using 'omg' is faster... we had to take a performance hit on the Rails 3 code base to put this in...
but for every gain there is a sacrifice
:)

@timnovinger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would OMG pluralize?

@jbarnette
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMGZ, obviously.

@mubi
Copy link

@mubi mubi commented on 2ebea1c Feb 2, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMGZ0RZ

@indrekj
Copy link
Contributor

@indrekj indrekj commented on 2ebea1c Feb 8, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great :P

@agrimm
Copy link
Contributor

@agrimm agrimm commented on 2ebea1c Feb 12, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've improved code quality: WTFs/minute have decreased!

Please sign in to comment.