rollbar 0.12.17 → 0.12.18

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: e3d027a33b4115d70243cffed4280b726a4dc269
4
- data.tar.gz: 6718be9dc5ae48738dd4c220fb06f9f06a45e990
3
+ metadata.gz: 7972522be3a3b32407ddead874e370a12831fada
4
+ data.tar.gz: 4f143b6ce99c6326789ae830069806ff36913bf4
5
5
  SHA512:
6
- metadata.gz: e6e16401feb719f6f2c270db7f478d23e125ed2b86ded864ffd9f4bfcad1a151cf4b6d9f0e725bfaf6b539a3bc8daa3af243ba4d85b029f8b75b3a5483e63e9b
7
- data.tar.gz: c7f031fdb97c8a935b302ed6531e815d11dee411b11f0b7ba7dcfe4f8f427aa18941e72ce5dcd3780e573ac3a96e5d123cec758fac3dbd302b1d792e62273393
6
+ metadata.gz: 746dd26aa8b253e1060b9583cceaed883b701c5f69afcb520c676970a209a6ae3d001414366160b4475f95351d487be261c507f4ade2c6ae066dbdd8797c738d
7
+ data.tar.gz: 7ba139d6221bad36afde2c32fe67930969790b930dd1b02f52609062e63debd993feb4923ccf10e9e189fd9c9183da9091af889f3276325849d1cf5d39162336
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ **0.12.18**
4
+ - Insert RollbarRequestStore middleware at the end in case the ActiveRecord ConnectionManagement middleware isn't used
5
+ - Scope Capistrano 3 task by server role [#110](https://github.com/rollbar/rollbar-gem/pull/110)
6
+
3
7
  **0.12.17**
4
8
  - Replace usage of `puts` with a configurable logger in different areas of the notifier
5
9
  - Fix error in `RollbarRequestStore` when `rollbar_person_data` isn't defined for a controller
data/README.md CHANGED
@@ -324,6 +324,7 @@ And then, to your `deploy.rb`:
324
324
  ```ruby
325
325
  set :rollbar_token, 'POST_SERVER_ITEM_ACCESS_TOKEN'
326
326
  set :rollbar_env, Proc.new { fetch :stage }
327
+ set :rollbar_role, Proc.new { :app }
327
328
  ```
328
329
 
329
330
  ### Capistrano 2
data/THANKS.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Huge thanks to the following contributors (by github username). For the most up-to-date list, see https://github.com/rollbar/rollbar-gem/graphs/contributors
4
4
 
5
+ - [alexdunae](https://github.com/alexdunae)
5
6
  - [allspiritseve](https://github.com/allspiritseve)
6
7
  - [arr-ee](https://github.com/arr-ee)
7
8
  - [awmichel](https://github.com/awmichel)
@@ -14,7 +14,7 @@ module Rollbar
14
14
  rescue
15
15
  controller = env["action_controller.instance"]
16
16
  if controller and controller.respond_to? :rollbar_person_data
17
- env['rollbar.person_data'] = controller.rollbar_person_data
17
+ env['rollbar.person_data'] = controller.rollbar_person_data rescue {}
18
18
  end
19
19
  raise
20
20
  end
@@ -10,8 +10,7 @@ module Rollbar
10
10
  if defined? ActiveRecord
11
11
  initializer 'rollbar.middleware.rails' do |app|
12
12
  require 'rollbar/middleware/rails/rollbar_request_store'
13
- app.config.middleware.insert_after ActiveRecord::ConnectionAdapters::ConnectionManagement,
14
- Rollbar::Middleware::Rails::RollbarRequestStore
13
+ app.config.middleware.use Rollbar::Middleware::Rails::RollbarRequestStore
15
14
  end
16
15
  end
17
16
 
@@ -6,22 +6,25 @@ namespace :rollbar do
6
6
 
7
7
  desc 'Send the deployment notification to Rollbar.'
8
8
  task :deploy do
9
- uri = URI.parse 'https://api.rollbar.com/api/1/deploy/'
10
- params = {
11
- :local_username => fetch(:rollbar_user),
12
- :access_token => fetch(:rollbar_token),
13
- :environment => fetch(:rollbar_env),
14
- :revision => fetch(:current_revision) }
15
-
16
- request = Net::HTTP::Post.new(uri.request_uri)
17
- request.body = JSON.dump(params)
18
-
19
- Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
20
- http.request(request)
21
- end
9
+ on roles fetch(:rollbar_role) do
10
+ uri = URI.parse 'https://api.rollbar.com/api/1/deploy/'
11
+ params = {
12
+ :local_username => fetch(:rollbar_user),
13
+ :access_token => fetch(:rollbar_token),
14
+ :environment => fetch(:rollbar_env),
15
+ :revision => fetch(:current_revision) }
16
+
17
+ debug "Building Rollbar POST to #{uri} with #{params.inspect}"
18
+
19
+ request = Net::HTTP::Post.new(uri.request_uri)
20
+ request.body = JSON.dump(params)
22
21
 
23
- # this is not the right way to output to capistrano's log..
24
- puts 'Rollbar notification complete.'
22
+ Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
23
+ http.request(request)
24
+ end
25
+
26
+ info 'Rollbar notification complete.'
27
+ end
25
28
  end
26
29
  end
27
30
 
@@ -34,5 +37,6 @@ namespace :load do
34
37
  set :rollbar_user, Proc.new { ENV['USER'] || ENV['USERNAME'] }
35
38
  set :rollbar_env, Proc.new { fetch :rails_env, 'production' }
36
39
  set :rollbar_token, Proc.new { abort "Please specify the Rollbar access token, set :rollbar_token, 'your token'" }
40
+ set :rollbar_role, Proc.new { :app }
37
41
  end
38
- end
42
+ end
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "0.12.17"
2
+ VERSION = "0.12.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.17
4
+ version: 0.12.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Rue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-15 00:00:00.000000000 Z
11
+ date: 2014-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json