url_format 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/url_format/url_format_validator.rb +1 -1
- data/lib/url_format/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f93de85b2acf9ac90257946858b149529856aca
|
4
|
+
data.tar.gz: b0b149a39a1085f7608e9e7a87966f9a81682f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbebaa9fafad59da23ad9f1ed19efc759bd91b45720f48a7c5e3f5bce38c8799dd923ad5bdca21675d4a2065c92af446af061bc737353d79b1c6cd5144601c30
|
7
|
+
data.tar.gz: fdf889314384b42e761c6f4e5607bdc6c152ba41b613bd5fa74deffd238499b8c81a7cb574fa57568f1c667f20441db7589430c50140b449a55346c351ca082e
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class UrlFormatValidator < ActiveModel::EachValidator
|
2
2
|
def validate_each(record, attribute, value)
|
3
|
-
unless URI.parse(
|
3
|
+
unless URI.parse(attribute).kind_of?(URI::HTTP)
|
4
4
|
url_format_invalid(record, attribute, value)
|
5
5
|
end
|
6
6
|
rescue URI::InvalidURIError
|
data/lib/url_format/version.rb
CHANGED