optimus_prime 4.4.3 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/optimus_prime/server.rb +5 -1
- data/lib/optimus_prime/version.rb +1 -1
- data/optimus_prime.log +141 -0
- data/spec/lib/optimus_prime_spec.rb +8 -0
- data.tar.gz.sig +4 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6002a6846076a2ab40d1c20b4db9a1ac0e4c9f9c
|
4
|
+
data.tar.gz: ec4a56f8542382076e5078e98ea1b996ec97bd5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 987faf196d8675bddda88f8afa986d7559fac01ff4e949aeaae95ffeda84ff8d8124f1ae652e7b64eaa80cbacded161bae7fb429db6e1da0e39f5d2e3fc1f2e6
|
7
|
+
data.tar.gz: 3d3816981345f13fdc7fea338760fffc0419a6b7968a942b0139e946d8d23595268f169659ce2f2218ae0c3da64bfb53aa61e03ea547e64c3298606eb9ecfd2c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/optimus_prime/server.rb
CHANGED
@@ -131,7 +131,11 @@ module OptimusPrime
|
|
131
131
|
params = JSON(payload.empty? ? '{}' : payload)
|
132
132
|
|
133
133
|
path = params["path_name"]
|
134
|
-
|
134
|
+
|
135
|
+
body = params["response"]
|
136
|
+
body = body.is_a?(String) ? body : body.to_json
|
137
|
+
|
138
|
+
responses[path] = { content_type: (params["content_type"] || :html), body: body, status_code: (params["status_code"] || 200), requested_with: (params["requested_with"] || false), sleep: (params["sleep"] || false), persisted: (params["persisted"] || false) }
|
135
139
|
requests[path] = { count: 0, last_request: nil }
|
136
140
|
201
|
137
141
|
end
|
data/optimus_prime.log
CHANGED
@@ -17677,3 +17677,144 @@ Maximum connections set to 1024
|
|
17677
17677
|
Listening on 0.0.0.0:7002, CTRL+C to stop
|
17678
17678
|
Waiting for 1 connection(s) to finish, can take up to 30 sec, CTRL+C to stop now
|
17679
17679
|
Exiting!
|
17680
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17681
|
+
Using rack adapter
|
17682
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17683
|
+
Debugging ON
|
17684
|
+
Maximum connections set to 1024
|
17685
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17686
|
+
Exiting!
|
17687
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17688
|
+
Using rack adapter
|
17689
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17690
|
+
Debugging ON
|
17691
|
+
Maximum connections set to 1024
|
17692
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17693
|
+
Exiting!
|
17694
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17695
|
+
Using rack adapter
|
17696
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17697
|
+
Debugging ON
|
17698
|
+
Maximum connections set to 1024
|
17699
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17700
|
+
Exiting!
|
17701
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17702
|
+
Using rack adapter
|
17703
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17704
|
+
Debugging ON
|
17705
|
+
Maximum connections set to 1024
|
17706
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17707
|
+
Exiting!
|
17708
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17709
|
+
Using rack adapter
|
17710
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17711
|
+
Debugging ON
|
17712
|
+
Maximum connections set to 1024
|
17713
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17714
|
+
Exiting!
|
17715
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17716
|
+
Using rack adapter
|
17717
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17718
|
+
Debugging ON
|
17719
|
+
Maximum connections set to 1024
|
17720
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17721
|
+
Exiting!
|
17722
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17723
|
+
Using rack adapter
|
17724
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17725
|
+
Debugging ON
|
17726
|
+
Maximum connections set to 1024
|
17727
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17728
|
+
Exiting!
|
17729
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17730
|
+
Using rack adapter
|
17731
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17732
|
+
Debugging ON
|
17733
|
+
Maximum connections set to 1024
|
17734
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17735
|
+
Exiting!
|
17736
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17737
|
+
Using rack adapter
|
17738
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17739
|
+
Debugging ON
|
17740
|
+
Maximum connections set to 1024
|
17741
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17742
|
+
Exiting!
|
17743
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17744
|
+
Using rack adapter
|
17745
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17746
|
+
Debugging ON
|
17747
|
+
Maximum connections set to 1024
|
17748
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17749
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17750
|
+
Using rack adapter
|
17751
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17752
|
+
Debugging ON
|
17753
|
+
Maximum connections set to 1024
|
17754
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17755
|
+
Exiting!
|
17756
|
+
Writing PID to /Users/acnalesso/dev/all/optimus_prime/tmp/pids/optimus_prime.pid
|
17757
|
+
Using rack adapter
|
17758
|
+
Thin web server (v1.6.3 codename Protein Powder)
|
17759
|
+
Debugging ON
|
17760
|
+
Maximum connections set to 1024
|
17761
|
+
Listening on 0.0.0.0:7003, CTRL+C to stop
|
17762
|
+
JSON::ParserError - 757: unexpected token at 'status=YES':
|
17763
|
+
/Users/acnalesso/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/json/common.rb:155:in `parse'
|
17764
|
+
/Users/acnalesso/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/json/common.rb:155:in `parse'
|
17765
|
+
/Users/acnalesso/dev/all/optimus_prime/lib/optimus_prime/server.rb:215:in `parse_request'
|
17766
|
+
/Users/acnalesso/dev/all/optimus_prime/lib/optimus_prime/server.rb:90:in `block in <class:Server>'
|
17767
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call'
|
17768
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!'
|
17769
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]'
|
17770
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!'
|
17771
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval'
|
17772
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!'
|
17773
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route'
|
17774
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch'
|
17775
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route'
|
17776
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!'
|
17777
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each'
|
17778
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!'
|
17779
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!'
|
17780
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
|
17781
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
|
17782
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
|
17783
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!'
|
17784
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!'
|
17785
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
|
17786
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
|
17787
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
|
17788
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!'
|
17789
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call'
|
17790
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
|
17791
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
|
17792
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
|
17793
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
|
17794
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
|
17795
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
|
17796
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
|
17797
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
|
17798
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
|
17799
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
|
17800
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
|
17801
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
|
17802
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
|
17803
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
|
17804
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
|
17805
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
|
17806
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
|
17807
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
|
17808
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
|
17809
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
|
17810
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
|
17811
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
|
17812
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/controllers/controller.rb:87:in `start'
|
17813
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/runner.rb:200:in `run_command'
|
17814
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/lib/thin/runner.rb:156:in `run!'
|
17815
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/gems/thin-1.6.3/bin/thin:6:in `<top (required)>'
|
17816
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/bin/thin:23:in `load'
|
17817
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/bin/thin:23:in `<main>'
|
17818
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
|
17819
|
+
/Users/acnalesso/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
|
17820
|
+
Exiting!
|
@@ -14,6 +14,14 @@ describe OptimusPrime do
|
|
14
14
|
expect( op.prime("test").status ).to eq 201
|
15
15
|
end
|
16
16
|
|
17
|
+
it "converts response payload, body, to string if it is not" do
|
18
|
+
op.prime('not-a-string', { string: false }, content_type: :json)
|
19
|
+
|
20
|
+
response = ::Faraday.new("http://localhost:7003").get('/get/not-a-string').body
|
21
|
+
|
22
|
+
expect(response).to eq('{"string":false}')
|
23
|
+
end
|
24
|
+
|
17
25
|
it "records the custom X-Params header" do
|
18
26
|
op.prime('custom-x-params', '{}', content_type: :json)
|
19
27
|
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
-
|
2
|
-
�
|
3
|
-
|
1
|
+
y�<��5a u���F�|÷%��5!�
|
2
|
+
b��p�C��8��9�ڵȬ�97PZ�k��R^0���h@W�v�������r��
|
3
|
+
V�&h.u�l��Rn]�;��p�c�kyr7��!�(oϒ�pj$�ާ���8��l($�OБO��d�}��!�����=�!��2�?��
|
4
|
+
�8��_.D�߾�j�{��$�E�rk�4���@�3P���k�nCC�F�kM~rm���Jr����7 ο�V��@
|
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.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Nalesso
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
xfaQSY/+k+cXJaUpE/aBsIgIzxuVJe98YWDtAgYpmo2jKsPleBAERd2lsSnfV4hj
|
32
32
|
hAycz5zInHKNXc6zcb6ge0NC
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-06-
|
34
|
+
date: 2015-06-11 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|