rack-robustness 1.1.0 → 2.0.0
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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +68 -6
- data/Gemfile +2 -7
- data/README.md +16 -8
- data/Rakefile +1 -3
- data/lib/rack/robustness/version.rb +8 -0
- data/lib/rack/robustness.rb +23 -7
- data/spec/test_context.rb +3 -3
- data/spec/test_ensure.rb +10 -10
- data/spec/test_header_names.rb +98 -0
- data/spec/test_last_resort.rb +17 -17
- data/spec/test_rescue.rb +6 -6
- data/spec/test_response.rb +4 -4
- data/spec/test_robustness.rb +46 -46
- data/spec/test_subclass.rb +3 -3
- data/tasks/gem.rake +25 -59
- data/tasks/test.rake +11 -0
- metadata +66 -63
- data/Gemfile.lock +0 -25
- data/Manifest.txt +0 -15
- data/rack-robustness.gemspec +0 -188
- data/tasks/spec_test.rake +0 -71
data/rack-robustness.gemspec
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
# We require your library, mainly to have access to the VERSION number.
|
|
2
|
-
# Feel free to set $version manually.
|
|
3
|
-
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
|
4
|
-
require "rack/robustness"
|
|
5
|
-
$version = Rack::Robustness::VERSION.dup.to_s
|
|
6
|
-
|
|
7
|
-
#
|
|
8
|
-
# This is your Gem specification. Default values are provided so that your library
|
|
9
|
-
# should be correctly packaged given what you have described in the .noespec file.
|
|
10
|
-
#
|
|
11
|
-
Gem::Specification.new do |s|
|
|
12
|
-
|
|
13
|
-
################################################################### ABOUT YOUR GEM
|
|
14
|
-
|
|
15
|
-
# Gem name (required)
|
|
16
|
-
s.name = "rack-robustness"
|
|
17
|
-
|
|
18
|
-
# Gem version (required)
|
|
19
|
-
s.version = $version
|
|
20
|
-
|
|
21
|
-
# A short summary of this gem
|
|
22
|
-
#
|
|
23
|
-
# This is displayed in `gem list -d`.
|
|
24
|
-
s.summary = "Rack::Robustness, the rescue clause of your Rack stack."
|
|
25
|
-
|
|
26
|
-
# A long description of this gem (required)
|
|
27
|
-
#
|
|
28
|
-
# The description should be more detailed than the summary. For example,
|
|
29
|
-
# you might wish to copy the entire README into the description.
|
|
30
|
-
s.description = "Rack::Robustness provides you with an easy way to handle errors in your stack, for making web applications more robust."
|
|
31
|
-
|
|
32
|
-
# The URL of this gem home page (optional)
|
|
33
|
-
s.homepage = "https://github.com/blambeau/rack-robustness"
|
|
34
|
-
|
|
35
|
-
# Gem publication date (required but auto)
|
|
36
|
-
#
|
|
37
|
-
# Today is automatically used by default, uncomment only if
|
|
38
|
-
# you know what you do!
|
|
39
|
-
#
|
|
40
|
-
# s.date = Time.now.strftime('%Y-%m-%d')
|
|
41
|
-
|
|
42
|
-
# The license(s) for the library. Each license must be a short name, no
|
|
43
|
-
# more than 64 characters.
|
|
44
|
-
#
|
|
45
|
-
# s.licences = %w{}
|
|
46
|
-
|
|
47
|
-
# The rubyforge project this gem lives under (optional)
|
|
48
|
-
#
|
|
49
|
-
# s.rubyforge_project = nil
|
|
50
|
-
|
|
51
|
-
################################################################### ABOUT THE AUTHORS
|
|
52
|
-
|
|
53
|
-
# The list of author names who wrote this gem.
|
|
54
|
-
#
|
|
55
|
-
# If you are providing multiple authors and multiple emails they should be
|
|
56
|
-
# in the same order.
|
|
57
|
-
#
|
|
58
|
-
s.authors = ["Bernard Lambeau"]
|
|
59
|
-
|
|
60
|
-
# Contact emails for this gem
|
|
61
|
-
#
|
|
62
|
-
# If you are providing multiple authors and multiple emails they should be
|
|
63
|
-
# in the same order.
|
|
64
|
-
#
|
|
65
|
-
# NOTE: Somewhat strangly this attribute is always singular!
|
|
66
|
-
# Don't replace by s.emails = ...
|
|
67
|
-
s.email = ["blambeau@gmail.com"]
|
|
68
|
-
|
|
69
|
-
################################################################### PATHS, FILES, BINARIES
|
|
70
|
-
|
|
71
|
-
# Paths in the gem to add to $LOAD_PATH when this gem is
|
|
72
|
-
# activated (required).
|
|
73
|
-
#
|
|
74
|
-
# The default 'lib' is typically sufficient.
|
|
75
|
-
s.require_paths = ["lib"]
|
|
76
|
-
|
|
77
|
-
# Files included in this gem.
|
|
78
|
-
#
|
|
79
|
-
# By default, we take all files included in the Manifest.txt file on root
|
|
80
|
-
# of the project. Entries of the manifest are interpreted as Dir[...]
|
|
81
|
-
# patterns so that lazy people may use wilcards like lib/**/*
|
|
82
|
-
#
|
|
83
|
-
here = File.expand_path(File.dirname(__FILE__))
|
|
84
|
-
s.files = File.readlines(File.join(here, 'Manifest.txt')).
|
|
85
|
-
inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
|
|
86
|
-
collect{|x| x[(1+here.size)..-1]}
|
|
87
|
-
|
|
88
|
-
# Test files included in this gem.
|
|
89
|
-
#
|
|
90
|
-
s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
|
|
91
|
-
|
|
92
|
-
# The path in the gem for executable scripts (optional)
|
|
93
|
-
#
|
|
94
|
-
s.bindir = "bin"
|
|
95
|
-
|
|
96
|
-
# Executables included in the gem.
|
|
97
|
-
#
|
|
98
|
-
s.executables = (Dir["bin/*"]).collect{|f| File.basename(f)}
|
|
99
|
-
|
|
100
|
-
################################################################### REQUIREMENTS & INSTALL
|
|
101
|
-
# Remember the gem version requirements operators and schemes:
|
|
102
|
-
# = Equals version
|
|
103
|
-
# != Not equal to version
|
|
104
|
-
# > Greater than version
|
|
105
|
-
# < Less than version
|
|
106
|
-
# >= Greater than or equal to
|
|
107
|
-
# <= Less than or equal to
|
|
108
|
-
# ~> Approximately greater than
|
|
109
|
-
#
|
|
110
|
-
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
|
111
|
-
# for setting your gem version.
|
|
112
|
-
#
|
|
113
|
-
# For your requirements to other gems, remember that
|
|
114
|
-
# ">= 2.2.0" (optimistic: specify minimal version)
|
|
115
|
-
# ">= 2.2.0", "< 3.0" (pessimistic: not greater than the next major)
|
|
116
|
-
# "~> 2.2" (shortcut for ">= 2.2.0", "< 3.0")
|
|
117
|
-
# "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
|
|
118
|
-
#
|
|
119
|
-
|
|
120
|
-
#
|
|
121
|
-
# One call to add_dependency('gem_name', 'gem version requirement') for each
|
|
122
|
-
# runtime dependency. These gems will be installed with your gem.
|
|
123
|
-
# One call to add_development_dependency('gem_name', 'gem version requirement')
|
|
124
|
-
# for each development dependency. These gems are required for developers
|
|
125
|
-
#
|
|
126
|
-
s.add_development_dependency("rake", "~> 10.0")
|
|
127
|
-
s.add_development_dependency("rspec", "~> 2.12")
|
|
128
|
-
s.add_development_dependency("rack", "~> 1.5")
|
|
129
|
-
s.add_development_dependency("rack-test", "~> 0.6")
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
# The version of ruby required by this gem
|
|
133
|
-
#
|
|
134
|
-
# Uncomment and set this if your gem requires specific ruby versions.
|
|
135
|
-
#
|
|
136
|
-
# s.required_ruby_version = ">= 0"
|
|
137
|
-
|
|
138
|
-
# The RubyGems version required by this gem
|
|
139
|
-
#
|
|
140
|
-
# s.required_rubygems_version = ">= 0"
|
|
141
|
-
|
|
142
|
-
# The platform this gem runs on. See Gem::Platform for details.
|
|
143
|
-
#
|
|
144
|
-
# s.platform = nil
|
|
145
|
-
|
|
146
|
-
# Extensions to build when installing the gem.
|
|
147
|
-
#
|
|
148
|
-
# Valid types of extensions are extconf.rb files, configure scripts
|
|
149
|
-
# and rakefiles or mkrf_conf files.
|
|
150
|
-
#
|
|
151
|
-
s.extensions = []
|
|
152
|
-
|
|
153
|
-
# External (to RubyGems) requirements that must be met for this gem to work.
|
|
154
|
-
# It’s simply information for the user.
|
|
155
|
-
#
|
|
156
|
-
s.requirements = nil
|
|
157
|
-
|
|
158
|
-
# A message that gets displayed after the gem is installed
|
|
159
|
-
#
|
|
160
|
-
# Uncomment and set this if you want to say something to the user
|
|
161
|
-
# after gem installation
|
|
162
|
-
#
|
|
163
|
-
s.post_install_message = nil
|
|
164
|
-
|
|
165
|
-
################################################################### SECURITY
|
|
166
|
-
|
|
167
|
-
# The key used to sign this gem. See Gem::Security for details.
|
|
168
|
-
#
|
|
169
|
-
# s.signing_key = nil
|
|
170
|
-
|
|
171
|
-
# The certificate chain used to sign this gem. See Gem::Security for
|
|
172
|
-
# details.
|
|
173
|
-
#
|
|
174
|
-
# s.cert_chain = []
|
|
175
|
-
|
|
176
|
-
################################################################### RDOC
|
|
177
|
-
|
|
178
|
-
# An ARGV style array of options to RDoc
|
|
179
|
-
#
|
|
180
|
-
# See 'rdoc --help' about this
|
|
181
|
-
#
|
|
182
|
-
s.rdoc_options = []
|
|
183
|
-
|
|
184
|
-
# Extra files to add to RDoc such as README
|
|
185
|
-
#
|
|
186
|
-
s.extra_rdoc_files = Dir["README.md"] + Dir["CHANGELOG.md"] + Dir["LICENCE.md"]
|
|
187
|
-
|
|
188
|
-
end
|
data/tasks/spec_test.rake
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Installs a rake task for for running examples written using rspec.
|
|
2
|
-
#
|
|
3
|
-
# This file installs the 'rake spec_test' (aliased as 'rake spec') as well as
|
|
4
|
-
# extends 'rake test' to run spec tests, if any. It is automatically generated
|
|
5
|
-
# by Noe from your .noespec file, and should therefore be configured there,
|
|
6
|
-
# under the variables/rake_tasks/spec_test entry, as illustrated below:
|
|
7
|
-
#
|
|
8
|
-
# variables:
|
|
9
|
-
# rake_tasks:
|
|
10
|
-
# spec_test:
|
|
11
|
-
# pattern: spec/**/*_spec.rb
|
|
12
|
-
# verbose: true
|
|
13
|
-
# rspec_opts: [--color, --backtrace]
|
|
14
|
-
# ...
|
|
15
|
-
#
|
|
16
|
-
# If you have specific needs requiring manual intervention on this file,
|
|
17
|
-
# don't forget to set safe-override to false in your noe specification:
|
|
18
|
-
#
|
|
19
|
-
# template-info:
|
|
20
|
-
# manifest:
|
|
21
|
-
# tasks/spec_test.rake:
|
|
22
|
-
# safe-override: false
|
|
23
|
-
#
|
|
24
|
-
# This file has been written to conform to RSpec v2.4.0. More information about
|
|
25
|
-
# rspec and options of the rake task defined below can be found on
|
|
26
|
-
# http://relishapp.com/rspec
|
|
27
|
-
#
|
|
28
|
-
begin
|
|
29
|
-
require "rspec/core/rake_task"
|
|
30
|
-
desc "Run RSpec code examples"
|
|
31
|
-
RSpec::Core::RakeTask.new(:spec_test) do |t|
|
|
32
|
-
# Glob pattern to match files.
|
|
33
|
-
t.pattern = "spec/**/test_*.rb"
|
|
34
|
-
|
|
35
|
-
# Whether or not to fail Rake when an error occurs (typically when
|
|
36
|
-
# examples fail).
|
|
37
|
-
t.fail_on_error = true
|
|
38
|
-
|
|
39
|
-
# A message to print to stderr when there are failures.
|
|
40
|
-
t.failure_message = nil
|
|
41
|
-
|
|
42
|
-
# Use verbose output. If this is set to true, the task will print the
|
|
43
|
-
# executed spec command to stdout.
|
|
44
|
-
t.verbose = true
|
|
45
|
-
|
|
46
|
-
# Use rcov for code coverage?
|
|
47
|
-
t.rcov = false
|
|
48
|
-
|
|
49
|
-
# Path to rcov.
|
|
50
|
-
t.rcov_path = "rcov"
|
|
51
|
-
|
|
52
|
-
# Command line options to pass to rcov. See 'rcov --help' about this
|
|
53
|
-
t.rcov_opts = []
|
|
54
|
-
|
|
55
|
-
# Command line options to pass to ruby. See 'ruby --help' about this
|
|
56
|
-
t.ruby_opts = []
|
|
57
|
-
|
|
58
|
-
# Path to rspec
|
|
59
|
-
t.rspec_path = "rspec"
|
|
60
|
-
|
|
61
|
-
# Command line options to pass to rspec. See 'rspec --help' about this
|
|
62
|
-
t.rspec_opts = ["--color", "--backtrace"]
|
|
63
|
-
end
|
|
64
|
-
rescue LoadError => ex
|
|
65
|
-
task :spec_test do
|
|
66
|
-
abort 'rspec is not available. In order to run spec, you must: gem install rspec'
|
|
67
|
-
end
|
|
68
|
-
ensure
|
|
69
|
-
task :spec => [:spec_test]
|
|
70
|
-
task :test => [:spec_test]
|
|
71
|
-
end
|