sinatra-contrib 2.0.0.rc2 → 2.0.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/sinatra/config_file.rb +3 -4
- data/lib/sinatra/contrib/version.rb +1 -1
- data/lib/sinatra/namespace.rb +1 -1
- data/sinatra-contrib.gemspec +5 -6
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3113e75c9840776c917bb1fdc1d22ebcf89017e
|
4
|
+
data.tar.gz: 11d60f002820bd757d704f1cbd8ca05e03f2cd6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec1cc4f6dff963d41307afa1c4be976e76f940a651a25e7056190d4aad39650d13423bc151fa278af30fd47a70edf9ff6a1347423a4d7a6eb76830f1cca4788d
|
7
|
+
data.tar.gz: 92a56af9e32b074e1fc63252231f24ea821de066a8d583d8c98bb5429c2c2c3d49979d9119d535ab4ddd7e462ca7af0a640c58e023ff4262fbba949d09a2c71d
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ task(:default => :spec)
|
|
11
11
|
namespace :doc do
|
12
12
|
task :readmes do
|
13
13
|
Dir.glob 'lib/sinatra/*.rb' do |file|
|
14
|
-
excluded_files = %w[lib/sinatra/contrib.rb lib/sinatra/capture.rb lib/sinatra/engine_tracking.rb]
|
14
|
+
excluded_files = %w[lib/sinatra/contrib.rb lib/sinatra/capture.rb lib/sinatra/decompile.rb lib/sinatra/engine_tracking.rb]
|
15
15
|
next if excluded_files.include?(file)
|
16
16
|
doc = File.read(file)[/^module Sinatra(\n)+( #[^\n]*\n)*/m].scan(/^ *#(?!#) ?(.*)\n/).join("\n")
|
17
17
|
file = "doc/#{file[4..-4].tr("/_", "-")}.rdoc"
|
data/lib/sinatra/config_file.rb
CHANGED
@@ -156,13 +156,12 @@ module Sinatra
|
|
156
156
|
# returned config is a indifferently accessible Hash, which means that you
|
157
157
|
# can get its values using Strings or Symbols as keys.
|
158
158
|
def config_for_env(hash)
|
159
|
-
if hash.respond_to?
|
159
|
+
if hash.respond_to?(:keys) && hash.keys.all? { |k| environments.include?(k.to_s) }
|
160
160
|
hash = hash[environment.to_s] || hash[environment.to_sym]
|
161
161
|
end
|
162
162
|
|
163
|
-
if hash.respond_to?
|
164
|
-
|
165
|
-
indifferent_hash.merge hash.to_hash
|
163
|
+
if hash.respond_to?(:to_hash)
|
164
|
+
IndifferentHash[hash.to_hash]
|
166
165
|
else
|
167
166
|
hash
|
168
167
|
end
|
data/lib/sinatra/namespace.rb
CHANGED
@@ -333,7 +333,7 @@ module Sinatra
|
|
333
333
|
end
|
334
334
|
|
335
335
|
def prefixed(method, pattern = nil, conditions = {}, &block)
|
336
|
-
default =
|
336
|
+
default = %r{(?:/.*)?} if method == :before or method == :after
|
337
337
|
pattern, conditions = compile pattern, conditions, default
|
338
338
|
result = base.send(method, pattern, conditions, &block)
|
339
339
|
invoke_hook :route_added, method.to_s.upcase, pattern, block
|
data/sinatra-contrib.gemspec
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
|
4
|
-
require "sinatra/version"
|
3
|
+
version = File.read(File.expand_path("../../VERSION", __FILE__)).strip
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.name = "sinatra-contrib"
|
8
|
-
s.version =
|
7
|
+
s.version = version
|
9
8
|
s.description = "Collection of useful Sinatra extensions"
|
10
9
|
s.homepage = "http://github.com/sinatra/sinatra/tree/master/sinatra-contrib"
|
11
10
|
s.license = "MIT"
|
@@ -22,11 +21,11 @@ Gem::Specification.new do |s|
|
|
22
21
|
|
23
22
|
s.required_ruby_version = '>= 2.2.0'
|
24
23
|
|
25
|
-
s.add_dependency "sinatra",
|
26
|
-
s.add_dependency "mustermann",
|
24
|
+
s.add_dependency "sinatra", version
|
25
|
+
s.add_dependency "mustermann", "~> 1.0"
|
27
26
|
s.add_dependency "backports", ">= 2.0"
|
28
27
|
s.add_dependency "tilt", ">= 1.3", "< 3"
|
29
|
-
s.add_dependency "rack-protection",
|
28
|
+
s.add_dependency "rack-protection", version
|
30
29
|
s.add_dependency "multi_json"
|
31
30
|
|
32
31
|
s.add_development_dependency "rspec", "~> 3.4"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-contrib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/sinatra/sinatra/graphs/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0.0.
|
19
|
+
version: 2.0.0.rc5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.0.0.
|
26
|
+
version: 2.0.0.rc5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mustermann
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: backports
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - '='
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.0.0.
|
81
|
+
version: 2.0.0.rc5
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.0.0.
|
88
|
+
version: 2.0.0.rc5
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: multi_json
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -420,7 +420,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
420
420
|
version: 1.3.1
|
421
421
|
requirements: []
|
422
422
|
rubyforge_project:
|
423
|
-
rubygems_version: 2.6.
|
423
|
+
rubygems_version: 2.6.11
|
424
424
|
signing_key:
|
425
425
|
specification_version: 4
|
426
426
|
summary: Collection of useful Sinatra extensions
|