url_common 0.1.6 → 0.1.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cc0c6794570b0acf1abb05d0650f7103669a3e07423344b98cf7d950368a638
4
- data.tar.gz: 6bde7b252e4e4f0dab5d224fc737f50dc147cf6471947721f98a0da1e868369e
3
+ metadata.gz: 44520f0e72a8b34a964de97eabcc77ac626ac87f63007bfaad080731a6386340
4
+ data.tar.gz: 94de6938e7bbe2c3fb26baca7e81ae6648a8c1262b343afa668e8e2254a0ecbd
5
5
  SHA512:
6
- metadata.gz: 8293201992fc1dc914343268ca104416d06115b16b67281a66fac8f7af00f365b7de4a94c9e0b3a22308d744b581fc1f83fe48b050565ab639146bf84cd9b145
7
- data.tar.gz: 63295ed84b0433a5bc22ca93b3b4701d6c77c7e9c5f0dba2a479072bc7b25fcac29b81a1f820605d7687da525735735b691eb00e11e05927e9ff0a21b2a77fb3
6
+ metadata.gz: c645869a19c945e76d0a5cf22178139f36931dacd603921d30a26396ed4fa2fb35b00dac1cd9d6fc01cf03b3dae3872c8f8a1e4f0efe67c27011cc015891790a
7
+ data.tar.gz: 3789757ff530f562f8e2f56d0501380bab8c043997c67e0579a65e3b1c42a9396571a2aa91f2168b810fb90d76fff227b1efdbbb624337d0247fc025fd0b8794
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- url_common (0.1.6)
11
+ url_common (0.1.6.1)
12
12
  fuzzyurl (~> 0.9.0)
13
13
  mechanize (~> 2.6)
14
14
 
@@ -1,3 +1,3 @@
1
1
  module UrlCommon
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.6.1"
3
3
  end
data/lib/url_common.rb CHANGED
@@ -81,6 +81,7 @@ module UrlCommon
81
81
  fu = Fuzzyurl.from_string(url)
82
82
  host_parts = fu.hostname.split('.')
83
83
  end
84
+ return host_parts[0] if host_parts.size == 1
84
85
  return "#{host_parts[host_parts.size - 2]}.#{host_parts.last}"
85
86
  end
86
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Johnson