adomain 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ff6ad12bb0daeb96fbb1ce22ee09f4cf09c5f6a0ac3ef21336792c977e4dce1
4
- data.tar.gz: be1e2cfa7e6a72b6595dc2d79e70f636cce95fc3fa9d4215a366b45e458a6baf
3
+ metadata.gz: 56b3fbe678e72450decc15bfc4d04a35b92765c5f89047d6c409a90df290ba07
4
+ data.tar.gz: d9ee244d9c2741445492ce2a1abbbb8fdf9e09182850ea0788c167a14f3b843a
5
5
  SHA512:
6
- metadata.gz: 50d9e06e046e86d8f5e4f5fd9c58af82f101c62ddfff23a263571f2afc7315d5ea555da4ed52a4df33399c629baecbf0e98da6137b17b5487470a8cb991b4c62
7
- data.tar.gz: b75ef3af5862e458d9389ce3bba1ba385d1bf528f30ae842c5c7121a9e818871203e728855aef1a4440f0f8060e6ed276ab42cee352e60dd0d93de93f3283ca1
6
+ metadata.gz: dd61d9cf052e21c113d337f4baa192d6397fb27ea1db83edd353166dd0bcc277acde381a31e177f1f2de732d2a1f1eea646d3ddd562d1aa6300c453c7a06ac26
7
+ data.tar.gz: 41517c82d6996b6f68bcb1491d4232aa24d95c2fd6f405996e4e75270e927fd14399a51e81cad6d679afd808124f07be9114c6b6a986c269405d0d64e14d7d11
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adomain (0.2.0)
4
+ adomain (0.2.1)
5
5
  addressable (~> 2.5)
6
6
  logger
7
7
 
data/README.md CHANGED
@@ -88,6 +88,8 @@ Adomain.path "http://www.xyz.com/pages/123" # => "/pages/123"
88
88
  Adomain.path "{{{{{" # => "{{{{{"
89
89
  Adomain.scheme "http://www.xyz.com/pages/123" # => "http"
90
90
  Adomain.scheme "harrison:ford" # => "harrison"
91
+ Adomain.query_values "https://maximumfun.org/donate?amt=20USD" # => {"amt"=>"20USD"}
92
+ Adomain.query_values "google.com?q=gagh.biz" # => {"q"=>"gagh.biz"}
91
93
  ```
92
94
 
93
95
  However, they are rescued from InvalidURIError,
@@ -96,6 +98,7 @@ like in other parts of the gem.
96
98
  ```ruby
97
99
  Adomain.path "::::::::::::" #=> nil
98
100
  Adomain.scheme "::::::::::::" #=> nil
101
+ Adomain.query_values "::::::::::::" #=> nil
99
102
  ```
100
103
 
101
104
  ## Installation
@@ -57,6 +57,14 @@ class Adomain
57
57
  nil
58
58
  end
59
59
 
60
+ # query_values is a wrapper around Addressable::URI's query_values
61
+ # it is only included for convenience
62
+ def query_values(string)
63
+ Addressable::URI.parse(string).query_values
64
+ rescue Addressable::URI::InvalidURIError => e
65
+ nil
66
+ end
67
+
60
68
  private
61
69
  # parse_for_domain accepts one hash of arguments that allow
62
70
  # changes to the parsing behavior of domains
@@ -1,3 +1,3 @@
1
1
  class Adomain
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adomain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Nissen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler