optic-middleware 0.1.3 → 0.2.0
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 +4 -4
- data/Publishing.md +7 -0
- data/lib/optic/middleware.rb +3 -2
- data/lib/optic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a476e26d11943ca30db41238583f8ac92700e0d6d142c1f949e540af377964c
|
|
4
|
+
data.tar.gz: 7737b66a4d925307dc54eddd7cca27af8af796ce33fe91f552984b56bd7d05ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1303b13a47a45ac6c842677f8af9a2e1161660d9ab27baa0b2bdf5f95bf4cf93c421568eda3cb06b7b70044780cab2b5ea1bdedf5b632276cb8d5647ee1ee8e9
|
|
7
|
+
data.tar.gz: 3b5a708e36aa50e994c0fe9c0d03c75ba9a1a63ad194ffec9f866b7b9c802389609ca2407ae60a7cee7a00b2ccf91d0870a6fc7a807b4b1e16f9cd0450c83737
|
data/Publishing.md
CHANGED
data/lib/optic/middleware.rb
CHANGED
|
@@ -6,6 +6,7 @@ module Optic
|
|
|
6
6
|
def initialize(app, options = {})
|
|
7
7
|
@app = app
|
|
8
8
|
@app.freeze
|
|
9
|
+
@host = ENV['OPTIC_SERVER_HOST'] || 'localhost'
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
def call(env)
|
|
@@ -49,7 +50,7 @@ module Optic
|
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
# Send request to request logging endpoint
|
|
52
|
-
http = Net::HTTP.new(
|
|
53
|
+
http = Net::HTTP.new(@host, 30334)
|
|
53
54
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
54
55
|
|
|
55
56
|
logging_request_response = http.start do
|
|
@@ -74,7 +75,7 @@ module Optic
|
|
|
74
75
|
logging_response.content_length = bodyData.bytesize.to_s
|
|
75
76
|
end
|
|
76
77
|
|
|
77
|
-
http = Net::HTTP.new(
|
|
78
|
+
http = Net::HTTP.new(@host, 30335)
|
|
78
79
|
logging_response_response = http.start do
|
|
79
80
|
http.request(logging_response)
|
|
80
81
|
end
|
data/lib/optic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: optic-middleware
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aidan Cunniffe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|