rack-robustness 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +55 -1
- data/Gemfile +3 -3
- data/Gemfile.lock +22 -14
- data/README.md +80 -8
- data/Rakefile +1 -3
- data/lib/rack/robustness.rb +173 -58
- data/spec/spec_helper.rb +23 -0
- data/spec/test_context.rb +45 -0
- data/spec/test_ensure.rb +37 -0
- data/spec/test_last_resort.rb +98 -0
- data/spec/test_rescue.rb +32 -0
- data/spec/test_response.rb +40 -0
- data/spec/test_robustness.rb +42 -50
- data/spec/test_subclass.rb +20 -0
- data/tasks/gem.rake +25 -59
- data/tasks/test.rake +11 -0
- metadata +32 -34
- data/tasks/spec_test.rake +0 -71
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
|