optimus_prime 4.1.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6183252fd738e135c91b166b1be330e2ad80dea3
4
- data.tar.gz: 0737ee9758766fd5c889f209a506ef03356f7879
3
+ metadata.gz: 93b4506c14103891ac41d093d4cdbe7fd91ddfba
4
+ data.tar.gz: 06684c6422755e5823ee7a3d57570332c5ad1b59
5
5
  SHA512:
6
- metadata.gz: c88d2ad32180bd904e74c102710e89726fc31fdc9facc8f40a3cbd647b91b23c975ef96d4fc02f6c7330fdf05f1718eb91125ea023bdbbb3c0990f11351cb1e1
7
- data.tar.gz: 1a9410d7f42e1f270aa35393d94a5fb24722b887ac82344c7d4cc7b08189dfce66e809369abff9f9197035c1704b07859a3ab2e71bb33d19d6ca943337c5b13d
6
+ metadata.gz: 7af00a76f3f77e393444c860fac755b6a8585023fb57dec780ac080f44f41dce37f0d16a49bcb7adf0dc834bd4a050f640c2577e04c0d29e335bb91c022954a7
7
+ data.tar.gz: 841e4e8de2804ec5a59f48dbd17e31320b37f9d485ce2deaaaf9d3517ee0329012511639668295cc78296b2cb438c99e3dd0084f32ca017f9d45bb574b7155ed
checksums.yaml.gz.sig CHANGED
@@ -1,5 +1,2 @@
1
- �~���?�%�բ>ŋ������/��,1N��5^�
2
- Yf��(l��<. ���j�vU^��,�gl`�8�sq[��-7�n��T���Av�����Du{��bF�U�˗���%o���D1M�7��/����‹h��� �\Y�8P���~
3
- �Inv�&�E\!��ʰ�h���Zeo�7��h8�x9�HUp�zr
4
- ��� �J�y��%
5
- qP�L�3�+��&��)W��Ǽ�����7� w����
1
+ 5�V���x�3��
2
+ u`�_mD�$B���"�{e
@@ -154,7 +154,10 @@ module OptimusPrime
154
154
 
155
155
  def record_request(path, body)
156
156
  requests[path][:count] += 1
157
- request_made = { method: self.env["REQUEST_METHOD"], body: body, headers: { content_type: request.content_type, accept: request.accept, cookies: request.cookies } }
157
+ cookies = request.cookies
158
+ cookies.merge!(CGI::Cookie::parse(env["HTTP_X_COOKIES"]))
159
+
160
+ request_made = { method: self.env["REQUEST_METHOD"], body: body, headers: { content_type: request.content_type, accept: request.accept, cookies: cookies } }
158
161
  @@requests[path][:last_request] = request_made
159
162
  end
160
163
 
@@ -1,3 +1,3 @@
1
1
  module OptimusPrime
2
- VERSION = "4.1.0"
2
+ VERSION = "4.2.0"
3
3
  end
data/optimus_prime.log CHANGED
@@ -12834,3 +12834,242 @@ JSON::ParserError - 757: unexpected token at 'status=YES':
12834
12834
  /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
12835
12835
  /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
12836
12836
  Exiting!
12837
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12838
+ Using rack adapter
12839
+ Thin web server (v1.6.3 codename Protein Powder)
12840
+ Debugging ON
12841
+ Maximum connections set to 1024
12842
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12843
+ Exiting!
12844
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12845
+ Using rack adapter
12846
+ Thin web server (v1.6.3 codename Protein Powder)
12847
+ Debugging ON
12848
+ Maximum connections set to 1024
12849
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12850
+ Exiting!
12851
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12852
+ Using rack adapter
12853
+ Thin web server (v1.6.3 codename Protein Powder)
12854
+ Debugging ON
12855
+ Maximum connections set to 1024
12856
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12857
+ Exiting!
12858
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12859
+ Using rack adapter
12860
+ Thin web server (v1.6.3 codename Protein Powder)
12861
+ Debugging ON
12862
+ Maximum connections set to 1024
12863
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12864
+ Exiting!
12865
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12866
+ Using rack adapter
12867
+ Thin web server (v1.6.3 codename Protein Powder)
12868
+ Debugging ON
12869
+ Maximum connections set to 1024
12870
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12871
+ Exiting!
12872
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12873
+ Using rack adapter
12874
+ Thin web server (v1.6.3 codename Protein Powder)
12875
+ Debugging ON
12876
+ Maximum connections set to 1024
12877
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12878
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
12879
+ Using rack adapter
12880
+ Thin web server (v1.6.3 codename Protein Powder)
12881
+ Debugging ON
12882
+ Maximum connections set to 1024
12883
+ Listening on 0.0.0.0:7003, CTRL+C to stop
12884
+ TypeError - no implicit conversion of nil into String:
12885
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:158:in `concat'
12886
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:158:in `record_request'
12887
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:115:in `block in <class:Server>'
12888
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call'
12889
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!'
12890
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]'
12891
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!'
12892
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval'
12893
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!'
12894
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route'
12895
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch'
12896
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route'
12897
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!'
12898
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each'
12899
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!'
12900
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!'
12901
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
12902
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
12903
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
12904
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!'
12905
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!'
12906
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
12907
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
12908
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
12909
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!'
12910
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call'
12911
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
12912
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
12913
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
12914
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
12915
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
12916
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
12917
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
12918
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
12919
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
12920
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
12921
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
12922
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
12923
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
12924
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
12925
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
12926
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
12927
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
12928
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
12929
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
12930
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
12931
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
12932
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
12933
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/controllers/controller.rb:87:in `start'
12934
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/runner.rb:200:in `run_command'
12935
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/runner.rb:156:in `run!'
12936
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/bin/thin:6:in `<top (required)>'
12937
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
12938
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
12939
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
12940
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
12941
+ TypeError - no implicit conversion of nil into String:
12942
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:158:in `concat'
12943
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:158:in `record_request'
12944
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:115:in `block in <class:Server>'
12945
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call'
12946
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!'
12947
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]'
12948
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!'
12949
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval'
12950
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!'
12951
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route'
12952
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch'
12953
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route'
12954
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!'
12955
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each'
12956
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!'
12957
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!'
12958
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
12959
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
12960
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
12961
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!'
12962
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!'
12963
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
12964
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
12965
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
12966
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!'
12967
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call'
12968
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
12969
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
12970
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
12971
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
12972
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
12973
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
12974
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
12975
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
12976
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
12977
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
12978
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
12979
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
12980
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
12981
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
12982
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
12983
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
12984
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
12985
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
12986
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
12987
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
12988
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
12989
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
12990
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/controllers/controller.rb:87:in `start'
12991
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/runner.rb:200:in `run_command'
12992
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/runner.rb:156:in `run!'
12993
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/bin/thin:6:in `<top (required)>'
12994
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
12995
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
12996
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
12997
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
12998
+ Exiting!
12999
+ Writing PID to /Users/saturn/dev/optimus_prime/tmp/pids/optimus_prime.pid
13000
+ Using rack adapter
13001
+ Thin web server (v1.6.3 codename Protein Powder)
13002
+ Debugging ON
13003
+ Maximum connections set to 1024
13004
+ Listening on 0.0.0.0:7003, CTRL+C to stop
13005
+
13006
+ From: /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb @ line 158 OptimusPrime::Server#record_request:
13007
+
13008
+ 155: def record_request(path, body)
13009
+ 156: requests[path][:count] += 1
13010
+ 157: require 'pry'
13011
+ => 158: binding.pry
13012
+ 159: cookies = request.cookies.to_s
13013
+ 160: cookies.concat(env["X_COOKIES"])
13014
+ 161: request_made = { method: self.env["REQUEST_METHOD"], body: body, headers: { content_type: request.content_type, accept: request.accept, cookies: cookies } }
13015
+ 162: @@requests[path][:last_request] = request_made
13016
+ 163: end
13017
+
13018
+ [?1034h[1] pry(#<OptimusPrime::Server>)> TypeError - no implicit conversion of nil into String:
13019
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:160:in `concat'
13020
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:160:in `record_request'
13021
+ /Users/saturn/dev/optimus_prime/lib/optimus_prime/server.rb:115:in `block in <class:Server>'
13022
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call'
13023
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!'
13024
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]'
13025
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!'
13026
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval'
13027
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!'
13028
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route'
13029
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch'
13030
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route'
13031
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!'
13032
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each'
13033
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!'
13034
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!'
13035
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
13036
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
13037
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
13038
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!'
13039
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!'
13040
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
13041
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
13042
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
13043
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!'
13044
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call'
13045
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
13046
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
13047
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
13048
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
13049
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
13050
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
13051
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
13052
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
13053
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
13054
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
13055
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
13056
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
13057
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
13058
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
13059
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
13060
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
13061
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
13062
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
13063
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
13064
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
13065
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
13066
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
13067
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/controllers/controller.rb:87:in `start'
13068
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/runner.rb:200:in `run_command'
13069
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/lib/thin/runner.rb:156:in `run!'
13070
+ /Users/saturn/.rvm/gems/ruby-2.1.1/gems/thin-1.6.3/bin/thin:6:in `<top (required)>'
13071
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
13072
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
13073
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
13074
+ /Users/saturn/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
13075
+ Exiting!
@@ -14,6 +14,15 @@ describe OptimusPrime do
14
14
  expect( op.prime("test").status ).to eq 201
15
15
  end
16
16
 
17
+ it "records the custom X-Cookies header" do
18
+ op.prime('custom-x-header', '{}', content_type: :json)
19
+
20
+ ::Faraday.new("http://localhost:7003").tap {|c| c.headers = { "X-Cookies" => "myCookie=true;" } }.get('/get/custom-x-header')
21
+ response = op.last_request_for('custom-x-header')
22
+
23
+ expect(response["headers"]["cookies"]["myCookie"][0]).to eq("true")
24
+ end
25
+
17
26
  it "primes an endpoint with attributes" do
18
27
  op.prime("test", "I am a response", content_type: "text/html")
19
28
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimus_prime
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Nalesso
@@ -31,7 +31,7 @@ cert_chain:
31
31
  +rCPh7Ea/RjeMlQGsgTMRuiTC+CQTmDPAz9LisgDHBdBlcXTiHT3BoqeqyTXM16Y
32
32
  bFu6DX3TgwVQy/O7nDXNRlOh
33
33
  -----END CERTIFICATE-----
34
- date: 2014-12-15 00:00:00.000000000 Z
34
+ date: 2014-12-16 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
metadata.gz.sig CHANGED
Binary file