sinatra-contrib 2.1.0 → 2.2.2

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
  SHA256:
3
- metadata.gz: b975fa7ce92c5cf316ecd5435760f80079cfe461ca28ff298b188eb08519dc52
4
- data.tar.gz: a7ec2909d72329c6d9089a00013c02aa11c308ce842f8ba3784dc76253eafa3c
3
+ metadata.gz: 3e8725df6a0ed1138cd098feabf1a7b5193dfc84c16aacdd414c7b7d38265504
4
+ data.tar.gz: 0b022fc28d2227211f73dddbec6b40ecf7cf8cce87cacec63b8a4f90c6d410c6
5
5
  SHA512:
6
- metadata.gz: 6eabdb605ec4c7b4dd0a7cbd7159ed048facdf215e35c6221de15dd0761466e58fc0276e9581f27dbfe78a7849dd481d072aaa5f4b1406899975187c84d89529
7
- data.tar.gz: 7bc7a597c8b679045302d66e4e12bfb4e6ce7e5ed1b064b28b8d0c6ae98986e8868a78a63bd9be7a7c2f689d30f514693c25daa2856c22f4ecfe9ac50f2e8f36
6
+ metadata.gz: 7e2ca0ad2780faa57f0825277098ff95d49a319deb561bfa1460573c5085ce1c919f94de66285542ef09f9294a20067e320c59952146b8211f35e48d0449c79d
7
+ data.tar.gz: 45d99ddba98ebc07f74f2a2b301abd69c6b7fde827b7b92ac464b928d482ccf27ec8167a80450fa792aaf3aab54da1d671a761f55164adb6431ef1b6226996c9
@@ -124,7 +124,11 @@ module Sinatra
124
124
  raise UnsupportedConfigType unless ['.yml', '.yaml', '.erb'].include?(File.extname(file))
125
125
  logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger)
126
126
  document = ERB.new(IO.read(file)).result
127
- yaml = YAML.load(document)
127
+ yaml = begin
128
+ YAML.load(document, aliases: true)
129
+ rescue ArgumentError
130
+ YAML.load(document)
131
+ end
128
132
  config = config_for_env(yaml)
129
133
  config.each_pair { |key, value| set(key, value) }
130
134
  end
@@ -1,6 +1,6 @@
1
1
  module Sinatra
2
2
  module Contrib
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.1'
4
4
  end
5
5
  end
6
6
 
@@ -238,7 +238,7 @@ module Sinatra
238
238
 
239
239
  def helpers(*extensions, &block)
240
240
  class_eval(&block) if block_given?
241
- prepend(*extensions) if extensions.any?
241
+ include(*extensions) if extensions.any?
242
242
  end
243
243
 
244
244
  def register(*extensions, &block)
@@ -284,8 +284,8 @@ module Sinatra
284
284
  end
285
285
 
286
286
  def set(key, value = self, &block)
287
+ return key.each { |k,v| set(k, v) } if key.respond_to?(:each) and block.nil? and value == self
287
288
  raise ArgumentError, "may not set #{key}" unless ([:views] + ALLOWED_ENGINES).include?(key)
288
- return key.each { |k,v| set(k, v) } if block.nil? and value == self
289
289
  block ||= proc { value }
290
290
  singleton_class.send(:define_method, key, &block)
291
291
  end
@@ -37,7 +37,7 @@ EOF
37
37
  s.required_ruby_version = '>= 2.3.0'
38
38
 
39
39
  s.add_dependency "sinatra", version
40
- s.add_dependency "mustermann", "~> 1.0"
40
+ s.add_dependency "mustermann", "~> 2.0"
41
41
  s.add_dependency "tilt", "~> 2.0"
42
42
  s.add_dependency "rack-protection", version
43
43
  s.add_dependency "multi_json"
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.1.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/sinatra/sinatra/graphs/contributors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-04 00:00:00.000000000 Z
11
+ date: 2022-07-23 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.1.0
19
+ version: 2.2.2
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.1.0
26
+ version: 2.2.2
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: '2.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: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: tilt
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 2.1.0
61
+ version: 2.2.2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 2.1.0
68
+ version: 2.2.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: multi_json
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -402,7 +402,7 @@ metadata:
402
402
  source_code_uri: https://github.com/sinatra/sinatra/tree/master/sinatra-contrib
403
403
  homepage_uri: http://sinatrarb.com/contrib/
404
404
  documentation_uri: https://www.rubydoc.info/gems/sinatra-contrib
405
- post_install_message:
405
+ post_install_message:
406
406
  rdoc_options: []
407
407
  require_paths:
408
408
  - lib
@@ -417,8 +417,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
417
  - !ruby/object:Gem::Version
418
418
  version: '0'
419
419
  requirements: []
420
- rubygems_version: 3.1.2
421
- signing_key:
420
+ rubygems_version: 3.0.3.1
421
+ signing_key:
422
422
  specification_version: 4
423
423
  summary: Collection of useful Sinatra extensions
424
424
  test_files: []