pageinfo 0.2.1 → 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: d8f3a65a699019ba4cc986e8633377259b7f0d7f
4
- data.tar.gz: 68172865635c27bb6404d4b2abbbc5bc187dfa96
3
+ metadata.gz: 2e56106d24a0e8bd5b4e1528a79bb194f6d4ccd1
4
+ data.tar.gz: 56f5811f7f928d79bc15a8414447d1a0fd81581b
5
5
  SHA512:
6
- metadata.gz: c5f4429146a3ede2411d871c1e97eba1181faba7f905d85aee990358d4d7461145e9f353c4f30c4e0632f9ff600b63f818ba698011126edfbbb53ef218fc71be
7
- data.tar.gz: c1f4b4bd24cd9450a345c10baeead99964e9ff4f7c3d148000125981d3f48bd261aaeab60bbdb406df89e29e6319beb778dfc79cc8e9481e23ff9cb2480d1be6
6
+ metadata.gz: bd43507764143701b101e236644800faa3113e5932f3a7beccaa443542a69bbaba96a9a346a62d6a65078db9d565f64c060fb27ff6cbc0c5c9c3918501cc3ab6
7
+ data.tar.gz: 77720c46e5746be7f9ebceb8b668315125fb8e1579faa415b8cc193c2b100538ffc9d6c05cacbb5b34e92978b20470f57c8e74965f2668ce37c695fd6c870bb7
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- pageinfo*.gem
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Pageinfo
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/meta-tags.svg)](http://badge.fury.io/rb/meta-tags)
4
+
3
5
  Pageinfo will browse through your site then list every page on your site and give detail meta info about the page.
4
6
 
5
7
  ## Installation
@@ -26,10 +28,6 @@ Browse your site using:
26
28
 
27
29
  ## Development
28
30
 
29
- <!-- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). -->
32
-
33
31
  ## Contributing
34
32
 
35
33
  1. Fork it ( https://github.com/aditiamahdar/pageinfo/fork )
@@ -1,3 +1,3 @@
1
1
  module Pageinfo
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.3"
3
3
  end
data/lib/pageinfo.rb CHANGED
@@ -4,12 +4,6 @@ require "typhoeus"
4
4
  require "nokogiri"
5
5
 
6
6
  module Pageinfo
7
- def self.hi
8
- greeting = "Hello World!"
9
- puts greeting
10
- greeting
11
- end
12
-
13
7
  def self.detect(url)
14
8
  content = ["url", "status", "time", "title", "description", "keyword"].join(",")
15
9
  content << new_line
@@ -25,14 +19,11 @@ module Pageinfo
25
19
  content << new_line
26
20
 
27
21
  @links = get_page_links(page)
28
- # puts "Homepage links: #{@links.count}"
29
22
  while true do
30
- # puts "Links: #{@links.count} left"
31
23
  if link = @links.shift
32
24
  full_url = get_full_url(link)
33
25
  unless full_url.nil?
34
26
  if (scrapped_urls & [full_url, "#{full_url}/", "#{full_url}/#"]).empty?
35
- # No duplicate link
36
27
  conn = Typhoeus.get(full_url)
37
28
  page = Nokogiri::HTML(conn.body)
38
29
  content << get_info(conn, page)
@@ -45,7 +36,6 @@ module Pageinfo
45
36
  new_links = new_links - @links
46
37
  new_links = new_links - scrapped_links
47
38
  @links = @links + new_links unless new_links.empty?
48
- # puts "Links: #{@links.count} left, #{new_links.count} new links"
49
39
  end
50
40
  end
51
41
  else
data/pageinfo.gemspec CHANGED
@@ -19,10 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- # if spec.respond_to?(:metadata)
23
- # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
24
- # end
25
-
26
22
  spec.add_dependency "typhoeus", "~> 0.7"
27
23
  spec.add_dependency "nokogiri", "~> 1.6"
28
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - aditiamahdar