wedding_registry_scraper 0.0.3 → 0.0.4

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: cdde10975ee6f2819318a2482570e57f7f506d5c
4
- data.tar.gz: f563bea9a46a59ce12f1716afcc63a69de34fb88
3
+ metadata.gz: 2d22e94eb87fb609ffe686dc63ce92cc37d6be4c
4
+ data.tar.gz: adbf5add3f714063c28b79316c6a2015c83cf2f9
5
5
  SHA512:
6
- metadata.gz: 4b4998f93832e42d6b6ab9b9fc3bf23fbb4a6c2db31160c922dec647e8fdcc9de6ffb7d3bd653cabf36f3559e8210a060fb45ac549629ce2e607a7b824c2b8c3
7
- data.tar.gz: b983f9fcd8277d212f6f56d57c444aed5c69502aa0eae6476c3acc92f5a1c66779d75a6815d01838e115adaa69373d9e67017dd89f0e4bbc5990e7c3d456889c
6
+ metadata.gz: 05c2880daa0a0ca54bd3aa7a495cba7f4303f350a0084eae42b40910adb9d80974a1cfe58cb6ee2edc83deb212e43aaa2cde411445395a94ce46703f4a475294
7
+ data.tar.gz: 21b057dc8ba776a21aae3021600bfa83cb954211f36089fa0b29b55fd8f89813881a0db39e8b7d95b1f6f1c2c0184113544ea6de07ddfe4553cb6e2e37efef73
@@ -18,8 +18,13 @@ private
18
18
 
19
19
  def get_sku(product)
20
20
  text = product.css('.ctxProductCol .tinyText').map(&:text).detect { |t| t =~ /SKU/ }
21
- sku = text.match(/SKU:\s+(\S+)/)[1]
22
- "heath:#{sku}"
21
+ if text
22
+ sku = text.match(/SKU:\s+(\S+)/)[1]
23
+ "heath:#{sku}"
24
+ else
25
+ title = product.css('.ctxProductCol .attentionText').text.parameterize
26
+ "heath:#{title}"
27
+ end
23
28
  end
24
29
 
25
30
  def get_url(product)
@@ -1,5 +1,5 @@
1
1
  module WeddingRegistryScraper
2
- VERSION = Gem::Version.new("0.0.3")
2
+ VERSION = Gem::Version.new("0.0.4")
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedding_registry_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Pariser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-15 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unirest