bazaar_sources 0.2.4 → 0.2.5

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.
@@ -377,7 +377,7 @@ module Amazon
377
377
  unless rating_block.nil?
378
378
  rating_text = rating_block.inner_text
379
379
  if rating_text =~ /\(([\d,]+).+? ratings\)/
380
- num_merchant_reviews = $1.gsub!(/\D/,'').to_i
380
+ num_merchant_reviews = $1.gsub(/\D/,'').to_i
381
381
  end
382
382
  end
383
383
  rating_link = seller_info.at("div.rating/a")
@@ -175,7 +175,7 @@ module Shopping
175
175
  # prices
176
176
  cpc = offer.at('cpc').nil? ? nil : (offer.at('cpc').text.to_f*100).to_i
177
177
  base_price = to_d_or_nil(offer.at('basePrice').text)
178
- shipping_cost = offer.at('shippingCost')['checkSite'] == 'true' ? nil : to_d_or_nil(offer.at('shippingCost').text)
178
+ shipping_cost = offer.at('shippingCost').nil? || offer.at('shippingCost')['checkSite'] == 'true' ? nil : to_d_or_nil(offer.at('shippingCost').text)
179
179
 
180
180
  # skip this offer if we already have one from same merchant and it has a lower total price
181
181
  existing_offer = offers[store_hash[:id]]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bazaar_sources
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - chris mcc
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-31 00:00:00 +00:00
18
+ date: 2010-09-13 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency