scrapers 0.2.1 → 0.3.0

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
  SHA1:
3
- metadata.gz: 9b43a082501b462b834904adece5c2024b9e1d50
4
- data.tar.gz: fbda2cfac531b98e3cf4e05273ddb99cd2dcfcd4
3
+ metadata.gz: 0ed963b518db6e326e8f86caf549821942e95248
4
+ data.tar.gz: fec6828d9b6b9923d0f595852accb4ba282454a0
5
5
  SHA512:
6
- metadata.gz: 154fb4afbcda5ae845bfeaa44431ab9d2725fb606cfb76154346b9eb2c163dbffc620a657f7e4b0ed0b50077f8c5d1b4487894c566e276eaffe010c60c79a554
7
- data.tar.gz: 2fba6befee1c8670c2978cf7943b67f467fa830bb1c1ac8d78a9ade0320590504603ed51900744ef5ca56832641dba40f1b53256586ea62be83ef155cd98a517
6
+ metadata.gz: 644b43272415ef5c765bd75d9e788564f861430b84914aa79e37f664f691eb1436f7b98934283521331d6411da51605af2c8937f9d4a1b856686badf454cf1e0
7
+ data.tar.gz: e47dc6eadcd7c7ca05197cdff5e19c60010e760380264c1bf515f832fa814bc7bde29d7c02df980b239dae75507198dc9b6b27a40840ada8398d7f09065a2f5d
@@ -12,15 +12,21 @@ module Scrapers
12
12
 
13
13
  results = Hash.new
14
14
 
15
+ results[:comic] = comic
16
+
15
17
  url = URI.parse GOCOMIC_URL
16
18
  url.path = "/#{comic}"
17
19
 
18
- page = Nokogiri::HTML(open(url.to_s))
19
20
  results[:url] = url.to_s
21
+
22
+ page = Nokogiri::HTML(open(url.to_s))
23
+
20
24
  results[:title] = scrape_title(page)
21
25
  results[:pubdate] = scrape_pubdate(page)
22
26
  results[:img_src] = scrape_image_source(page)
27
+
23
28
  results
29
+
24
30
  end
25
31
 
26
32
  def self.scrape_title(page)
@@ -1,5 +1,5 @@
1
1
  module Scrapers
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  DESCRIPTION = "A library of web site scrapers utilizing mechanize and other goodies. Helpful in gathering images, moving things, saving things, etc."
4
4
  SUMMARY = "Web site scrapers"
5
5
  LICENSE = "MIT"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrapers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tamara Temple
@@ -132,7 +132,6 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - .gitignore
134
134
  - .rspec-example
135
- - .watchr
136
135
  - Gemfile
137
136
  - Guardfile
138
137
  - LICENSE.txt
data/.watchr DELETED
@@ -1,27 +0,0 @@
1
- # -*- ruby -*-
2
- def run_spec(file)
3
- unless File.exist?(file)
4
- puts "#{file} does not exist"
5
- return
6
- end
7
-
8
- puts "Running #{file}"
9
- system "bundle exec rspec #{file}"
10
- puts
11
- end
12
-
13
- watch("^spec/*_spec.rb$") do |match|
14
- run_spec match[0]
15
- end
16
-
17
- watch("^spec/.*/*_spec.rb$") do |match|
18
- run_spec match[0]
19
- end
20
-
21
- watch("^lib/(.*).rb$") do |match|
22
- run_spec "spec/#{match[1]}_spec.rb"
23
- end
24
-
25
- watch("^lib/(.*/.*).rb$") do |match|
26
- run_spec "spec/#{match[1]}_spec.rb"
27
- end