grape-appsignal 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a764110c79dd5df816ae0a1c6d449eb0fac7651d
4
- data.tar.gz: a5e2bc8b6e3c55094406a8fd27dd7fe04a7253f1
3
+ metadata.gz: 801fa49a4ee1290f3145ce8bfd2910472016e0b4
4
+ data.tar.gz: 2d11531026cd6c0c50aef962514fea5a5ddadc2f
5
5
  SHA512:
6
- metadata.gz: f140b399fc4c7b660f6e84de087e293cac966eca42203751e7fa262185edd3c5cb0218616039494cd3951278d9a7a4d7bdec60e1232e02668465dd35c3440ffa
7
- data.tar.gz: e8b5454bba8bbcf6f11d82a012d21ad9ba0258664d9794dfaf7def1d995e8b575b3a4000987e77b75a7a6ff3c7c17712db68b40983dc2c0f980963b0c0ef7055
6
+ metadata.gz: b14855bf668efacee9e6a1f73843fe12c4faf65b08002956316b3782cd3b0d4d0b5cf23a0864906148b4ccf0eb3f5d34e457968ed3df9aca8c53fdf63824f2fd
7
+ data.tar.gz: 44e97b5ab1b563e01f03741d1d06a93c46b87af7b587ab045af011fa85c9c24060d0eefb74c0180d2fe83ab9542601661485ac11f2c35cfc17e1923590d66816
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Appsignal::Grape
2
2
 
3
- AppSignal intergation for [Grape][0], based on code from these [NewRelic][1] and [Liberato][2] gems.
3
+ [AppSignal][0] intergation for [Grape][1], based on code from these [NewRelic][2] and [Liberato][3] gems.
4
4
 
5
5
  [![Build Status](https://travis-ci.org/aai/grape-appsignal.png?branch=master)](http://travis-ci.org/aai/grape-appsignal)
6
6
 
@@ -8,7 +8,7 @@ AppSignal intergation for [Grape][0], based on code from these [NewRelic][1] and
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'grape-appsignal'
11
+ gem 'grape-appsignal', '~> 0.1.1'
12
12
 
13
13
  Or install:
14
14
 
@@ -17,11 +17,17 @@ Or install:
17
17
  Include it in your Grape API like this
18
18
 
19
19
  class TestAPI < Grape::API
20
+ # Make sure this is at the top of the class.
21
+ # If you are mounting other APIs it only needs to go into the base API
20
22
  use Appsignal::Grape::Middleware
21
23
 
24
+ helpers Helpers
25
+ mount ProfileAPI
26
+
22
27
  get 'hello' do
23
28
  "Hello World"
24
29
  end
30
+
25
31
  end
26
32
 
27
33
  *Make sure you have already setup AppSignal for your app!*
@@ -34,6 +40,7 @@ Include it in your Grape API like this
34
40
  4. Push to the branch (`git push origin my-new-feature`)
35
41
  5. Make a pull request
36
42
 
37
- [0]: https://github.com/intridea/grape
38
- [1]: https://github.com/flyerhzm/newrelic-grape
39
- [2]: https://github.com/seanmoon/grape-librato
43
+ [0]: https://appsignal.com
44
+ [1]: https://github.com/intridea/grape
45
+ [2]: https://github.com/flyerhzm/newrelic-grape
46
+ [3]: https://github.com/seanmoon/grape-librato
@@ -14,7 +14,7 @@ module Appsignal
14
14
  request_path = env['api.endpoint'].routes.first.route_path[1..-1].gsub(/\(\.:format\)\z/, "")
15
15
 
16
16
  metric_name = "process_action.grape#{metric_path}"
17
- action = "#{method}#{metric_path}"
17
+ action = "#{method}#{env['PATH_INFO']}"
18
18
 
19
19
  ActiveSupport::Notifications.instrument(metric_name, { method: method, path: request_path, action: action, class: "API" } ) do |payload|
20
20
  @app.call(env)
@@ -1,5 +1,5 @@
1
1
  module Appsignal
2
2
  module Grape
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -31,7 +31,7 @@ describe Appsignal::Grape::Middleware do
31
31
  end
32
32
 
33
33
  it do
34
- should == { method: "GET" , path: "api/:version/hello/:name", action: "GET.api.v1.hello.mark"}
34
+ should == { method: "GET" , path: "api/:version/hello/:name", action: "GET/api/v1/hello/mark", class: "API"}
35
35
  end
36
36
 
37
37
  context "verify the api request" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Madsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-03 00:00:00.000000000 Z
11
+ date: 2014-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appsignal