egregious 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.authors = ["Russell Edens"]
9
9
  s.email = ["rx@voomify.com"]
10
10
  s.homepage = "http://github.com/voomify/egregious"
11
- s.summary = %q{Egregious is a rails based exception handling gem for well defined http exception handling for json, xml and html}
12
- s.description = %q{Requires Rails 3.x.}
11
+ s.summary = %q{Egregious is a rails based exception handling gem for well defined http exception handling for json, xml and html. Requires Rails 3.x.}
12
+ s.description = %q{Egregious is a rails based exception handling gem for well defined http exception handling for json, xml and html. Requires Rails 3.x.}
13
13
 
14
14
  s.rubyforge_project = "egregious"
15
15
 
@@ -167,7 +167,7 @@ module Egregious
167
167
  end
168
168
 
169
169
  def build_html_file_path(status)
170
- File.expand_path(Rails.root, 'public', status + '.html')
170
+ File.join(Rails.root, 'public', status + '.html')
171
171
  end
172
172
 
173
173
  def self.included(base)
@@ -1,3 +1,3 @@
1
1
  module Egregious
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -101,5 +101,16 @@ describe Egregious do
101
101
  Egregious.exception_codes.merge!({NameError => "999"})
102
102
  status_code_for_exception(NameError.new).should=="999"
103
103
  end
104
+ end
105
+
106
+ describe "build_html_file_path" do
107
+ it "should build a valid path" do
108
+ class Rails
109
+ def self.root
110
+ __FILE__
111
+ end
112
+ end
113
+ build_html_file_path('500').should == File.join(__FILE__, 'public', '500.html')
104
114
  end
115
+ end
105
116
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egregious
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Russell Edens
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-27 00:00:00 -04:00
18
+ date: 2011-10-04 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -134,7 +134,7 @@ dependencies:
134
134
  version: "0"
135
135
  type: :runtime
136
136
  version_requirements: *id008
137
- description: Requires Rails 3.x.
137
+ description: Egregious is a rails based exception handling gem for well defined http exception handling for json, xml and html. Requires Rails 3.x.
138
138
  email:
139
139
  - rx@voomify.com
140
140
  executables: []
@@ -188,7 +188,7 @@ rubyforge_project: egregious
188
188
  rubygems_version: 1.5.2
189
189
  signing_key:
190
190
  specification_version: 3
191
- summary: Egregious is a rails based exception handling gem for well defined http exception handling for json, xml and html
191
+ summary: Egregious is a rails based exception handling gem for well defined http exception handling for json, xml and html. Requires Rails 3.x.
192
192
  test_files:
193
193
  - spec/egregious_spec.rb
194
194
  - spec/exceptions_spec.rb