optimus_prime 1.5.1 → 2.0.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: dfc3bf739f61b2346d837a94146d8d0284a63ec8
4
- data.tar.gz: d177ce8ddc86d17e084d0091b290066a90f7e317
3
+ metadata.gz: 4b3135b64d78fbfc82b6e95728b246c98b5f7d4e
4
+ data.tar.gz: e4e4d81b833d88ae6f5664241e92982fda0d7eea
5
5
  SHA512:
6
- metadata.gz: 6b4feaa04cf21be57842586b7f0240eadcd681f24cc97d3a83e0e3843cc76cd8894e7abe7f56a22c4521a021965b5cf0497f4da6bcf72eb887e8fe44367535b9
7
- data.tar.gz: cd3c27f64767b2cbbcde4cee7f1ef51f58120ea2fc01fd741a05fae2ccd528147fa4bd5a8bcddc7633d787ba3768cd66776c1df91fb98b2bdac2cbc98be4f1fd
6
+ metadata.gz: 5e8113aaa90279f42911eeaf9b85bdf3dd7b8a71b1b1bed18d5d9f0a818742228288ff7aea4b14f658abcdb70a73dc6d82bf9fa58bd8b17a14df5ff492dab58c
7
+ data.tar.gz: 4923245beaf1e72e8be3a7528d153ed92c35516cac9e9d840af2d72b717e04e1dd70791c1e201019138ac49be5936967fe1af6ad8505b37c7cc2a5b42ac6153e
data/README.md CHANGED
@@ -26,10 +26,12 @@ to it and get the desired response.
26
26
  * localhost:7003 -> TEST default endpoint
27
27
  * returns 200 status code for GET,POST
28
28
  * sets content-type to text
29
+ * wait_for is 3 seconds
29
30
 
30
31
  ## HTTP allowed requests
31
32
  * GET
32
33
  * POST
34
+ * PUT
33
35
 
34
36
  # Usage
35
37
  ```ruby
@@ -127,12 +129,17 @@ By default OptimusPrime sets <code>wait_for</code> flag to 3 seconds.
127
129
  # GET Requests
128
130
  op.prime('your/endpoint')
129
131
  Faraday.get("http://localhost:7002/get/your/endpoint")
130
- op.requests('your/endpoint') #=> ["method" => "GET", "body" => ""]
132
+ op.last_request_for('your/endpoint') #=> ["method" => "GET", "body" => ""]
131
133
 
132
134
  # POST Requests
133
135
  op.prime('your/endpoint')
134
136
  Faraday.post("http://localhost:7002/get/your/endpoint", {some: "data"})
135
- op.requests('your/endpoint') #=> ["method" => "GET", "body" => "some=data", "headers" => { "content_type": "", accept: [] } ]
137
+ op.last_request_for('your/endpoint') #=> ["method" => "GET", "body" => "some=data", "headers" => { "content_type": "", accept: [] } ]
138
+ ```
139
+
140
+ ## Clear all requests
141
+ ```ruby
142
+ op.clear
136
143
  ```
137
144
 
138
145
  ## TODO
@@ -1,3 +1,3 @@
1
1
  module OptimusPrime
2
- VERSION = "1.5.1"
2
+ VERSION = "2.0.0"
3
3
  end
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: 1.5.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Nalesso