domain_extractor 0.1.9 → 0.2.0

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: 2b919b52fe3fda7edf9738141e66e2acbcb2458d276800cb62b48c4c34d3b914
4
- data.tar.gz: be02cf195da3a6a9da51136140f1487e96c026b22f1a300825d15733eb493acf
3
+ metadata.gz: 9be08df3b44102d414007ad7fc6865166cb89061a09340d5e49de211165c963f
4
+ data.tar.gz: a334da0e7a8dc42335b9710aaf9d601d9fc85323ca2e328359de9593a340abc3
5
5
  SHA512:
6
- metadata.gz: 981d228483ba55b85834c38df3146a47018be6b7456053add7356a74f15d33cd27038d50682e5488f14ff9dfd09ef463bee1bbd6f7c486d9e9698dd305543738
7
- data.tar.gz: e320e6d216196664de8f73b18be95746863b60fba99e496dc166ebd2f051afdf475d56f7d7a30dc6910e66d380e5b03b7d472730698905ed5b83e87aba3eb4e5
6
+ metadata.gz: 297852adc140faba6fc64b7589402c1f3b032be344d13ad781ede5ff2a1c1ba867480edbebaca488708da46d68152bf3ee80c02da36d6f8afbf97a74361960ae
7
+ data.tar.gz: 6b0191d8bfb2458a23e3c56c382f495c9eebf86715a16c8f2936e6804d4adc0643835485e100e42f3bcd3f4d83344d7d60aac47dee60f72214fd95297f714334
data/README.md CHANGED
@@ -78,6 +78,7 @@ DomainExtractor now returns a `ParsedURL` object that supports three accessor st
78
78
  ### Method Accessor Styles
79
79
 
80
80
  #### 1. Default Methods (Silent Nil)
81
+
81
82
  Returns the value or `nil` - perfect for exploratory code or when handling invalid data gracefully.
82
83
 
83
84
  ```ruby
@@ -93,6 +94,7 @@ result.domain # => 'example'
93
94
  ```
94
95
 
95
96
  #### 2. Bang Methods (!) - Explicit Errors
97
+
96
98
  Returns the value or raises `InvalidURLError` - ideal for production code where missing data should fail fast.
97
99
 
98
100
  ```ruby
@@ -102,6 +104,7 @@ result.subdomain! # raises InvalidURLError: "subdomain not found or invalid"
102
104
  ```
103
105
 
104
106
  #### 3. Question Methods (?) - Boolean Checks
107
+
105
108
  Always returns `true` or `false` - perfect for conditional logic without exceptions.
106
109
 
107
110
  ```ruby
@@ -261,7 +264,7 @@ hash = result.to_h
261
264
  # }
262
265
  ```
263
266
 
264
- **See [docs/PARSED_URL_API.md](docs/PARSED_URL_API.md) for comprehensive documentation and real-world examples.**
267
+ **[Comprehensive documentation and real-world examples of parsed URL quick start guide](https://github.com/opensite-ai/domain_extractor/blob/master/docs/PARSED_URL_QUICK_START.md)**
265
268
 
266
269
  ## Usage Examples
267
270
 
@@ -326,31 +329,38 @@ DomainExtractor.parse('not-a-url')
326
329
 
327
330
  ## API Reference
328
331
 
329
- ### `DomainExtractor.parse(url_string)`
330
-
331
- Parses a URL string and extracts domain components.
332
+ ```ruby
333
+ DomainExtractor.parse(url_string)
332
334
 
333
- **Returns:** Hash with keys `:subdomain`, `:domain`, `:tld`, `:root_domain`, `:host`, `:path`
335
+ # => Parses a URL string and extracts domain components.
334
336
 
335
- **Raises:** `DomainExtractor::InvalidURLError` when the URL fails validation
337
+ # Returns: Hash with keys :subdomain, :domain, :tld, :root_domain, :host, :path
338
+ # Raises: DomainExtractor::InvalidURLError when the URL fails validation
339
+ ```
336
340
 
337
- ### `DomainExtractor.parse_batch(urls)`
341
+ ```ruby
342
+ DomainExtractor.parse_batch(urls)
338
343
 
339
- Parses multiple URLs efficiently.
344
+ # => Parses multiple URLs efficiently.
340
345
 
341
- **Returns:** Array of parsed results
346
+ # Returns: Array of parsed results
347
+ ```
342
348
 
343
- ### `DomainExtractor.valid?(url_string)`
349
+ ```ruby
350
+ DomainExtractor.valid?(url_string)
344
351
 
345
- Checks if a URL can be parsed successfully without raising.
352
+ # => Checks if a URL can be parsed successfully without raising.
346
353
 
347
- **Returns:** `true` or `false`
354
+ # Returns: true or false
355
+ ```
348
356
 
349
- ### `DomainExtractor.parse_query_params(query_string)`
357
+ ```ruby
358
+ DomainExtractor.parse_query_params(query_string)
350
359
 
351
- Parses a query string into a hash of parameters.
360
+ # => Parses a query string into a hash of parameters.
352
361
 
353
- **Returns:** Hash of query parameters
362
+ # Returns: Hash of query parameters
363
+ ```
354
364
 
355
365
  ## Use Cases
356
366
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DomainExtractor
4
- VERSION = '0.1.9'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domain_extractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenSite AI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-31 00:00:00.000000000 Z
11
+ date: 2025-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: public_suffix