isomorfeus-react 16.12.18 → 16.12.19
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 132a99117abaac3fec23a796fc8ecfcbf5345e3958610a1f99e323121c585bd7
|
4
|
+
data.tar.gz: 819016d219fbb375aa3099fe42ab632b25482de9d4994c17cc566d86b9ecf2b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a15c75fcc3c20763f875572b36bd65eb98d756675f83beeab24272804911febf0e76e9cc975e8d8319478d0103f7c1cd2e49942131b3821b833d2dbfa2679412
|
7
|
+
data.tar.gz: 49436125dcab5c7fb04a4ad8201b20e6f242cfe83110d4319db06a2e347302188e6f46562c213789ee31954ea30b91a764334eddef9873186a5603a4593d0ed3
|
@@ -169,14 +169,12 @@ module Isomorfeus
|
|
169
169
|
# sub types
|
170
170
|
|
171
171
|
def Email
|
172
|
-
@validation_hash[:type] = :
|
173
|
-
@validation_hash[:validate][:sub_type] = :email
|
172
|
+
@validation_hash[:type] = :email
|
174
173
|
self
|
175
174
|
end
|
176
175
|
|
177
176
|
def Url
|
178
|
-
@validation_hash[:type] = :
|
179
|
-
@validation_hash[:validate][:sub_type] = :url
|
177
|
+
@validation_hash[:type] = :uri
|
180
178
|
self
|
181
179
|
end
|
182
180
|
|
@@ -72,6 +72,8 @@ module Isomorfeus
|
|
72
72
|
case @o[:type]
|
73
73
|
when :boolean
|
74
74
|
Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a boolean") unless @v.class == TrueClass || @v.class == FalseClass
|
75
|
+
else
|
76
|
+
c_string_sub_types
|
75
77
|
end
|
76
78
|
end
|
77
79
|
end
|
@@ -133,10 +135,34 @@ module Isomorfeus
|
|
133
135
|
Isomorfeus.raise_error(message: "#{@c}: #{@p} test condition check failed") unless @o[:test].call(@v)
|
134
136
|
end
|
135
137
|
|
136
|
-
def
|
137
|
-
|
138
|
+
def c_string_sub_types
|
139
|
+
Isomorfeus.raise_error(message: "#{@c}: #{@p} must be a String") unless @v.class == String
|
140
|
+
case @o[:type]
|
138
141
|
when :email
|
139
|
-
|
142
|
+
Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid email address") unless @v.match? /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/
|
143
|
+
when :uri
|
144
|
+
if RUBY_ENGINE == 'opal'
|
145
|
+
%x{
|
146
|
+
try {
|
147
|
+
new URL(#@v);
|
148
|
+
} catch {
|
149
|
+
#{Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid uri")}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
else
|
153
|
+
unless @v.match? /\A([a-zA-Z][\-+.a-zA-Z\d]*):(?:((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|
|
154
|
+
%[a-fA-F\d]{2})*)|(?:(?:\/\/(?:(?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)?(?:((?:(?:[a-zA-Z0-9\-.]|
|
155
|
+
%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|
|
156
|
+
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|
|
157
|
+
(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|
|
158
|
+
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))?|((?:[\-_.!~*'()a-zA-Z\d$,;:@&=+]|%[a-fA-F\d]{2})+))|
|
159
|
+
(?!\/\/))(\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|
|
160
|
+
%[a-fA-F\d]{2})*)*(?:\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|
|
161
|
+
%[a-fA-F\d]{2})*)*)*)?)(?:\?((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|
|
162
|
+
%[a-fA-F\d]{2})*))?)(?:\#((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?\z/x
|
163
|
+
Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid uri")
|
164
|
+
end
|
165
|
+
end
|
140
166
|
end
|
141
167
|
end
|
142
168
|
end
|
data/lib/react/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-react
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.12.
|
4
|
+
version: 16.12.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -277,7 +277,7 @@ metadata:
|
|
277
277
|
github_repo: ssh://github.com/isomorfeus/gems
|
278
278
|
post_install_message: |2+
|
279
279
|
|
280
|
-
isomorfeus-react 16.12.
|
280
|
+
isomorfeus-react 16.12.19:
|
281
281
|
Breaking change:
|
282
282
|
The event_handler DSL is gone. Instead use normal methods and method_ref, see:
|
283
283
|
https://github.com/isomorfeus/isomorfeus-react/blob/master/ruby/docs/events.md
|