lita-onewheel-amazon-product 0.1.0 → 0.1.1

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: 1b8b4693d0b58b4757039100d7cef861339936a7
4
- data.tar.gz: 93da4351bc30eb1f975b4208af04b54f9d47e6d5
3
+ metadata.gz: cdfa78631be91a47c8287d2cd37a9ef44038e6ca
4
+ data.tar.gz: 21b87bcf144ceedadb565fac1b2593caaadfdf2f
5
5
  SHA512:
6
- metadata.gz: 8a1f80939a8cbf487421f0cd7dd5c214345100cd76028c858cecfe08ad952b1621144367b18ae86065314dbd892d67079a1d65cc565e64dd3ad3c467909f2e24
7
- data.tar.gz: 29a5763e93bd0c3b821cc0cf1545244bab81644679b6723db0e29b377718317cf5e564b96761de17d4f7b9f72f8d3165cc469171dca61cf8becfe2de5f781a2d
6
+ metadata.gz: 1d1269c7fc834901d0c801a699dd02701c9d42875149fecbfd037c4d2c96a07380afe110bdc6ab73b5471472eff0e0c6fb699a71a98c275a880c6a32fe37842b
7
+ data.tar.gz: 5b9b7fab8a2bf6b17de9fce8bfc9a3f831191ac71ff8531908517bb7518e6b9031b6055cfd1a1e3dde2f91a3a636ead4fdcfd424dcbbc4d449fb76ec38a2a901
@@ -21,6 +21,11 @@ module Lita
21
21
  end
22
22
  end
23
23
 
24
+ if description.nil?
25
+ Lita.logger.error "lita-onewheel-amazon-product: Processing of #{uri} failed."
26
+ return
27
+ end
28
+
24
29
  price_node = noko_doc.css('span#priceblock_ourprice')
25
30
 
26
31
  if price_node.empty?
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-amazon-product'
3
- spec.version = '0.1.0'
3
+ spec.version = '0.1.1'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita interface to post information about amazon products.}
@@ -17,4 +17,10 @@ describe Lita::Handlers::OnewheelAmazonProduct, lita_handler: true do
17
17
  send_message ('http://www.amazon.com/Digital-Life-Performance-Ethernet-Cables/dp/B001AE8YBW/')
18
18
  expect(replies.last).to eq('$67.30 Digital Life High Performance Ethernet Cables - Advanced High Speed - 7 ft. Advanced High Speed Ethernet Cable')
19
19
  end
20
+
21
+ it 'puts book price' do
22
+ mock_fixture('book_price')
23
+ send_message ('http://www.amazon.com/Live-Detroit-Without-Being-Jackass/dp/0996836705')
24
+ expect(replies.last).to eq('')
25
+ end
20
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-amazon-product
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-05 00:00:00.000000000 Z
11
+ date: 2016-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita