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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce9ac920bfbc9929ad8569fe4210c3d071365890
4
- data.tar.gz: 7d0f491e07a2f3adf5e0683801be9d1635100e7c
3
+ metadata.gz: 1f0528de4eba03d1a520693be7840d5f3f2156db
4
+ data.tar.gz: 5daf611b38482c680274d2d3fa1121a1a3adb009
5
5
  SHA512:
6
- metadata.gz: c4cffddb6727929aa5328207bc4c18d0a15a030079760234dce26940650bb98ae52229c6d88a6c2b16d8ee459aca3b709e838c53645163644d82fd80041f88b5
7
- data.tar.gz: e34ef42a3dd78d1a46819b8255574c7a824e639f831a316d3d938bd57b700ec2476437adae67f06a8a2c6fc42fb152b548973306145acef3960181c34714e8bb
6
+ metadata.gz: 65035d0c3a46dc930116a2efc9c941bf861bca05ec24b22fcc167b27d94f0e182aa25a7fbb19f94fbd70ce0a8fde38bc5b50fb8a3a3a40efa39e8dc9df46aa16
7
+ data.tar.gz: e82f0e098ef5355da213fd76b080a3d63dbd3dc1e678df8b3f008a0f59c95d31e42327aa7b007160522cc2971d516482247d08ca90f43c62383687f041d13517
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
@@ -1,3 +1,3 @@
1
1
  module OptimusPrime
2
- VERSION = "4.10.6"
2
+ VERSION = "4.10.8"
3
3
  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
- call lib/optimus_prime.rb /^ def call(env)$/
9
- get lib/optimus_prime.rb /^ ::Faraday.get("http:\/\/localhost:#{op_port}/
10
- prime lib/optimus_prime.rb /^ def prime(path_name, response="", options={})$/
11
- sleep lib/optimus_prime.rb /^ sleep(0.1)$/
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.6
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-10 00:00:00.000000000 Z
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