webpage 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/lib/webpage.rb +4 -1
  3. data/webpage.gemspec +1 -1
  4. metadata +8 -12
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e6b36a431d2500ad66eec785d92564f82fd41414
4
+ data.tar.gz: 9443d1950c7680b28913df2f0ed348c27640082c
5
+ SHA512:
6
+ metadata.gz: 3377b8ce9f9e3074c1111ba11e20dcf85fd4730d61cdd5311e9b1dd74a199d9454f916e57418f924a2f73c8ceba2633a14023ab6790f098bbe94404029cb699b
7
+ data.tar.gz: e35fb1c6352f1bbe377a8e4b8567deb49a2889ea6d910f8b0f584f45f4eee643ca7aa5ffc4bcef7c57db26994ff0402d984b575aa80c31ca823354461cac906f
data/lib/webpage.rb CHANGED
@@ -84,6 +84,9 @@ class Webpage
84
84
  uri.host and uri.host.end_with?@domain
85
85
  end
86
86
  end
87
+ def comments
88
+ @nokogiri.xpath("//comment()").map{|comment|comment.to_s}.delete_if{|comment|comment.downcase.start_with?'[if ie' or comment.downcase.include?'google' or comment.downcase.include?'baidu'}
89
+ end
87
90
 
88
91
  private
89
92
  def make_href_absolute(href)
@@ -92,4 +95,4 @@ class Webpage
92
95
  raise 'need :uri in options when initialize' unless @uri
93
96
  URI.join(@uri,href)
94
97
  end
95
- end
98
+ end
data/webpage.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{webpage}
3
- s.version = '0.0.10'
3
+ s.version = '0.0.11'
4
4
  s.authors = ["seoaqua"]
5
5
  s.date = %q{2013-02-28}
6
6
  s.description = %q{a tool to extract some basic data from a webpage}
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
5
- prerelease:
4
+ version: 0.0.11
6
5
  platform: ruby
7
6
  authors:
8
7
  - seoaqua
@@ -14,17 +13,15 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: a tool to extract some basic data from a webpage
@@ -42,26 +39,25 @@ files:
42
39
  - webpage.gemspec
43
40
  homepage: https://github.com/seoaqua/webpage
44
41
  licenses: []
42
+ metadata: {}
45
43
  post_install_message:
46
44
  rdoc_options: []
47
45
  require_paths:
48
46
  - lib
49
47
  required_ruby_version: !ruby/object:Gem::Requirement
50
- none: false
51
48
  requirements:
52
- - - ! '>='
49
+ - - '>='
53
50
  - !ruby/object:Gem::Version
54
51
  version: '0'
55
52
  required_rubygems_version: !ruby/object:Gem::Requirement
56
- none: false
57
53
  requirements:
58
- - - ! '>='
54
+ - - '>='
59
55
  - !ruby/object:Gem::Version
60
56
  version: '0'
61
57
  requirements: []
62
58
  rubyforge_project:
63
- rubygems_version: 1.8.25
59
+ rubygems_version: 2.0.3
64
60
  signing_key:
65
- specification_version: 3
61
+ specification_version: 4
66
62
  summary: a tool to extract some basic data from a webpage
67
63
  test_files: []