typero 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/lib/typero.rb +4 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eaa8278b3b0dde68e1c8f2ff0ebed2715cc21caee65e4eace4d2dafd69b96bbc
4
- data.tar.gz: fddf1feee206bb971713ed9df6819cfef93abb457b1ed141ecf1d43bde74d462
3
+ metadata.gz: f1c86d82e552055ef4caf2fcd72dcbfb040431d44f37dba36016ff93e4785ccf
4
+ data.tar.gz: d9e2dda55e722b7c7b2e6d54b87e363e7b1491c903007be100512cf22e0798f9
5
5
  SHA512:
6
- metadata.gz: 0ad494feec708f0886a9396b8311433ea0eb2310ace9ba761c9e1ae8d7c19995bac61dd938beb6a201666f16c3a09b5788e1b0ba499fc9c742ebed878aa919ab
7
- data.tar.gz: 6db00aae4495818d03f5dabb09eb1f19d43bfcecbd05c0528b8dc136f818643731f0e4f7635aa4ffecbb8b7a59d90af30da94ca2a9114ed7f10369192ab149af
6
+ metadata.gz: ff912277d4fe41e6d18637ee208f2f91d066be02e4ef2b3fba26ce69684b13dcd5a9a8a1078d09b7e241b8c6196dccacdda6d06f1a2e08bc310c2f52d5ce9e6d
7
+ data.tar.gz: 5aa99ee889b1524727f43a76bf5c2cfd8b8d8f85a634081607248680f81dc0b004781bc1dff936b0a17d2a17e31bbe46536e52a569a7fc3f4cd2ea2c55d80cc4
data/.version CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.3.6
@@ -91,11 +91,12 @@ class Typero
91
91
 
92
92
  # used in dsl to define value
93
93
  def set field, type=String, opts={}
94
- klass = '::Typero::%sType' % type.to_s.gsub(/[^\w]/,'').classify
95
- klass.constantize
96
-
97
94
  opts = type.is_a?(Hash) ? type : opts.merge(type: type)
98
95
 
96
+ opts[:type] ||= :string
97
+ klass = 'Typero::%sType' % opts[:type].to_s.gsub(/[^\w]/,'').classify
98
+ klass.constantize
99
+
99
100
  @rules[field] = parse_option opts
100
101
  end
101
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Reic