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 +4 -4
- data/README.md +19 -1
- data/lib/rippersnapper/url.rb +2 -0
- data/lib/rippersnapper/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: e4f4a7e8091b50527bdafa4c87972ede333f694f
|
|
4
|
+
data.tar.gz: 91cdf3585d3d3801e247a1999109ff0a48f8e2b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
data/lib/rippersnapper/url.rb
CHANGED