roda-component 0.1.43 → 0.1.44

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: 92de764f146e178968f17bebd9476cc8f7268278
4
- data.tar.gz: 475b2bc9ef2c91d05393b79a9163e4a7ea4767eb
3
+ metadata.gz: e50f7bb6290f77be3eb924e2624c619eeb5fbc96
4
+ data.tar.gz: 2dfb6ca0a16f789ef3419a7ffb59cec7951c63df
5
5
  SHA512:
6
- metadata.gz: 719b51510a012f8849d60942062988c6939a925ca5b2e5a1a8a9f5a4338ae7ab5c5a06afab0531ae36bb59643b08bcc684d54e0aa41498aa2edfa498ba84b939
7
- data.tar.gz: 1848090168526fd3a4824297f07670ee97a5edd4a3381424111d721e93911025a1fb4a5a7f29968dee90c189319fe730c60564113ecbc1d29c69843f39c7b81a
6
+ metadata.gz: d6f866b81dd1c53b17d4bb6ad8a3b636bd53db7aab7aa68a5801cd1bd08e6f727efed6f89428ac968bf494dc8a5a8edede6abd2bebf50d67fb7694d404d082ad
7
+ data.tar.gz: 8524a48e32f6ea44c52d2841b281df3ec51268a6dd7d87f96cec6ba24f9e0e482c0e20e5691c9c27087ef9502fea5cf007afbf7fd08712870b28d4cd5ad947c0
@@ -166,9 +166,9 @@ class Roda
166
166
  end
167
167
 
168
168
  if client?
169
- EMAIL = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/i
169
+ EMAIL = /^[a-z0-9!\#$%&'*\/=\?^{|}+_-]+(?:\.[a-z0-9!\#$%&'*\/=\?^{|}+_-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i
170
170
  else
171
- EMAIL = /\A[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]\z/i
171
+ EMAIL = /\A[a-z0-9!\#$%&'*\/=\?^{|}+_-]+(?:\.[a-z0-9!\#$%&'*\/=\?^{|}+_-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\z/i
172
172
  end
173
173
 
174
174
  def assert_email(att, error = [att, :not_email])
@@ -203,9 +203,9 @@ class Roda
203
203
  # to make the case equality work, the check inverts the order of
204
204
  # the arguments: `assert_equal :foo, Bar` is translated to the
205
205
  # expression `Bar === send(:foo)`.
206
- #
206
+ #
207
207
  # @example
208
- #
208
+ #
209
209
  # def validate
210
210
  # assert_equal :status, "pending"
211
211
  # assert_equal :quantity, Fixnum
@@ -259,7 +259,15 @@ class Roda
259
259
  x['selected'] = true if x['value'] == value.to_s
260
260
  end
261
261
  when 'input'
262
- element['value'] = value.to_s
262
+ if element['type']=='radio'
263
+ if element['value'] == value.to_s
264
+ element['checked'] = true
265
+ else
266
+ element.delete 'checked'
267
+ end
268
+ else
269
+ element['value'] = value.to_s
270
+ end
263
271
  when 'textarea'
264
272
  element.val value.to_s
265
273
  end
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.43"
3
+ VERSION = "0.1.44"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.43
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-16 00:00:00.000000000 Z
11
+ date: 2015-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -1063,7 +1063,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1063
1063
  version: '0'
1064
1064
  requirements: []
1065
1065
  rubyforge_project:
1066
- rubygems_version: 2.4.5
1066
+ rubygems_version: 2.4.3
1067
1067
  signing_key:
1068
1068
  specification_version: 4
1069
1069
  summary: ''
@@ -1746,3 +1746,4 @@ test_files:
1746
1746
  - test/dummy/public/form/js/index.js
1747
1747
  - test/dummy/public/form/license.txt
1748
1748
  - test/helper.rb
1749
+ has_rdoc: