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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a3837b4e5796761383a09064e40f682862a48a9
4
- data.tar.gz: c0e347a6f786ca317d0c42d62d20e72dfffe46b6
3
+ metadata.gz: c3113e75c9840776c917bb1fdc1d22ebcf89017e
4
+ data.tar.gz: 11d60f002820bd757d704f1cbd8ca05e03f2cd6b
5
5
  SHA512:
6
- metadata.gz: 0eed9a63680ab183eb8b2ed3161eed6b38280c668196a9052225e86ebea07b2af4aaa3c9c6a5cb87ada74146b30f4efee7eca66815cd2f5f1c8ee63e611ec192
7
- data.tar.gz: e5a2555a09268cb5c1c96dd023ad764c1758da22e01751cdc40adc1c14ee42df05306375bec6606131d512ab795d1fc656d6e6e3c2b591b5999ae14397c5c3fb
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"
@@ -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? :keys and hash.keys.all? { |k| environments.include? k.to_s }
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? :to_hash
164
- indifferent_hash = Hash.new { |hash, key| hash[key.to_s] if Symbol === key }
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
@@ -1,6 +1,6 @@
1
1
  module Sinatra
2
2
  module Contrib
3
- VERSION = ::Sinatra::VERSION
3
+ VERSION = '2.0.0.rc5'
4
4
  end
5
5
  end
6
6
 
@@ -333,7 +333,7 @@ module Sinatra
333
333
  end
334
334
 
335
335
  def prefixed(method, pattern = nil, conditions = {}, &block)
336
- default = /.*/ if method == :before or method == :after
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
@@ -1,11 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
- $:.unshift File.expand_path("../../lib", __FILE__)
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 = Sinatra::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", Sinatra::VERSION
26
- s.add_dependency "mustermann", "1.0.0"
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", Sinatra::VERSION
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.rc2
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-03-19 00:00:00.000000000 Z
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.rc2
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.rc2
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.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.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.rc2
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.rc2
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.8
423
+ rubygems_version: 2.6.11
424
424
  signing_key:
425
425
  specification_version: 4
426
426
  summary: Collection of useful Sinatra extensions