dynamic_errors 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,15 +1,15 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "shoulda", ">= 0"
10
- gem "bundler", "~> 1.0.0"
11
- gem "jeweler", "~> 1.6.0"
12
- gem "rcov", ">= 0"
13
- end
14
-
15
- gem 'rails', '>=3.0.3'
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "bundler", "~> 1.0.0"
11
+ gem "jeweler", "~> 1.6.0"
12
+ gem "rcov", ">= 0"
13
+ end
14
+
15
+ gem 'rails', '>=3.0.3'
@@ -1,82 +1,83 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- abstract (1.0.0)
5
- actionmailer (3.0.7)
6
- actionpack (= 3.0.7)
7
- mail (~> 2.2.15)
8
- actionpack (3.0.7)
9
- activemodel (= 3.0.7)
10
- activesupport (= 3.0.7)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.5.0)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.14)
16
- rack-test (~> 0.5.7)
17
- tzinfo (~> 0.3.23)
18
- activemodel (3.0.7)
19
- activesupport (= 3.0.7)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.5.0)
22
- activerecord (3.0.7)
23
- activemodel (= 3.0.7)
24
- activesupport (= 3.0.7)
25
- arel (~> 2.0.2)
26
- tzinfo (~> 0.3.23)
27
- activeresource (3.0.7)
28
- activemodel (= 3.0.7)
29
- activesupport (= 3.0.7)
30
- activesupport (3.0.7)
31
- arel (2.0.9)
32
- builder (2.1.2)
33
- erubis (2.6.6)
34
- abstract (>= 1.0.0)
35
- git (1.2.5)
36
- i18n (0.5.0)
37
- jeweler (1.6.0)
38
- bundler (~> 1.0.0)
39
- git (>= 1.2.5)
40
- rake
41
- mail (2.2.19)
42
- activesupport (>= 2.3.6)
43
- i18n (>= 0.4.0)
44
- mime-types (~> 1.16)
45
- treetop (~> 1.4.8)
46
- mime-types (1.16)
47
- polyglot (0.3.1)
48
- rack (1.2.2)
49
- rack-mount (0.6.14)
50
- rack (>= 1.0.0)
51
- rack-test (0.5.7)
52
- rack (>= 1.0)
53
- rails (3.0.7)
54
- actionmailer (= 3.0.7)
55
- actionpack (= 3.0.7)
56
- activerecord (= 3.0.7)
57
- activeresource (= 3.0.7)
58
- activesupport (= 3.0.7)
59
- bundler (~> 1.0)
60
- railties (= 3.0.7)
61
- railties (3.0.7)
62
- actionpack (= 3.0.7)
63
- activesupport (= 3.0.7)
64
- rake (>= 0.8.7)
65
- thor (~> 0.14.4)
66
- rake (0.8.7)
67
- rcov (0.9.9)
68
- shoulda (2.11.3)
69
- thor (0.14.6)
70
- treetop (1.4.9)
71
- polyglot (>= 0.3.1)
72
- tzinfo (0.3.27)
73
-
74
- PLATFORMS
75
- ruby
76
-
77
- DEPENDENCIES
78
- bundler (~> 1.0.0)
79
- jeweler (~> 1.6.0)
80
- rails (>= 3.0.3)
81
- rcov
82
- shoulda
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ abstract (1.0.0)
5
+ actionmailer (3.0.7)
6
+ actionpack (= 3.0.7)
7
+ mail (~> 2.2.15)
8
+ actionpack (3.0.7)
9
+ activemodel (= 3.0.7)
10
+ activesupport (= 3.0.7)
11
+ builder (~> 2.1.2)
12
+ erubis (~> 2.6.6)
13
+ i18n (~> 0.5.0)
14
+ rack (~> 1.2.1)
15
+ rack-mount (~> 0.6.14)
16
+ rack-test (~> 0.5.7)
17
+ tzinfo (~> 0.3.23)
18
+ activemodel (3.0.7)
19
+ activesupport (= 3.0.7)
20
+ builder (~> 2.1.2)
21
+ i18n (~> 0.5.0)
22
+ activerecord (3.0.7)
23
+ activemodel (= 3.0.7)
24
+ activesupport (= 3.0.7)
25
+ arel (~> 2.0.2)
26
+ tzinfo (~> 0.3.23)
27
+ activeresource (3.0.7)
28
+ activemodel (= 3.0.7)
29
+ activesupport (= 3.0.7)
30
+ activesupport (3.0.7)
31
+ arel (2.0.10)
32
+ builder (2.1.2)
33
+ erubis (2.6.6)
34
+ abstract (>= 1.0.0)
35
+ git (1.2.5)
36
+ i18n (0.5.0)
37
+ jeweler (1.6.0)
38
+ bundler (~> 1.0.0)
39
+ git (>= 1.2.5)
40
+ rake
41
+ mail (2.2.19)
42
+ activesupport (>= 2.3.6)
43
+ i18n (>= 0.4.0)
44
+ mime-types (~> 1.16)
45
+ treetop (~> 1.4.8)
46
+ mime-types (1.16)
47
+ polyglot (0.3.1)
48
+ rack (1.2.3)
49
+ rack-mount (0.6.14)
50
+ rack (>= 1.0.0)
51
+ rack-test (0.5.7)
52
+ rack (>= 1.0)
53
+ rails (3.0.7)
54
+ actionmailer (= 3.0.7)
55
+ actionpack (= 3.0.7)
56
+ activerecord (= 3.0.7)
57
+ activeresource (= 3.0.7)
58
+ activesupport (= 3.0.7)
59
+ bundler (~> 1.0)
60
+ railties (= 3.0.7)
61
+ railties (3.0.7)
62
+ actionpack (= 3.0.7)
63
+ activesupport (= 3.0.7)
64
+ rake (>= 0.8.7)
65
+ thor (~> 0.14.4)
66
+ rake (0.9.0)
67
+ rcov (0.9.9)
68
+ shoulda (2.11.3)
69
+ thor (0.14.6)
70
+ treetop (1.4.9)
71
+ polyglot (>= 0.3.1)
72
+ tzinfo (0.3.27)
73
+
74
+ PLATFORMS
75
+ ruby
76
+ x86-mingw32
77
+
78
+ DEPENDENCIES
79
+ bundler (~> 1.0.0)
80
+ jeweler (~> 1.6.0)
81
+ rails (>= 3.0.3)
82
+ rcov
83
+ shoulda
@@ -1,20 +1,20 @@
1
- Copyright (c) 2011 Kyle Bock
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2011 Kyle Bock
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,19 +1,33 @@
1
- = dynamic_errors
2
-
3
- Description goes here.
4
-
5
- == Contributing to dynamic_errors
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2011 Kyle Bock. See LICENSE.txt for
18
- further details.
19
-
1
+ = dynamic_errors
2
+
3
+ This gem wraps the standard Rails 3 error pages (public/(404|422|500).html) with the applications layout. Any further changes to the application layout will be reflected on the error pages, preventing having to make layout changes in three places.
4
+
5
+ == Installation
6
+ gem install dynamic_errors
7
+
8
+ == Usage
9
+ add "require 'dynamic_errors'" to environment.rb
10
+
11
+ Create the following views if you wish to override the standard error message
12
+ errors/404.html.erb
13
+ errors/422.html.erb
14
+ errors/500.html.erb
15
+
16
+ == Compatibility
17
+ Currently the gem has only been tested (very briefly at that) with Rails -v3.0.3-7. Rails 2.x may be added if requested.
18
+
19
+ == Contributing to dynamic_errors
20
+
21
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
22
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
23
+ * Fork the project
24
+ * Start a feature/bugfix branch
25
+ * Commit and push until you are happy with your contribution
26
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
27
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
28
+
29
+ == Copyright
30
+
31
+ Copyright (c) 2011 Kyle Bock. See LICENSE.txt for
32
+ further details.
33
+
data/Rakefile CHANGED
@@ -1,53 +1,53 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "dynamic_errors"
18
- gem.homepage = "http://github.com/kwbock/dynamic_errors"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Adds dynamic error pages to Rails}
21
- gem.description = %Q{A gem to allow dynamic error pages in Rails}
22
- gem.email = "kylewbock@gmail.com"
23
- gem.authors = ["Kyle Bock"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rake/testtask'
29
- Rake::TestTask.new(:test) do |test|
30
- test.libs << 'lib' << 'test'
31
- test.pattern = 'test/**/test_*.rb'
32
- test.verbose = true
33
- end
34
-
35
- require 'rcov/rcovtask'
36
- Rcov::RcovTask.new do |test|
37
- test.libs << 'test'
38
- test.pattern = 'test/**/test_*.rb'
39
- test.verbose = true
40
- test.rcov_opts << '--exclude "gems/*"'
41
- end
42
-
43
- task :default => :test
44
-
45
- require 'rake/rdoctask'
46
- Rake::RDocTask.new do |rdoc|
47
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
-
49
- rdoc.rdoc_dir = 'rdoc'
50
- rdoc.title = "dynamic_errors #{version}"
51
- rdoc.rdoc_files.include('README*')
52
- rdoc.rdoc_files.include('lib/**/*.rb')
53
- end
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "dynamic_errors"
18
+ gem.homepage = "http://github.com/kwbock/dynamic_errors"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Adds dynamic error pages to Rails}
21
+ gem.description = %Q{A gem to allow dynamic error pages in Rails}
22
+ gem.email = "kylewbock@gmail.com"
23
+ gem.authors = ["Kyle Bock"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ require 'rcov/rcovtask'
36
+ Rcov::RcovTask.new do |test|
37
+ test.libs << 'test'
38
+ test.pattern = 'test/**/test_*.rb'
39
+ test.verbose = true
40
+ test.rcov_opts << '--exclude "gems/*"'
41
+ end
42
+
43
+ task :default => :test
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "dynamic_errors #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -1,29 +1,23 @@
1
- <style type="text/css">
2
- body {
3
- background-color: #fff;
4
- color: #666;
5
- text-align: center;
6
- font-family: arial, sans-serif;
7
- }
8
-
9
- div.dialog {
10
- width: 25em;
11
- padding: 0 4em;
12
- margin: 4em auto 0 auto;
13
- border: 1px solid #ccc;
14
- border-right-color: #999;
15
- border-bottom-color: #999;
16
- }
17
-
18
- h1 {
19
- font-size: 100%;
20
- color: #f00;
21
- line-height: 1.5em;
22
- }
23
- </style>
24
- <div class="dialog">
25
- <h1>The page you were looking for doesn't exist.</h1>
26
- <p>
27
- You may have mistyped the address or the page may have moved.
28
- </p>
29
- </div>
1
+ <style type="text/css">
2
+ div.dialog {
3
+ width: 25em;
4
+ padding: 0 4em;
5
+ margin: 4em auto 0 auto;
6
+ border: 1px solid #ccc;
7
+ border-right-color: #999;
8
+ border-bottom-color: #999;
9
+ background-color: #fff;
10
+ }
11
+
12
+ h1 {
13
+ font-size: 100%;
14
+ color: #f00;
15
+ line-height: 1.5em;
16
+ }
17
+ </style>
18
+ <div class="dialog">
19
+ <h1>The page you were looking for doesn't exist.</h1>
20
+ <p>
21
+ You may have mistyped the address or the page may have moved.
22
+ </p>
23
+ </div>
@@ -1,29 +1,23 @@
1
- <style type="text/css">
2
- body {
3
- background-color: #fff;
4
- color: #666;
5
- text-align: center;
6
- font-family: arial, sans-serif;
7
- }
8
-
9
- div.dialog {
10
- width: 25em;
11
- padding: 0 4em;
12
- margin: 4em auto 0 auto;
13
- border: 1px solid #ccc;
14
- border-right-color: #999;
15
- border-bottom-color: #999;
16
- }
17
-
18
- h1 {
19
- font-size: 100%;
20
- color: #f00;
21
- line-height: 1.5em;
22
- }
23
- </style>
24
- <div class="dialog">
25
- <h1>The change you wanted was rejected.</h1>
26
- <p>
27
- Maybe you tried to change something you didn't have access to.
28
- </p>
29
- </div>
1
+ <style type="text/css">
2
+ div.dialog {
3
+ width: 25em;
4
+ padding: 0 4em;
5
+ margin: 4em auto 0 auto;
6
+ border: 1px solid #ccc;
7
+ border-right-color: #999;
8
+ border-bottom-color: #999;
9
+ background-color: #fff;
10
+ }
11
+
12
+ h1 {
13
+ font-size: 100%;
14
+ color: #f00;
15
+ line-height: 1.5em;
16
+ }
17
+ </style>
18
+ <div class="dialog">
19
+ <h1>The change you wanted was rejected.</h1>
20
+ <p>
21
+ Maybe you tried to change something you didn't have access to.
22
+ </p>
23
+ </div>
@@ -1,29 +1,23 @@
1
- <style type="text/css">
2
- body {
3
- background-color: #fff;
4
- color: #666;
5
- text-align: center;
6
- font-family: arial, sans-serif;
7
- }
8
-
9
- div.dialog {
10
- width: 25em;
11
- padding: 0 4em;
12
- margin: 4em auto 0 auto;
13
- border: 1px solid #ccc;
14
- border-right-color: #999;
15
- border-bottom-color: #999;
16
- }
17
-
18
- h1 {
19
- font-size: 100%;
20
- color: #f00;
21
- line-height: 1.5em;
22
- }
23
- </style>
24
- <div class="dialog">
25
- <h1>We're sorry, but something went wrong.</h1>
26
- <p>
27
- We've been notified about this issue and we'll take a look at it shortly.
28
- </p>
29
- </div>
1
+ <style type="text/css">
2
+ div.dialog {
3
+ width: 25em;
4
+ padding: 0 4em;
5
+ margin: 4em auto 0 auto;
6
+ border: 1px solid #ccc;
7
+ border-right-color: #999;
8
+ border-bottom-color: #999;
9
+ background-color: #fff;
10
+ }
11
+
12
+ h1 {
13
+ font-size: 100%;
14
+ color: #f00;
15
+ line-height: 1.5em;
16
+ }
17
+ </style>
18
+ <div class="dialog">
19
+ <h1>We're sorry, but something went wrong.</h1>
20
+ <p>
21
+ We've been notified about this issue and we'll take a look at it shortly.
22
+ </p>
23
+ </div>
Binary file
@@ -1,67 +1,68 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{dynamic_errors}
8
- s.version = "0.1.1"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Kyle Bock"]
12
- s.date = %q{2011-05-25}
13
- s.description = %q{A gem to allow dynamic error pages in Rails}
14
- s.email = %q{kylewbock@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- "Gemfile",
21
- "Gemfile.lock",
22
- "LICENSE.txt",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "app/views/errors/404.html.erb",
27
- "app/views/errors/422.html.erb",
28
- "app/views/errors/500.html.erb",
29
- "dynamic_errors-0.1.0.gem",
30
- "dynamic_errors.gemspec",
31
- "lib/dynamic_errors.rb",
32
- "lib/dynamic_errors/engine.rb",
33
- "test/helper.rb",
34
- "test/test_dynamic_errors.rb"
35
- ]
36
- s.homepage = %q{http://github.com/kwbock/dynamic_errors}
37
- s.licenses = ["MIT"]
38
- s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.3.7}
40
- s.summary = %q{Adds dynamic error pages to Rails}
41
-
42
- if s.respond_to? :specification_version then
43
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
- s.specification_version = 3
45
-
46
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_runtime_dependency(%q<rails>, [">= 3.0.3"])
48
- s.add_development_dependency(%q<shoulda>, [">= 0"])
49
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
50
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
51
- s.add_development_dependency(%q<rcov>, [">= 0"])
52
- else
53
- s.add_dependency(%q<rails>, [">= 3.0.3"])
54
- s.add_dependency(%q<shoulda>, [">= 0"])
55
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
56
- s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
57
- s.add_dependency(%q<rcov>, [">= 0"])
58
- end
59
- else
60
- s.add_dependency(%q<rails>, [">= 3.0.3"])
61
- s.add_dependency(%q<shoulda>, [">= 0"])
62
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
63
- s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
64
- s.add_dependency(%q<rcov>, [">= 0"])
65
- end
66
- end
67
-
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{dynamic_errors}
8
+ s.version = "0.1.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kyle Bock"]
12
+ s.date = %q{2011-05-25}
13
+ s.description = %q{A gem to allow dynamic error pages in Rails}
14
+ s.email = %q{kylewbock@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "Gemfile",
21
+ "Gemfile.lock",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "app/views/errors/404.html.erb",
27
+ "app/views/errors/422.html.erb",
28
+ "app/views/errors/500.html.erb",
29
+ "dynamic_errors-0.1.0.gem",
30
+ "dynamic_errors-0.1.1.gem",
31
+ "dynamic_errors.gemspec",
32
+ "lib/dynamic_errors.rb",
33
+ "lib/dynamic_errors/engine.rb",
34
+ "test/helper.rb",
35
+ "test/test_dynamic_errors.rb"
36
+ ]
37
+ s.homepage = %q{http://github.com/kwbock/dynamic_errors}
38
+ s.licenses = ["MIT"]
39
+ s.require_paths = ["lib"]
40
+ s.rubygems_version = %q{1.3.7}
41
+ s.summary = %q{Adds dynamic error pages to Rails}
42
+
43
+ if s.respond_to? :specification_version then
44
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
+ s.specification_version = 3
46
+
47
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.3"])
49
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
50
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
51
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
52
+ s.add_development_dependency(%q<rcov>, [">= 0"])
53
+ else
54
+ s.add_dependency(%q<rails>, [">= 3.0.3"])
55
+ s.add_dependency(%q<shoulda>, [">= 0"])
56
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
57
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
58
+ s.add_dependency(%q<rcov>, [">= 0"])
59
+ end
60
+ else
61
+ s.add_dependency(%q<rails>, [">= 3.0.3"])
62
+ s.add_dependency(%q<shoulda>, [">= 0"])
63
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
64
+ s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
65
+ s.add_dependency(%q<rcov>, [">= 0"])
66
+ end
67
+ end
68
+
@@ -1,35 +1,35 @@
1
- require 'rubygems'
2
- require 'active_record'
3
- require 'active_record/errors'
4
-
5
- require 'dynamic_errors/engine'
6
-
7
- module DynamicErrors
8
- class ActionController::Base
9
- # the following is for dynamic errors
10
- # consider moving this to lib/dynamic_errors.rb to create mixin module that can be reused
11
- # in Tapestry Adjustments case we want to redirect to the root path (search page)
12
- unless config.consider_all_requests_local
13
- rescue_from Exception, :with => :render_error
14
- rescue_from ActiveRecord::RecordNotFound, :with => :render_not_found
15
- rescue_from ActionController::RoutingError, :with => :render_not_found
16
- rescue_from ActionController::UnknownController, :with => :render_not_found
17
- # customize these as much as you want, ie, different for every error or all the same
18
- rescue_from ActionController::UnknownAction, :with => :render_not_found
19
- end
20
-
21
- private
22
-
23
- def render_not_found(exception)
24
- # uncomment the following line land make sure that view exists for customized 404 error page
25
- render :template => "app/views/errors/404.html.erb", :status => 404
26
- #redirect_to :root
27
- end
28
-
29
- def render_error(exception)
30
- # uncomment the following line and make sure that view exists for customized 500 error page
31
- render :template => "/errors/500.html.erb", :status => 500
32
- #redirect_to :root
33
- end
34
- end
35
- end
1
+ require 'rubygems'
2
+ require 'active_record'
3
+ require 'active_record/errors'
4
+
5
+ require 'dynamic_errors/engine'
6
+
7
+ module DynamicErrors
8
+ class ActionController::Base
9
+ # the following is for dynamic errors
10
+ # consider moving this to lib/dynamic_errors.rb to create mixin module that can be reused
11
+ # in Tapestry Adjustments case we want to redirect to the root path (search page)
12
+ unless config.consider_all_requests_local
13
+ rescue_from Exception, :with => :render_error
14
+ rescue_from ActiveRecord::RecordNotFound, :with => :render_not_found
15
+ rescue_from ActionController::RoutingError, :with => :render_not_found
16
+ rescue_from ActionController::UnknownController, :with => :render_not_found
17
+ # customize these as much as you want, ie, different for every error or all the same
18
+ rescue_from ActionController::UnknownAction, :with => :render_not_found
19
+ end
20
+
21
+ private
22
+
23
+ def render_not_found(exception)
24
+ # uncomment the following line land make sure that view exists for customized 404 error page
25
+ render :template => "app/views/errors/404.html.erb", :status => 404
26
+ #redirect_to :root
27
+ end
28
+
29
+ def render_error(exception)
30
+ # uncomment the following line and make sure that view exists for customized 500 error page
31
+ render :template => "/errors/500.html.erb", :status => 500
32
+ #redirect_to :root
33
+ end
34
+ end
35
+ end
@@ -1,4 +1,4 @@
1
- module DynamicErrors
2
- class Engine < Rails::Engine
3
- end
1
+ module DynamicErrors
2
+ class Engine < Rails::Engine
3
+ end
4
4
  end
@@ -1,18 +1,18 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'dynamic_errors'
16
-
17
- class Test::Unit::TestCase
18
- end
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'dynamic_errors'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -1,7 +1,7 @@
1
- require 'helper'
2
-
3
- class TestDynamicErrors < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end
1
+ require 'helper'
2
+
3
+ class TestDynamicErrors < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_errors
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kyle Bock
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-25 00:00:00 -07:00
18
+ date: 2011-05-25 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -114,6 +114,7 @@ files:
114
114
  - app/views/errors/422.html.erb
115
115
  - app/views/errors/500.html.erb
116
116
  - dynamic_errors-0.1.0.gem
117
+ - dynamic_errors-0.1.1.gem
117
118
  - dynamic_errors.gemspec
118
119
  - lib/dynamic_errors.rb
119
120
  - lib/dynamic_errors/engine.rb