lita-onewheel-freds-sound-of-music 0.0.2 → 0.1.0

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: 91a01321671edca204a317004fbba9e3eae912ac
4
- data.tar.gz: 15a70b0a0216ce68e62baa958bf705792bb4aa63
3
+ metadata.gz: 84b58f7a2b971d3945594ccaaec564a92c926e19
4
+ data.tar.gz: 628b9e4e2292bd45f192e3609867dfd5ba3502c0
5
5
  SHA512:
6
- metadata.gz: c49353ab20088bce2355d49700959847cb11778ea47f1186c077758d37d79c48e0b83a5e7c66532d8f8b26f854cd994085297b6732cc3c7d0c0dbfdc3ad8f885
7
- data.tar.gz: f2321a2e8c4ed450f10ec992f93cd64521ce5dcbad0c4325f3e217af68096ee68ea78b654e80a2b34b1f9124e351f2abb0574c3958e460ac29396af06b8e02cb
6
+ metadata.gz: 7bf987b0c809670ec65d700f435ad6fed90350933ab225b09f97ce7d23af70e9ba1b802f5da11a927c191d5b722ae99d57995dbb1071167d59ef404b9c151b1a
7
+ data.tar.gz: 07b0b1bcb1788be09a52e578b50a5c91e4972564120d2802381fa62d52d62a0bd9f841478bea4472da31945267e5fc2ebc1fe6b80c467f8983a141145c3df93a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lita-onewheel-freds-sound-of-music (0.0.2)
4
+ lita-onewheel-freds-sound-of-music (0.1.0)
5
5
  lita (~> 4)
6
6
  nokogiri (~> 1)
7
7
  rest-client (~> 1)
@@ -54,7 +54,8 @@ module Lita
54
54
 
55
55
  def format_output(response, records)
56
56
  records.each do |rec|
57
- response.reply "#{rec[:brand]} #{rec[:model]} was $#{rec[:was_new]}, now $#{rec[:price]}"
57
+ query = "#{rec[:brand]} #{rec[:model]}".gsub /\s+/, '+'
58
+ response.reply "#{rec[:brand]} #{rec[:model]} was $#{rec[:was_new]}, now $#{rec[:price]} https://google.com?q=#{query}"
58
59
  end
59
60
  end
60
61
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-freds-sound-of-music'
3
- spec.version = '0.0.2'
3
+ spec.version = '0.1.0'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita interface to Fred's sound of music used listings.}
@@ -4,7 +4,7 @@ describe Lita::Handlers::OnewheelFredsSoundOfMusic, lita_handler: true do
4
4
  it 'will list the items' do
5
5
  mock_fixture('freds')
6
6
  send_command 'freds '
7
- expect(replies.last).to eq('Yamaha CT-1010 was $385.00, now $299.95')
7
+ expect(replies.last).to eq('Yamaha CT-1010 was $385.00, now $299.95 https://google.com?q=Yamaha+CT-1010')
8
8
  expect(replies.length).to eq(176)
9
9
  end
10
10
 
@@ -12,15 +12,15 @@ describe Lita::Handlers::OnewheelFredsSoundOfMusic, lita_handler: true do
12
12
  mock_fixture('freds')
13
13
  send_command 'freds mx130'
14
14
  expect(replies.length).to eq(1)
15
- expect(replies.last).to eq('Mcintosh MX130 was $4800.00, now $999.95')
15
+ expect(replies.last).to eq('Mcintosh MX130 was $4800.00, now $999.95 https://google.com?q=Mcintosh+MX130')
16
16
  end
17
17
 
18
18
  it 'will search for an item by brand' do
19
19
  mock_fixture('freds')
20
20
  send_command 'freds mci'
21
21
  expect(replies.length).to eq(3)
22
- expect(replies[0]).to eq('Mcintosh MX130 was $4800.00, now $999.95')
23
- expect(replies[1]).to eq('Mcintosh MC502 was $1200.00, now $895.00')
24
- expect(replies.last).to eq('Mcintosh MR80 was $2499.00, now $1295.00')
22
+ expect(replies[0]).to eq('Mcintosh MX130 was $4800.00, now $999.95 https://google.com?q=Mcintosh+MX130')
23
+ expect(replies[1]).to eq('Mcintosh MC502 was $1200.00, now $895.00 https://google.com?q=Mcintosh+MC502')
24
+ expect(replies.last).to eq('Mcintosh MR80 was $2499.00, now $1295.00 https://google.com?q=Mcintosh+MR80')
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-freds-sound-of-music
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps