errplane 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmJlM2RlNmMwMTc5OWJkNjMzZThlY2FiNTVlMzU0M2I2Y2Q1YWFkNQ==
4
+ N2M3YjRmZDg3MzNhYTI3ZmI3YzM2MTUzMTJhY2RjZDBlNzJkODI3ZQ==
5
5
  data.tar.gz: !binary |-
6
- ZmMyNTNkNmRhZDliZWI2NzI0NjgzNDM1MGU2OTJiYmY0OTM1NWNjNg==
6
+ MTYyOTIwNWFhYzRjMGVmYTU3NzFlMzM5ZDdiMzkzNWZhOWE2ZTdiYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWNiNWZhMzUxZTQ2ZDcwZGZlM2Q5ZjQwM2QzMWY3M2ZkNmQxYmM4ZGUwMTA0
10
- MWMzNTg3MmQ3MjljMjQ3ZTkxM2UzZjEzMjFiYmNjMzU4YzZjMWJiODAxYmI0
11
- ZWNhYWI2OGUzOTgyZmU5YmU2MGYyMTNkMjkxNTY2MWI4MzViMTQ=
9
+ MmJjNTk0ZmY2MzQ3YmMwZTAyMzM2ODA4NzM2ZGM5MmY1MTY4ODNmODg5ZGJh
10
+ NmY3MDUzMmRmMzVhYjA1YWJiMjFmNmNkZWRjYzNkYmViZmE3NmI4NmFhOWM5
11
+ Y2Q4Y2FkMzEzNzFhZmQwZDBjNDY4MDA2YzM1OWJhYTA2MmY4NTM=
12
12
  data.tar.gz: !binary |-
13
- OTlmMjc0ODEwMzdiZmRkMWQ5ZWM5ZTg0MzVlNWU1NjdhMmZiODIzY2ZhMjhi
14
- MGNjNDAyZDJlOWM3MjU1MWM4ZWRjZGI4ZGU2MDQzMDdhZmExZGM1ZThmZTgy
15
- NTgzNjUwMzQzMjI2YWM3MGE1NTZhOTY2ZWMxYzdhOWE0MmZmYTY=
13
+ MjY4MmJhY2UwYjA1ZTQyNGE0ODYyNjdlNGZiY2ZjYzkxY2QyMmZkMDViNDI2
14
+ ZjU4ZWE4ZDgyYmVhM2ExODY1NTI4MzQ2NGIyNzdlMzZmM2U2YjlkZTUxOWJl
15
+ YjJlZmFhZmNkYjQ2NDRhNmEyZjMxMGNhNWFhMWIxNDdmZTE2N2U=
@@ -13,7 +13,22 @@ Capistrano::Configuration.instance(:must_exist).load do
13
13
 
14
14
  puts "Notifying Errplane of the deployment.."
15
15
  framework_env = fetch(:errplane_env, fetch(:rails_env, 'production'))
16
- load File.join(Dir.pwd, "config/initializers/errplane.rb")
16
+
17
+ unless defined?(Rails)
18
+ class Rails
19
+ @env = "production";
20
+ def self.env; return self; end
21
+ def self.env=(env); @env = env; end
22
+ def self.to_s; @env; end
23
+ def self.method_missing(m, *args, &block); return m.to_s == "#{@env}?"; end
24
+ end
25
+ Rails.env = framework_env
26
+ end
27
+ begin
28
+ load File.join(Dir.pwd, "config/initializers/errplane.rb")
29
+ rescue
30
+ puts "Couldn't find default initializer for Errplane, continuing anyhow."
31
+ end
17
32
 
18
33
  Errplane.configuration.logger = Logger.new("/dev/null")
19
34
  Errplane.configuration.environment = framework_env
@@ -9,6 +9,7 @@ module Errplane
9
9
  attr_reader :backtrace
10
10
  attr_reader :params
11
11
  attr_reader :session_data
12
+ attr_reader :current_user
12
13
  attr_reader :controller
13
14
  attr_reader :action
14
15
  attr_reader :request_url
@@ -23,6 +24,7 @@ module Errplane
23
24
  @backtrace = Errplane::Backtrace.new(@exception.backtrace).to_a || []
24
25
  @params = params[:params]
25
26
  @session_data = params[:session_data] || {}
27
+ @current_user = params[:current_user]
26
28
  @controller = params[:controller]
27
29
  @action = params[:action]
28
30
  @request_url = params[:request_url]
@@ -13,7 +13,8 @@ module Errplane
13
13
  :action => params[:action],
14
14
  :request_url => errplane_request_url,
15
15
  :user_agent => request.env["HTTP_USER_AGENT"],
16
- :referer => request.referer
16
+ :referer => request.referer,
17
+ :current_user => current_user
17
18
  }
18
19
  end
19
20
 
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errplane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Persen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-14 00:00:00.000000000 Z
11
+ date: 2013-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json