rippersnapper 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 35070dcfed092728cf3313d3200168cfb7e6fced
4
- data.tar.gz: 91ce08a9372b0a78f052813c96cbf93fec69d071
3
+ metadata.gz: e4f4a7e8091b50527bdafa4c87972ede333f694f
4
+ data.tar.gz: 91cdf3585d3d3801e247a1999109ff0a48f8e2b5
5
5
  SHA512:
6
- metadata.gz: b12e5e6449e4c16a791a8a0b0c5aa03008fce4eca507875fa224a515cc77dcabb04a11f5ac68aa791aab41a6b38ce9f422ad2a068de1f3036d255cbf8bb5fecb
7
- data.tar.gz: 22da6ce6af7f36f62bc790d6ffe14845d088abc7e1e7a5d316b6611aa30657490bfaedd850934f00e1a0432ff085571df507c10d61bf83eb7da98f923d4ee6e4
6
+ metadata.gz: b8cd9f500fef2b9aa50570f3a3e75933fc9995a5968f8a63c8b70fd7879c11ec39cd025f6e243e42e69d3dcfeb7a31b6201e99143d4b9fc1126337bec942c47c
7
+ data.tar.gz: c56fa40791c55fbd0544fb9a518b63316c2322585c0f7f5367de931f1678cec6d638e161641e0275304238e565914df576f90ab3b944b8c699fdae54da804963
data/README.md CHANGED
@@ -28,11 +28,29 @@ Or install it yourself as:
28
28
  url.domain # => "rippersnapper"
29
29
 
30
30
  url = Rippersnapper.parse("http://foo.bar.rippersnapper.co.uk/asdf.html?q=arg")
31
- url.public # => "co.uk"
31
+ url.suffix # => "co.uk"
32
32
  url.domain # => "rippersnapper"
33
33
  url.subdomain # => "foo.bar"
34
34
  url.path # => "/asdf.html?q=arg"
35
35
 
36
+ ## Notable differences between Rippersnapper and [Domainatrix](https://github.com/pauldix/domainatrix)
37
+
38
+ One of Rippersnappers goals is to be a compatable API with Domainatrix, but
39
+ there are some differences.
40
+
41
+ 1. Rippersnapper chose the method name `suffix` instead of `public_suffix`.
42
+ Domainatrix is misleading with this name, for instance it will return
43
+ `parliment.uk`, however this is not a public suffix, it is a private suffix
44
+ reserved for Parliment.
45
+
46
+ 2. Rippersnapper does not parse `http://localhost:3000` at the moment. I chose
47
+ not to do this b/c `http://localhost.com` is a valid domain, and will parse,
48
+ but `localhost:3000` is not a domain name, it's a hostname. If you need it
49
+ let me know and I will reconsider
50
+
51
+ 3. There is no `canonical`, I didn't understand the use case for it, nor why it
52
+ is reversed. Several google searches came up short on information.
53
+
36
54
  ## Contributing
37
55
 
38
56
  1. Fork it
@@ -1,3 +1,5 @@
1
+ require 'URI'
2
+
1
3
  module Rippersnapper
2
4
  class Url
3
5
  attr_accessor :subdomain, :domain
@@ -1,3 +1,3 @@
1
1
  module Rippersnapper
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rippersnapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Woods