exception_handler 0.2.7 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/README.md +84 -15
  4. data/{vendor → app}/assets/images/exception_handler/alert.png +0 -0
  5. data/{vendor → app}/assets/images/exception_handler/bg.png +0 -0
  6. data/{vendor → app}/assets/images/exception_handler/contact/facebook.png +0 -0
  7. data/{vendor → app}/assets/images/exception_handler/contact/fusion.png +0 -0
  8. data/{vendor → app}/assets/images/exception_handler/contact/linkedin.png +0 -0
  9. data/{vendor → app}/assets/images/exception_handler/contact/twitter.png +0 -0
  10. data/{vendor → app}/assets/images/exception_handler/contact/youtube.png +0 -0
  11. data/app/controllers/exception_handler/exception_controller.rb +1 -1
  12. data/app/views/exception_handler/exception/show.html.haml +16 -13
  13. data/exception_handler.gemspec +2 -0
  14. data/lib/exception_handler/config.rb +3 -0
  15. data/lib/exception_handler/version.rb +1 -1
  16. data/lib/generators/exception_handler/install_generator.rb +11 -42
  17. data/lib/generators/exception_handler/migration_generator.rb +27 -0
  18. data/lib/generators/exception_handler/views_generator.rb +42 -0
  19. data/lib/generators/templates/create_table.rb +9 -7
  20. data/lib/generators/templates/exception_handler.rb +2 -3
  21. data/readme/404.png +0 -0
  22. data/readme/404_demo.png +0 -0
  23. data/readme/500_demo.png +0 -0
  24. data/readme/config.png +0 -0
  25. data/readme/config_db.png +0 -0
  26. data/readme/development.png +0 -0
  27. data/readme/gem_install.png +0 -0
  28. data/readme/install.png +0 -0
  29. data/readme/install_migration.png +0 -0
  30. data/readme/install_views.png +0 -0
  31. data/spec/installation_spec.rb +15 -9
  32. data/spec/spec_helper.rb +19 -0
  33. metadata +49 -12
  34. data/lib/generators/templates/create_errors.rb +0 -14
  35. data/spec/exception_spec.rb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcd9b5923dc39f43b43beb02ee3004ea850f3103
4
- data.tar.gz: f9c1174fe636735617607af47e51cf5b43eb178b
3
+ metadata.gz: e68469b36f2f889baf7991a21d4efdb17a276e15
4
+ data.tar.gz: a031a71aafe2fd6b637cc0bf56b06ef92eccf575
5
5
  SHA512:
6
- metadata.gz: b85c858abce97e7937823922a0981caae1b3dbdd0ae639a52431b4a3f139a7ee2661adf38307846829b4a6d7d293be26ada2546d15711f6632892d77f7fff69a
7
- data.tar.gz: a3705b63eb93501674d6dd829c98bee369ef70911377177c742c7293d81e737cd4e409d4d22554076b79241eeaeafbcc74b2505b49acdc264504d4fd13d60c93
6
+ metadata.gz: 103e17d288c47a132c6fbecd30292ec29d3d92204b1739534b17eff5900f3b9e8a0688ffb18f7b2e220491552bc76dff7412d90686dc295663aedf95abdd934b
7
+ data.tar.gz: a0c49c6a9503d7e95172126801743d3553bc82f628a9bcdbb53919722441aea68dcc39f0e9c3651309c05df16c0a792542ef8a05b03dc6eb0f4c5ba31b45638a
data/Gemfile CHANGED
@@ -5,7 +5,10 @@ gemspec
5
5
 
6
6
  ###########################################
7
7
 
8
+ #For Testing
8
9
  group :test do
10
+ gem 'rspec-rails'
11
+ gem 'rails', '~> 4.1.1'
9
12
  gem 'coveralls', require: false
10
13
  end
11
14
 
data/README.md CHANGED
@@ -18,14 +18,14 @@ Works with the [`config.exceptions_app`](http://guides.rubyonrails.org/configuri
18
18
 
19
19
  ####Custom Error Pages
20
20
 
21
- You can deploy *custom error pages*. These allow you to serve your own design error pages in production; showing both the error, and the problem. This is a big step forward from the standard Rails error reporting facility
21
+ `ExceptionHandler` deploys *custom error pages*. These allow you to serve your own design error pages in production; showing both the error, and the problem. This is a big step forward from the standard Rails error reporting facility
22
22
 
23
23
  There are two types of error page:
24
24
 
25
25
  - 404 errors
26
26
  - 500 errors (+ other)
27
27
 
28
- The **`404`** error is standard (missing page) - we use your own `layout` for this. The **`500 & other errors`** are `server` issues, and so we have included an `errors` layout (`/views/layouts/errors.html.haml`).
28
+ The custom **`404`** error uses your own `layout`. The **`500 & other errors`** are `server` issues, and so we have included an `errors` layout (`/views/layouts/errors.html.haml`).
29
29
 
30
30
  The `errors` layout in important. If you try and load your "standard" layout with an internal server error, all your
31
31
  "supporting" functionality is called too. Problem? You're likely going to cause even more errors.
@@ -35,7 +35,8 @@ You can change them by using the **`rails generate exception_handler:assets --vi
35
35
 
36
36
  **500 Errors** | **404 Errors**
37
37
  --- | ---
38
- ![500 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/500.png "500 Server Error Page") | ![404 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/500.png "404 Server Error Page")
38
+ ![500 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/500.png "500 Server Error Page") | ![404 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/404.png "404 Server Error Page")
39
+ Uses **errors** layout | Uses **standard** layout
39
40
 
40
41
  -----------
41
42
 
@@ -56,7 +57,7 @@ Sometimes, you want to save your errors to your database (admin areas, multi-ten
56
57
  This db allows you to track, read & repair errors in your application on the fly. We deploy this in our admin areas, to help us
57
58
  appreciate any issues on our client apps.
58
59
 
59
- ![500 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/db.png "500 Server Error Page")
60
+ ![Errors Table](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/db.png "Errors Table")
60
61
 
61
62
  This functionality is **`disabled`** by default
62
63
 
@@ -67,33 +68,89 @@ To enable, you need to do the following:
67
68
  - rake db:migrate #-> creates `errors` table
68
69
 
69
70
  - config/initializers/exception_handler.rb
71
+ - ExceptionHandler.setup do |config|
72
+ - config.db = true
73
+ - end
70
74
 
71
75
  ---------
72
76
 
73
77
  ## Installation
74
78
 
79
+ ###Step1
80
+
81
+ You need to reference the [`exception_handler`](http://rubygems.org/gems/exception_handler) gem. Once you have downloaded the gem, you'll be able to deploy it in your application.
82
+
75
83
  Add this line to your application's Gemfile:
76
84
 
77
- gem 'exception_handler'
85
+ gem 'exception_handler'
78
86
 
79
87
  And then execute:
80
88
 
81
89
  $ bundle
82
90
 
83
- Or install it yourself as:
91
+ **Or** install it yourself as:
84
92
 
85
93
  $ gem install exception_handler
86
94
 
95
+ ![gem install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/gem_install.png "gem install")
96
+
97
+ --
98
+
99
+ ###Step2
100
+
101
+ Run:
102
+
103
+ rails generate exception_handler:install
104
+
105
+ ![Installation](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install.png "Installation")
106
+
107
+ This will create `config/initializers/exception_handler.rb`. Whilst not vital, it will give you
108
+ access to the configuration options which can change the gem's behavior:
109
+
110
+ ![Config File](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/config.png "Configuration")
111
+
112
+ --
113
+
114
+ ###Database
115
+
116
+ If you want to set up the database, you will need to use the `migration installer`:
117
+
118
+ $ rails generate exception_handler:migration
119
+
120
+ This creates:
121
+
122
+ $ rake db:migrate
123
+
124
+ This will migrate the datatable for you. Now you need to change `config.db = true`
125
+
126
+ ![DB Config](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/config_db.png "Config DB")
127
+
128
+
129
+ ---------
130
+
87
131
  ###Configuration
88
132
 
133
+ [Exception handler](https://rubygems.org/gems/exception_handler) comes with 3 installers
134
+
135
+ **You only need to use `rails generate exception_handler:install`**. The others allow you to include files on your system, or create the `errors` table.
136
+
89
137
  # General
90
- $ rails generate exception_handler:install
138
+ $ rails generate exception_handler:install #-> installs "config" file (initializer)
139
+
140
+ ![Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install.png "Standard Install")
141
+
91
142
 
92
143
  # Migration
93
- $ rails generate exception_handler:migrate
144
+ $ rails generate exception_handler:migration #-> generates migration for "errors" table
145
+
146
+ ![Migration Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install_migration.png "Migration Install")
147
+
94
148
 
95
149
  # Files
96
- $ rails generate exception_handler:assets
150
+ $ rails generate exception_handler:views #-> controller, models, views & assets
151
+ $ rails generate exception_handler:views -v views controllers models assets #-> remove as appropriate to install individual assets
152
+
153
+ ![Views Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install_views.png "Views Install")
97
154
 
98
155
 
99
156
 
@@ -101,22 +158,34 @@ Or install it yourself as:
101
158
 
102
159
  ## Usage
103
160
 
104
- ###Dev
161
+ ###Development Environment
162
+
163
+ **[`config.exceptions_app`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration)** is only used in Rails' production environment. Therefore, if you wish to **test the gem in dev**,
164
+ you'll need to make your app process requests as `production` for now. This is a temporary step, and will be
165
+ resolved in a new version:
105
166
 
106
167
  #config/environments/development.rb
107
168
  config.consider_all_requests_local = false # true
108
169
 
109
- `config.exceptions_app` is used in Rails' production environment. Therefore, if you wish to test the gem in dev,
110
- you'll need to make your app process requests as `production` for now. This is a temporary step, and will be
111
- resolved in a new version
170
+ ![Development Testing](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/development.png "Development Testing")
171
+
172
+ You should change this setting if you wish to test your styling in development mode. Please note **it should be temporary**
112
173
 
113
- ###Production
174
+ --
175
+
176
+ ###Production Environment
114
177
 
115
178
  No action required
116
179
 
180
+ ---------
181
+
117
182
  ###Demo
118
183
 
119
- Demo to be put onto Heroku etc
184
+ **404 Error** | **500 Error**
185
+ :---: | :---:
186
+ [![404 Error Page](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/404_demo.png "404 Error Page Demo")](http://firststopcosmeticshop.co.uk/sdfsdf/sdf/sdfsdf) | [![500 Error Page](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/500_demo.png "500 Error Page Demo")](http://firststopcosmeticshop.co.uk/search/fasdfasdfasdfasdfasdf)
187
+ [Link](http://firststopcosmeticshop.co.uk/sdfsdf/sdf/sdfsdf) | [Link](http://firststopcosmeticshop.co.uk/search/fasdfasdfasdfasdfasdf)
188
+
120
189
 
121
190
  --------
122
191
 
@@ -56,7 +56,7 @@ module ExceptionHandler
56
56
 
57
57
  #App
58
58
  def app_name
59
- @app_name = Rails.application.class.parent_name
59
+ @app_name = Rails.application.class.parent_name
60
60
  end
61
61
 
62
62
  end
@@ -1,15 +1,18 @@
1
- .error
2
- /Alert
3
- = image_tag 'exception_handler/alert.png', width: "150", alt: "Error!", title: "Sorry, A Server Error Occurred", class: "alert"
1
+ - if @status.to_s == "404"
2
+ Sorry, this page is missing!
3
+ - else
4
+ .error
5
+ /Alert
6
+ = image_tag 'exception_handler/alert.png', width: "150", alt: "Error!", title: "Sorry, A Server Error Occurred", class: "alert"
4
7
 
5
- /Message
6
- .message
7
- %strong
8
- = details[:name]
9
- %span
10
- = details[:message]
8
+ /Message
9
+ .message
10
+ %strong
11
+ = details[:name]
12
+ %span
13
+ = details[:message]
11
14
 
12
- /Contact
13
- .contact
14
- - ExceptionHandler.config.social.each do |item, address|
15
- %a{ href: address, target: "_blank" }> #{image_tag "exception_handler/contact/#{item}.png", title: item.to_s.titleize}
15
+ /Contact
16
+ .contact
17
+ - ExceptionHandler.config.social.each do |item, address|
18
+ %a{ href: address, target: "_blank" }> #{image_tag "exception_handler/contact/#{item}.png", title: item.to_s.titleize}
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rails", "~> 4.0.0"
23
23
  spec.add_development_dependency "haml", "~> 4.0.5"
24
24
  spec.add_development_dependency "sass", "~> 3.3.7"
25
+ spec.add_development_dependency "activerecord"
26
+ spec.add_development_dependency "activesupport"
25
27
  spec.add_development_dependency "rake"
26
28
  spec.add_development_dependency "rspec"
27
29
  end
@@ -1,8 +1,11 @@
1
1
  ###########################################
2
+
2
3
  # Refs
3
4
  # http://stackoverflow.com/questions/10584638/setting-up-configuration-settings-when-writing-a-gem
4
5
  # http://robots.thoughtbot.com/mygem-configure-block
6
+
5
7
  ###########################################
8
+
6
9
  module ExceptionHandler
7
10
  class Config
8
11
  attr_accessor :db, :social
@@ -1,3 +1,3 @@
1
1
  module ExceptionHandler
2
- VERSION = "0.2.7"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -1,51 +1,20 @@
1
1
  module ExceptionHandler
2
- class InstallGenerator < Rails::Generators::Base
2
+ class Generators
3
+ class InstallGenerator < Rails::Generators::Base
3
4
 
4
- #Needed to reference files
5
- source_root File.expand_path("../../templates", __FILE__)
5
+ #Needed to reference files
6
+ source_root File.expand_path("../../templates", __FILE__)
6
7
 
7
- #Option
8
- class_option :assets, desc: 'Add views, controllers, models & assets to app (for customization)'
9
- class_option :migration, type: :boolean, desc: 'Create migration'
10
-
11
- #Config
12
- def create_config_file
13
- return unless options.empty?
14
- template "exception_handler.rb", "config/initializers/exception_handler.rb" # https://github.com/plataformatec/devise/blob/master/lib/generators/devise/install_generator.rb#L13
15
- end
16
-
17
- #Assets
18
- def create_customization assets = options.assets
19
- #(views / controllers / models / assets)
20
- return unless assets
21
- file_generator assets
22
- end
23
-
24
- #Migration
25
- def create_migration
26
- return unless options.migration?
27
- template "create_table.rb", "db/migrate/create_table.rb" #-> Need to use ActiveRecord::Generators::Base
28
- end
8
+ ###########################################
29
9
 
30
- protected
31
-
32
- #File Generator
33
- def file_generator args = options, options = %w(views controllers models assets)
34
-
35
- #Valid?
36
- return raise "Invalid Argument" unless options.include? args
37
-
38
- #Types
39
- if args.is_a? String
40
- create_file "config/initializers/#{args}.rb", "# Add initialization content here"
41
- elsif args.is_a? Array
42
- for arg in args do
43
- create_file "config/initializers/#{arg}.rb", "# Add initialization content here" #Need to use template
44
- end
45
- else
46
- raise "Sorry, you either need to use 'views', 'controllers', 'models', 'assets' as the --files options"
10
+ #Config
11
+ def create_config_file
12
+ return unless options.empty?
13
+ template "exception_handler.rb", "config/initializers/exception_handler.rb" # https://github.com/plataformatec/devise/blob/master/lib/generators/devise/install_generator.rb#L13
47
14
  end
48
15
 
16
+ ###########################################
17
+
49
18
  end
50
19
  end
51
20
  end
@@ -0,0 +1,27 @@
1
+ ###########################################
2
+
3
+ require 'rails/generators/active_record'
4
+
5
+ ###########################################
6
+
7
+ #Migration Generator (for adding errors table)
8
+ #Ref: https://github.com/plataformatec/devise/blob/master/lib/generators/active_record/devise_generator.rb
9
+
10
+ module ExceptionHandler
11
+ class MigrationGenerator < ActiveRecord::Generators::Base
12
+
13
+ #Name - from http://old.thoughtsincomputation.com/posts/cgfr3-part-3-adding-a-generator
14
+ argument :name, default: "migration"
15
+
16
+ #Source of Migrations
17
+ source_root File.expand_path("../../templates", __FILE__)
18
+
19
+ ###########################################
20
+
21
+ #Create Migration
22
+ def create_errors_migration
23
+ migration_template "create_table.rb", "db/migrate/create_errors.rb"
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,42 @@
1
+ module ExceptionHandler
2
+ class ViewsGenerator < Rails::Generators::Base
3
+
4
+ #Views
5
+ @@views = %w(views controllers models assets)
6
+
7
+ #Options
8
+ class_option :files, aliases: "-v", default: @@views, type: :array, desc: "Select file types (views, models, controllers, assets)"
9
+
10
+ #Needed to reference files
11
+ source_root File.expand_path("../../../../app", __FILE__)
12
+
13
+ ###########################################
14
+
15
+ #Files
16
+ def create_files
17
+ generate_files options.files
18
+ end
19
+
20
+ ###########################################
21
+
22
+ protected
23
+
24
+ #File Generator
25
+ def generate_files args
26
+
27
+ #Valid?
28
+ return raise args.inspect unless args.nil? || (args-@@views).empty?
29
+
30
+ #Types
31
+ for arg in args do
32
+ directory arg, "app/#{arg}"
33
+ end
34
+
35
+ #Success
36
+ puts "Files transferred successfully"
37
+ end
38
+
39
+ ###########################################
40
+
41
+ end
42
+ end
@@ -1,13 +1,15 @@
1
1
  class CreateErrors < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :errors do |t|
4
- t.text :class_name
5
- t.text :message
6
- t.text :trace
7
- t.text :target_url
8
- t.text :referer_url
9
- t.text :params
10
- t.text :user_agent
4
+ t.string :usable_type
5
+ t.integer :usable_id
6
+ t.text :class_name
7
+ t.text :message
8
+ t.text :trace
9
+ t.text :target_url
10
+ t.text :referer_url
11
+ t.text :params
12
+ t.text :user_agent
11
13
  t.timestamps
12
14
  end
13
15
  end
@@ -6,9 +6,8 @@
6
6
  ExceptionHandler.setup do |config|
7
7
 
8
8
  #DB -
9
- #Default = false / true ("errors")
10
- #Options = [string] = sets db name (if use true, default is "errors")
11
- config.db = "errors"
9
+ #Options = false / true
10
+ config.db = false
12
11
 
13
12
  #Email -
14
13
  #Default = false / true
data/readme/404.png ADDED
Binary file
Binary file
Binary file
data/readme/config.png ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,18 +1,24 @@
1
- #Coveralls
2
- require 'coveralls'
3
- Coveralls.wear!
4
-
5
1
  ###########################################
6
2
 
7
3
  require 'spec_helper'
8
4
 
9
5
  ###########################################
10
6
 
11
- describe "test" do
7
+ class InstallationSpec < Rails::Generators::TestCase
8
+
9
+ #Setup
10
+ tests ExceptionHandler::Generators::InstallGenerator
11
+ destination File.expand_path("../../tmp", __FILE__)
12
+
13
+ #Before
14
+ setup do
15
+ prepare_destination
16
+ run_generator
17
+ end
12
18
 
13
- describe "404 Error" do
14
- it "will show custom 404 error page" do
15
- end
16
- end
19
+ #Config Installer
20
+ test "assert Config Files Are Created" do
21
+ assert_file "config/initializers/exception_handler.rb"
22
+ end
17
23
 
18
24
  end
data/spec/spec_helper.rb CHANGED
@@ -4,6 +4,25 @@
4
4
  # loaded once.
5
5
  #
6
6
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+
8
+ #Coveralls
9
+ require 'coveralls'
10
+ Coveralls.wear!
11
+
12
+ #Env
13
+ ENV["RAILS_ENV"] = 'test'
14
+
15
+ #Rails
16
+ #require 'rails'
17
+ #require 'active_support'
18
+
19
+ #For Generators
20
+ require "rails/generators/test_case"
21
+ require "generators/exception_handler/install_generator"
22
+
23
+
24
+ ###########################################
25
+
7
26
  RSpec.configure do |config|
8
27
  config.treat_symbols_as_metadata_keys_with_true_values = true
9
28
  config.run_all_when_everything_filtered = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Peck
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-31 00:00:00.000000000 Z
12
+ date: 2014-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -67,6 +67,34 @@ dependencies:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: 3.3.7
70
+ - !ruby/object:Gem::Dependency
71
+ name: activerecord
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: activesupport
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
70
98
  - !ruby/object:Gem::Dependency
71
99
  name: rake
72
100
  requirement: !ruby/object:Gem::Requirement
@@ -111,6 +139,13 @@ files:
111
139
  - LICENSE.txt
112
140
  - README.md
113
141
  - Rakefile
142
+ - app/assets/images/exception_handler/alert.png
143
+ - app/assets/images/exception_handler/bg.png
144
+ - app/assets/images/exception_handler/contact/facebook.png
145
+ - app/assets/images/exception_handler/contact/fusion.png
146
+ - app/assets/images/exception_handler/contact/linkedin.png
147
+ - app/assets/images/exception_handler/contact/twitter.png
148
+ - app/assets/images/exception_handler/contact/youtube.png
114
149
  - app/controllers/exception_handler/exception_controller.rb
115
150
  - app/models/exception_handler/error.rb
116
151
  - app/views/exception_handler/exception/show.html.haml
@@ -121,22 +156,25 @@ files:
121
156
  - lib/exception_handler/parser.rb
122
157
  - lib/exception_handler/version.rb
123
158
  - lib/generators/exception_handler/install_generator.rb
124
- - lib/generators/templates/create_errors.rb
159
+ - lib/generators/exception_handler/migration_generator.rb
160
+ - lib/generators/exception_handler/views_generator.rb
125
161
  - lib/generators/templates/create_table.rb
126
162
  - lib/generators/templates/exception_handler.rb
163
+ - readme/404.png
164
+ - readme/404_demo.png
127
165
  - readme/500.png
166
+ - readme/500_demo.png
167
+ - readme/config.png
168
+ - readme/config_db.png
128
169
  - readme/db.png
170
+ - readme/development.png
129
171
  - readme/exception_handler.png
130
- - spec/exception_spec.rb
172
+ - readme/gem_install.png
173
+ - readme/install.png
174
+ - readme/install_migration.png
175
+ - readme/install_views.png
131
176
  - spec/installation_spec.rb
132
177
  - spec/spec_helper.rb
133
- - vendor/assets/images/exception_handler/alert.png
134
- - vendor/assets/images/exception_handler/bg.png
135
- - vendor/assets/images/exception_handler/contact/facebook.png
136
- - vendor/assets/images/exception_handler/contact/fusion.png
137
- - vendor/assets/images/exception_handler/contact/linkedin.png
138
- - vendor/assets/images/exception_handler/contact/twitter.png
139
- - vendor/assets/images/exception_handler/contact/youtube.png
140
178
  homepage: http://frontlineutilities.co.uk/ror/custom_error_pages
141
179
  licenses:
142
180
  - MIT
@@ -163,6 +201,5 @@ specification_version: 4
163
201
  summary: Rails gem to show custom error pages in production. Also logs errors in "errors"
164
202
  db if required
165
203
  test_files:
166
- - spec/exception_spec.rb
167
204
  - spec/installation_spec.rb
168
205
  - spec/spec_helper.rb
@@ -1,14 +0,0 @@
1
- class CreateErrors < ActiveRecord::Migration
2
- def change
3
- create_table :errors do |t|
4
- t.text :class_name
5
- t.text :message
6
- t.text :trace
7
- t.text :target_url
8
- t.text :referer_url
9
- t.text :params
10
- t.text :user_agent
11
- t.timestamps
12
- end
13
- end
14
- end
@@ -1,18 +0,0 @@
1
- #Coveralls
2
- require 'coveralls'
3
- Coveralls.wear!
4
-
5
- ###########################################
6
-
7
- require 'spec_helper'
8
-
9
- ###########################################
10
-
11
- describe "test" do
12
-
13
- describe "404 Error" do
14
- it "will show custom 404 error page" do
15
- end
16
- end
17
-
18
- end