exception_handler 0.3.45 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +86 -122
  3. data/app/assets/images/exception_handler/alert.jpg +0 -0
  4. data/app/assets/images/exception_handler/alert.png +0 -0
  5. data/app/assets/images/exception_handler/bg.jpg +0 -0
  6. data/app/assets/images/exception_handler/bg_overlay.png +0 -0
  7. data/app/assets/images/exception_handler/close.png +0 -0
  8. data/app/assets/images/exception_handler/connect/facebook.png +0 -0
  9. data/app/assets/images/exception_handler/connect/fusion.png +0 -0
  10. data/app/assets/images/exception_handler/connect/linkedin.png +0 -0
  11. data/app/assets/images/exception_handler/connect/twitter.png +0 -0
  12. data/app/assets/images/exception_handler/connect/youtube.png +0 -0
  13. data/app/assets/images/exception_handler/home.png +0 -0
  14. data/app/assets/images/exception_handler/noise.png +0 -0
  15. data/app/assets/images/exception_handler/overlay.png +0 -0
  16. data/app/assets/stylesheets/exception_handler/error.css.erb +297 -0
  17. data/app/controllers/exception_handler/exception_controller.rb +13 -6
  18. data/app/views/exception_handler/exception/show.html.erb +25 -23
  19. data/app/views/layouts/error.html.erb +17 -73
  20. data/lib/exception_handler.rb +9 -5
  21. data/lib/exception_handler/config.rb +9 -3
  22. data/lib/exception_handler/parser.rb +2 -2
  23. data/lib/exception_handler/version.rb +1 -1
  24. data/lib/generators/exception_handler/install_generator.rb +1 -1
  25. data/lib/generators/exception_handler/migration_generator.rb +12 -2
  26. data/lib/generators/templates/config.rb +43 -0
  27. data/lib/generators/templates/{create_table.rb → migration.rb.erb} +2 -2
  28. data/readme/400.jpg +0 -0
  29. data/readme/500.jpg +0 -0
  30. data/readme/application_controller.jpg +0 -0
  31. data/readme/config.jpg +0 -0
  32. data/readme/db.jpg +0 -0
  33. data/readme/db_edit.jpg +0 -0
  34. data/readme/dev.jpg +0 -0
  35. data/readme/exception_controller.jpg +0 -0
  36. data/readme/exceptions_app.png +0 -0
  37. data/readme/layout.jpg +0 -0
  38. data/readme/parser.jpg +0 -0
  39. data/readme/source/title.psd +0 -0
  40. data/readme/subtitle.jpg +0 -0
  41. data/readme/title.png +0 -0
  42. data/readme/view.jpg +0 -0
  43. metadata +50 -41
  44. data/app/assets/images/exception_handler/bg.png +0 -0
  45. data/app/assets/images/exception_handler/contact/facebook.png +0 -0
  46. data/app/assets/images/exception_handler/contact/fusion.png +0 -0
  47. data/app/assets/images/exception_handler/contact/linkedin.png +0 -0
  48. data/app/assets/images/exception_handler/contact/twitter.png +0 -0
  49. data/app/assets/images/exception_handler/contact/youtube.png +0 -0
  50. data/lib/generators/templates/exception_handler.rb +0 -25
  51. data/readme/404.png +0 -0
  52. data/readme/404_demo.png +0 -0
  53. data/readme/500.png +0 -0
  54. data/readme/500_demo.png +0 -0
  55. data/readme/config.png +0 -0
  56. data/readme/config_db.png +0 -0
  57. data/readme/db.png +0 -0
  58. data/readme/development.png +0 -0
  59. data/readme/exception_handler.png +0 -0
  60. data/readme/gem_install.png +0 -0
  61. data/readme/install.png +0 -0
  62. data/readme/install_migration.png +0 -0
  63. data/readme/install_views.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2138c87ceb274a814a29d092734aa1a69803fb1
4
- data.tar.gz: 2e88d2a0b3712594ba8cca9f54fd0aa1c2e17e36
3
+ metadata.gz: 59b626c88f86b2004ac659f93be9a15249db6809
4
+ data.tar.gz: 13a0cd232e3e096df48e6afe04a1a43ebe5de56d
5
5
  SHA512:
6
- metadata.gz: d50d274eafdc3b0cc3ff5eb0d8e8056b06ee7cebcc1251b4e01c155cce28080c438fb7ba523a82664a93c42cfe415194b41e4b0cc3a89cced0fb390d67acf545
7
- data.tar.gz: a49b192481e227188d0d60f1a44e9d0acf9e1c6cdee824b4fb10a21583f26fea45ca50ff489c68fff0c1c69ff922f6ed618c2d61811d22d07ddd3830fcc6aa52
6
+ metadata.gz: a9112518dc66d6f03981325fe72437c7365f748802bb39c562e8185ad15234e9a091a4f09247c8bcd4bd4b4bb1984de67adb4857981c35ff68ed6f61c48a04e3
7
+ data.tar.gz: 62328b6458cd677c0ff16646a2dcd68449afa5284ab50fc93486989b558d79331b35ffb5773bd04b4cc8ddc66dfbc1175a0d627f62c56ef19a4466a0089b8f1f
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [![Exception Handler](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/exception_handler.png "Exception Handler Logo")](http://frontlineutilities.co.uk/ruby-on-rails/exception-handler)
1
+ ![Exception Handler](/readme/title.png "Exception Handler Logo")
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/exception_handler.svg)](http://badge.fury.io/rb/exception_handler)
4
4
  [![Code Climate](https://codeclimate.com/github/richpeck/exception_handler.png)](https://codeclimate.com/github/richpeck/exception_handler)
@@ -7,205 +7,169 @@
7
7
  [![Build Status](https://travis-ci.org/richpeck/exception_handler.svg?branch=master)](https://travis-ci.org/richpeck/exception_handler)
8
8
 
9
9
 
10
- [**ExceptionHandler** Rails Gem](https://rubygems.org/gems/exception_handler) (adapted from [this tutorial](https://gist.github.com/wojtha/8433843) & [this tutorial](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3))
10
+ ----------
11
11
 
12
- Works with the [`config.exceptions_app`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration) hook in Rails' middleware stack:
12
+ Sick of the standard Rails error pages?
13
13
 
14
- config.exceptions_app sets the exceptions application invoked by the ShowExceptionmiddleware
15
- when an exception happens. Defaults to ActionDispatch::PublicExceptions.new(Rails.public_path).
14
+ Need a custom layout to show professional-looking errors in production?
16
15
 
17
- -----------
16
+ `exception_handler` is exactly what you need!
18
17
 
19
- ####Custom Error Pages
18
+ ----------
20
19
 
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
20
+ **ExceptionHandler** provides error handling for Rails 4+ apps *(adapted from [**1**](https://gist.github.com/wojtha/8433843) & [**2**](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3))*.
22
21
 
23
- There are two types of error page:
22
+ It hooks into the **[`config.exceptions_app`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration)** middleware:
24
23
 
25
- - 404 errors
26
- - 500 errors (+ other)
24
+ ![Exceptions_App middleware](/readme/exceptions_app.png)
27
25
 
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.erb`).
26
+ With **ExceptionHandler**, you can create custom **404 & 500 production error pages**:
29
27
 
30
- The `errors` layout in important. If you try and load your "standard" layout with an internal server error, all your
31
- "supporting" functionality is called too. Problem? You're likely going to cause even more errors.
28
+ ![Exceptions_App middleware](/readme/subtitle.jpg)
32
29
 
33
- **Custom error pages** are included by default.
34
- You can change them by using the **`rails generate exception_handler:assets --views`**:
30
+ ---
35
31
 
36
- **500 Errors** | **404 Errors**
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/404.png "404 Server Error Page")
39
- Uses **errors** layout | Uses **standard** layout
40
-
41
- -----------
42
-
43
- ####Saving Errors To DB
44
-
45
- Adapted & refactored from [this tutorial](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3)
46
-
47
- Sometimes, you want to save your errors to your database (admin areas, multi-tenant apps, etc). We've included some middleware which captures the exceptions & saves them to the db:
48
-
49
- - Model (class) Name
50
- - Error Message
51
- - Stack trace
52
- - Target URL
53
- - Referrer URL
54
- - Params
55
- - User Agent (Browser Details)
32
+ **ExceptionHandler** catches errors in the middleware hook (`config.exceptions_app`), channeling the users to our [custom `exceptions` controller](blob/master/app/controllers/exception_handler/exception_controller.rb). It then dissects data such as the `message`, `details`, `user agent`, etc, redirect the user to a `custom view`, storing it in the db:
56
33
 
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
58
- appreciate any issues on our client apps.
34
+ **40x Errors** | **50x Errors**
35
+ --- | ---
36
+ ![404 Error Page](/readme/400.jpg "404 Error Page (Uses Application Layout)") | ![500 Error Page](/readme/500.jpg "500 Error Page (Uses Error Layout)")
37
+ **layouts/application.html.erb** | **layouts/errors.html.erb**
59
38
 
60
- ![Errors Table](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/db.png "Errors Table")
61
39
 
62
- This functionality is **`disabled`** by default
40
+ All exceptions in Rails are handled by the [`ActiveDispatch::ShowExceptions`](https://github.com/rails/rails/blob/4-0-stable/actionpack/lib/action_dispatch/middleware/show_exceptions.rb) middleware.
63
41
 
64
- To enable, you need to do the following:
42
+ This is invoked through a hook called `config.exceptions_app`, accessed through the `environment` files of rails `application.rb`, `environments/development.rb`, `environments/production.rb` etc.
65
43
 
66
- - rails generate exception_handler:install #-> will install config initializer
67
- - rails generate exception_handler:migration #-> will create migration (for `errors` table)
68
- - rake db:migrate #-> creates `errors` table
44
+ Whilst it's common practice to use `config.exceptions_app = self.routes` to send exceptions to your routes, `ExceptionHandler` hooks directly into the middleware, giving us access to all the data:
69
45
 
70
- - config/initializers/exception_handler.rb
71
- - ExceptionHandler.setup do |config|
72
- - config.db = true
73
- - end
46
+ ![Parse](/readme/parser.jpg "Parser")
74
47
 
75
- ---------
48
+ ----------
76
49
 
77
50
  ## Installation
78
51
 
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
-
83
- Add this line to your application's Gemfile:
52
+ gem install 'exception_handler'
53
+
54
+ or
84
55
 
85
- gem 'exception_handler'
86
-
87
- And then execute:
56
+ gem 'exception_handler', '~> 0.4' # Gemfile
88
57
 
89
58
  $ bundle
90
59
 
91
- **Or** install it yourself as:
92
-
93
- $ gem install exception_handler
94
-
95
- ![gem install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/gem_install.png "gem install")
60
+ You can see [`ExceptionHandler` on RubyGems](https://rubygems.org/gems/exception_handler)
96
61
 
97
62
  --
98
63
 
99
- ###Step2
100
-
101
- Run:
64
+ ##### Config
102
65
 
103
- rails generate exception_handler:install
66
+ *Optional*
104
67
 
105
- ![Installation](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install.png "Installation")
68
+ If you wish to change any of the default settings (listed below), run the following command:
106
69
 
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:
70
+ $ rails g exception_handler:install
109
71
 
110
- ![Config File](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/config.png "Configuration")
72
+ ![Creates config/initializers/exception_handler.rb](/readme/config.jpg)
111
73
 
112
- --
74
+ This will deploy a file to `config/initializers/exception_handler.rb`, which you'll be able to edit as required.
113
75
 
114
- ###Database
76
+ You can run `ExceptionHandler` just from the `gem` if you wish.
115
77
 
116
- If you want to set up the database, you will need to use the `migration installer`:
78
+ --
117
79
 
118
- $ rails generate exception_handler:migration
80
+ ##### DB
119
81
 
120
- This creates:
82
+ *Optional*
121
83
 
122
- $ rake db:migrate
84
+ If you want to set up database support (IE have exceptions saved to a table), you need to create a migration:
123
85
 
124
- This will migrate the datatable for you. Now you need to change `config.db = true`
86
+ $ rails generate exception_handler:migration
87
+ $ rake db:migrate
125
88
 
126
- ![DB Config](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/config_db.png "Config DB")
89
+ ![Database](/readme/db.jpg "Database")
127
90
 
91
+ This is an optional step. If you want to save the data, you will also need to ensure your `config.db` option is correct:
128
92
 
129
- ---------
93
+ ![Database Edit](/readme/db_edit.jpg "Database Edit")
130
94
 
131
- ###Configuration
95
+ --
132
96
 
133
- [Exception handler](https://rubygems.org/gems/exception_handler) comes with 3 installers
97
+ ##### Views
134
98
 
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.
99
+ *Optional*
136
100
 
137
- # General
138
- $ rails generate exception_handler:install #-> installs "config" file (initializer)
101
+ If you want to change the views, you can have them put into your app:
139
102
 
140
- ![Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install.png "Standard Install")
103
+ $ rails generate exception_handler:views #-> controller, models, views & assets
104
+ $ rails generate exception_handler:views -v views controllers models assets #-> remove as appropriate to install individual assets
141
105
 
106
+ The views will be appended to your app, and you'll be able to edit them as required.
142
107
 
143
- # Migration
144
- $ rails generate exception_handler:migration #-> generates migration for "errors" table
108
+ ---
145
109
 
146
- ![Migration Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install_migration.png "Migration Install")
110
+ ###### Show
147
111
 
112
+ ![View](/readme/view.jpg "View")
148
113
 
149
- # Files
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
114
+ The view is located in `app/views/exception_handler/show.html.erb` designed to work for all exceptions.
152
115
 
153
- ![Views Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install_views.png "Views Install")
116
+ By default, it is split for use with different layouts, data being available to both.
154
117
 
118
+ This works exactly the same as the other views in your app (IE the `exceptions` controller invokes the `show` action)
155
119
 
120
+ ---
156
121
 
157
- ---------
122
+ ###### Layout
158
123
 
159
- ## Usage
124
+ One of the most critial aspects of **ExceptionHandler** is the custom `Error` layout.
160
125
 
161
- ###Development Environment
126
+ If you want to change the layout (for 500 error pages), you need to use the following:
162
127
 
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:
128
+ ![Layout](/readme/layout.jpg "Layout")
166
129
 
167
- #config/environments/development.rb
168
- config.consider_all_requests_local = false # true
130
+ ----------
169
131
 
170
- ![Development Testing](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/development.png "Development Testing")
132
+ ### Development
171
133
 
172
- You should change this setting if you wish to test your styling in development mode. Please note **it should be temporary**
134
+ `config.exceptions_app` is only used in Rails' **production** environment.
173
135
 
174
- --
136
+ If you wish to test the gem in dev, you'll need to make your app process requests as production for now. This is a temporary step, and will be resolved in a new version:
175
137
 
176
- ###Production Environment
138
+ ![#config/environments/development.rb](/readme/dev.jpg "Developer Testing")
177
139
 
178
- No action required
140
+ You should change this setting if you wish to test your styling in development mode. It should be temporary (you need to change it back once you have it looking how you like)
179
141
 
180
- ---------
142
+ ### Usable_Type & Usable_ID
181
143
 
182
- ###Demo
144
+ ----------
183
145
 
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)
146
+ ## Bugs
188
147
 
148
+ 1. `ApplicationController`
189
149
 
190
- --------
150
+ ![ApplicationController](/readme/application_controller.jpg "Application Controller")
151
+
152
+ A significant issue exists in respect to the inheritance of `exceptions_controller`.
153
+ Our current version (`0.4`) inherits from the `ApplicationController`. This causes a problem for many applications.
191
154
 
192
- ## Support
155
+ If you use any sort of `before_action` callback in your controller, especially to populate variables, this
156
+ will cause untold problems in your `exceptions_controller`.
193
157
 
194
- If you need help, you may consider:
158
+ `500` errors are server faults; trying to get the server to call more data will simply not work. It causes
159
+ an exception loop, leading to catastrophic failure.
195
160
 
196
- 1. Watching this [**video tutorial**](http://www.youtube.com/watch?v=Zo2vav3dYnY):
197
161
 
198
- [![ExceptionHandler Update](http://img.youtube.com/vi/Zo2vav3dYnY/0.jpg)](http://www.youtube.com/watch?v=Zo2vav3dYnY)
199
- 2. Read [**our tutorial**](http://google.com)
200
- 3. Ask on [**StackOverflow**](http://stackoverflow.com)
201
- 4. Go on the [**gem support page**](http://frontlineutilities.co.uk)
162
+ ## Support
202
163
 
203
- ---------
164
+ - Watch the video tutorial (soon)
165
+ - [Create an "issue"](https://github.com/richpeck/exception_handler/issues)
166
+ - Contact support (soon)
167
+ - [Ask on StackOverflow](http://stackoverflow.com/questions/ask?tags=exception_handler&ruby_on_rails)
204
168
 
205
- ## Contributing
169
+ ## Contribution
206
170
 
207
171
  1. Fork it ( https://github.com/richpeck/exception_handler/fork )
208
172
  2. Create your feature branch (`git checkout -b my-new-feature`)
209
173
  3. Commit your changes (`git commit -am 'Add some feature'`)
210
174
  4. Push to the branch (`git push origin my-new-feature`)
211
- 5. Create a new Pull Request
175
+ 5. Create a new Pull Request
@@ -0,0 +1,297 @@
1
+ /* Vars */
2
+ <% size = 20 %>
3
+ <% opacity = 0.85 %>
4
+ <% footer = 50 %>
5
+ <% radius = 5 %>
6
+ <% title_bg = "rgba(227,11,11,1)" %>
7
+
8
+
9
+ /* Responsive */
10
+ @media screen and (max-width: 950px) {
11
+ html { background-size: cover !important; }
12
+ .container .error { width: 55% !important; }
13
+ }
14
+
15
+ /* Styling */
16
+ * { margin: 0; }
17
+ html, body, .container { height: 100%; }
18
+ html {
19
+ height: 100%;
20
+ background: #010008 url(<%= asset_url("exception_handler/bg.jpg") %>) top left no-repeat;
21
+ background-size: 100% 100%;
22
+ }
23
+ body {
24
+ font-family: Helvetica, Arial, Sans-Serif;
25
+ font-size: 14px;
26
+ text-transform: capitalize;
27
+ }
28
+ body:before,
29
+ body:after {
30
+ content: "";
31
+ position: absolute;
32
+ top: 0;
33
+ left: 0;
34
+ width: 100%;
35
+ height: 100%;
36
+ z-index: 1000;
37
+ }
38
+ body:before{ background-image: url(<%=asset_url("exception_handler/noise.png") %>); background-repeat: repeat; }
39
+ body:after{ background-image: url(<%=asset_url("exception_handler/bg_overlay.png") %>); background-repeat: no-repeat; }
40
+
41
+ a { color: #fff; text-decoration: none; }
42
+ a:hover { text-decoration: underline; }
43
+
44
+ .container {
45
+ position: relative;
46
+ min-height: 100%;
47
+ overflow-y: hidden; /* Shouldn't need to have this */
48
+ margin-bottom: -<%= footer * 1.2 %>px;
49
+ z-index: 1100;
50
+ }
51
+
52
+ .container .error {
53
+ display: block;
54
+ margin: 10% auto 0;
55
+ width: 25%;
56
+ color: #000;
57
+ text-align: center;
58
+ overflow: hidden;
59
+ background: rgba(255,255,255,1);
60
+ border: 1px solid rgba(0,0,0,1);
61
+ border-radius: <%= radius %>px;
62
+
63
+ -moz-background-clip: padding;
64
+ -webkit-background-clip: padding-box;
65
+ background-clip: padding-box;
66
+
67
+ -webkit-transition: width 0.15s ease-in-out;
68
+ -moz-transition: width 0.15s ease-in-out;
69
+ -ms-transition: width 0.15s ease-in-out;
70
+ -o-transition: width 0.15s ease-in-out;
71
+ transition: width 0.15s ease-in-out;
72
+ }
73
+
74
+ .container .error img.alert {
75
+ display: block;
76
+ margin: 0 auto 20px auto;
77
+ }
78
+
79
+ .container .message > * { display: block; }
80
+ .container .message .title {
81
+ display: block;
82
+ position: relative;
83
+ font-weight: bold;
84
+ font-size: 0.85em;
85
+ margin: 0;
86
+ color: rgba(255,255,255,1);
87
+ background: <%= title_bg %>;
88
+ padding: 12px 15px;
89
+ text-align: left;
90
+ text-shadow: 0px 1px 0px rgba(0,0,0,1);
91
+ overflow-y: hidden;
92
+
93
+ /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#7a07ed+0,000000+100&amp;0+0,1+100 */
94
+ background: <%= title_bg %> -moz-linear-gradient(top, rgba(227,11,11,0) 0%, rgba(0,0,0,0.4) 100%); /* FF3.6+ */
95
+ background: <%= title_bg %> -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(227,11,11,0)), color-stop(100%,rgba(0,0,0,0.4))); /* Chrome,Safari4+ */
96
+ background: <%= title_bg %> -webkit-linear-gradient(top, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* Chrome10+,Safari5.1+ */
97
+ background: <%= title_bg %> -o-linear-gradient(top, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* Opera 11.10+ */
98
+ background: <%= title_bg %> -ms-linear-gradient(top, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* IE10+ */
99
+ background: <%= title_bg %> linear-gradient(to bottom, rgba(227,11,11,0) 0%,rgba(0,0,0,0.4) 100%); /* W3C */
100
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007a07ed', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
101
+ }
102
+ .container .message .title:before,
103
+ .container .message .title:after {
104
+ position: absolute;
105
+ content: "";
106
+ width: 100%;
107
+ left: 0;
108
+ }
109
+ .container .message .title:before {
110
+ position: absolute;
111
+ content: "";
112
+ width: 100%;
113
+ left: 0;
114
+ height: 100%;
115
+ top: 0;
116
+ background: url(<%= asset_url("exception_handler/overlay.png") %>) repeat;
117
+ background-size: 100%;
118
+ }
119
+ .container .message .title:after {
120
+ height: 1px;
121
+ background: rgba(255,255,255,0.1);
122
+ bottom: 0px;
123
+ }
124
+ .container .message .title a.close {
125
+ float: right;
126
+ position: relative;
127
+ top: 2px;
128
+ right: -2px;
129
+ }
130
+ .container .message .title a.close img {
131
+ width: 12px;
132
+
133
+ -webkit-transition: opacity 0.15s ease-in-out;
134
+ -moz-transition: opacity 0.15s ease-in-out;
135
+ -ms-transition: opacity 0.15s ease-in-out;
136
+ -o-transition: opacity 0.15s ease-in-out;
137
+ transition: opacity 0.15s ease-in-out;
138
+ }
139
+ .container .message .title a.close:hover img { opacity: 0.75; }
140
+
141
+
142
+
143
+ .container .message .details {
144
+ position: relative;
145
+ margin: 0;
146
+ padding: 0;
147
+ height: 310px;
148
+ width: 100%;
149
+ background-image: url(<%= asset_url("exception_handler/alert.jpg") %>);
150
+ background-repeat: no-repeat;
151
+ background-size: cover;
152
+ background-position: center top;
153
+ }
154
+ .container .message .details:before,
155
+ .container .message .details:after {
156
+ display: block;
157
+ content: "";
158
+ position: absolute;
159
+ left: 0;
160
+ top: 0;
161
+ width: 100%;
162
+ z-index: 1000;
163
+ }
164
+ .container .message .details:after {
165
+ height: 2px;
166
+
167
+ /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&amp;1+0,0+100 */
168
+ background: -moz-linear-gradient(top, rgba(0,0,0,0.485) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */
169
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.85)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
170
+ background: -webkit-linear-gradient(top, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
171
+ background: -o-linear-gradient(top, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
172
+ background: -ms-linear-gradient(top, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* IE10+ */
173
+ background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%,rgba(0,0,0,0) 100%); /* W3C */
174
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
175
+
176
+ }
177
+ .container .message .details:before {
178
+ height: 100%;
179
+ outline-offset: -1px;
180
+ outline: 1px solid rgba(255,255,255,0.1);
181
+ }
182
+ .container .message .details img {
183
+ margin: 10% 0 0 0;
184
+ padding: 0;
185
+ }
186
+ .container .message .details .status {
187
+ position: absolute;
188
+ left: 0;
189
+ bottom: 0;
190
+ width: 100%;
191
+ color: #fff;
192
+ padding: 1em 15px;
193
+ font-size: 1.1em;
194
+ font-weight: bold;
195
+ background: rgba(0,0,0,0.5);
196
+ text-align: left;
197
+ }
198
+
199
+ .container .message .info {
200
+ display: block;
201
+ padding-top: 15px;
202
+ margin: auto;
203
+ font-size: 0.75em;
204
+ background: rgba(232,232,232,1);
205
+ }
206
+ .container .message .info > * {
207
+ display: block;
208
+ padding-left: 15px;
209
+ padding-right: 15px;
210
+ }
211
+ .container .message > .info h2 {
212
+ margin: 10px 0;
213
+ font-size: 1.75em;
214
+ text-align: left;
215
+ }
216
+ .container .message > .info .notification {
217
+ display: block;
218
+ position: relative;
219
+ clear: both;
220
+ margin: 20px 0 0;
221
+ padding-top: 5px;
222
+ padding-bottom: 5px;
223
+ text-align: left;
224
+ background: rgba(205,205,205,1);
225
+ border-top: 1px solid rgba(175,175,175,1);
226
+ }
227
+ .container .message > .info .notification > * { vertical-align: middle; }
228
+ .container .message > .info .notification strong {
229
+ display: inline-block;
230
+ max-width: 75%;
231
+ text-overflow: ellipsis;
232
+ white-space: nowrap;
233
+ overflow-x: hidden;
234
+ }
235
+ .container .message > .info .notification .version {
236
+ display: inline-block;
237
+ text-transform: lowercase;
238
+ padding: 0 15px 0 0;
239
+ margin: 0 10px 0 0;
240
+ border-right: 1px solid rgba(175,175,175,1);
241
+ }
242
+ .container .message > .info .notification a.home {
243
+ float: right;
244
+ position: relative;
245
+ right: -6px;
246
+ opacity: <%= opacity * 0.5 %>;
247
+
248
+ -webkit-transition: opacity 0.15s ease-in-out;
249
+ -moz-transition: opacity 0.15s ease-in-out;
250
+ -ms-transition: opacity 0.15s ease-in-out;
251
+ -o-transition: opacity 0.15s ease-in-out;
252
+ transition: opacity 0.15s ease-in-out;
253
+ }
254
+ .container .message > .info .notification a.home:hover { opacity: <%= opacity %>; }
255
+ .container .message > .info .notification a.home img { height: 12px; }
256
+
257
+ /* Footer */
258
+ footer {
259
+ display: block;
260
+ position: relative;
261
+ vertical-align: middle;
262
+ clear: both;
263
+ color: #fff;
264
+ margin: 15px auto 0;
265
+ padding: 14px 1%;
266
+ box-sizing: border-box;
267
+ max-height: <%= footer %>;
268
+ z-index: 1100;
269
+ }
270
+
271
+ footer .app { text-transform: uppercase; }
272
+ footer .app strong { font-size: 1em; letter-spacing: 1px; }
273
+ footer .app span { font-size: 0.9em; }
274
+
275
+ footer .connect {
276
+ display: block;
277
+ float: right;
278
+ clear: both;
279
+ text-align: center;
280
+ }
281
+
282
+ footer .connect:hover a { opacity: <%= opacity * 0.5 %>; }
283
+ footer .connect a {
284
+ display: inline-block;
285
+ opacity: <%= opacity * 0.7 %>;
286
+ padding-left: 4px;
287
+ margin: 0 -1px; /* Use 0 -1px for inline block & ERB - HAML removes whitespace; ERB does now - http://haml.info/docs/yardoc/file.REFERENCE.html#whitespace_removal__and_ */
288
+ transition: opacity 0.2s ease;
289
+ }
290
+
291
+ footer .connect a img { display: block; vertical-align: middle; }
292
+ footer .connect a.facebook img { height: <%= size * 0.85 %>px; }
293
+ footer .connect a.twitter img { height: <%= size * 0.85 %>px; }
294
+ footer .connect a.linkedin img { height: <%= size * 0.9 %>px; }
295
+ footer .connect a.youtube img { height: <%= size * 0.875 %>px; }
296
+ footer .connect a.fusion img { height: <%= size %>px; }
297
+ footer .connect:hover a:hover { opacity: 1; }