mosaic-errors 2.0.1 → 2.0.2

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.
@@ -1,4 +1,4 @@
1
- Errors::Engine.routes.draw do
1
+ Mosaic::Errors::Engine.routes.draw do
2
2
  match "/404", :to => "errors/errors#not_found"
3
3
  match "/422", :to => "errors/errors#unprocessable_entity"
4
4
  match "/500", :to => "errors/errors#internal_server_error"
@@ -0,0 +1,9 @@
1
+ Usage:
2
+ rails generate errors setup
3
+
4
+ This will create:
5
+ - A routing entry in config/routes.rb for "mount Mosaic::Errors::Engine => '/'"
6
+ - A config entry in config/application.rb for "config.exceptions_app = self.routes"
7
+
8
+ Description:
9
+ This will generate an entry in Routing table and update Application.rb to load MosaicErros engine
@@ -0,0 +1,8 @@
1
+ class ErrorsGenerator < Rails::Generators::NamedBase
2
+ source_root File.expand_path('../templates', __FILE__)
3
+
4
+ def setup
5
+ route "mount Mosaic::Errors::Engine => '/'"
6
+ application "config.exceptions_app = self.routes"
7
+ end
8
+ end
@@ -1,4 +1,6 @@
1
- module Errors
2
- class Engine < ::Rails::Engine
1
+ module Mosaic
2
+ module Errors
3
+ class Engine < ::Rails::Engine
4
+ end
3
5
  end
4
6
  end
@@ -1,5 +1,5 @@
1
1
  module Mosaic
2
2
  module Errors
3
- VERSION = "2.0.1"
3
+ VERSION = "2.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mosaic-errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml
@@ -83,6 +83,8 @@ files:
83
83
  - app/views/errors/layouts/application.html
84
84
  - config/routes.rb
85
85
  - install.rb
86
+ - lib/generators/USAGE
87
+ - lib/generators/errors_generator.rb
86
88
  - lib/mosaic-errors.rb
87
89
  - lib/mosaic/errors.rb
88
90
  - lib/mosaic/errors/engine.rb