marmot 0.0.2 → 0.0.3

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: e696ab3975eb1b1de9c87e93b6f4b8d540c4db24
4
- data.tar.gz: 916e93b1787efecf75144de17258d362b718a43a
3
+ metadata.gz: 228f38b8858271aa4a229d71b3fbacc753419c5d
4
+ data.tar.gz: 1872cd0700969adbbf3a8300d67faba615a59dd3
5
5
  SHA512:
6
- metadata.gz: 7b3a76aad08d973de5d582808c7aadb90de5df6cc874b211cfaec1ae5dd1c34ca584a80c75adc9e7690db865ca56b74fc54e05a65e38d9853b727bcf7ef1abae
7
- data.tar.gz: 4b2152cab10e08d17cf17a9900bf4f067360f6ce460cc31a48e7d5adfec5efaa5f5b13693154a152f694a882c95f8052eb86d9598aef42ad0178bc5919ca387b
6
+ metadata.gz: 0ea52f31499bed84da982e75457719e4054e82576fbf2586eddaefb65921e0a115c01e854a3c5b12b49601187157c6cd6931cf70eeebc25eb0a98a17d45c340c
7
+ data.tar.gz: b4cdf3fd93d01dac5c6f88a0e1714302ed1162b3df7023d4e5ae863a069cbdb7bd6dda9657475e81df252a93dd03c71fbf40792d749f2a412cca80cb9438f8bb
@@ -77,7 +77,7 @@ module Marmot
77
77
  when :checkbox
78
78
  if user_value == true
79
79
  result[key] = allowed_values.last
80
- elsif user_value == "false"
80
+ elsif user_value == false
81
81
  #nil
82
82
  else
83
83
  result[key] = allowed_values.include?(user_value) ? (user_value) : (allowed_values[0])
@@ -1,3 +1,3 @@
1
1
  module Marmot
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.0.3".freeze
3
3
  end
@@ -46,6 +46,21 @@ describe Marmot::OptionsSanitizer do
46
46
  })
47
47
  end
48
48
 
49
+
50
+ it "returns options 2" do
51
+ opts = Marmot::OptionsSanitizer.sanitize({
52
+ :formats => ["woff","ttf"],
53
+ :add_hyphens => false,
54
+ :webonly => true,
55
+ :mode => "basic"
56
+ })
57
+ opts.should include({
58
+ :formats => ["woff","ttf"],
59
+ :webonly => "Y",
60
+ :mode => "basic"
61
+ })
62
+ end
63
+
49
64
  it "doesn't accept incorrect options" do
50
65
  opts = Marmot::OptionsSanitizer.sanitize(params = {
51
66
  :agreement => "N",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marmot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Filimonov