validates_hostname 1.0.7 → 1.0.8
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.
- checksums.yaml +4 -4
- data/lib/validates_hostname.rb +1 -1
- data/lib/validates_hostname/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ea611edf3668df86f660a91e505be9e1c6a8a72
|
4
|
+
data.tar.gz: 5a60461d6e32f7346aeb93e2087440510489c473
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3edd904aa236f30af9004249a9ee0a6f53c6b0880e9e6c34c27caf705adbf7fc01109e2c8ccd809e396d932adca971635e7df9d1ed554654a425ae7d5f58887e
|
7
|
+
data.tar.gz: 796c7bf514ee216049676f9ca830bb6a125c43e545cb91014bc88dda6573d5df90d790e177a26207b3c4bf96dda0486aa1282aabbe98e4f06ef0175558a0e291
|
data/lib/validates_hostname.rb
CHANGED
@@ -186,7 +186,7 @@ module PAK
|
|
186
186
|
labels = value.split '.'
|
187
187
|
labels.each_with_index do |label, index|
|
188
188
|
# CHECK 1: hostname label cannot be longer than 63 characters
|
189
|
-
add_error(record, attribute, :invalid_label_length) unless
|
189
|
+
add_error(record, attribute, :invalid_label_length) unless label.length.between?(1, 63)
|
190
190
|
|
191
191
|
# CHECK 2: hostname label cannot begin or end with hyphen
|
192
192
|
add_error(record, attribute, :label_begins_or_ends_with_hyphen) if label =~ /^[-]/i or label =~ /[-]$/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_hostname
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kim Nørgaard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.6.
|
161
|
+
rubygems_version: 2.6.13
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Checks for valid hostnames
|