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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ef0883ffd29bd81de9c7a70b6112e3e8e877d21
4
- data.tar.gz: 750cfc0639962b2f46434e6f28715acdb97db8c3
3
+ metadata.gz: e046fb025d367006e6b7917b5cbf63bfd592271d
4
+ data.tar.gz: a2cc0879ae2f6386ab860e17d78914428babd5a9
5
5
  SHA512:
6
- metadata.gz: 4523a7ca1c3c4860643779073c86802ba7331038fa0633280509d1b4d82fc811fb77c5faaa96a672e700d0d6c7e786051d874e674b0d05bf8979238c875e26f5
7
- data.tar.gz: ccb7f37840632b613902a3eda64fab7534b86e5147116869fc3729f560eccba6e2318d00bb3ab9a79fb1e2c22c48b3d2965dc711780b0d26b22ded9eaab089ca
6
+ metadata.gz: 1d99afd1e739b01f82e575c0237afea2a2c4cace49e2634b9c1965c16eaea09f4bac37d31c24bba2a4454cc70256922431cd11dd3828653ffddcc14214fea39c
7
+ data.tar.gz: aee0fbbb44af79823ca0cb68f5801e58d1302aa0e6158bfbe165887dd0db94ef83789ff265fe24a5c8e49808c33fc5718b60953460530fe476688321021fc9a0
@@ -1,3 +1,6 @@
1
+ # 2.1.2
2
+ * Fix error with Grape request methods defined with symbols. PR #259
3
+
1
4
  # 2.1.1
2
5
  * Fix DNS issue related to musl build.
3
6
  Commit 732c877de8faceabe8a977bf80a82a6a89065c4d
@@ -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 == "/"
@@ -1,5 +1,5 @@
1
1
  require "yaml"
2
2
 
3
3
  module Appsignal
4
- VERSION = "2.1.1"
4
+ VERSION = "2.1.2"
5
5
  end
@@ -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.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-06 00:00:00.000000000 Z
12
+ date: 2017-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack