Skip to content

Instantly share code, notes, and snippets.

@Electron-libre
Created July 4, 2013 14:08
Show Gist options
  • Save Electron-libre/5928099 to your computer and use it in GitHub Desktop.
Save Electron-libre/5928099 to your computer and use it in GitHub Desktop.
traces ...
[1] pry(#<Api::Openstc::DepartmentsController>)> request.session_options
=> {:path=>"/",
:domain=>nil,
:expire_after=>nil,
:secure=>false,
:httponly=>true,
:defer=>false,
:renew=>false,
:secret=>"b0509b8047175645ff907981d6772eaafec5306cedd24915236d39af143f",
:coder=>#<Rack::Session::Cookie::Base64::Marshal:0x0000000556b260>,
:id=>nil}
[2] pry(#<Api::Openstc::DepartmentsController>)> request.session_options.class
=> Rack::Session::Abstract::OptionsHash
[1] pry(#<Api::Openstc::DepartmentsController>)> request.session_options
=> #<ActionDispatch::Request::Session::Options:0x000000044f1ec0
@by=
#<ActionDispatch::Session::CookieStore:0x0000000453fb20
@app=
#<ActionDispatch::Flash:0x0000000453fb48
@app=
#<ActionDispatch::ParamsParser:0x0000000453fbe8
@app=
#<Rack::Head:0x0000000453fc10
@app=
#<Rack::ConditionalGet:0x0000000453fc38
@app=
#<Rack::ETag:0x0000000453fc60
@app=#<ActionDispatch::Routing::RouteSet:0x00000002bbd670>,
@cache_control="max-age=0, private, must-revalidate",
@no_cache_control="no-cache">>>,
@parsers=
{#<Mime::Type:0x000000029a16c0
@string="application/json",
@symbol=:json,
@synonyms=["text/x-json", "application/jsonrequest"]>=>:json}>>,
@cookie_only=true,
@default_options=
{:path=>"/",
:domain=>nil,
:expire_after=>nil,
:secure=>false,
:httponly=>true,
:defer=>false,
:renew=>false},
@key="_barakafrites_session">,
@delegate=
{:path=>"/",
:domain=>nil,
:expire_after=>nil,
:secure=>false,
:httponly=>true,
:defer=>false,
:renew=>false},
@env=
{"CONTENT_LENGTH"=>"59",
"CONTENT_TYPE"=>"application/json; charset=UTF-8",
"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"/api/openstc/departments",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"127.0.0.1",
"REQUEST_METHOD"=>"POST",
"REQUEST_URI"=>"http://localhost:3000/api/openstc/departments",
"SCRIPT_NAME"=>"",
"SERVER_NAME"=>"localhost",
"SERVER_PORT"=>"3000",
"SERVER_PROTOCOL"=>"HTTP/1.1",
"SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/2.0.0/2013-06-27)",
"HTTP_HOST"=>"localhost:3000",
"HTTP_USER_AGENT"=>
"Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0",
"HTTP_ACCEPT"=>
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"HTTP_ACCEPT_LANGUAGE"=>"null",
"HTTP_ACCEPT_ENCODING"=>"gzip, deflate",
"HTTP_AUTHORIZATION"=>"Token token=\"bf59ad855064b414038f33736b7c1832\"",
"HTTP_CONNECTION"=>"keep-alive",
"HTTP_PRAGMA"=>"no-cache",
"HTTP_CACHE_CONTROL"=>"no-cache",
"rack.version"=>[1, 2],
"rack.input"=>#<StringIO:0x007f5ce001a0b0>,
"rack.errors"=>#<IO:<STDERR>>,
"rack.multithread"=>false,
"rack.multiprocess"=>false,
"rack.run_once"=>false,
"rack.url_scheme"=>"http",
"HTTP_VERSION"=>"HTTP/1.1",
"REQUEST_PATH"=>"/api/openstc/departments",
"ORIGINAL_FULLPATH"=>"/api/openstc/departments",
"ORIGINAL_SCRIPT_NAME"=>"",
"action_dispatch.routes"=>
#<ActionDispatch::Routing::RouteSet:0x00000002bbd670>,
"action_dispatch.parameter_filter"=>[:password],
"action_dispatch.redirect_filter"=>[],
"action_dispatch.secret_token"=>
"560048a478123256e54c1da0c7b037e8e66b166d393dce00dacbdf831a3196e4758eb34d169bdd0a7868c44ca3705ac12c8dd8697cada212a93f94ce018c6039"
"action_dispatch.secret_key_base"=>nil,
"action_dispatch.show_exceptions"=>true,
"action_dispatch.show_detailed_exceptions"=>true,
"action_dispatch.logger"=>
#<ActiveSupport::Logger:0x00000002c5da58
@default_formatter=
#<Logger::Formatter:0x00000002c5da08 @datetime_format=nil>,
@formatter=
#<ActiveSupport::Logger::SimpleFormatter:0x00000002c3ec70
@datetime_format=nil>,
@level=0,
@logdev=
#<Logger::LogDevice:0x00000002c5d828
@dev=#<File:/home/cedric/Dev/Siclic/barakafrites/log/development.log>,
@filename=nil,
@mutex=
#<Logger::LogDevice::LogDeviceMutex:0x00000002c5d7b0
@mon_count=0,
@mon_mutex=#<Mutex:0x00000002c5d6e8>,
@mon_owner=nil>,
@shift_age=nil,
@shift_size=nil>,
@progname=nil>,
"action_dispatch.backtrace_cleaner"=>
#<Rails::BacktraceCleaner:0x007f5ce0031580
@filters=
[#<Proc:0x007f5ce0031058@/home/cedric/.rvm/gems/ruby-2.0.0-p247@barakafrites/gems/railties-4.0.0/lib/rails/backtrace_cleaner.rb:
#<Proc:0x007f5ce0031030@/home/cedric/.rvm/gems/ruby-2.0.0-p247@barakafrites/gems/railties-4.0.0/lib/rails/backtrace_cleaner.rb:
#<Proc:0x007f5ce0031008@/home/cedric/.rvm/gems/ruby-2.0.0-p247@barakafrites/gems/railties-4.0.0/lib/rails/backtrace_cleaner.rb:
#<Proc:0x007f5ce0030a18@/home/cedric/.rvm/gems/ruby-2.0.0-p247@barakafrites/gems/railties-4.0.0/lib/rails/backtrace_cleaner.rb:
@silencers=
[#<Proc:0x007f5ce00309f0@/home/cedric/.rvm/gems/ruby-2.0.0-p247@barakafrites/gems/railties-4.0.0/lib/rails/backtrace_cleaner.rb:
"action_dispatch.key_generator"=>
#<ActiveSupport::LegacyKeyGenerator:0x007f5ce00309a0
@secret=
"560048a478123256e54c1da0c7b037e8e66b166d393dce00dacbdf831a3196e4758eb34d169bdd0a7868c44ca3705ac12c8dd8697cada212a93f94ce018c603
"action_dispatch.http_auth_salt"=>"http authentication",
"action_dispatch.signed_cookie_salt"=>"signed cookie",
"action_dispatch.encrypted_cookie_salt"=>"encrypted cookie",
"action_dispatch.encrypted_signed_cookie_salt"=>"signed encrypted cookie",
"ROUTES_22932280_SCRIPT_NAME"=>"",
"action_dispatch.request_id"=>"a28b1446-9bbd-4f89-8ab5-e5404cc09f68",
"action_dispatch.remote_ip"=>
#<ActionDispatch::RemoteIp::GetIp:0x007f5ce0046a98
@check_ip=true,
@env={...},
@proxies=
/
^127\.0\.0\.1$ | # localhost IPv4
^::1$ | # localhost IPv6
^fc00: | # private IPv6 range fc00
^10\. | # private IPv4 range 10.x.x.x
^172\.(1[6-9]|2[0-9]|3[0-1])\.| # private IPv4 range 172.16.0.0 .. 172.31.255.255
^192\.168\. # private IPv4 range 192.168.x.x
/x>,
"rack.session"=>
#<ActionDispatch::Request::Session:0x44f1fb0 not yet loaded>,
"rack.session.options"=>
#<ActionDispatch::Request::Session::Options:0x000000044f1ec0 ...>,
"action_dispatch.request.content_type"=>
"action_dispatch.request.content_type"=>
#<Mime::Type:0x000000029a16c0
@string="application/json",
@symbol=:json,
@synonyms=["text/x-json", "application/jsonrequest"]>,
"action_dispatch.request.request_parameters"=>
{"department"=>{"name"=>"api_created", "code"=>"API"}},
"action_dispatch.request.path_parameters"=>
{:format=>"json",
:action=>"create",
:controller=>"api/openstc/departments"},
"action_controller.instance"=>
#<Api::Openstc::DepartmentsController:0x007f5ce00d5220
@_action_has_layout=true,
@_env={...},
@_headers={"Content-Type"=>"text/html"},
@_request=
#<ActionDispatch::Request:0x007f5ce00d5108
@env={...},
@filtered_env=nil,
@filtered_parameters=nil,
@filtered_path=nil,
@fullpath=nil,
@ip=nil,
@method=nil,
@original_fullpath=nil,
@port=nil,
@protocol=nil,
@remote_ip=nil,
@request_method=nil,
@symbolized_path_params=nil,
@uuid=nil>,
@_response=
#<ActionDispatch::Response:0x007f5ce00d50e0
@blank=false,
@cache_control={},
@charset=nil,
@committed=false,
@content_type=nil,
@cv=
#<MonitorMixin::ConditionVariable:0x007f5ce00d4fa0
@cond=
#<ConditionVariable:0x007f5ce00d4f50
@waiters={},
@waiters_mutex=#<Mutex:0x007f5ce00d4f00>>,
@monitor=#<ActionDispatch::Response:0x007f5ce00d50e0 ...>>,
@etag=nil,
@header=
{"X-Frame-Options"=>"SAMEORIGIN",
"X-XSS-Protection"=>"1; mode=block",
"X-Content-Type-Options"=>"nosniff",
"X-UA-Compatible"=>"chrome=1"},
@mon_count=0,
@mon_mutex=#<Mutex:0x007f5ce00d5040>,
@mon_owner=nil,
@request=
#<ActionDispatch::Request:0x007f5ce00d5108
@env={...},
@filtered_env=nil,
@filtered_parameters=nil,
@filtered_path=nil,
@fullpath=nil,
@ip=nil,
@method=nil,
@original_fullpath=nil,
@port=nil,
@protocol=nil,
@remote_ip=nil,
@request_method=nil,
@symbolized_path_params=nil,
@uuid=nil>,
@sending_file=false,
@status=200,
@stream=
#<ActionDispatch::Response::Buffer:0x007f5ce00d4fc8
@buf=[],
@closed=false,
@response=#<ActionDispatch::Response:0x007f5ce00d50e0 ...>>>,
@_routes=nil,
@_status=200>}>
[2] pry(#<Api::Openstc::DepartmentsController>)> request.session_options.class
=> ActionDispatch::Request::Session::Options
pry(#<SessionManagementTest::SpecializedController>)> request.session_options
=> {:key=>"rack.session",
:path=>"/",
:domain=>nil,
:expire_after=>nil,
:secure=>false,
:httponly=>true,
:defer=>false,
:renew=>false,
:sidbits=>128,
:cookie_only=>true,
:secure_random=>SecureRandom,
:id=>"63f0d8ba64959f1a6490529ed4c66014"}
[3] pry(#<SessionManagementTest::SpecializedController>)> request.session_options.class
=> Hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment