optimus_prime 4.10.6 → 4.10.8
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 -5
- data/lib/optimus_prime/version.rb +1 -1
- data/tags +4 -5
- data.tar.gz.sig +0 -0
- 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: 1f0528de4eba03d1a520693be7840d5f3f2156db
|
4
|
+
data.tar.gz: 5daf611b38482c680274d2d3fa1121a1a3adb009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65035d0c3a46dc930116a2efc9c941bf861bca05ec24b22fcc167b27d94f0e182aa25a7fbb19f94fbd70ce0a8fde38bc5b50fb8a3a3a40efa39e8dc9df46aa16
|
7
|
+
data.tar.gz: e82f0e098ef5355da213fd76b080a3d63dbd3dc1e678df8b3f008a0f59c95d31e42327aa7b007160522cc2971d516482247d08ca90f43c62383687f041d13517
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/optimus_prime/server.rb
CHANGED
@@ -31,7 +31,7 @@ module OptimusPrime
|
|
31
31
|
return 404
|
32
32
|
end
|
33
33
|
|
34
|
-
return response[:status_code] if response[:status_code].to_s =~ /500|404/
|
34
|
+
return response[:status_code].to_i if response[:status_code].to_s =~ /500|404/
|
35
35
|
|
36
36
|
body = parse_request(response[:content_type])
|
37
37
|
|
@@ -59,7 +59,7 @@ module OptimusPrime
|
|
59
59
|
return 404
|
60
60
|
end
|
61
61
|
|
62
|
-
return response[:status_code] if response[:status_code].to_s =~ /500|404/
|
62
|
+
return response[:status_code].to_i if response[:status_code].to_s =~ /500|404/
|
63
63
|
|
64
64
|
body = parse_request(response[:content_type])
|
65
65
|
|
@@ -89,7 +89,7 @@ module OptimusPrime
|
|
89
89
|
|
90
90
|
body = parse_request(response[:content_type])
|
91
91
|
|
92
|
-
return response[:status_code] if response[:status_code].to_s =~ /500|404/
|
92
|
+
return response[:status_code].to_i if response[:status_code].to_s =~ /500|404/
|
93
93
|
|
94
94
|
if response[:requested_with]
|
95
95
|
return 404 unless body.include?(response[:requested_with])
|
@@ -116,7 +116,7 @@ module OptimusPrime
|
|
116
116
|
return 404
|
117
117
|
end
|
118
118
|
|
119
|
-
return response[:status_code] if response[:status_code].to_s =~ /500|404/
|
119
|
+
return response[:status_code].to_i if response[:status_code].to_s =~ /500|404/
|
120
120
|
|
121
121
|
record_request(path, {})
|
122
122
|
|
@@ -136,7 +136,7 @@ module OptimusPrime
|
|
136
136
|
body = params["response"]
|
137
137
|
body = body.is_a?(String) ? body : body.to_json
|
138
138
|
|
139
|
-
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) }
|
139
|
+
responses[path] = { content_type: (params["content_type"] || :html), body: body, status_code: (params["status_code"].to_i || 200), requested_with: (params["requested_with"] || false), sleep: (params["sleep"] || false), persisted: (params["persisted"] || false) }
|
140
140
|
requests[path] = { count: 0, last_request: nil }
|
141
141
|
201
|
142
142
|
end
|
data/tags
CHANGED
@@ -5,8 +5,7 @@
|
|
5
5
|
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
6
|
!_TAG_PROGRAM_VERSION 5.8 //
|
7
7
|
OptimusPrime lib/optimus_prime/version.rb /^module OptimusPrime$/;" m
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
system lib/optimus_prime.rb /^ return system("echo '\\nOptimus is already p/
|
8
|
+
JSON lib/optimus_prime/server.rb /^ params = JSON(payload.empty? ? '{}' : payloa/
|
9
|
+
parse_request lib/optimus_prime/server.rb /^ body = parse_request(response[:content_type]/
|
10
|
+
record_request lib/optimus_prime/server.rb /^ record_request(path, {})$/
|
11
|
+
sub lib/optimus_prime/server.rb /^ self.env["REQUEST_URI"].sub(\/\\\/get\\\/|\\/
|
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.10.
|
4
|
+
version: 4.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Nalesso
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
VENeDFfZVO7+QJ1CcexQChPNOenp/1hPs18XXfz7Bx/EOw69PTCudZVqj+xt3gYS
|
32
32
|
9Y/PNWqAWckM1cLwdt/PnWHI
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-08-
|
34
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|