http_url_validation_improved 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/http_url_validation_improved.rb +4 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
@@ -78,7 +78,8 @@ module ActiveRecord
|
|
78
78
|
Net::HTTPPartialContent,
|
79
79
|
Net::HTTPFound,
|
80
80
|
Net::HTTPTemporaryRedirect,
|
81
|
-
Net::HTTPSeeOther
|
81
|
+
Net::HTTPSeeOther,
|
82
|
+
Timeout::Error
|
82
83
|
]
|
83
84
|
# If response is not allowed, raise an error
|
84
85
|
raise unless allowed_codes.include?(response.class)
|
@@ -86,6 +87,8 @@ module ActiveRecord
|
|
86
87
|
unless configuration[:content_type].nil?
|
87
88
|
record.errors.add(attr_name, configuration[:message_wrong_content]) if response['content-type'].index(configuration[:content_type]).nil?
|
88
89
|
end
|
90
|
+
rescue Timeout::Error
|
91
|
+
record.errors.add(attr_name, configuration[:message_not_accessible] + ". The website took too long to respond." )
|
89
92
|
rescue
|
90
93
|
# Has the page moved?
|
91
94
|
if response.is_a?(Net::HTTPMovedPermanently)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_url_validation_improved
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 1
|
10
|
+
version: 1.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Erik Gregg
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date:
|
20
|
+
date: 2012-06-15 00:00:00 +12:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|