optimus_prime 2.1.1 → 2.1.2

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: 17caf6649ea375c745d42d3344df5a31eb2ee0c5
4
- data.tar.gz: 22ff5ee79f6494cae2c55d521a1614591e2fe8cf
3
+ metadata.gz: a4cfed466df85b63163c9133130170eb7e7aebe7
4
+ data.tar.gz: 295b07a948251dbff489158ac0f2f139584d6d53
5
5
  SHA512:
6
- metadata.gz: 8f50d19338be070a1066a585b2c89be054e63eee8614994e9510c7fbc7c8057c1e98cb1110922685a3e2d69b8598879fd011b0083cf287597b4bfb952a343841
7
- data.tar.gz: 8dc2d7473e21291fea08fb495b29a4ed2bd4158afdf449edfb1b88e577c686a5d1ccc0202d5444797ddfe245f87ada33f4713ce59b7515d9d01fecf58e8e1739
6
+ metadata.gz: ad6c79f94adcf936127c7167512dcd4cdea66cbce6f8bdc86bdadfeaf76bcaf421d3c9c02b109af6bc4a4d141be76de2c3e6b240368ffc1f66dbaa3b9023660b
7
+ data.tar.gz: 6171e2c2fb9de34ca1e46d6db85fb1b8497f9fd5fe2fcdc4f96136d86e77be0c1d86116851d95b805a453c984b441d5541e9022e2643200a53e090b137a0ac2d
data/README.md CHANGED
@@ -137,15 +137,15 @@ By default OptimusPrime sets <code>wait_for</code> flag to 3 seconds.
137
137
  op.last_request_for('your/endpoint') #=> ["method" => "GET", "body" => "some=data", "headers" => { "content_type": "", accept: [] } ]
138
138
  ```
139
139
 
140
- ## Passing expectations
140
+ ## Waiting for requests
141
141
  Sometimes your ajax requests may take a while to fire when running on Continuous Integration Platforms like cicleCI for example.
142
- Optimus Prime allows you to set a expectation that a request will be made within a given time.
142
+ Optimus Prime will return requests made within a given time for you to set your own expectations.
143
143
 
144
144
  ```ruby
145
145
  op = OptimusPrime.new(wait_for: 3)
146
146
 
147
- op.expect("path_name") do |response|
148
- expect( response["body"] ).to include("CALLED")
147
+ op.wait_until_request("path_name") do |request|
148
+ expect( request["body"] ).to include("CALLED")
149
149
  end
150
150
  ```
151
151
 
@@ -1,3 +1,3 @@
1
1
  module OptimusPrime
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.2"
3
3
  end
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "rspec"
24
24
 
25
+ spec.add_dependency "sinatra"
25
26
  spec.add_dependency "thin"
26
27
  spec.add_dependency "faraday"
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimus_prime
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Nalesso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
11
+ date: 2014-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sinatra
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: thin
57
71
  requirement: !ruby/object:Gem::Requirement