inspect_request 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b47b554290fe5fcbad88bb503676d086ed8908e
4
- data.tar.gz: cb258de71c477edf2f502553a5b2d94653790f4f
3
+ metadata.gz: 6abde53a7e052c38f001e03a0a5f79e6ed8302ac
4
+ data.tar.gz: 48b1b558b118fa00432a7d801b3d30556f2e3b86
5
5
  SHA512:
6
- metadata.gz: 7f01ced3e1393be34bf609447af3de6f09fc7474e2107bc394ca1e110ad511dfc2348158d5ce7ef86977e57b883a525170055f630c05d30a3b3331f0653788f1
7
- data.tar.gz: 9e909b5f1969e5f7d8ec98503bc66b995e800b335d3db678a740e42e8f40ffcc3b54bfb2019edb4f29e74e2cd3e9da69519b452f7a6f016a6371cf5c297e3cdb
6
+ metadata.gz: 28fefa4b276bfe6b80f0f7fa5d8b4e9563bc47d6059965c5e0bf65c0588a3242e0c0244781cb7bfd1b30589081163d1416e696acd32831edd2eb3882e4be734a
7
+ data.tar.gz: 8ddb64164fa1d02bc7ca6859349083178de80603b914010397dfb80e751213522c2605ca7a6036a015c1edc8f6e7ac555b615e05de15a7754149a71e2e01ca4e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- inspect_request (0.1.1)
4
+ inspect_request (0.1.2)
5
5
  ritm (~> 1.0.3)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -24,19 +24,31 @@ Or install it yourself as:
24
24
 
25
25
  ## Usage
26
26
 
27
- ```
27
+ ```ruby
28
28
  require 'inspect_request'
29
+ require 'rest-client'
29
30
 
30
31
  foo = InspectRequest::Checker.new
32
+
33
+ # we can configure our proxy details similar to Ritm
34
+ foo.configure do
35
+ proxy[:bind_port] = 7777 # default port
36
+ end
37
+
31
38
  foo.verify do |req|
32
39
  req.host == 'example.org'
33
40
  end
34
41
 
42
+ # make sure to go throuh our proxy
43
+ RestClient.proxy = 'http://127.0.0.1:7777'
44
+ # send a test request
35
45
  RestClient.get 'http://example.org'
46
+
36
47
  sleep 1
37
- expect(foo.fulfilled?).to be true
48
+ foo.fulfilled? # true
38
49
  ```
39
50
 
51
+
40
52
  ## Development
41
53
 
42
54
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,3 +1,3 @@
1
1
  module InspectRequest
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
@@ -32,7 +32,9 @@ module InspectRequest
32
32
  end
33
33
 
34
34
  def configure(&block)
35
- InspectRequest.session.configure block
35
+ InspectRequest.session.send(:configure, &block)
36
+ InspectRequest.session.shutdown
37
+ InspectRequest.session.start
36
38
  end
37
39
 
38
40
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inspect_request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akhmad Fathonih