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 +4 -4
- data/lib/sinatra/helpers/wanted.rb +4 -4
- data/lib/sinatra/helpers/wanted/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cebe8a6afda6c950d71167b5656d2456c22c8894d06a224a969f49c8f01e6f4
|
4
|
+
data.tar.gz: 32ef7d621342e14718c5d4a4f18ae769d3141fa6bfea17b098e257f61b02aa94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
9
|
-
def o.
|
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
|
114
|
-
else [ nil,
|
113
|
+
then [ params.fetch(param) { NO_VALUE }, param ]
|
114
|
+
else [ nil, param ]
|
115
115
|
end
|
116
116
|
else
|
117
117
|
[ param, nil ]
|
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.
|
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-
|
11
|
+
date: 2021-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|