http_status_exceptions 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Gemfile.lock +41 -10
- data/README.rdoc +7 -11
- data/http_status_exceptions.gemspec +10 -9
- data/lib/http_status_exceptions.rb +6 -3
- data/spec/http_status_exception_spec.rb +10 -8
- data/spec/spec_helper.rb +3 -11
- data/tasks/github-gem.rake +50 -56
- metadata +49 -33
- data/init.rb +0 -1
data/Gemfile.lock
CHANGED
@@ -1,25 +1,56 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
http_status_exceptions (0.
|
5
|
-
actionpack (
|
4
|
+
http_status_exceptions (0.3.0)
|
5
|
+
actionpack (>= 3)
|
6
|
+
rack (>= 1.2.1)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: http://rubygems.org/
|
9
10
|
specs:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
abstract (1.0.0)
|
12
|
+
actionpack (3.0.3)
|
13
|
+
activemodel (= 3.0.3)
|
14
|
+
activesupport (= 3.0.3)
|
15
|
+
builder (~> 2.1.2)
|
16
|
+
erubis (~> 2.6.6)
|
17
|
+
i18n (~> 0.4)
|
18
|
+
rack (~> 1.2.1)
|
19
|
+
rack-mount (~> 0.6.13)
|
20
|
+
rack-test (~> 0.5.6)
|
21
|
+
tzinfo (~> 0.3.23)
|
22
|
+
activemodel (3.0.3)
|
23
|
+
activesupport (= 3.0.3)
|
24
|
+
builder (~> 2.1.2)
|
25
|
+
i18n (~> 0.4)
|
26
|
+
activesupport (3.0.3)
|
27
|
+
builder (2.1.2)
|
28
|
+
diff-lcs (1.1.2)
|
29
|
+
erubis (2.6.6)
|
30
|
+
abstract (>= 1.0.0)
|
31
|
+
i18n (0.5.0)
|
32
|
+
rack (1.2.1)
|
33
|
+
rack-mount (0.6.13)
|
34
|
+
rack (>= 1.0.0)
|
35
|
+
rack-test (0.5.6)
|
36
|
+
rack (>= 1.0)
|
15
37
|
rake (0.8.7)
|
16
|
-
rspec (
|
38
|
+
rspec (2.2.0)
|
39
|
+
rspec-core (~> 2.2)
|
40
|
+
rspec-expectations (~> 2.2)
|
41
|
+
rspec-mocks (~> 2.2)
|
42
|
+
rspec-core (2.2.1)
|
43
|
+
rspec-expectations (2.2.0)
|
44
|
+
diff-lcs (~> 1.1.2)
|
45
|
+
rspec-mocks (2.2.0)
|
46
|
+
tzinfo (0.3.23)
|
17
47
|
|
18
48
|
PLATFORMS
|
19
49
|
ruby
|
20
50
|
|
21
51
|
DEPENDENCIES
|
22
|
-
actionpack (
|
52
|
+
actionpack (>= 3)
|
23
53
|
http_status_exceptions!
|
54
|
+
rack (>= 1.2.1)
|
24
55
|
rake
|
25
|
-
rspec
|
56
|
+
rspec (~> 2)
|
data/README.rdoc
CHANGED
@@ -3,25 +3,21 @@
|
|
3
3
|
This simple plugin will register exception classes for all HTTP status. These exceptions can then be raised from your controllers, after
|
4
4
|
which a response will be send back to the client with the desired HTTP status, possible with some other content.
|
5
5
|
|
6
|
-
You can use this plugin to access control mechanisms. You can simply raise a HTTPStatus::Forbidden if a user is not allowed to
|
7
|
-
perform a certain action. A nice looking error page will be the result. See the
|
6
|
+
You can use this plugin to access control mechanisms. You can simply raise a <tt>HTTPStatus::Forbidden</tt> if a user is not allowed to
|
7
|
+
perform a certain action. A nice looking error page will be the result. See the project wiki
|
8
|
+
(https://github.com/wvanbergen/http_status_exceptions/wiki) for additional documentation.
|
8
9
|
|
9
|
-
|
10
|
+
This plugin only works with Rails 3. Version 0.2.1 of this plugin is compatible with Rails 2. The code for this version can be found in
|
11
|
+
the rails2 branch: https://github.com/wvanbergen/http_status_exceptions/tree/rails2.
|
10
12
|
|
11
13
|
== Installation
|
12
14
|
|
13
|
-
Installation is simple. Simply add the gem to the configuration in your <tt>
|
14
|
-
|
15
|
-
# environment.rb
|
16
|
-
Rails::Initializer.run do |config|
|
17
|
-
...
|
18
|
-
config.gem 'http_status_exceptions'
|
19
|
-
end
|
15
|
+
Installation is simple. Simply add the gem to the configuration in your <tt>Gemfile</tt>:
|
20
16
|
|
21
17
|
# Gemfile
|
22
18
|
gem 'http_status_exceptions'
|
23
19
|
|
24
|
-
Run <tt>
|
20
|
+
Run <tt>bundle install</tt> to make sure to have the gem included in your bundle.
|
25
21
|
|
26
22
|
== Configuration
|
27
23
|
|
@@ -3,23 +3,24 @@ Gem::Specification.new do |s|
|
|
3
3
|
|
4
4
|
# Do not update the version and date values by hand.
|
5
5
|
# This will be done automatically by the gem release script.
|
6
|
-
s.version = "0.
|
7
|
-
s.date = "2010-
|
6
|
+
s.version = "0.3.0"
|
7
|
+
s.date = "2010-12-17"
|
8
8
|
|
9
9
|
s.summary = "A Rails plugin to use exceptions for generating HTTP status responses"
|
10
10
|
s.description = "Clean up your controller code by raising exceptions that generate responses with different HTTP status codes."
|
11
11
|
|
12
|
-
s.add_runtime_dependency('
|
12
|
+
s.add_runtime_dependency('rack', '>= 1.2.1')
|
13
|
+
s.add_runtime_dependency('actionpack', '>= 3')
|
13
14
|
|
14
15
|
s.add_development_dependency('rake')
|
15
|
-
s.add_development_dependency('rspec')
|
16
|
+
s.add_development_dependency('rspec', '~> 2')
|
16
17
|
|
17
|
-
s.authors = ['Willem van Bergen']
|
18
|
-
s.email =
|
19
|
-
s.homepage = 'http://github.com/wvanbergen/http_status_exceptions/
|
18
|
+
s.authors = ['Willem van Bergen', 'Jaap van der Meer', 'Jeff Pollard']
|
19
|
+
s.email = 'willem@vanbergen.org'
|
20
|
+
s.homepage = 'http://github.com/wvanbergen/http_status_exceptions/wiki'
|
20
21
|
|
21
22
|
# Do not update the files and test_files values by hand.
|
22
23
|
# This will be done automatically by the gem release script.
|
23
|
-
s.files = %w(
|
24
|
+
s.files = %w(.gitignore Gemfile Gemfile.lock MIT-LICENSE README.rdoc Rakefile http_status_exceptions.gemspec lib/http_status_exceptions.rb spec/http_status_exception_spec.rb spec/spec_helper.rb tasks/github-gem.rake)
|
24
25
|
s.test_files = %w(spec/http_status_exception_spec.rb)
|
25
|
-
end
|
26
|
+
end
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'rack/utils'
|
2
|
+
require 'action_controller'
|
3
|
+
|
1
4
|
# The HTTPStatus module is the core of the http_status_exceptions gem and
|
2
5
|
# contains all functionality.
|
3
6
|
#
|
@@ -19,7 +22,7 @@ module HTTPStatus
|
|
19
22
|
|
20
23
|
# The current gem release version. Do not set this value by hand, it will
|
21
24
|
# be done automatically by them gem release script.
|
22
|
-
VERSION = "0.
|
25
|
+
VERSION = "0.3.0"
|
23
26
|
|
24
27
|
# The Base HTTP status exception class is used as superclass for every
|
25
28
|
# exception class that is constructed. It implements some shared
|
@@ -70,7 +73,7 @@ module HTTPStatus
|
|
70
73
|
# The numeric status code corresponding to this exception class. Uses the
|
71
74
|
# status symbol to code map in <tt>ActionController::StatusCodes</tt>.
|
72
75
|
def self.status_code
|
73
|
-
|
76
|
+
Rack::Utils::SYMBOL_TO_STATUS_CODE[self.status]
|
74
77
|
end
|
75
78
|
|
76
79
|
# The numeric status code corresponding to this exception. By default, it
|
@@ -115,7 +118,7 @@ module HTTPStatus
|
|
115
118
|
# class should be generated.
|
116
119
|
def self.const_missing(const)
|
117
120
|
status_symbol = const.to_s.underscore.to_sym
|
118
|
-
raise "Unrecognized HTTP Status name!" unless
|
121
|
+
raise "Unrecognized HTTP Status name!" unless Rack::Utils::SYMBOL_TO_STATUS_CODE.has_key?(status_symbol)
|
119
122
|
klass = Class.new(HTTPStatus::Base)
|
120
123
|
klass.cattr_accessor(:status)
|
121
124
|
klass.status = status_symbol
|
@@ -1,12 +1,13 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe HTTPStatus::Base, 'class inheritance' do
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
before do
|
6
|
+
Rack::Utils::SYMBOL_TO_STATUS_CODE[:testing_status] = 9000 #.stub(:has_key?).with(:testing_status).and_return(true)
|
6
7
|
@status_exception_class = HTTPStatus::TestingStatus
|
7
8
|
end
|
8
9
|
|
9
|
-
after
|
10
|
+
after do
|
10
11
|
HTTPStatus::Base.template_path = 'shared/http_status'
|
11
12
|
HTTPStatus.send :remove_const, 'TestingStatus'
|
12
13
|
end
|
@@ -20,7 +21,7 @@ describe HTTPStatus::Base, 'class inheritance' do
|
|
20
21
|
end
|
21
22
|
|
22
23
|
it "should check ActionController's status code list for the status code based on the class name" do
|
23
|
-
|
24
|
+
Rack::Utils::SYMBOL_TO_STATUS_CODE.should_receive(:[]).with(:testing_status)
|
24
25
|
@status_exception_class.status_code
|
25
26
|
end
|
26
27
|
|
@@ -66,9 +67,10 @@ describe 'HTTPStatus#http_status_exception' do
|
|
66
67
|
|
67
68
|
it "should call :http_status_exception when an exception is raised when handling the action" do
|
68
69
|
exception = HTTPStatus::Base.new('test')
|
69
|
-
@controller.stub
|
70
|
+
@controller.stub(:request).and_return(ActionDispatch::TestRequest.new)
|
71
|
+
@controller.stub(:test).and_raise(exception)
|
70
72
|
@controller.should_receive(:http_status_exception).with(exception)
|
71
|
-
@controller.send(:
|
73
|
+
@controller.send(:process_action, :test)
|
72
74
|
end
|
73
75
|
|
74
76
|
it "should call render with the correct view and correct HTTP status" do
|
@@ -90,8 +92,8 @@ describe 'HTTPStatus#http_status_exception' do
|
|
90
92
|
end
|
91
93
|
|
92
94
|
it "should call head with the correct status code if render cannot found a template" do
|
93
|
-
@controller.stub!(:render).and_raise(ActionView::MissingTemplate.new([], 'template.html.erb'))
|
95
|
+
@controller.stub!(:render).and_raise(ActionView::MissingTemplate.new([], 'template.html.erb', {}, false))
|
94
96
|
@controller.should_receive(:head).with(:internal_server_error)
|
95
97
|
@controller.http_status_exception(HTTPStatus::Base.new('test'))
|
96
98
|
end
|
97
|
-
end
|
99
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,19 +1,11 @@
|
|
1
|
-
$: << File.join(File.dirname(__FILE__), '..', 'lib')
|
2
|
-
|
3
1
|
require 'rubygems'
|
4
2
|
require 'bundler'
|
5
3
|
|
6
4
|
Bundler.setup
|
7
5
|
|
8
|
-
require '
|
9
|
-
require 'action_controller'
|
6
|
+
require 'rspec'
|
10
7
|
require 'http_status_exceptions'
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
require file
|
15
|
-
end
|
16
|
-
|
17
|
-
Spec::Runner.configure do |config|
|
18
|
-
# nothing special
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.mock_with :rspec
|
19
11
|
end
|
data/tasks/github-gem.rake
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'rake/tasklib'
|
4
4
|
require 'date'
|
5
|
-
require '
|
5
|
+
require 'set'
|
6
6
|
|
7
7
|
module GithubGem
|
8
8
|
|
@@ -24,7 +24,7 @@ module GithubGem
|
|
24
24
|
|
25
25
|
class RakeTasks
|
26
26
|
|
27
|
-
attr_reader :gemspec, :modified_files
|
27
|
+
attr_reader :gemspec, :modified_files
|
28
28
|
attr_accessor :gemspec_file, :task_namespace, :main_include, :root_dir, :spec_pattern, :test_pattern, :remote, :remote_branch, :local_branch
|
29
29
|
|
30
30
|
# Initializes the settings, yields itself for configuration
|
@@ -33,7 +33,7 @@ module GithubGem
|
|
33
33
|
@gemspec_file = GithubGem.detect_gemspec_file
|
34
34
|
@task_namespace = task_namespace
|
35
35
|
@main_include = GithubGem.detect_main_include
|
36
|
-
@modified_files =
|
36
|
+
@modified_files = Set.new
|
37
37
|
@root_dir = Dir.pwd
|
38
38
|
@test_pattern = 'test/**/*_test.rb'
|
39
39
|
@spec_pattern = 'spec/**/*_spec.rb'
|
@@ -43,13 +43,16 @@ module GithubGem
|
|
43
43
|
|
44
44
|
yield(self) if block_given?
|
45
45
|
|
46
|
-
@git = Git.open(@root_dir)
|
47
46
|
load_gemspec!
|
48
47
|
define_tasks!
|
49
48
|
end
|
50
49
|
|
51
50
|
protected
|
52
51
|
|
52
|
+
def git
|
53
|
+
@git ||= ENV['GIT'] || 'git'
|
54
|
+
end
|
55
|
+
|
53
56
|
# Define Unit test tasks
|
54
57
|
def define_test_tasks!
|
55
58
|
require 'rake/testtask'
|
@@ -68,23 +71,23 @@ module GithubGem
|
|
68
71
|
|
69
72
|
# Defines RSpec tasks
|
70
73
|
def define_rspec_tasks!
|
71
|
-
require '
|
74
|
+
require 'rspec/core/rake_task'
|
72
75
|
|
73
76
|
namespace(:spec) do
|
74
77
|
desc "Verify all RSpec examples for #{gemspec.name}"
|
75
|
-
|
76
|
-
t.
|
78
|
+
RSpec::Core::RakeTask.new(:basic) do |t|
|
79
|
+
t.pattern = spec_pattern
|
77
80
|
end
|
78
81
|
|
79
82
|
desc "Verify all RSpec examples for #{gemspec.name} and output specdoc"
|
80
|
-
|
81
|
-
t.
|
82
|
-
t.
|
83
|
+
RSpec::Core::RakeTask.new(:specdoc) do |t|
|
84
|
+
t.pattern = spec_pattern
|
85
|
+
t.rspec_opts = ['--format', 'documentation', '--color']
|
83
86
|
end
|
84
87
|
|
85
88
|
desc "Run RCov on specs for #{gemspec.name}"
|
86
|
-
|
87
|
-
t.
|
89
|
+
RSpec::Core::RakeTask.new(:rcov) do |t|
|
90
|
+
t.pattern = spec_pattern
|
88
91
|
t.rcov = true
|
89
92
|
t.rcov_opts = ['--exclude', '"spec/*,gems/*"', '--rails']
|
90
93
|
end
|
@@ -165,7 +168,7 @@ module GithubGem
|
|
165
168
|
# in the repository and the spec/test file pattern.
|
166
169
|
def manifest_task
|
167
170
|
# Load all the gem's files using "git ls-files"
|
168
|
-
repository_files = git
|
171
|
+
repository_files = `#{git} ls-files`.split("\n")
|
169
172
|
test_files = Dir[test_pattern] + Dir[spec_pattern]
|
170
173
|
|
171
174
|
update_gemspec(:files, repository_files)
|
@@ -180,7 +183,7 @@ module GithubGem
|
|
180
183
|
end
|
181
184
|
|
182
185
|
def newest_version
|
183
|
-
git.
|
186
|
+
`#{git} tag`.split("\n").map { |tag| tag.split('-').last }.compact.map { |v| Gem::Version.new(v) }.max || Gem::Version.new('0.0.0')
|
184
187
|
end
|
185
188
|
|
186
189
|
def next_version(increment = nil)
|
@@ -217,72 +220,58 @@ module GithubGem
|
|
217
220
|
|
218
221
|
def check_version_task
|
219
222
|
raise "#{ENV['VERSION']} is not a valid version number!" if ENV['VERSION'] && !Gem::Version.correct?(ENV['VERSION'])
|
220
|
-
proposed_version = Gem::Version.new(ENV['VERSION']
|
223
|
+
proposed_version = Gem::Version.new((ENV['VERSION'] || gemspec.version).dup)
|
221
224
|
raise "This version (#{proposed_version}) is not higher than the highest tagged version (#{newest_version})" if newest_version >= proposed_version
|
222
225
|
end
|
223
226
|
|
224
227
|
# Checks whether the current branch is not diverged from the remote branch
|
225
228
|
def check_not_diverged_task
|
226
|
-
raise "The current branch is diverged from the remote branch!" if git
|
229
|
+
raise "The current branch is diverged from the remote branch!" if `#{git} rev-list HEAD..#{remote}/#{remote_branch}`.split("\n").any?
|
227
230
|
end
|
228
231
|
|
229
232
|
# Checks whether the repository status ic clean
|
230
233
|
def check_clean_status_task
|
231
|
-
raise "The current working copy contains modifications" if git.
|
234
|
+
raise "The current working copy contains modifications" if `#{git} ls-files -m`.split("\n").any?
|
232
235
|
end
|
233
236
|
|
234
237
|
# Checks whether the current branch is correct
|
235
238
|
def check_current_branch_task
|
236
|
-
raise "Currently not on #{local_branch} branch!" unless git
|
239
|
+
raise "Currently not on #{local_branch} branch!" unless `#{git} branch`.split("\n").detect { |b| /^\* / =~ b } == "* #{local_branch}"
|
237
240
|
end
|
238
241
|
|
239
242
|
# Fetches the latest updates from Github
|
240
243
|
def fetch_origin_task
|
241
|
-
git
|
244
|
+
sh git, 'fetch', remote
|
242
245
|
end
|
243
246
|
|
244
247
|
# Commits every file that has been changed by the release task.
|
245
248
|
def commit_modified_files_task
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
+
really_modified = `#{git} ls-files -m #{modified_files.entries.join(' ')}`.split("\n")
|
250
|
+
if really_modified.any?
|
251
|
+
really_modified.each { |file| sh git, 'add', file }
|
252
|
+
sh git, 'commit', '-m', "Released #{gemspec.name} gem version #{gemspec.version}."
|
249
253
|
end
|
250
254
|
end
|
251
255
|
|
252
256
|
# Adds a tag for the released version
|
253
257
|
def tag_version_task
|
254
|
-
git
|
258
|
+
sh git, 'tag', '-a', "#{gemspec.name}-#{gemspec.version}", '-m', "Released #{gemspec.name} gem version #{gemspec.version}."
|
255
259
|
end
|
256
260
|
|
257
261
|
# Pushes the changes and tag to github
|
258
262
|
def github_release_task
|
259
|
-
git
|
263
|
+
sh git, 'push', '--tags', remote, remote_branch
|
260
264
|
end
|
261
265
|
|
262
|
-
# # Checks whether Rubyforge is configured properly
|
263
|
-
# def check_rubyforge_task
|
264
|
-
# # Login no longer necessary when using rubyforge 2.0.0 gem
|
265
|
-
# # raise "Could not login on rubyforge!" unless `rubyforge login 2>&1`.strip.empty?
|
266
|
-
# output = `rubyforge names`.split("\n")
|
267
|
-
# raise "Rubyforge group not found!" unless output.any? { |line| %r[^groups\s*\:.*\b#{Regexp.quote(gemspec.rubyforge_project)}\b.*] =~ line }
|
268
|
-
# raise "Rubyforge package not found!" unless output.any? { |line| %r[^packages\s*\:.*\b#{Regexp.quote(gemspec.name)}\b.*] =~ line }
|
269
|
-
# end
|
270
|
-
|
271
|
-
# # Task to release the .gem file toRubyforge.
|
272
|
-
# def rubyforge_release_task
|
273
|
-
# sh 'rubyforge', 'add_release', gemspec.rubyforge_project, gemspec.name, gemspec.version.to_s, "pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
274
|
-
# end
|
275
|
-
|
276
266
|
def gemcutter_release_task
|
277
|
-
sh "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
267
|
+
sh "gem", 'push', "pkg/#{gemspec.name}-#{gemspec.version}.gem"
|
278
268
|
end
|
279
269
|
|
280
270
|
# Gem release task.
|
281
271
|
# All work is done by the task's dependencies, so just display a release completed message.
|
282
272
|
def release_task
|
283
273
|
puts
|
284
|
-
puts
|
285
|
-
puts "Released #{gemspec.name} version #{gemspec.version}"
|
274
|
+
puts "Release successful."
|
286
275
|
end
|
287
276
|
|
288
277
|
private
|
@@ -342,30 +331,35 @@ module GithubGem
|
|
342
331
|
|
343
332
|
# Reload the gemspec so the changes are incorporated
|
344
333
|
load_gemspec!
|
334
|
+
|
335
|
+
# Also mark the Gemfile.lock file as changed because of the new version.
|
336
|
+
modified_files << 'Gemfile.lock' if File.exist?(File.join(root_dir, 'Gemfile.lock'))
|
345
337
|
end
|
346
338
|
end
|
347
339
|
|
348
340
|
# Updates the tasks file using the latest file found on Github
|
349
341
|
def update_tasks_task
|
350
|
-
require 'net/
|
351
|
-
|
352
|
-
|
353
|
-
|
342
|
+
require 'net/https'
|
343
|
+
require 'uri'
|
344
|
+
|
345
|
+
uri = URI.parse('https://github.com/wvanbergen/github-gem/raw/master/tasks/github-gem.rake')
|
346
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
347
|
+
http.use_ssl = true
|
348
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
349
|
+
response = http.request(Net::HTTP::Get.new(uri.path))
|
354
350
|
|
355
|
-
Net::
|
356
|
-
response = http.get(path)
|
351
|
+
if Net::HTTPSuccess === response
|
357
352
|
open(__FILE__, "w") { |file| file.write(response.body) }
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
353
|
+
relative_file = File.expand_path(__FILE__).sub(%r[^#{@root_dir}/], '')
|
354
|
+
if `#{git} ls-files -m #{relative_file}`.split("\n").any?
|
355
|
+
sh git, 'add', relative_file
|
356
|
+
sh git, 'commit', '-m', "Updated to latest gem release management tasks."
|
357
|
+
else
|
358
|
+
puts "Release managament tasks already are at the latest version."
|
359
|
+
end
|
365
360
|
else
|
366
|
-
|
361
|
+
raise "Download failed with HTTP status #{response.code}!"
|
367
362
|
end
|
368
363
|
end
|
369
|
-
|
370
364
|
end
|
371
365
|
end
|
metadata
CHANGED
@@ -1,55 +1,60 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_status_exceptions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Willem van Bergen
|
14
|
+
- Jaap van der Meer
|
15
|
+
- Jeff Pollard
|
14
16
|
autorequire:
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
19
|
|
18
|
-
date: 2010-
|
20
|
+
date: 2010-12-17 00:00:00 -08:00
|
19
21
|
default_executable:
|
20
22
|
dependencies:
|
21
23
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
24
|
+
type: :runtime
|
23
25
|
prerelease: false
|
24
|
-
|
26
|
+
name: rack
|
27
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
28
|
none: false
|
26
29
|
requirements:
|
27
|
-
- -
|
30
|
+
- - ">="
|
28
31
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
32
|
+
hash: 29
|
30
33
|
segments:
|
34
|
+
- 1
|
31
35
|
- 2
|
32
|
-
|
33
|
-
|
34
|
-
|
36
|
+
- 1
|
37
|
+
version: 1.2.1
|
38
|
+
requirement: *id001
|
35
39
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
40
|
+
type: :runtime
|
37
41
|
prerelease: false
|
38
|
-
|
42
|
+
name: actionpack
|
43
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
44
|
none: false
|
40
45
|
requirements:
|
41
46
|
- - ">="
|
42
47
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
48
|
+
hash: 5
|
44
49
|
segments:
|
45
|
-
-
|
46
|
-
version: "
|
47
|
-
|
48
|
-
version_requirements: *id002
|
50
|
+
- 3
|
51
|
+
version: "3"
|
52
|
+
requirement: *id002
|
49
53
|
- !ruby/object:Gem::Dependency
|
50
|
-
|
54
|
+
type: :development
|
51
55
|
prerelease: false
|
52
|
-
|
56
|
+
name: rake
|
57
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
53
58
|
none: false
|
54
59
|
requirements:
|
55
60
|
- - ">="
|
@@ -58,11 +63,23 @@ dependencies:
|
|
58
63
|
segments:
|
59
64
|
- 0
|
60
65
|
version: "0"
|
66
|
+
requirement: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
61
68
|
type: :development
|
62
|
-
|
69
|
+
prerelease: false
|
70
|
+
name: rspec
|
71
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 7
|
77
|
+
segments:
|
78
|
+
- 2
|
79
|
+
version: "2"
|
80
|
+
requirement: *id004
|
63
81
|
description: Clean up your controller code by raising exceptions that generate responses with different HTTP status codes.
|
64
|
-
email:
|
65
|
-
- willem@vanbergen.org
|
82
|
+
email: willem@vanbergen.org
|
66
83
|
executables: []
|
67
84
|
|
68
85
|
extensions: []
|
@@ -70,20 +87,19 @@ extensions: []
|
|
70
87
|
extra_rdoc_files: []
|
71
88
|
|
72
89
|
files:
|
73
|
-
- spec/spec_helper.rb
|
74
|
-
- spec/http_status_exception_spec.rb
|
75
|
-
- http_status_exceptions.gemspec
|
76
90
|
- .gitignore
|
77
|
-
- MIT-LICENSE
|
78
|
-
- lib/http_status_exceptions.rb
|
79
91
|
- Gemfile
|
80
|
-
- init.rb
|
81
|
-
- Rakefile
|
82
|
-
- README.rdoc
|
83
92
|
- Gemfile.lock
|
93
|
+
- MIT-LICENSE
|
94
|
+
- README.rdoc
|
95
|
+
- Rakefile
|
96
|
+
- http_status_exceptions.gemspec
|
97
|
+
- lib/http_status_exceptions.rb
|
98
|
+
- spec/http_status_exception_spec.rb
|
99
|
+
- spec/spec_helper.rb
|
84
100
|
- tasks/github-gem.rake
|
85
101
|
has_rdoc: true
|
86
|
-
homepage: http://github.com/wvanbergen/http_status_exceptions/
|
102
|
+
homepage: http://github.com/wvanbergen/http_status_exceptions/wiki
|
87
103
|
licenses: []
|
88
104
|
|
89
105
|
post_install_message:
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'http_status_exceptions.rb'
|