webinspector 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 2b21d53503380346f5c1e75254fbf03fae74bc0f
4
- data.tar.gz: b6be9972b81d0e0ea6996f6442c992ee37105b5d
3
+ metadata.gz: 90677267a36bfa5bb128a1b1c6e173825353c1ea
4
+ data.tar.gz: 35030a7661c3973f450c18a41c994b116e9aaf52
5
5
  SHA512:
6
- metadata.gz: 5b62fdfcf13447eda7c89a461af271349194bc57ee3cb41edf7c6b371bbb29a575edc2367a11b4c8544131255e82a2efe2cc5fb38e00f339067a3898ad1c5f36
7
- data.tar.gz: 93f80d193cad478794c9fa840db21d14c345ee4540833b9e58b2f9c7a27b1de11927810d0bf2c310b71a8cbd7ea88fcde34cd08b332958bbbb2005b0d67a771c
6
+ metadata.gz: eb8ba8906c2883202b7885c4cdb78e8e0b56a284a8dbba6eb57cb9298b124cb7ef24d0b7adc93ffc9c565dde1a1c2e2cd582758560f5b98bee08527b75e367d7
7
+ data.tar.gz: 6bd92e33ea85d76570527f68cd878f33f6a3dd43aa907a7180f7d813e89f28f4cc875929837927dbe8fefdc9d1f92b6e8e25be469a096c2cccb3afe57caa6822
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Davide Santangelo
3
+ Copyright (c) 2015 Davide Santangelo <davide.santangelo@gmail.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,14 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -51,6 +51,15 @@ page.images # every image found
51
51
  page.meta # metatags of the page
52
52
  ```
53
53
 
54
+ ## Accessing meta tags
55
+
56
+ ```ruby
57
+ page.meta # metatags of the page
58
+ page.meta['description'] # meta description
59
+ page.meta['keywors'] # meta keywords
60
+ ```
61
+
62
+
54
63
  ## License
55
64
  The restcountry GEM is released under the MIT License.
56
65
 
@@ -9,7 +9,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'request'))
9
9
 
10
10
  module WebInspector
11
11
  class Page
12
- attr_reader :url, :scheme, :host, :port, :title, :description, :meta, :links, :images, :size, :response
12
+ attr_reader :url, :scheme, :host, :port, :title, :description, :meta, :links, :images, :response
13
13
 
14
14
  def initialize(url, options = {})
15
15
  @url = url
@@ -73,7 +73,6 @@ module WebInspector
73
73
  def response
74
74
  @response ||= fetch
75
75
  rescue Faraday::TimeoutError, Faraday::Error::ConnectionFailed, RuntimeError, URI::InvalidURIError => e
76
- @exception_log << e
77
76
  nil
78
77
  end
79
78
 
@@ -102,7 +101,6 @@ module WebInspector
102
101
  response
103
102
  end
104
103
 
105
-
106
104
  def with_default_scheme(request)
107
105
  request.url && request.scheme.nil? ? 'http://' + request.url : request.url
108
106
  end
@@ -1,3 +1,3 @@
1
1
  module WebInspector
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webinspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide Santangelo