- 18 12月, 2008 3 次提交
-
-
由 Brady Bouchard 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Joshua Peek 提交于
When checking for the wrong routing method, ensure the environment is passed to recognize optimize [#1406 state:resolved]
-
由 Joshua Peek 提交于
-
- 17 12月, 2008 6 次提交
-
-
由 Joshua Peek 提交于
Instead of calling super to pass the request on, return a 404. The modified app looks like this: # app/metal/poller.rb class Poller def self.call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "text/html"}, "Hello, World!"] else [404, {"Content-Type" => "text/html"}, "Not Found"] end end end But you aren't locked in to just Rails: # app/metal/api.rb require 'sinatra' Sinatra::Application.default_options.merge!(:run => false, :env => :production) Api = Sinatra.application unless defined? Api get '/interesting/new/ideas' do 'Hello Sinatra!' end
-
由 Jesse Newland 提交于
Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal: class Poller < Rails::Rack::Metal def call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "text/plain"}, "Hello World!"] else super end end end might be tested like so: class PollerTest < ActionController::IntegrationTest test "poller returns hello world" do get "/poller" assert_response 200 assert_response :success assert_response :ok assert_equal "Hello World!", response.body end end [#1588 state:committed] Signed-off-by: NDavid Heinemeier Hansson <david@loudthinking.com>
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
# app/metal/poller.rb class Poller < Rails::Rack::Metal def call(env) if env["PATH_INFO"] =~ /^\/poller/ [200, {"Content-Type" => "application/json"}, Message.recent.to_json] else super end end end * There is a generator to help you get started `script/generate metal poller` * Also, metal bits can be ran standalone with rackup `rackup app/metal/poller.rb`
-
- 16 12月, 2008 18 次提交
-
-
由 Daniel Luz 提交于
Signed-off-by: NDavid Heinemeier Hansson <david@loudthinking.com>
-
由 Xavier Noria 提交于
Signed-off-by: NDavid Heinemeier Hansson <david@loudthinking.com>
-
由 Hongli Lai (Phusion 提交于
Do not output an ETag header if response body is blank or when sending files with send_file(... :xsendfile => true) [#1578 state:committed] Signed-off-by: NDavid Heinemeier Hansson <david@loudthinking.com>
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
Session objects are always a hash, so we need to ensure a flash hash is always assigned to the session
-
由 Jeremy Kemper 提交于
-
由 Jeremy Kemper 提交于
[#410 state:open] This reverts commit 262fef7e.
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
由 Nathan Weizenbaum 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Hongli Lai (Phusion) 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Jeremy Kemper 提交于
-
由 Frederick Cheung 提交于
[#410 state:resolved] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
由 Seth Fitzsimmons 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Seth Fitzsimmons 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Frederick Cheung 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Dan Pickett 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 15 12月, 2008 3 次提交
-
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 Frederick Cheung 提交于
[#1559 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 13 12月, 2008 1 次提交
-
-
由 Frederick Cheung 提交于
[#1559 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 12 12月, 2008 3 次提交
-
-
由 mark 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Frederick Cheung 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Joshua Peek 提交于
-
- 11 12月, 2008 6 次提交
-
-
由 Eloy Duran 提交于
Fixed ActiveSupport::OrderedHash #delete_if, #reject!, and #reject, which did not sync the @keys after the operation. This probably holds true for other mutating methods as well. Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
由 Christos Zisopoulos 提交于
Fix for Integration::Session follow_redirect! headers['location'] bug with Rack [#1555 state:resolved] Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
由 Joshua Peek 提交于
-
由 Frederick Cheung 提交于
Don't use the transaction instance method so that people with has_one/belongs_to :transaction aren't fubared [#1551 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
由 Frederick Cheung 提交于
[#1552 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
由 Jeremy Kemper 提交于
-