appsignal 2.1.1 → 2.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/appsignal/integrations/grape.rb +2 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/integrations/grape_spec.rb +24 -0
- 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: e046fb025d367006e6b7917b5cbf63bfd592271d
|
4
|
+
data.tar.gz: a2cc0879ae2f6386ab860e17d78914428babd5a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d99afd1e739b01f82e575c0237afea2a2c4cace49e2634b9c1965c16eaea09f4bac37d31c24bba2a4454cc70256922431cd11dd3828653ffddcc14214fea39c
|
7
|
+
data.tar.gz: aee0fbbb44af79823ca0cb68f5801e58d1302aa0e6158bfbe165887dd0db94ef83789ff265fe24a5c8e49808c33fc5718b60953460530fe476688321021fc9a0
|
data/CHANGELOG.md
CHANGED
@@ -22,13 +22,13 @@ module Appsignal
|
|
22
22
|
transaction.set_error(error)
|
23
23
|
raise error
|
24
24
|
ensure
|
25
|
-
request_method = request.request_method
|
25
|
+
request_method = request.request_method.to_s.upcase
|
26
26
|
path = request.path # Path without namespaces
|
27
27
|
endpoint = env["api.endpoint"]
|
28
28
|
|
29
29
|
if endpoint && endpoint.options
|
30
30
|
options = endpoint.options
|
31
|
-
request_method = options[:method].first
|
31
|
+
request_method = options[:method].first.to_s.upcase
|
32
32
|
klass = options[:for]
|
33
33
|
namespace = endpoint.namespace
|
34
34
|
namespace = "" if namespace == "/"
|
data/lib/appsignal/version.rb
CHANGED
@@ -98,6 +98,30 @@ if DependencyHelper.grape_present?
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
context "with route" do
|
102
|
+
let(:app) do
|
103
|
+
Class.new(::Grape::API) do
|
104
|
+
route [:get, :post], "hello" do
|
105
|
+
"Hello!"
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
let(:env) do
|
110
|
+
http_request_env_with_data \
|
111
|
+
"api.endpoint" => api_endpoint,
|
112
|
+
"REQUEST_METHOD" => "GET",
|
113
|
+
:path => ""
|
114
|
+
end
|
115
|
+
|
116
|
+
it "sets non-unique route path" do
|
117
|
+
expect(transaction).to receive(:set_action).with("GET::GrapeExample::Api#/hello")
|
118
|
+
expect(transaction).to receive(:set_metadata).with("path", "/hello")
|
119
|
+
expect(transaction).to receive(:set_metadata).with("method", "GET")
|
120
|
+
end
|
121
|
+
|
122
|
+
after { middleware.call(env) }
|
123
|
+
end
|
124
|
+
|
101
125
|
context "with route_param" do
|
102
126
|
let(:app) do
|
103
127
|
Class.new(::Grape::API) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03-
|
12
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|