rack-contrib 2.0.0 → 2.0.1

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b545ac91ebc6596e463da4596aa475e98f170759
4
- data.tar.gz: 7185814a488ba9dfc59071569d9ae7175e2f5eb3
3
+ metadata.gz: 7784c9ef2deb5524c67848eec58934752c586e8d
4
+ data.tar.gz: 76bca1883c124f0c9143ef9b0d79cb550c261c03
5
5
  SHA512:
6
- metadata.gz: 6b8b85e0c0d7541825991235ec8b20057d9d8965d031540f056741fb99b9bd6ac524096988066ba717221ec6f6f134db76f9bf5f6325794f28d6a8f2b8831a0f
7
- data.tar.gz: 3413f89de71509f68b16b21d4e40dc0eb7fbd98c5210a5fa9e0512521f630f044a75933ce05eca29f19536f052184722c79ca37ba443d49f8161a3702054ac40
6
+ metadata.gz: b9a70c52bcf05c8c56a11f7822e8b297feafcccd4cf67e80f21f3a5ea64116aab9db8a57e942c5eaea92825476fa7f1f9b7ad4b4133b1f8632e1a78f59f71f38
7
+ data.tar.gz: bced2fb275258c226af75d670c6fac2eb5a2d10422ae0c9d9026f19330cf635dda62449e055923669a2c7495827ecb8035cdbcf849068e4a11f2ed46c980aa8d
data/README.md CHANGED
@@ -104,8 +104,6 @@ guidelines in CONTRIBUTING.md.
104
104
 
105
105
  ### Links
106
106
 
107
- * rack-contrib on GitHub:: <http://github.com/rack/rack-contrib>
108
- * Rack:: <http://rack.rubyforge.org/>
109
- * Rack On GitHub:: <http://github.com/rack/rack>
110
- * rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
111
- * [![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)
107
+ * rack-contrib on GitHub:: <https://github.com/rack/rack-contrib>
108
+ * Rack:: <https://rack.github.io/>
109
+ * Rack On GitHub:: <https://github.com/rack/rack>
@@ -90,7 +90,7 @@ module Rack
90
90
  mail.delivery_method :test
91
91
  elsif config[:smtp]
92
92
  smtp = config[:smtp]
93
- # for backward compability, replace the :server key with :address
93
+ # for backward compatibility, replace the :server key with :address
94
94
  address = smtp.delete :server
95
95
  smtp[:address] = address if address
96
96
  mail.delivery_method :smtp, smtp
@@ -19,7 +19,7 @@ module Rack
19
19
  else
20
20
  @content = F.read(path)
21
21
  end
22
- @length = @content.size.to_s
22
+ @length = @content.bytesize.to_s
23
23
 
24
24
  @content_type = content_type
25
25
  end
@@ -23,7 +23,7 @@ class Rack::ResponseCache
23
23
  end
24
24
  end
25
25
 
26
- # Initialize a new ReponseCache object with the given arguments. Arguments:
26
+ # Initialize a new ResponseCache object with the given arguments. Arguments:
27
27
  # * app : The next middleware in the chain. This is always called.
28
28
  # * cache : The place to cache responses. If a string is provided, a disk
29
29
  # cache is used, and all cached files will use this directory as the root directory.
@@ -42,7 +42,7 @@ class Rack::ResponseCache
42
42
  # Call the next middleware with the environment. If the request was successful (response status 200),
43
43
  # was a GET request, and had an empty query string, call the block set up in initialize to get the path.
44
44
  # If the cache is a string, create any necessary middle directories, and cache the file in the appropriate
45
- # subdirectory of cache. Otherwise, cache the body of the reponse as the value with the path as the key.
45
+ # subdirectory of cache. Otherwise, cache the body of the response as the value with the path as the key.
46
46
  def call(env)
47
47
  res = @app.call(env)
48
48
  if env['REQUEST_METHOD'] == 'GET' and env['QUERY_STRING'] == '' and res[0] == 200 and path = @path_proc.call(env, res)
@@ -16,7 +16,7 @@ module Rack
16
16
  #
17
17
  # Another way to bypass the cache is adding the version number in a field-value pair in the
18
18
  # URL query string. As an example, http://yoursite.com/images/test.png?v=1.0.0
19
- # In that case, set the option :versioning to false to avoid unneccessary regexp calculations.
19
+ # In that case, set the option :versioning to false to avoid unnecessary regexp calculations.
20
20
  #
21
21
  # It's better to keep the current version number in some config file and use it in every static
22
22
  # content's URL. So each time we modify our static contents, we just have to change the version
@@ -40,7 +40,7 @@ module Rack
40
40
  # default headers.
41
41
  #
42
42
  # use Rack::StaticCache, :urls => ["/images"], :duration => 2, :versioning => false
43
- # will serve all requests begining with /images under the current directory (default for the option :root
43
+ # will serve all requests beginning with /images under the current directory (default for the option :root
44
44
  # is current directory). All the contents served will have cache expiration duration set to 2 years in headers
45
45
  # (default for :duration is 1 year), and StaticCache will not compute any versioning logics (default for
46
46
  # :versioning is true)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rack-devel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-30 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack