webinspector 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/web_inspector/inspector.rb +3 -3
- data/lib/web_inspector/meta.rb +1 -1
- data/lib/web_inspector/page.rb +2 -2
- data/lib/web_inspector/request.rb +4 -4
- data/lib/web_inspector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0efe4a40a16bb9c97ff2445946ea2aeb0a41ba59
|
4
|
+
data.tar.gz: 384771649e09ab8ead6750975438f8dbd1b88a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94f0e0a0eb0577a4dc357a6648734b22f25518889d3e3678ef6d2e31e2bbfe6cd74b2a5e51f53f697e4eed9f9b957f2cab863820e27af585eb567a2134af3c4e
|
7
|
+
data.tar.gz: af8d8cfb20811990d79e05a4fd3201c1880affb213fbcea484779102fcd291d0be8ed04984d98b24e27cc642d4da837f0f241ac8081dbbb7a4839c04a633f8a3
|
@@ -8,9 +8,9 @@ module WebInspector
|
|
8
8
|
@meta = WebInspector::Meta.new(page).meta
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
def title
|
12
|
+
@page.css('title').inner_text.strip rescue nil
|
13
|
+
end
|
14
14
|
|
15
15
|
def description
|
16
16
|
@meta['description'] || snippet
|
data/lib/web_inspector/meta.rb
CHANGED
data/lib/web_inspector/page.rb
CHANGED
@@ -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
|
-
|
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
|
@@ -110,7 +110,7 @@ module WebInspector
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def page
|
113
|
-
Nokogiri::HTML(open(with_default_scheme(@request), :
|
113
|
+
Nokogiri::HTML(open(with_default_scheme(@request), allow_redirections: :safe))
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webinspector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide Santangelo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|