logjam_agent 0.22.0 → 0.22.1
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/lib/logjam_agent/railtie.rb +6 -5
- data/lib/logjam_agent/version.rb +1 -1
- data/lib/logjam_agent/zmq_forwarder.rb +1 -1
- data/test/zmq_forwarder_test.rb +14 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cca5098317b3d3338b67eb29ee6a1989acd7faf
|
4
|
+
data.tar.gz: 41338b77ab2e005017455c9f26a9518a76d3ccb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d348f5ca4f773be3539c7be4bb6ac973eb1b1fbb013447b1ad454cb19fff9bd331120a666bcb492544360672ea5636a8518908830fc13ef10a00b44a211268a4
|
7
|
+
data.tar.gz: f26426cf92bac9d176ceacfed0c8bc8ac74df8d4c68cf1725627a0eddde98f5fefbbcb37119eb2f30e332c22d875c47a643e82a76b29347bc4be43ccaabf5a07
|
data/lib/logjam_agent/railtie.rb
CHANGED
@@ -78,16 +78,17 @@ module LogjamAgent
|
|
78
78
|
# patch controller testing to create a logjam request, because middlewares aren't executed
|
79
79
|
if Rails.env.test?
|
80
80
|
ActiveSupport.on_load(:action_controller) do
|
81
|
-
|
82
|
-
|
81
|
+
require 'action_controller/test_case'
|
82
|
+
module ActionController::TestCase::Behavior
|
83
|
+
def process_with_logjam(*args)
|
83
84
|
LogjamAgent.start_request
|
84
|
-
|
85
|
+
process_without_logjam(*args)
|
85
86
|
ensure
|
86
87
|
LogjamAgent.finish_request
|
87
88
|
end
|
89
|
+
alias_method :process_without_logjam, :process
|
90
|
+
alias_method :process, :process_with_logjam
|
88
91
|
end
|
89
|
-
require 'action_controller/test_case'
|
90
|
-
ActionController::TestCase.prepend TestWithLogjamStartRequest
|
91
92
|
end
|
92
93
|
end
|
93
94
|
end
|
data/lib/logjam_agent/version.rb
CHANGED
data/test/zmq_forwarder_test.rb
CHANGED
@@ -7,14 +7,24 @@ module LogjamAgent
|
|
7
7
|
LogjamAgent.compression_method = NO_COMPRESSION
|
8
8
|
end
|
9
9
|
|
10
|
-
test "sets up single connection with default port" do
|
10
|
+
test "sets up single push connection with default port" do
|
11
11
|
f = ZMQForwarder.new(:host => "a.b.c", :port => 3001)
|
12
|
-
assert_equal ["tcp://a.b.c:3001"], f.
|
12
|
+
assert_equal ["tcp://a.b.c:3001"], f.push_connection_specs
|
13
13
|
end
|
14
14
|
|
15
|
-
test "sets up multiple connections" do
|
15
|
+
test "sets up multiple push connections" do
|
16
16
|
f = ZMQForwarder.new(:host => "a.b.c,tcp://x.y.z:9000,zmq.gnu.org:600")
|
17
|
-
assert_equal %w(tcp://a.b.c:9605 tcp://x.y.z:9000 tcp://zmq.gnu.org:600), f.
|
17
|
+
assert_equal %w(tcp://a.b.c:9605 tcp://x.y.z:9000 tcp://zmq.gnu.org:600), f.push_connection_specs
|
18
|
+
end
|
19
|
+
|
20
|
+
test "sets up single req connection with default port" do
|
21
|
+
f = ZMQForwarder.new(:host => "a.b.c", :req_port => 3001)
|
22
|
+
assert_equal ["tcp://a.b.c:3001"], f.req_connection_specs
|
23
|
+
end
|
24
|
+
|
25
|
+
test "sets up multiple req connections" do
|
26
|
+
f = ZMQForwarder.new(:host => "a.b.c,tcp://x.y.z:9000,zmq.gnu.org:600")
|
27
|
+
assert_equal %w(tcp://a.b.c:9604 tcp://x.y.z:9000 tcp://zmq.gnu.org:600).sort, f.req_connection_specs.sort
|
18
28
|
end
|
19
29
|
|
20
30
|
test "encodes the payload" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.22.
|
4
|
+
version: 0.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|