raggi / async_sinatra Goto Github PK
View Code? Open in Web Editor NEWA plugin for Sinatra to provide a DSL extension for using Thin for asynchronous responses
Home Page: http://rubyforge.org/libraggi/async_sinatra
A plugin for Sinatra to provide a DSL extension for using Thin for asynchronous responses
Home Page: http://rubyforge.org/libraggi/async_sinatra
Gist with data: https://gist.github.com/882330
Code:
aget "/api/v1/inputs/:id" do |*args|
# get a particular input
@logger.info args
@logger.info params
end # aget "/api/v1/inputs/:id"
In Sinatra 1.2, async_sinatra 0.5.0, and rack 1.2.1, the above prints 'args' with the :id value, but params misses the value. In Sinatra 1.1 same effect. Sinatra 1.0 it works. (The changes were I would gem uninstall sinatra -v 1.2, gem install sinatra -v 1.1, etc).
If I replace 'aget' with 'get', it works correctly in Sinatra 1.2.
Bug?
with rainbows i get this error:
NoMethodError: undefined method each' for "hello async":String /Users/Francesco/.rvm/gems/ruby-1.9.2-p0/gems/rainbows-2.0.1/lib/rainbows/response/body.rb:118:in
write_body_each'
/Users/Francesco/.rvm/gems/ruby-1.9.2-p0/gems/rainbows-2.0.1/lib/rainbows/event_machine.rb:149:in em_write_response' /Users/Francesco/.rvm/gems/ruby-1.9.2-p0/gems/async_sinatra-0.3.0/lib/sinatra/async.rb:80:in
[]'
/Users/Francesco/.rvm/gems/ruby-1.9.2-p0/gems/async_sinatra-0.3.0/lib/sinatra/async.rb:80:in `body'
with this configuration:
worker_processes 1
Rainbows! do
use :EventMachine
worker_connections 100
end
Hi, I'm having a very strange problem with async_sinatra.
Apparently the 'puts request.body.string' is called twice when receives a POST request.
https://gist.github.com/874281
If I use the normal post method from sinatra I have the output I expect, if I use async this is what I see:
{"subdomain":"test","given_name":"Wieland","nickname":"nwieland","location":null,"url":"http://nofeed.org","designs":[]}
{"subdomain":"test","given_name":"Wieland","nickname":"nwieland","location":null,"url":"http://nofeed.org","designs":[]}
Am I doing something wrong ? Or is it async_sinatra ?
-> % bundle exec cucumber
Feature: Herp
Scenario: Derp # features/test.feature:3
Given I am a bug # features/step_definitions/derp_steps.rb:1
When I get "/" # features/step_definitions/derp_steps.rb:4
undefined method `options' for #<Rack::Head:0x7f786dfbdf50> (NoMethodError)
./features/step_definitions/derp_steps.rb:5:in `/^I get "([^"]*)"$/'
features/test.feature:5:in `When I get "/"'
Then I should asplode # features/step_definitions/derp_steps.rb:9
Failing Scenarios:
cucumber features/test.feature:3 # Scenario: Derp
1 scenario (1 failed)
3 steps (1 failed, 1 skipped, 1 passed)
0m0.007s
-> %
I've got a full reproduction test case in this GitHub repository
Mostly you should be able to avoid the need for this and use some of the modern alternative solutions for most use cases, e.g. https://gist.github.com/raggi/ff7971991297e5c8a1ce or http://old.blog.phusion.nl/2013/01/23/the-new-rack-socket-hijacking-api/ and avoid the whole eventmachine async life. Puma works real well.
Anyway, if you need this, rely on it, and would be willing to help maintain, leave a note here.
I have an async_sinatra app mounted within the routes of a Rails app. When running capybara selenium or poltergeist specs it hangs on any async actions.
Has anyone figured out a way around this?
Thank you!
sinatra/sinatra@4d0b740#lib/sinatra/base.rb
Makes async_continue break.
app.options.async_schedules.shift
on line 81 in async/test
When I am issuing multiple request to a Sinatra instance with Async Sinatra, it seems to only handle on request at a time and blocking the others. Am I doing something wrong, or is this a bug with some particular version of thin/rack/sinatra?
I think this example should take 5-6 secs and not 25.
Example:
require 'rubygems'
require 'sinatra/async'
class MyApp < Sinatra::Base
register Sinatra::Async
set :server, 'thin'
aget '/' do
EM.add_timer(5) { body {"delayed for 5 seconds" } }
end
end
MyApp.run!
And ab gives me:
ab -n 5 http://127.0.0.1:4567/
Time taken for tests: 25.230 seconds
Hi there.
Since upgrading Sinatra to 1.3.3, the test module cannot determine that the application is a Sinatra::Base.
The application itself works fine, it's just the test suite that no longer works.
Minimal scenario to replicate is located here: https://gist.github.com/3464182
Cheers.
In the 0.5.0 build, there's a rack 1.2.1 dependency which isn't necessary because of the Sinatra => 1.0.x dependency. This will break things if running async_sinatra in a Rails 2.3.x environment. Its pretty easy to just remove rack from the dependencies and let whatever version of Sinatra you're using deal with that. Perhaps you meant to add this only as a development dependency for Rack::Test?
Hi,
I just wonder if you could give some details related to testing Sinatra apps using async_sinatra. I just rolled my own (simple) solution at http://github.com/crohr/rack-async2sync which is a rack middleware that exposes the asynchronous requests as if they were synchronous (by catching the throw(:async) call). This allows using Rack::Test transparently however I'm not sure whether this is the correct approach or not.
Thanks,
Cyril
full codes: https://gist.github.com/867967
i tried modify lib/sinatra/async/test.rb:81 from options
to settings
, but it failed with:
NoMethodError:
undefined method async_schedules' for AsyncTest:Class # /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/async_sinatra-0.5.0/lib/sinatra/async/test.rb:81:in
async_continue'
# /home/ayaya/.rvm/gems/ruby-1.9.2-p180/gems/async_sinatra-0.5.0/lib/sinatra/async/test.rb:59:in aget' # ./spec/metals/async_test_spec.rb:14:in
block (3 levels) in <top (required)>'
I noticed that EM::FileStreamer requires a connection to be passed to it as an initialization argument. Is it possible to get a handle to the current connection in order to pass it to filestreamer?
Hi,
If multiple routes are defined with the same path but different condition clauses, async routes all requests for the path to the very last definition.
Test code & possible fix: https://gist.github.com/723577
When using async_sinatra requests are not logged to Thin log file. Is it by design? Any workaround?
I've tried the example code and I could only make it run with thin.
Whenever I try to execute it with rainbows, puma or zbatery This is the output I get:
I, [2013-09-27T14:00:11.622946 #22958] INFO -- : listening on addr=0.0.0.0:8080 fd=9
I, [2013-09-27T14:00:11.623052 #22958] INFO -- : worker=0 spawning...
I, [2013-09-27T14:00:11.623893 #22958] INFO -- : master process ready
I, [2013-09-27T14:00:11.625906 #22960] INFO -- : worker=0 spawned pid=22960
I, [2013-09-27T14:00:11.626466 #22960] INFO -- : Refreshing Gem list
I, [2013-09-27T14:00:11.686086 #22960] INFO -- : Rainbows! Base worker_connections=1
I, [2013-09-27T14:00:11.686161 #22960] INFO -- : worker=0 ready
NameError - uninitialized constant Sinatra::Async::Helpers::EM:
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:132:in `native_async_schedule'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:124:in `async_schedule'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:142:in `async_runner'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:68:in `block in aroute'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/showexceptions.rb:21:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1726:in `synchronize'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/lint.rb:49:in `_call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/showexceptions.rb:24:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/chunked.rb:43:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/max_body.rb:66:in `block in call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/max_body.rb:59:in `catch'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/max_body.rb:59:in `call'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/process_client.rb:44:in `process_loop'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/base.rb:32:in `process_client'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632:in `worker_loop'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/http_server.rb:45:in `worker_loop'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/lib/rainbows/http_server.rb:61:in `spawn_missing_workers'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142:in `start'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rainbows-4.5.0/bin/rainbows:127:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p247/bin/rainbows:23:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p247/bin/rainbows:23:in `<main>'
/usr/local/rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'
127.0.0.1 - - [27/Sep/2013 14:00:26] "GET / HTTP/1.1" 500 174534 0.0598
Take a look, very odd (or not): http://pastie.org/1742202
Tested with 1.9.2p180 via RVM.
Quick correction: "be" is an alias for "bundle exec".
When I try to run the tests for async_sinatra 0.4.0 I get the following failures:
assert_redirect' ./test/test_async.rb:187:in
test_aredirect']:diff:
? http://example.org/
assert_redirect' ./test/test_async.rb:195:in
test_emredirect']:diff:
? http://example.org/
assert_redirect' ./test/test_async.rb:180:in
test_redirect']:diff:
? http://example.org/
Please let me know if you need more information to further diagnose this.
Seems like async_sinatra responds with a body when a HEAD request is made, where regular Sinatra works fine.
require 'sinatra/async'
class TestServer < Sinatra::Base
register Sinatra::Async
aget '/' do
body('hello')
end
end
TestServer.run!
>ruby -e "require 'socket'; s=TCPSocket.open('localhost',4567); s.write(\"HEAD / HTTP/1.0\r\n\r\n\"); while((d=s.recv(1)).length>0) do print(d); end"
HTTP/1.1 200 OK
Content-Length: 5
Connection: close
Server: thin 1.2.11 codename Bat-Shit Crazy
hello
Is there a specific reason for dependency on rack version 1.4.5?
I see that you've been looking for a maintainer for like two years, so you might not be answering these anymore. But I thought I might ask. My question is originally posted on Stack Overflow here.
Basically, I need to communicate with another server that only uses websockets, which means I need to wait for its messages, then wait for it to close, and then send the HTTP response to the client, based on that information. I'm using async_sinatra for this, but when I call the body
method within the websocket logic, nothing happens.
test_async.rb fails with this error with EventMachine 0.12.10. I believe the fix is to change "EM.tick_loop" to "EM.next_tick" in lib/sinatra/async/test.rb:61.
test_em_halt(TestSinatraAsync):
NoMethodError: undefined method tick_loop' for EventMachine:Module /opt/local/lib/ruby/gems/1.8/gems/async_sinatra-0.2.1/lib/sinatra/async/test.rb:61 /opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
call'
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine' /opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run'
/opt/local/lib/ruby/gems/1.8/gems/async_sinatra-0.2.1/lib/sinatra/async/test.rb:59:in `em_async_continue'
If an exception appears within the code of a route's block Im not able to see info about it because (I believe) another exception occurs while sinatra-async
tries to send the exception to be displayed, here is the full traceback:
== Sinatra/1.4.5 has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop
Stopping ...
== Sinatra has ended his set (crowd applauds)
/Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.4.5/lib/sinatra/show_exceptions.rb:37:in `rescue in call': undefined method `join' for #<String:0x007fbab19fc6a8> (NoMethodError)
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.4.5/lib/sinatra/show_exceptions.rb:21:in `call'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:169:in `rescue in async_handle_exception'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:165:in `async_handle_exception'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:155:in `async_catch_execute'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/async_sinatra-1.1.0/lib/sinatra/async.rb:124:in `block in async_schedule'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-1.0.7/lib/eventmachine.rb:968:in `call'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-1.0.7/lib/eventmachine.rb:968:in `block in run_deferred_callbacks'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-1.0.7/lib/eventmachine.rb:965:in `times'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-1.0.7/lib/eventmachine.rb:965:in `run_deferred_callbacks'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/rack-1.6.0/lib/rack/handler/thin.rb:19:in `run'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.4.5/lib/sinatra/base.rb:1497:in `start_server'
from /Users/messutiEdd/.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.4.5/lib/sinatra/base.rb:1435:in `run!'
from app.rb:19:in `<class:AsyncTest>'
from app.rb:3:in `<main>'
I'm able to reproduce this with the basic example app from the readme:
require 'sinatra/async'
class AsyncTest < Sinatra::Base
register Sinatra::Async
aget '/' do
body "hello async"
end
aget '/error' do
throw "boom"
body "hello async"
end
aget '/delay/:n' do |n|
EM.add_timer(n.to_i) { body { "delayed for #{n} seconds" } }
end
run!
end
AsyncTest.new
Trying to run the test provided in the async_sinatra 0.3.0 I get the following error:
@@@
rake aborted!
can't convert nil into String
/var/tmp/portage/dev-ruby/async_sinatra-0.3.0/work/all/async_sinatra-0.3.0/Rakefile:11:in `read'
@@@
It looks like the gemspec file is missing from the gem distribution.
Title says it all:
require 'sinatra/async'
class TestServer < Sinatra::Base
register Sinatra::Async
before do
puts 'before'
end
after do
puts 'after'
end
aget '/1' do
puts 'aget /1'
body ''
end
get '/2' do
puts 'get /2'
''
end
end
TestServer.run!
http://localhost:4567/1 prints:
before
after
aget /1
http://localhost:4567/2 prints:
before
get /2
after
redirect throws unhandled exception
Sinatra v 0.9.4
This gist explains it:
https://gist.github.com/3464182/6847ae1affb6dc5c2be960dbd5936d31107407f7
Failures: 1) MyApp can access the base route. Failure/Error: aget '/' RuntimeError: Cannot determine sinatra application from #>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :xss_mode=>:block, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :xss_mode=>:block, :frame_options=>:sameorigin, :except=>[:session_hijacking, :remote_token]}>, @level=1>, @logger=nil>>> # ./app_spec.rb:20:in `block (2 levels) in ' Finished in 0.05393 seconds 1 example, 1 failure
Sinatra version is at 1.3.3
async_sinatra (1.0.0)
rspec-core (2.12.2)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.