wgit 0.0.11 → 0.0.12

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: '0929be93cf79c3ca942c78607c9bfae6ef53d3d2b033964ac7348e1d03b8f113'
4
- data.tar.gz: e9a24df51634b84bc2c17790ccff5c04ded32852f538bdc81bbc90806c20008c
3
+ metadata.gz: 542c84509de63fe870f23c81da2c377a03638cee9fe1950beb7135698bd9175d
4
+ data.tar.gz: b2131ef8b7beb32ba8bbb9eb1605e700c34d98210a126c2e24b23adafe35171f
5
5
  SHA512:
6
- metadata.gz: 95ffe388b6d4ddc7771be4db2ea1ed7579c2e82d7a76b7b2950658c7114d1d14af0ff80817fcc4a7ac6ba9c6094d764d24549e18d283293edb63ec1fb6f9837b
7
- data.tar.gz: 74d96db70834054c757c2429ee3bfce5b05f5d2a783f513b92dfc7ec185d69cf0c5f008e01227543f59acef70f87e1f0e81eadec2a607d2f3a3fc9d44d5c2641
6
+ metadata.gz: f3926c76974da55cf8bb179fead9b19805f6c15154925d72e76dc0b14cc3c17a14e64528c71bdcde33841ff56e2dd19d68b5d4a6b894991b08c142d1baac23fb
7
+ data.tar.gz: dcc9d04e67d7a2b93c8cb89be5610fa71f2c446e06bec99a099e0fe8a45a9e48db0aa2e2482f20a2ca00c8637cc6158e9be5720877190386249421e52dc02bc6
data/TODO.txt CHANGED
@@ -19,7 +19,7 @@ Refactoring
19
19
  - Replace method params with named parameters where applicable.
20
20
  - Think about reducing the amount of method aliases, pick the best for the method def and remove the aliases?
21
21
  - Mock (monkey patch) the 'mongo' gem's func. for speed in the tests.
22
- - Refactor the tests to include: Removal of instance_vars defined in setup & Expansion of test scenarios for each func (where possible).
22
+ - Refactor the 3 main classes and their tests (where needed): Url, Document & Crawler.
23
23
 
24
24
  Gem Publishing Checklist
25
25
  ------------------------
data/lib/wgit/crawler.rb CHANGED
@@ -17,6 +17,9 @@ module Wgit
17
17
  # The docs of the crawled @urls.
18
18
  attr_reader :docs
19
19
 
20
+ # The Net::HTTPResponse of the most recently crawled URL or nil.
21
+ attr_reader :last_response
22
+
20
23
  # Initializes the Crawler by setting the @urls and @docs.
21
24
  #
22
25
  # @param urls [*Wgit::Url] The URLs to crawl.
@@ -149,6 +152,7 @@ module Wgit
149
152
  # ignored and nil will be returned. Otherwise, the HTML is returned.
150
153
  def fetch(url)
151
154
  response = resolve(url)
155
+ @last_response = response
152
156
  response.body.empty? ? nil : response.body
153
157
  rescue Exception => ex
154
158
  Wgit.logger.debug(
data/lib/wgit/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # @author Michael Telford
4
4
  module Wgit
5
5
  # The current gem version of Wgit.
6
- VERSION = "0.0.11".freeze
6
+ VERSION = "0.0.12".freeze
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Telford