rails_exception_handler 1.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  before_script:
2
- - "spec/testapp_30/script/setup"
2
+ - "spec/dummy_30/script/setup"
3
3
 
4
4
  notifications:
5
5
  disable: true
data/Gemfile CHANGED
@@ -11,6 +11,7 @@ group :test, :development do
11
11
  #gem "rack-test", '0.6.1'
12
12
  #gem 'mysql2', '0.3.11'
13
13
 
14
+ gem 'pry'
14
15
  gem "rspec-rails"
15
16
  gem "jeweler"
16
17
  gem "rails_exception_handler", :path => '.'
data/Gemfile.lock CHANGED
@@ -35,6 +35,7 @@ GEM
35
35
  activesupport (3.0.12)
36
36
  arel (2.0.10)
37
37
  builder (2.1.2)
38
+ coderay (1.0.6)
38
39
  diff-lcs (1.1.3)
39
40
  erubis (2.6.6)
40
41
  abstract (>= 1.0.0)
@@ -45,15 +46,20 @@ GEM
45
46
  git (>= 1.2.5)
46
47
  rake
47
48
  rdoc
48
- json (1.6.5)
49
+ json (1.7.3)
49
50
  mail (2.2.19)
50
51
  activesupport (>= 2.3.6)
51
52
  i18n (>= 0.4.0)
52
53
  mime-types (~> 1.16)
53
54
  treetop (~> 1.4.8)
54
- mime-types (1.17.2)
55
+ method_source (0.7.1)
56
+ mime-types (1.18)
55
57
  mysql2 (0.2.6)
56
58
  polyglot (0.3.3)
59
+ pry (0.9.9.6)
60
+ coderay (~> 1.0.5)
61
+ method_source (~> 0.7.1)
62
+ slop (>= 2.4.4, < 3)
57
63
  rack (1.2.5)
58
64
  rack-mount (0.6.14)
59
65
  rack (>= 1.0.0)
@@ -76,24 +82,25 @@ GEM
76
82
  rake (0.9.2.2)
77
83
  rdoc (3.12)
78
84
  json (~> 1.4)
79
- rspec (2.8.0)
80
- rspec-core (~> 2.8.0)
81
- rspec-expectations (~> 2.8.0)
82
- rspec-mocks (~> 2.8.0)
83
- rspec-core (2.8.0)
84
- rspec-expectations (2.8.0)
85
- diff-lcs (~> 1.1.2)
86
- rspec-mocks (2.8.0)
87
- rspec-rails (2.8.1)
85
+ rspec (2.10.0)
86
+ rspec-core (~> 2.10.0)
87
+ rspec-expectations (~> 2.10.0)
88
+ rspec-mocks (~> 2.10.0)
89
+ rspec-core (2.10.0)
90
+ rspec-expectations (2.10.0)
91
+ diff-lcs (~> 1.1.3)
92
+ rspec-mocks (2.10.1)
93
+ rspec-rails (2.10.1)
88
94
  actionpack (>= 3.0)
89
95
  activesupport (>= 3.0)
90
96
  railties (>= 3.0)
91
- rspec (~> 2.8.0)
97
+ rspec (~> 2.10.0)
98
+ slop (2.4.4)
92
99
  thor (0.14.6)
93
100
  treetop (1.4.10)
94
101
  polyglot
95
102
  polyglot (>= 0.3.1)
96
- tzinfo (0.3.32)
103
+ tzinfo (0.3.33)
97
104
 
98
105
  PLATFORMS
99
106
  ruby
@@ -101,6 +108,7 @@ PLATFORMS
101
108
  DEPENDENCIES
102
109
  jeweler
103
110
  mysql2 (= 0.2.6)
111
+ pry
104
112
  rack-test (= 0.5.7)
105
113
  rails (= 3.0.12)
106
114
  rails_exception_handler!
data/README.markdown CHANGED
@@ -1,8 +1,11 @@
1
1
  # Rails Exception Handler [![Build Status](http://travis-ci.org/Sharagoz/rails_execption_handler.png)](http://travis-ci.org/#!/Sharagoz/rails_exception_handler)
2
2
 
3
- This is an exception handler for Rails 3 built as Rack middleware. It enables you to save the key information from the error message in a database somewhere and display a customized error message to the user within the applications layout file. You can hook this gem into all your rails apps and gather the exception reports in one place. This gem just contains the back end. You will have to create your own front end to view and manage the error reports.
3
+ Upgrading from version 1? [See wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Version-2.0-upgrade-instructions)
4
+
5
+ This is a flexible exception handler for Rails 3 built as Rack middleware. It enables you to save the key information from the error message in a database somewhere and display a customized error message to the user within the applications layout file. You can hook this gem into all your rails apps and gather the exception reports in one place. This gem just contains the back end, you will have to create your own front end to view and manage the error reports.
4
6
 
5
7
  Does your app have an authorization mechanism? [See wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Interaction-with-authorization-mechanisms)
8
+
6
9
  Do you need to catch ruby errors outside of Rack? [See wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Manual-exception-handling-outside-of-rack)
7
10
 
8
11
  ## Compatiblity
@@ -12,43 +15,16 @@ See Travis-CI for info on which rubies it is tested against:
12
15
  http://travis-ci.org/#!/Sharagoz/rails_exception_handler
13
16
 
14
17
  ## Installation
15
- Add this line to your Gemfile:
18
+ Add the line below to your gemfile and run bundler
16
19
 
17
20
  ```
18
- gem 'rails_exception_handler'
21
+ gem 'rails_exception_handler', "~> 2"
19
22
  ```
20
23
 
21
- Create an initializer in **config/initializers** called **rails_exception_handler.rb** and uncomment the options where you want something other than the default:
24
+ Now run "rails g rails_exception_handler:install" to create an initializer in config/initializers/rails_exception_handler.rb
22
25
 
23
- ```ruby
24
- RailsExceptionHandler.configure do |config|
25
- # config.environments = [:development, :test, :production] # Defaults to [:production]
26
- # config.storage_strategies = [:active_record, :rails_log, :remote_url => {:target => 'http://example.com'}] # Defaults to []
27
- # config.fallback_layout = 'home' # Defaults to 'application'
28
- # config.store_user_info = {:method => :current_user, :field => :login} # Defaults to false
29
- # config.filters = [ # No filters are enabled by default
30
- # :all_404s,
31
- # :no_referer_404s,
32
- # :anon_404s,
33
- # {:user_agent_regxp => /\b(ApptusBot|TurnitinBot|DotBot|SiteBot)\b/i},
34
- # {:target_url_regxp => /\b(myphpadmin)\b/i}
35
- # ]
36
- # config.responses = { # There must be a default response if public/500.html and public/400.html does not exist.
37
- # :default => "<h1>500</h1><p>Internal server error</p>",
38
- # :custom => "<h1>404</h1><p>Page not found</p>"
39
- # }
40
- # config.response_mapping = { # All errors are mapped to the :default response unless overridden here
41
- # 'ActiveRecord::RecordNotFound' => :custom,
42
- # 'ActionController::RoutingError' => :custom,
43
- # 'AbstractController::ActionNotFound' => :custom
44
- # }
45
- # config.after_initialize do
46
- # # this block will be called after the initialization is done
47
- # end
48
- end
49
- ```
50
26
 
51
- ## Configuration options explained
27
+ ## Configuration options
52
28
 
53
29
  ### environments
54
30
  An array of symbols that says which Rails environments you want the exception handler to run in.
@@ -146,7 +122,7 @@ config.filters = [:no_referer_404s]
146
122
  ```
147
123
 
148
124
  ActionController::RoutingError, AbstractController::ActionNotFound, ActiveRecord::RecordNotFound will be ignored if it was caused by a request without a referer.
149
- This is very effective against bots. 99.9% of the time a routing error with no referer will be caused by a bot, and then once in a while it will be caused by a real user that happened to generate an error on the first page he opened. You will get a lot less false positives with this filter than :all_404s.
125
+ This is very effective against bots. 99.9% of the time a routing error with no referer will be caused by a bot, and then once in a while it will be caused by a real user that happened to generate an error on the first page he opened (like a broken bookmark). You will get a lot less false positives with this filter than :all_404s.
150
126
 
151
127
  **:user_agent_regxp**
152
128
 
@@ -166,6 +142,25 @@ Sometimes black bots add a common user agent string and a referer to their reque
166
142
  config.filters = [:target_url_regxp => /\.php/i]
167
143
  ```
168
144
 
145
+ ## Gathering exception information
146
+
147
+ The following for methods exists for extracting the information you need. You are given direct access to the relevant objects, which means full flexibility, but also more work on your part.
148
+ The initializers contains a basic suggestion, you can check out [the wiki](https://github.com/Sharagoz/rails_exception_handler/wiki/Extracting-exception-info)
149
+ for more options, or inspect the objects yourself with a tool like Pry to find what you need.
150
+
151
+ The "storage" hash below is the object that is sent to the storage strategy. Make sure the keys in the hash matches up with the name of the database fields.
152
+
153
+ ```ruby
154
+ config.store_request_info do |storage,request|
155
+ end
156
+ config.store_exception_info do |storage,exeception|
157
+ end
158
+ config.store_environment_info do |storage,env|
159
+ end
160
+ config.store_global_info do |storage|
161
+ end
162
+ ```
163
+
169
164
  ## Storage strategy - active record
170
165
  ```ruby
171
166
  config.storage_strategies = [:active_record]
@@ -187,7 +182,7 @@ exception_database:
187
182
 
188
183
  You could of course store the error messages in the same database as the application uses, but one of the main purposes of this library is to enable you to easily store error reports from many applications in the same database, so I recommend you set up a separate dedicated database for this.
189
184
 
190
- The exception database needs a table called **error_messages**. Here's a migration script that you can use to create the table with the necessary fields:
185
+ The exception database needs a table called **error_messages**. Here's a migration script that you can use to create the table with the necessary fields required for the default configuration:
191
186
 
192
187
  ```ruby
193
188
  class CreateErrorMessages < ActiveRecord::Migration
@@ -202,6 +197,7 @@ class CreateErrorMessages < ActiveRecord::Migration
202
197
  t.text :user_agent
203
198
  t.string :user_info
204
199
  t.string :app_name
200
+ t.string :doc_root
205
201
 
206
202
  t.timestamps
207
203
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 2.0.0
@@ -1,5 +1,7 @@
1
1
  if(defined?(ActiveRecord) && RailsExceptionHandler.configuration.activate? && RailsExceptionHandler.configuration.active_record?)
2
+
2
3
  class ErrorMessage < ActiveRecord::Base
3
4
  establish_connection(:exception_database)
4
5
  end
6
+
5
7
  end
@@ -0,0 +1,11 @@
1
+ class RailsExceptionHandler
2
+ class InstallGenerator < Rails::Generators::Base
3
+ desc "Copy initialization file"
4
+ source_root File.expand_path('../templates', __FILE__)
5
+ class_option :template_engine
6
+
7
+ def copy_initializer
8
+ copy_file 'rails_exception_handler.rb', 'config/initializers/rails_exception_handler.rb'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,50 @@
1
+ RailsExceptionHandler.configure do |config|
2
+ # config.environments = [:development, :test, :production] # Defaults to [:production]
3
+ # config.fallback_layout = 'home' # Defaults to 'application'
4
+ # config.after_initialize do
5
+ # # This block will be called after the initialization is done.
6
+ # # Usefull for interaction with authentication mechanisms, which should
7
+ # # only happen when the exception handler is enabled.
8
+ # end
9
+ # config.filters = [ # No filters are enabled by default
10
+ # :all_404s,
11
+ # :no_referer_404s,
12
+ # :anon_404s,
13
+ # {:user_agent_regxp => /\b(ApptusBot|TurnitinBot|DotBot|SiteBot)\b/i},
14
+ # {:target_url_regxp => /\.php/i}
15
+ # ]
16
+ # !!! IMPORTANT !!!
17
+ # You must remove public/500.html and public/404.html for these to have any effect
18
+ config.responses = {
19
+ :default => "<h1>500</h1><p>Internal server error</p>",
20
+ :not_found => "<h1>404</h1><p>Page not found</p>"
21
+ }
22
+ config.response_mapping = { # All errors are mapped to the :default response unless overridden here
23
+ 'ActiveRecord::RecordNotFound' => :not_found,
24
+ 'ActionController::RoutingError' => :not_found,
25
+ 'AbstractController::ActionNotFound' => :not_found
26
+ }
27
+ config.storage_strategies = [:active_record] # Available options: [:active_record, :rails_log, :remote_url => {:target => 'http://example.com'}]
28
+ config.store_request_info do |storage,request|
29
+ storage[:target_url] = request.url
30
+ storage[:referer_url] = request.referer
31
+ storage[:params] = request.params.inspect
32
+ storage[:user_agent] = request.user_agent
33
+ end
34
+
35
+ config.store_exception_info do |storage,exeception|
36
+ storage[:class_name] = exception.class.to_s
37
+ storage[:message] = exception.to_s
38
+ storage[:trace] = exception.backtrace.join("\n")
39
+ end
40
+
41
+ config.store_environment_info do |storage,env|
42
+ storage[:doc_root] = env['DOCUMENT_ROOT']
43
+ end
44
+
45
+ config.store_global_info do |storage|
46
+ storage[:app_name] = Rails.application.class.parent_name
47
+ storage[:created_at] = Time.now
48
+ end
49
+ # config.store_user_info = {:method => :current_user, :field => :login} # Helper method for easier access to current_user
50
+ end
@@ -30,5 +30,6 @@ end
30
30
  require 'rails_exception_handler/configuration.rb'
31
31
  require 'rails_exception_handler/handler.rb'
32
32
  require 'rails_exception_handler/parser.rb'
33
+ require 'rails_exception_handler/storage.rb'
33
34
  require 'rails_exception_handler/engine.rb'
34
35
  require 'net/http'
@@ -1,5 +1,5 @@
1
1
  class RailsExceptionHandler::Configuration
2
- attr_accessor :storage_strategies, :environments, :filters, :responses, :response_mapping, :fallback_layout, :store_user_info
2
+ attr_accessor :storage_strategies, :environments, :filters, :responses, :response_mapping, :fallback_layout, :store_user_info, :env_info_block, :global_info_block, :exception_info_block, :request_info_block
3
3
 
4
4
  def initialize
5
5
  @environments = [:production]
@@ -27,4 +27,20 @@ class RailsExceptionHandler::Configuration
27
27
  @callback.call if(@callback)
28
28
  end
29
29
 
30
+ def store_environment_info(&block)
31
+ @env_info_block = block
32
+ end
33
+
34
+ def store_global_info(&block)
35
+ @global_info_block = block
36
+ end
37
+
38
+ def store_exception_info(&block)
39
+ @exception_info_block = block
40
+ end
41
+
42
+ def store_request_info(&block)
43
+ @request_info_block = block
44
+ end
45
+
30
46
  end
@@ -19,7 +19,7 @@ class RailsExceptionHandler::Handler
19
19
  end
20
20
 
21
21
  def handle_exception
22
- @parsed_error = RailsExceptionHandler::Parser.new(@exception, @request, @controller)
22
+ @parsed_error = RailsExceptionHandler::Parser.new(@env, @request, @exception, @controller)
23
23
  store_error unless(@parsed_error.ignore?)
24
24
  return response
25
25
  end
@@ -29,40 +29,15 @@ class RailsExceptionHandler::Handler
29
29
  def store_error
30
30
  RailsExceptionHandler.configuration.storage_strategies.each do |strategy|
31
31
  if(strategy.class == Symbol)
32
- send("store_in_#{strategy}")
32
+ RailsExceptionHandler::Storage.send(strategy, @parsed_error.external_info)
33
33
  elsif(strategy.class == Hash && strategy[:remote_url])
34
- store_in_remote_url(strategy[:remote_url])
34
+ RailsExceptionHandler::Storage.remote_url(strategy[:remote_url][:target],@parsed_error.external_info)
35
35
  else
36
36
  raise "RailsExceptionHandler: Unknown storage strategy #{strategy.inspect}"
37
37
  end
38
38
  end
39
39
  end
40
40
 
41
- def store_in_active_record
42
- ErrorMessage.create(@parsed_error.relevant_info)
43
- end
44
-
45
- def store_in_rails_log
46
- info = @parsed_error.relevant_info
47
- message = "TARGET: #{info[:target_url]}\n"
48
- message += "REFERER: #{info[:referer_url]}\n"
49
- message += "PARAMS: #{info[:params]}\n"
50
- message += "USER_AGENT: #{info[:user_agent]}\n"
51
- message += "USER_INFO: #{info[:user_info]}\n"
52
- message += "#{info[:class_name]} (#{info[:message]}):\n"
53
- message += Rails.backtrace_cleaner.clean(info[:trace].split("\n"), :noise).join("\n")
54
- Rails.logger.fatal(message)
55
- end
56
-
57
- def store_in_remote_url(args)
58
- uri = URI.parse(args[:target])
59
- params = {}
60
- @parsed_error.relevant_info.each do |key,value|
61
- params["error_message[#{key}]"] = value
62
- end
63
- Net::HTTP::post_form(uri, params)
64
- end
65
-
66
41
  def response
67
42
  @env['exception_handler.layout'] = response_layout
68
43
  @env['exception_handler.response'] = response_text
@@ -95,7 +70,7 @@ class RailsExceptionHandler::Handler
95
70
 
96
71
  def response_text
97
72
  config = RailsExceptionHandler.configuration
98
- klass = @parsed_error.relevant_info[:class_name]
73
+ klass = @parsed_error.internal_info[:error_class]
99
74
  key = config.response_mapping[klass] || :default
100
75
  return config.responses[key]
101
76
  end
@@ -1,23 +1,28 @@
1
1
  class RailsExceptionHandler::Parser
2
- def initialize(exception, request, controller)
3
- @exception = exception
2
+ attr_accessor :external_info, :internal_info
3
+
4
+ def initialize(env, request, exception, controller)
5
+ @env = env
4
6
  @request = request
7
+ @exception = exception
5
8
  @controller = controller
9
+ @external_info = {}
10
+ @internal_info = {}
11
+ parse
6
12
  end
7
13
 
8
- def relevant_info
9
- info = {}
10
- info[:app_name] = Rails.application.class.parent_name
11
- info[:class_name] = @exception.class.to_s
12
- info[:message] = @exception.to_s
13
- info[:trace] = @exception.backtrace.join("\n")
14
- info[:target_url] = @request.url
15
- info[:referer_url] = @request.referer
16
- info[:params] = @request.params.inspect
17
- info[:user_agent] = @request.user_agent
18
- info[:user_info] = user_info
19
- info[:created_at] = Time.now
20
- return info
14
+ def parse
15
+ @internal_info[:error_class] = @exception.class.to_s
16
+ @internal_info[:target_url] = @request.url
17
+ @internal_info[:referer_url] = @request.referer
18
+ @internal_info[:user_agent] = @request.user_agent
19
+
20
+ config = RailsExceptionHandler.configuration
21
+ config.request_info_block.call(@external_info, @request) if(config.request_info_block)
22
+ config.exception_info_block.call(@external_info, @exception) if(config.exception_info_block)
23
+ config.env_info_block.call(@external_info, @env) if(config.env_info_block)
24
+ config.global_info_block.call(@external_info) if(config.global_info_block)
25
+ @external_info[:user_info] = user_info
21
26
  end
22
27
 
23
28
  def ignore?
@@ -47,7 +52,7 @@ class RailsExceptionHandler::Parser
47
52
  private
48
53
 
49
54
  def blank_referer?
50
- relevant_info[:referer_url] == "/" || relevant_info[:referer_url].blank?
55
+ @internal_info[:referer_url] == "/" || @internal_info[:referer_url].blank?
51
56
  end
52
57
 
53
58
  def user_info
@@ -70,12 +75,12 @@ class RailsExceptionHandler::Parser
70
75
  end
71
76
 
72
77
  def filter_user_agent_regxp(regxp)
73
- result = relevant_info[:user_agent].match(regxp)
78
+ result = @internal_info[:user_agent].match(regxp)
74
79
  result != nil
75
80
  end
76
81
 
77
82
  def filter_target_url_regxp(regxp)
78
- result = relevant_info[:target_url].match(regxp)
83
+ result = @internal_info[:target_url].match(regxp)
79
84
  result != nil
80
85
  end
81
86
  end
@@ -0,0 +1,47 @@
1
+ class RailsExceptionHandler::Storage
2
+ def self.active_record(info)
3
+ ErrorMessage.create(info)
4
+ end
5
+
6
+ def self.rails_log(info)
7
+ message = ""
8
+ info.each do |key,val|
9
+ message += "#{key.upcase}: #{val.to_s}\n"
10
+ end
11
+ Rails.logger.fatal(message)
12
+ end
13
+
14
+ def self.remote_url(target, info)
15
+ uri = URI.parse(target)
16
+ params = flatten_hash({:error_message => info})
17
+ Net::HTTP::post_form(uri, params)
18
+ end
19
+
20
+ private
21
+
22
+ # Credit: Hash flattening technique borrowed from Peter Marklund: http://marklunds.com/articles/one/314
23
+ def self.flatten_hash(hash, ancestor_names = [])
24
+ flat_hash = {}
25
+ hash.each do |k, v|
26
+ names = Array.new(ancestor_names)
27
+ names << k
28
+ if v.is_a?(Hash)
29
+ flat_hash.merge!(flatten_hash(v, names))
30
+ else
31
+ key = flat_hash_key(names)
32
+ key += "[]" if v.is_a?(Array)
33
+ flat_hash[key] = v
34
+ end
35
+ end
36
+ flat_hash
37
+ end
38
+
39
+ def self.flat_hash_key(names)
40
+ names = Array.new(names)
41
+ name = names.shift.to_s.dup
42
+ names.each do |n|
43
+ name << "[#{n}]"
44
+ end
45
+ name
46
+ end
47
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rails_exception_handler"
8
- s.version = "1.4.0"
8
+ s.version = "2.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sharagoz"]
12
- s.date = "2012-03-10"
12
+ s.date = "2012-05-14"
13
13
  s.description = ""
14
14
  s.email = "contact@sharagoz.com"
15
15
  s.extra_rdoc_files = [
@@ -26,12 +26,15 @@ Gem::Specification.new do |s|
26
26
  "VERSION",
27
27
  "app/controllers/error_response_controller.rb",
28
28
  "app/models/error_message.rb",
29
+ "lib/generators/rails_exception_handler/install_generator.rb",
30
+ "lib/generators/rails_exception_handler/templates/rails_exception_handler.rb",
29
31
  "lib/patch/show_exceptions.rb",
30
32
  "lib/rails_exception_handler.rb",
31
33
  "lib/rails_exception_handler/configuration.rb",
32
34
  "lib/rails_exception_handler/engine.rb",
33
35
  "lib/rails_exception_handler/handler.rb",
34
36
  "lib/rails_exception_handler/parser.rb",
37
+ "lib/rails_exception_handler/storage.rb",
35
38
  "rails_exception_handler.gemspec",
36
39
  "spec/dummy_30/.gitignore",
37
40
  "spec/dummy_30/lib/tasks/.gitkeep",
@@ -49,7 +52,7 @@ Gem::Specification.new do |s|
49
52
  s.homepage = "http://github.com/Sharagoz/rails_exception_handler"
50
53
  s.licenses = ["MIT"]
51
54
  s.require_paths = ["lib"]
52
- s.rubygems_version = "1.8.17"
55
+ s.rubygems_version = "1.8.21"
53
56
  s.summary = "Exception Handling for Rails 3"
54
57
 
55
58
  if s.respond_to? :specification_version then
@@ -59,6 +62,7 @@ Gem::Specification.new do |s|
59
62
  s.add_development_dependency(%q<rails>, ["= 3.0.12"])
60
63
  s.add_development_dependency(%q<rack-test>, ["= 0.5.7"])
61
64
  s.add_development_dependency(%q<mysql2>, ["= 0.2.6"])
65
+ s.add_development_dependency(%q<pry>, [">= 0"])
62
66
  s.add_development_dependency(%q<rspec-rails>, [">= 0"])
63
67
  s.add_development_dependency(%q<jeweler>, [">= 0"])
64
68
  s.add_development_dependency(%q<rails_exception_handler>, [">= 0"])
@@ -66,6 +70,7 @@ Gem::Specification.new do |s|
66
70
  s.add_dependency(%q<rails>, ["= 3.0.12"])
67
71
  s.add_dependency(%q<rack-test>, ["= 0.5.7"])
68
72
  s.add_dependency(%q<mysql2>, ["= 0.2.6"])
73
+ s.add_dependency(%q<pry>, [">= 0"])
69
74
  s.add_dependency(%q<rspec-rails>, [">= 0"])
70
75
  s.add_dependency(%q<jeweler>, [">= 0"])
71
76
  s.add_dependency(%q<rails_exception_handler>, [">= 0"])
@@ -74,6 +79,7 @@ Gem::Specification.new do |s|
74
79
  s.add_dependency(%q<rails>, ["= 3.0.12"])
75
80
  s.add_dependency(%q<rack-test>, ["= 0.5.7"])
76
81
  s.add_dependency(%q<mysql2>, ["= 0.2.6"])
82
+ s.add_dependency(%q<pry>, [">= 0"])
77
83
  s.add_dependency(%q<rspec-rails>, [">= 0"])
78
84
  s.add_dependency(%q<jeweler>, [">= 0"])
79
85
  s.add_dependency(%q<rails_exception_handler>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_exception_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,44 +9,75 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-10 00:00:00.000000000 Z
12
+ date: 2012-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &5782380 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - =
19
+ - - '='
20
20
  - !ruby/object:Gem::Version
21
21
  version: 3.0.12
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *5782380
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - '='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.12
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rack-test
27
- requirement: &5797040 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
- - - =
35
+ - - '='
31
36
  - !ruby/object:Gem::Version
32
37
  version: 0.5.7
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *5797040
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - '='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.5.7
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: mysql2
38
- requirement: &5795460 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.2.6
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
39
57
  none: false
40
58
  requirements:
41
- - - =
59
+ - - '='
42
60
  - !ruby/object:Gem::Version
43
61
  version: 0.2.6
62
+ - !ruby/object:Gem::Dependency
63
+ name: pry
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
44
70
  type: :development
45
71
  prerelease: false
46
- version_requirements: *5795460
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
47
78
  - !ruby/object:Gem::Dependency
48
79
  name: rspec-rails
49
- requirement: &5792080 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
50
81
  none: false
51
82
  requirements:
52
83
  - - ! '>='
@@ -54,10 +85,15 @@ dependencies:
54
85
  version: '0'
55
86
  type: :development
56
87
  prerelease: false
57
- version_requirements: *5792080
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
58
94
  - !ruby/object:Gem::Dependency
59
95
  name: jeweler
60
- requirement: &5806360 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
61
97
  none: false
62
98
  requirements:
63
99
  - - ! '>='
@@ -65,10 +101,15 @@ dependencies:
65
101
  version: '0'
66
102
  type: :development
67
103
  prerelease: false
68
- version_requirements: *5806360
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
69
110
  - !ruby/object:Gem::Dependency
70
111
  name: rails_exception_handler
71
- requirement: &5805160 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
72
113
  none: false
73
114
  requirements:
74
115
  - - ! '>='
@@ -76,7 +117,12 @@ dependencies:
76
117
  version: '0'
77
118
  type: :development
78
119
  prerelease: false
79
- version_requirements: *5805160
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
80
126
  description: ''
81
127
  email: contact@sharagoz.com
82
128
  executables: []
@@ -94,12 +140,15 @@ files:
94
140
  - VERSION
95
141
  - app/controllers/error_response_controller.rb
96
142
  - app/models/error_message.rb
143
+ - lib/generators/rails_exception_handler/install_generator.rb
144
+ - lib/generators/rails_exception_handler/templates/rails_exception_handler.rb
97
145
  - lib/patch/show_exceptions.rb
98
146
  - lib/rails_exception_handler.rb
99
147
  - lib/rails_exception_handler/configuration.rb
100
148
  - lib/rails_exception_handler/engine.rb
101
149
  - lib/rails_exception_handler/handler.rb
102
150
  - lib/rails_exception_handler/parser.rb
151
+ - lib/rails_exception_handler/storage.rb
103
152
  - rails_exception_handler.gemspec
104
153
  - spec/dummy_30/.gitignore
105
154
  - spec/dummy_30/lib/tasks/.gitkeep
@@ -126,9 +175,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
175
  - - ! '>='
127
176
  - !ruby/object:Gem::Version
128
177
  version: '0'
129
- segments:
130
- - 0
131
- hash: 77448128479568593
132
178
  required_rubygems_version: !ruby/object:Gem::Requirement
133
179
  none: false
134
180
  requirements:
@@ -137,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
183
  version: '0'
138
184
  requirements: []
139
185
  rubyforge_project:
140
- rubygems_version: 1.8.17
186
+ rubygems_version: 1.8.21
141
187
  signing_key:
142
188
  specification_version: 3
143
189
  summary: Exception Handling for Rails 3