rack-contrib 1.2.0 → 1.2.0.39.g17d21b4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rack-contrib might be problematic. Click here for more details.

Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +98 -0
  3. data/lib/rack/contrib.rb +3 -1
  4. data/lib/rack/contrib/enforce_valid_encoding.rb +23 -0
  5. data/lib/rack/contrib/jsonp.rb +5 -1
  6. data/lib/rack/contrib/locale.rb +1 -1
  7. data/lib/rack/contrib/mailexceptions.rb +41 -10
  8. data/lib/rack/contrib/post_body_content_type_parser.rb +1 -1
  9. data/lib/rack/contrib/relative_redirect.rb +1 -1
  10. data/lib/rack/contrib/try_static.rb +1 -1
  11. metadata +166 -113
  12. data/README.rdoc +0 -98
  13. data/Rakefile +0 -89
  14. data/rack-contrib.gemspec +0 -112
  15. data/test/404.html +0 -1
  16. data/test/Maintenance.html +0 -1
  17. data/test/documents/existing.html +0 -1
  18. data/test/documents/index.htm +0 -1
  19. data/test/documents/index.html +0 -1
  20. data/test/documents/test +0 -1
  21. data/test/mail_settings.rb +0 -20
  22. data/test/spec_rack_accept_format.rb +0 -72
  23. data/test/spec_rack_access.rb +0 -154
  24. data/test/spec_rack_backstage.rb +0 -26
  25. data/test/spec_rack_callbacks.rb +0 -65
  26. data/test/spec_rack_common_cookies.rb +0 -107
  27. data/test/spec_rack_config.rb +0 -22
  28. data/test/spec_rack_contrib.rb +0 -8
  29. data/test/spec_rack_cookies.rb +0 -56
  30. data/test/spec_rack_csshttprequest.rb +0 -66
  31. data/test/spec_rack_deflect.rb +0 -107
  32. data/test/spec_rack_evil.rb +0 -19
  33. data/test/spec_rack_expectation_cascade.rb +0 -72
  34. data/test/spec_rack_garbagecollector.rb +0 -13
  35. data/test/spec_rack_host_meta.rb +0 -50
  36. data/test/spec_rack_jsonp.rb +0 -188
  37. data/test/spec_rack_lighttpd_script_name_fix.rb +0 -16
  38. data/test/spec_rack_mailexceptions.rb +0 -169
  39. data/test/spec_rack_nested_params.rb +0 -46
  40. data/test/spec_rack_not_found.rb +0 -17
  41. data/test/spec_rack_post_body_content_type_parser.rb +0 -40
  42. data/test/spec_rack_proctitle.rb +0 -26
  43. data/test/spec_rack_profiler.rb +0 -42
  44. data/test/spec_rack_relative_redirect.rb +0 -78
  45. data/test/spec_rack_response_cache.rb +0 -137
  46. data/test/spec_rack_response_headers.rb +0 -35
  47. data/test/spec_rack_runtime.rb +0 -35
  48. data/test/spec_rack_sendfile.rb +0 -86
  49. data/test/spec_rack_simple_endpoint.rb +0 -95
  50. data/test/spec_rack_static_cache.rb +0 -104
  51. data/test/spec_rack_try_static.rb +0 -56
  52. data/test/statics/test +0 -1
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a0fc912702d3787e565c1b9a5e7adf53f029a858
4
+ data.tar.gz: 6da50db6fac1aacf515e580e735ef9cfeaa52609
5
+ SHA512:
6
+ metadata.gz: ebd6c1774b9436008a19d32aa651fdd228cd3e31ee96767cf470714a842d083592bf95d7926d22564702b928800b7002a7f099cf647118b9029e3335e4e349e8
7
+ data.tar.gz: 0ebb959efb4a31b6f0c9e068274601051d28bcd1fdbd7cc585db1c86eaaef3f785cb82b909b441070b2e7dd23b4555996c1b5ba714f3f05a54e9cd270b19f291
@@ -0,0 +1,98 @@
1
+ # Contributed Rack Middleware and Utilities
2
+
3
+ This package includes a variety of add-on components for Rack, a Ruby web server
4
+ interface:
5
+
6
+ * `Rack::AcceptFormat` - Adds a format extension at the end of the URI when there is none, corresponding to the mime-type given in the Accept HTTP header.
7
+ * `Rack::Access` - Limits access based on IP address
8
+ * `Rack::Backstage` - Returns content of specified file if it exists, which makes it convenient for putting up maintenance pages.
9
+ * `Rack::CSSHTTPRequest` - Adds CSSHTTPRequest support by encoding responses as CSS for cross-site AJAX-style data loading
10
+ * `Rack::Callbacks` - Implements DSL for pure before/after filter like Middlewares.
11
+ * `Rack::Config` - Shared configuration for cooperative middleware.
12
+ * `Rack::Cookies` - Adds simple cookie jar hash to env
13
+ * `Rack::Deflect` - Helps protect against DoS attacks.
14
+ * `Rack::Evil` - Lets the rack application return a response to the client from any place.
15
+ * `Rack::HostMeta` - Configures `/host-meta` using a block
16
+ * `Rack::JSONP` - Adds JSON-P support by stripping out the callback param and padding the response with the appropriate callback format.
17
+ * `Rack::LighttpdScriptNameFix` - Fixes how lighttpd sets the `SCRIPT_NAME` and `PATH_INFO` variables in certain configurations.
18
+ * `Rack::Locale` - Detects the client locale using the Accept-Language request header and sets a `rack.locale` variable in the environment.
19
+ * `Rack::MailExceptions` - Rescues exceptions raised from the app and sends a useful email with the exception, stacktrace, and contents of the environment.
20
+ * `Rack::NestedParams` - parses form params with subscripts (e.g., * "`post[title]=Hello`") into a nested/recursive Hash structure (based on Rails' implementation).
21
+ * `Rack::NotFound` - A default 404 application.
22
+ * `Rack::PostBodyContentTypeParser` - Adds support for JSON request bodies. The Rack parameter hash is populated by deserializing the JSON data provided in the request body when the Content-Type is application/json.
23
+ * `Rack::Printout` - Prints the environment and the response per request
24
+ * `Rack::ProcTitle` - Displays request information in process title (`$0`) for monitoring/inspection with ps(1).
25
+ * `Rack::Profiler` - Uses ruby-prof to measure request time.
26
+ * `Rack::RelativeRedirect` - Transforms relative paths in redirects to absolute URLs.
27
+ * `Rack::ResponseCache` - Caches responses to requests without query strings to Disk or a user provider Ruby object. Similar to Rails' page caching.
28
+ * `Rack::ResponseHeaders` - Manipulates response headers object at runtime
29
+ * `Rack::Sendfile` - Enables `X-Sendfile` support for bodies that can be served from file.
30
+ * `Rack::Signals` - Installs signal handlers that are safely processed after a request
31
+ * `Rack::SimpleEndpoint` - Creates simple endpoints with routing rules, similar to Sinatra actions
32
+ * `Rack::StaticCache` - Modifies the response headers to facilitiate client and proxy caching for static files that minimizes http requests and improves overall load times for second time visitors.
33
+ * `Rack::TimeZone` - Detects the client's timezone using JavaScript and sets a variable in Rack's environment with the offset from UTC.
34
+ * `Rack::TryStatic` - Tries to match request to a static file
35
+
36
+ ### Use
37
+
38
+ Git is the quickest way to the rack-contrib sources:
39
+
40
+ git clone git://github.com/rack/rack-contrib.git
41
+
42
+ Gems are available too:
43
+
44
+ gem install rack-contrib
45
+
46
+ Requiring `'rack/contrib'` will add autoloads to the Rack modules for all of the
47
+ components included. The following example shows what a simple rackup
48
+ (`config.ru`) file might look like:
49
+
50
+ ```ruby
51
+ require 'rack'
52
+ require 'rack/contrib'
53
+
54
+ use Rack::Profiler if ENV['RACK_ENV'] == 'development'
55
+
56
+ use Rack::ETag
57
+ use Rack::MailExceptions
58
+
59
+ run theapp
60
+ ```
61
+
62
+ ### Testing
63
+
64
+ To contribute to the project, begin by cloning the repo and installing the necessary gems:
65
+
66
+ gem install json rack ruby-prof test-spec test-unit
67
+
68
+ To run the entire test suite, run
69
+
70
+ rake test
71
+
72
+ To run a specific component's tests run
73
+
74
+ specrb -Ilib:test -w test/spec_rack_thecomponent.rb
75
+
76
+ This works on ruby 1.8.7 but has problems under ruby 1.9.x.
77
+
78
+ TODO: instructions for 1.9.x and include bundler
79
+
80
+ ### Criteria for inclusion
81
+ The criteria for middleware being included in this project are roughly as follows:
82
+ * For patterns that are very common, provide a reference implementation so that other projects do not have to reinvent the wheel.
83
+ * For patterns that are very useful or interesting, provide a well-done implementation.
84
+ * The middleware fits in 1 code file and is relatively small. Currently all middleware in the project are < 150 LOC.
85
+ * The middleware doesn't have any dependencies other than rack and the ruby standard library.
86
+
87
+ These criteria were introduced several years after the start of the project, so some of the included middleware may not meet all of them. In particular, several middleware have external dependencies. It is possible that in some future release of rack-contrib, middleware with external depencies will be removed from the project.
88
+
89
+ When submitting code keep the above criteria in mind and also see the code
90
+ guidelines in CONTRIBUTING.md.
91
+
92
+ ### Links
93
+
94
+ * rack-contrib on GitHub:: <http://github.com/rack/rack-contrib>
95
+ * Rack:: <http://rack.rubyforge.org/>
96
+ * Rack On GitHub:: <http://github.com/rack/rack>
97
+ * rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
98
+ * [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/rack/rack-contrib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -1,9 +1,10 @@
1
1
  require 'rack'
2
+ require 'git-version-bump'
2
3
 
3
4
  module Rack
4
5
  module Contrib
5
6
  def self.release
6
- "1.2.0"
7
+ GVB.version
7
8
  end
8
9
  end
9
10
 
@@ -13,6 +14,7 @@ module Rack
13
14
  autoload :Cookies, "rack/contrib/cookies"
14
15
  autoload :CSSHTTPRequest, "rack/contrib/csshttprequest"
15
16
  autoload :Deflect, "rack/contrib/deflect"
17
+ autoload :EnforceValidEncoding, "rack/contrib/enforce_valid_encoding"
16
18
  autoload :ExpectationCascade, "rack/contrib/expectation_cascade"
17
19
  autoload :HostMeta, "rack/contrib/host_meta"
18
20
  autoload :GarbageCollector, "rack/contrib/garbagecollector"
@@ -0,0 +1,23 @@
1
+ module Rack
2
+ # Ensure that the path and query string presented to the application
3
+ # contains only valid characters. If the validation fails, then a
4
+ # 400 Bad Request response is returned immediately.
5
+ #
6
+ # Requires: Ruby 1.9
7
+ #
8
+ class EnforceValidEncoding
9
+ def initialize app
10
+ @app = app
11
+ end
12
+
13
+ def call env
14
+ full_path = (env.fetch('PATH_INFO', '') + env.fetch('QUERY_STRING', ''))
15
+ if full_path.force_encoding("US-ASCII").valid_encoding? &&
16
+ Rack::Utils.unescape(full_path).valid_encoding?
17
+ @app.call env
18
+ else
19
+ [400, {'Content-Type'=>'text/plain'}, ['Bad Request']]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -37,6 +37,10 @@ module Rack
37
37
 
38
38
  status, headers, response = @app.call(env)
39
39
 
40
+ if STATUS_WITH_NO_ENTITY_BODY.include?(status)
41
+ return status, headers, response
42
+ end
43
+
40
44
  headers = HeaderHash.new(headers)
41
45
 
42
46
  if is_json?(headers) && has_callback?(request)
@@ -65,7 +69,7 @@ module Rack
65
69
  end
66
70
 
67
71
  def has_callback?(request)
68
- request.params.include?('callback') and not request.params['callback'].empty?
72
+ request.params.include?('callback') and not request.params['callback'].to_s.empty?
69
73
  end
70
74
 
71
75
  # See:
@@ -13,7 +13,7 @@ module Rack
13
13
  locale = accept_locale(env) || I18n.default_locale
14
14
  locale = env['rack.locale'] = I18n.locale = locale.to_s
15
15
  status, headers, body = @app.call(env)
16
- headers['Content-Language'] = locale
16
+ headers['Content-Language'] = locale unless headers['Content-Language']
17
17
  [status, headers, body]
18
18
  ensure
19
19
  I18n.locale = old_locale
@@ -7,6 +7,17 @@ module Rack
7
7
  # sends a useful email with the exception, stacktrace, and
8
8
  # contents of the environment.
9
9
 
10
+ # use smtp
11
+ # use Rack::MailExceptions do |mail|
12
+ # mail.to 'test@gmail.com'
13
+ # mail.smtp :address => 'mail.test.com', :user_name => 'test@test.com', :password => 'test'
14
+ # end
15
+ # use sendmail
16
+ # use Rack::MailExceptions do |mail|
17
+ # mail.to 'test@gmail.com'
18
+ # mail.smtp false
19
+ # end
20
+
10
21
  class MailExceptions
11
22
  attr_reader :config
12
23
 
@@ -17,7 +28,7 @@ module Rack
17
28
  :from => ENV['USER'] || 'rack@localhost',
18
29
  :subject => '[exception] %s',
19
30
  :smtp => {
20
- :address => 'localhost',
31
+ :address => 'localhost',
21
32
  :domain => 'localhost',
22
33
  :port => 25,
23
34
  :authentication => :login,
@@ -26,6 +37,7 @@ module Rack
26
37
  }
27
38
  }
28
39
  @template = ERB.new(TEMPLATE)
40
+ @test_mode = false
29
41
  yield self if block_given?
30
42
  end
31
43
 
@@ -46,26 +58,45 @@ module Rack
46
58
  end
47
59
 
48
60
  def smtp(settings={})
49
- @config[:smtp].merge! settings
61
+ if settings
62
+ @config[:smtp].merge! settings
63
+ else
64
+ @config[:smtp] = nil
65
+ end
66
+ end
67
+
68
+ def enable_test_mode
69
+ @test_mode = true
70
+ end
71
+
72
+ def disable_test_mode
73
+ @test_mode = false
50
74
  end
51
75
 
52
76
  private
53
77
  def generate_mail(exception, env)
54
- mail = Mail.new({
78
+ Mail.new({
55
79
  :from => config[:from],
56
80
  :to => config[:to],
57
- :subject => config[:subject] % [exception.to_s],
58
- :body => @template.result(binding)
81
+ :subject => config[:subject] % [exception.to_s],
82
+ :body => @template.result(binding),
83
+ :charset => "UTF-8"
59
84
  })
60
85
  end
61
86
 
62
87
  def send_notification(exception, env)
63
88
  mail = generate_mail(exception, env)
64
- smtp = config[:smtp]
65
- # for backward compability, replace the :server key with :address
66
- address = smtp.delete :server
67
- smtp[:address] = address if address
68
- mail.delivery_method :smtp, smtp
89
+ if @test_mode
90
+ mail.delivery_method :test
91
+ elsif config[:smtp]
92
+ smtp = config[:smtp]
93
+ # for backward compability, replace the :server key with :address
94
+ address = smtp.delete :server
95
+ smtp[:address] = address if address
96
+ mail.delivery_method :smtp, smtp
97
+ else
98
+ mail.delivery_method :sendmail
99
+ end
69
100
  mail.deliver!
70
101
  env['mail.sent'] = true
71
102
  mail
@@ -31,7 +31,7 @@ module Rack
31
31
  def call(env)
32
32
  if Rack::Request.new(env).media_type == APPLICATION_JSON && (body = env[POST_BODY].read).length != 0
33
33
  env[POST_BODY].rewind # somebody might try to read this stream
34
- env.update(FORM_HASH => JSON.parse(body), FORM_INPUT => env[POST_BODY])
34
+ env.update(FORM_HASH => JSON.parse(body, :create_additions => false), FORM_INPUT => env[POST_BODY])
35
35
  end
36
36
  @app.call(env)
37
37
  end
@@ -31,7 +31,7 @@ class Rack::RelativeRedirect
31
31
  # does not start with a slash, make location relative to the path requested.
32
32
  def call(env)
33
33
  res = @app.call(env)
34
- if [301,302,303].include?(res[0]) and loc = res[1]['Location'] and !%r{\Ahttps?://}o.match(loc)
34
+ if [301,302,303, 307,308].include?(res[0]) and loc = res[1]['Location'] and !%r{\Ahttps?://}o.match(loc)
35
35
  absolute = @absolute_proc.call(env, res)
36
36
  res[1]['Location'] = if %r{\A/}.match(loc)
37
37
  "#{absolute}#{loc}"
@@ -28,7 +28,7 @@ module Rack
28
28
  found = nil
29
29
  @try.each do |path|
30
30
  resp = @static.call(env.merge!({'PATH_INFO' => orig_path + path}))
31
- break if 404 != resp[0] && found = resp
31
+ break if !(403..405).include?(resp[0]) && found = resp
32
32
  end
33
33
  found or @app.call(env.merge!('PATH_INFO' => orig_path))
34
34
  end
metadata CHANGED
@@ -1,92 +1,214 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
5
- prerelease:
4
+ version: 1.2.0.39.g17d21b4
6
5
  platform: ruby
7
6
  authors:
8
7
  - rack-devel
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2013-12-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 0.9.1
19
+ version: '1.4'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 0.9.1
26
+ version: '1.4'
30
27
  - !ruby/object:Gem::Dependency
31
- name: test-spec
28
+ name: git-version-bump
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: 0.9.0
33
+ version: '0.15'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.15'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: github-release
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
38
62
  type: :development
39
63
  prerelease: false
40
64
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
65
  requirements:
43
- - - ! '>='
66
+ - - "~>"
44
67
  - !ruby/object:Gem::Version
45
- version: 0.9.0
68
+ version: '0.1'
46
69
  - !ruby/object:Gem::Dependency
47
- name: tmail
70
+ name: i18n
48
71
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
72
  requirements:
51
- - - ! '>='
73
+ - - "~>"
52
74
  - !ruby/object:Gem::Version
53
- version: '1.2'
75
+ version: '0.4'
54
76
  type: :development
55
77
  prerelease: false
56
78
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
79
  requirements:
59
- - - ! '>='
80
+ - - "~>"
60
81
  - !ruby/object:Gem::Version
61
- version: '1.2'
82
+ version: '0.4'
62
83
  - !ruby/object:Gem::Dependency
63
84
  name: json
64
85
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
86
  requirements:
67
- - - ! '>='
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.8'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.8'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '5.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '5.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: minitest-hooks
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: mail
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.3'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.3'
139
+ - !ruby/object:Gem::Dependency
140
+ name: nbio-csshttprequest
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
68
144
  - !ruby/object:Gem::Version
69
- version: '1.1'
145
+ version: '1.0'
70
146
  type: :development
71
147
  prerelease: false
72
148
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
149
  requirements:
75
- - - ! '>='
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rake
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '10.4'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 10.4.2
163
+ type: :development
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '10.4'
170
+ - - ">="
76
171
  - !ruby/object:Gem::Version
77
- version: '1.1'
172
+ version: 10.4.2
173
+ - !ruby/object:Gem::Dependency
174
+ name: rdoc
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '3.12'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: '3.12'
187
+ - !ruby/object:Gem::Dependency
188
+ name: ruby-prof
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: 0.13.0
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "~>"
199
+ - !ruby/object:Gem::Version
200
+ version: 0.13.0
78
201
  description: Contributed Rack Middleware and Utilities
79
202
  email: rack-devel@googlegroups.com
80
203
  executables: []
81
204
  extensions: []
82
205
  extra_rdoc_files:
83
- - README.rdoc
206
+ - README.md
84
207
  - COPYING
85
208
  files:
86
209
  - AUTHORS
87
210
  - COPYING
88
- - README.rdoc
89
- - Rakefile
211
+ - README.md
90
212
  - lib/rack/contrib.rb
91
213
  - lib/rack/contrib/accept_format.rb
92
214
  - lib/rack/contrib/access.rb
@@ -98,6 +220,7 @@ files:
98
220
  - lib/rack/contrib/cookies.rb
99
221
  - lib/rack/contrib/csshttprequest.rb
100
222
  - lib/rack/contrib/deflect.rb
223
+ - lib/rack/contrib/enforce_valid_encoding.rb
101
224
  - lib/rack/contrib/evil.rb
102
225
  - lib/rack/contrib/expectation_cascade.rb
103
226
  - lib/rack/contrib/garbagecollector.rb
@@ -109,8 +232,8 @@ files:
109
232
  - lib/rack/contrib/nested_params.rb
110
233
  - lib/rack/contrib/not_found.rb
111
234
  - lib/rack/contrib/post_body_content_type_parser.rb
112
- - lib/rack/contrib/proctitle.rb
113
235
  - lib/rack/contrib/printout.rb
236
+ - lib/rack/contrib/proctitle.rb
114
237
  - lib/rack/contrib/profiler.rb
115
238
  - lib/rack/contrib/relative_redirect.rb
116
239
  - lib/rack/contrib/response_cache.rb
@@ -123,104 +246,34 @@ files:
123
246
  - lib/rack/contrib/static_cache.rb
124
247
  - lib/rack/contrib/time_zone.rb
125
248
  - lib/rack/contrib/try_static.rb
126
- - rack-contrib.gemspec
127
- - test/404.html
128
- - test/Maintenance.html
129
- - test/documents/existing.html
130
- - test/documents/index.htm
131
- - test/documents/index.html
132
- - test/documents/test
133
- - test/mail_settings.rb
134
- - test/spec_rack_accept_format.rb
135
- - test/spec_rack_access.rb
136
- - test/spec_rack_backstage.rb
137
- - test/spec_rack_callbacks.rb
138
- - test/spec_rack_common_cookies.rb
139
- - test/spec_rack_config.rb
140
- - test/spec_rack_contrib.rb
141
- - test/spec_rack_cookies.rb
142
- - test/spec_rack_csshttprequest.rb
143
- - test/spec_rack_deflect.rb
144
- - test/spec_rack_evil.rb
145
- - test/spec_rack_expectation_cascade.rb
146
- - test/spec_rack_garbagecollector.rb
147
- - test/spec_rack_host_meta.rb
148
- - test/spec_rack_jsonp.rb
149
- - test/spec_rack_lighttpd_script_name_fix.rb
150
- - test/spec_rack_mailexceptions.rb
151
- - test/spec_rack_nested_params.rb
152
- - test/spec_rack_not_found.rb
153
- - test/spec_rack_post_body_content_type_parser.rb
154
- - test/spec_rack_proctitle.rb
155
- - test/spec_rack_profiler.rb
156
- - test/spec_rack_relative_redirect.rb
157
- - test/spec_rack_response_cache.rb
158
- - test/spec_rack_response_headers.rb
159
- - test/spec_rack_runtime.rb
160
- - test/spec_rack_sendfile.rb
161
- - test/spec_rack_simple_endpoint.rb
162
- - test/spec_rack_static_cache.rb
163
- - test/spec_rack_try_static.rb
164
- - test/statics/test
165
249
  homepage: http://github.com/rack/rack-contrib/
166
250
  licenses:
167
251
  - MIT
252
+ metadata: {}
168
253
  post_install_message:
169
254
  rdoc_options:
170
- - --line-numbers
171
- - --inline-source
172
- - --title
255
+ - "--line-numbers"
256
+ - "--inline-source"
257
+ - "--title"
173
258
  - rack-contrib
174
- - --main
259
+ - "--main"
175
260
  - README
176
261
  require_paths:
177
262
  - lib
178
263
  required_ruby_version: !ruby/object:Gem::Requirement
179
- none: false
180
264
  requirements:
181
- - - ! '>='
265
+ - - ">="
182
266
  - !ruby/object:Gem::Version
183
267
  version: '0'
184
268
  required_rubygems_version: !ruby/object:Gem::Requirement
185
- none: false
186
269
  requirements:
187
- - - ! '>='
270
+ - - ">"
188
271
  - !ruby/object:Gem::Version
189
- version: '0'
272
+ version: 1.3.1
190
273
  requirements: []
191
274
  rubyforge_project:
192
- rubygems_version: 1.8.23
275
+ rubygems_version: 2.2.2
193
276
  signing_key:
194
277
  specification_version: 2
195
278
  summary: Contributed Rack Middleware and Utilities
196
- test_files:
197
- - test/spec_rack_accept_format.rb
198
- - test/spec_rack_access.rb
199
- - test/spec_rack_backstage.rb
200
- - test/spec_rack_callbacks.rb
201
- - test/spec_rack_common_cookies.rb
202
- - test/spec_rack_config.rb
203
- - test/spec_rack_contrib.rb
204
- - test/spec_rack_cookies.rb
205
- - test/spec_rack_csshttprequest.rb
206
- - test/spec_rack_deflect.rb
207
- - test/spec_rack_evil.rb
208
- - test/spec_rack_expectation_cascade.rb
209
- - test/spec_rack_garbagecollector.rb
210
- - test/spec_rack_host_meta.rb
211
- - test/spec_rack_jsonp.rb
212
- - test/spec_rack_lighttpd_script_name_fix.rb
213
- - test/spec_rack_mailexceptions.rb
214
- - test/spec_rack_nested_params.rb
215
- - test/spec_rack_not_found.rb
216
- - test/spec_rack_post_body_content_type_parser.rb
217
- - test/spec_rack_proctitle.rb
218
- - test/spec_rack_profiler.rb
219
- - test/spec_rack_relative_redirect.rb
220
- - test/spec_rack_response_cache.rb
221
- - test/spec_rack_response_headers.rb
222
- - test/spec_rack_runtime.rb
223
- - test/spec_rack_sendfile.rb
224
- - test/spec_rack_simple_endpoint.rb
225
- - test/spec_rack_static_cache.rb
226
- - test/spec_rack_try_static.rb
279
+ test_files: []