inspect_request 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +14 -2
- data/lib/inspect_request/version.rb +1 -1
- data/lib/inspect_request.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6abde53a7e052c38f001e03a0a5f79e6ed8302ac
|
4
|
+
data.tar.gz: 48b1b558b118fa00432a7d801b3d30556f2e3b86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28fefa4b276bfe6b80f0f7fa5d8b4e9563bc47d6059965c5e0bf65c0588a3242e0c0244781cb7bfd1b30589081163d1416e696acd32831edd2eb3882e4be734a
|
7
|
+
data.tar.gz: 8ddb64164fa1d02bc7ca6859349083178de80603b914010397dfb80e751213522c2605ca7a6036a015c1edc8f6e7ac555b615e05de15a7754149a71e2e01ca4e
|
data/Gemfile.lock
CHANGED
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
|
-
|
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.
|
data/lib/inspect_request.rb
CHANGED