typero 0.3.0 → 0.3.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
  SHA1:
3
- metadata.gz: '06869371b2f8a0fadb0c88f51a8a011aee2619a3'
4
- data.tar.gz: 3593d80591d5a061fa02be6ef16816b3ee05c71d
3
+ metadata.gz: cc36bd353b01f5a2cad71d752b207cc759ceea4a
4
+ data.tar.gz: 4c9dcc992d03bab7e67e8dc8d3d6fdada54bcf37
5
5
  SHA512:
6
- metadata.gz: 7e4720817d8fae4a96d5b65ac2d68d39aea79609a0e7be7f2828b137318ab0059a68661994d5551dbbc2fa9c5c21a8c33ec3902c8a99612007b15ceec8d7f662
7
- data.tar.gz: 3551cfde3e9da75ddf74cc5c6deaa98476a37dba821644c8613d35fd2ecaede68270ff00f265731b2725a10f55c289bff7a99334a810b1c67dcee06a0202aa87
6
+ metadata.gz: b2a7adff5d3dee36a5ccb29501f2aea3cfd3214b584eeec10bb1fc8b5f23599799afbef8804b5a91d804eee5e6652c462f1ca6fb7c0a5c5360f41f51e09661bb
7
+ data.tar.gz: e86ff3194f5603981270233747ea14f1801ebeddfc9a62fad26b4b7eba8f2955b4f8e77c858000af6e29fd4963d4653dee58f226c9e75e70df87c5d13e90db22
data/.version CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.2
@@ -113,7 +113,8 @@ class Typero
113
113
  end
114
114
  end
115
115
  elsif opts[:req]
116
- add_error field, 'is required' if opts[:req].class == TrueClass
116
+ msg = opts[:req].class == TrueClass ? 'is required' : opts[:req]
117
+ add_error field, msg
117
118
  end
118
119
  end
119
120
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Reic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-22 00:00:00.000000000 Z
11
+ date: 2017-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fast_blank
@@ -43,7 +43,6 @@ files:
43
43
  - "./lib/typero/type/label.rb"
44
44
  - "./lib/typero/type/string.rb"
45
45
  - "./lib/typero/type/url.rb"
46
- - "./lib/typero/type/utf_label.rb"
47
46
  homepage: https://github.com/dux/typero
48
47
  licenses:
49
48
  - MIT
@@ -1,11 +0,0 @@
1
- class Typero::UtfLabelType < Typero::Type
2
- MASK = /[\/\\\[\]'"]/
3
-
4
- def set
5
- @value = @value.to_s.gsub(/\s+/,'-').gsub(MASK,'')[0,50].downcase
6
- end
7
-
8
- def validate
9
- raise TypeError, "Label is having unallowed characters" if @value =~ MASK
10
- end
11
- end