sinatra-params 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sinatra/params/bool.rb +21 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 537d119f0645bf221bd76424c3aa55fdde255fbc9ab6c8f27debae99fcddea06
4
- data.tar.gz: b9b89435db7a3a5974a2fc64183fa7d9c4cd549e3363950cf295ce7b4e76770b
3
+ metadata.gz: da828ae7b845b5a7221f2be7504470fe92e750fcb8a77744551e5c6ff51a5e1a
4
+ data.tar.gz: b30bf3a033682de65e2d8965e2cf7705e30e051112ae488d981ff5ad35d65583
5
5
  SHA512:
6
- metadata.gz: f7ee084130265762cdf84b2512f0874434e65c9a5a23c6a7b225a045c3db87cdcaddfd39c610b0ffd910d0e598cdb0dc5ae6db1a0f40dde9cb37c05881e688af
7
- data.tar.gz: 61f1040afc9c64a4773a3df22dfd1a495f5c236d6e9cb5a372136ad3c32bd36e605a2fc7a2e4dcb0db956fc5ab6403da82a0581118252d6855ce29bb8014ccd5
6
+ metadata.gz: 8b69d7a230560a5adbc906b7e12e12aa657b374a6592cbffd6106c4c13585cc399bcf550e7b5c97eeef829040a0bbe5f38754fdbd6237ee065ecfb6224f69457
7
+ data.tar.gz: d6e6cfc90edda73e721750800977b18171fffe259566e03e6f1d2cc6c8c06f1f9f506dad1850b8b28cacd9911ee1344a8d556b7d04b497b03f7284f375732c64
@@ -0,0 +1,21 @@
1
+ class TrueClass
2
+ def self.convert_to(type)
3
+ table = {
4
+ TrueClass => :itself,
5
+ String => :to_s
6
+ }
7
+
8
+ table[type]
9
+ end
10
+ end
11
+
12
+ class FalseClass
13
+ def self.convert_to(type)
14
+ table = {
15
+ FalseClass => :itself,
16
+ String => :to_s
17
+ }
18
+
19
+ table[type]
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Cabrera
@@ -60,6 +60,7 @@ extra_rdoc_files: []
60
60
  files:
61
61
  - lib/sinatra/params.rb
62
62
  - lib/sinatra/params/array.rb
63
+ - lib/sinatra/params/bool.rb
63
64
  - lib/sinatra/params/date.rb
64
65
  - lib/sinatra/params/datetime.rb
65
66
  - lib/sinatra/params/errors.rb