sinatra-wanted 0.8.1 → 0.8.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: 36dd224a2e9a878f60e34b32192e512a5359fe0e8dce37654b43fc8693932004
4
- data.tar.gz: '08e02cfe3f691cf1bac73947c6cc007c18b604ea0658595320d783b86021b805'
3
+ metadata.gz: 7cebe8a6afda6c950d71167b5656d2456c22c8894d06a224a969f49c8f01e6f4
4
+ data.tar.gz: 32ef7d621342e14718c5d4a4f18ae769d3141fa6bfea17b098e257f61b02aa94
5
5
  SHA512:
6
- metadata.gz: 419d1b4c42c2c7c3ac3f4e35a797c25eee14c2c67a7488f8c5e9f80891e5ab425a2e106a893a84368cbe15358d98a5b7a7d09d998008ea1e509f597003577596
7
- data.tar.gz: c4678ed4ada73ee0fbd4735db716e879f69be8a44f6009925bff132bb0d66d7af91a002c42a31db152097a93cedcbf04b13ea324ea4f83bbcbfbeae0214e31bf
6
+ metadata.gz: 0aa57b280ce6d9dc9f56def9bb3dd8a09f1e99269bcd968ad298c63f130b5390b269f94e4dc6e04fba3752727945e94c0f502897694ad4a28ca96478e006309b
7
+ data.tar.gz: f8688d782efd075a6748485d12740c58b0369c1e6f1702db6006f4ec9dc2ab29020f78e37258047309a33a2e6451bb18494297dac7eafc91b45c261470f45ab7
@@ -5,8 +5,8 @@ require_relative 'wanted/version'
5
5
  module Sinatra::Helpers::Wanted
6
6
  # Define a "No Value" object.
7
7
  # It is used to signal that a parameter exists but as no associated value.
8
- NO_VALUE = Object.new.then {|o|
9
- def o.insect
8
+ NO_VALUE = Object.new.tap {|o|
9
+ def o.inspect
10
10
  "No_Value"
11
11
  end
12
12
  }.freeze
@@ -110,8 +110,8 @@ module Sinatra::Helpers::Wanted
110
110
  end
111
111
  value, id = if param.kind_of?(Symbol)
112
112
  if params.include?(param)
113
- then [ params[param] || NO_VALUE, param ]
114
- else [ nil, param ]
113
+ then [ params.fetch(param) { NO_VALUE }, param ]
114
+ else [ nil, param ]
115
115
  end
116
116
  else
117
117
  [ param, nil ]
@@ -2,7 +2,7 @@ module Sinatra
2
2
  module Helpers
3
3
  module Wanted
4
4
  # Version
5
- VERSION = "0.8.1"
5
+ VERSION = "0.8.2"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-wanted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stéphane D'Alu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-26 00:00:00.000000000 Z
11
+ date: 2021-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra