lita-onewheel-wolfram-alpha 0.2.3 → 0.3.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: a2d6b3fdad32fffc3bb340101c4ded08d9122e38
4
- data.tar.gz: 0a0b44f5db76fefe28483e3f50bcc3087e200d82
3
+ metadata.gz: e680b12bb1ba0e4de7265bf2eed31c937120d3a2
4
+ data.tar.gz: 127bad9eaa91a9785d61efbf54ae3f99e0cfc3b4
5
5
  SHA512:
6
- metadata.gz: 3a78d974ab27485ebcb1e8135e94d550ffad12ff437ae60371087086e33aaae751a91d61ba736a24f7af4ae5dad7ab1b194f49be836ee4fd1695824d278008d0
7
- data.tar.gz: dbde7fc8a551ac0a471ccb03c9727cb4c0df87964137ea123d0d96e892c2d729f28e1f5a59b365e126c650a130b3f77d35e38e0bb0188b7926923afd52ba5b3f
6
+ metadata.gz: a3ba64991afc26a6ed571519cfd7be4ff273d15e65a06699620982fd1c077d75882b55a7e9ed3ad8078d08fb7231daeadc7efbbb8da14d38062586272457608d
7
+ data.tar.gz: 22ad5d4af696b59890be8bf0e4efbc580cee9d59b6d1c0551388b802a711a518a6a249fe902ef3eca631be12007cc666c86531df53f233e8ccb3b56442a7b425
@@ -23,6 +23,11 @@ module Lita
23
23
  post_script = " #{matches[1]}"
24
24
  end
25
25
 
26
+ # fraction hack
27
+ if query.match /\// and !query.match /\./
28
+ query += ".0"
29
+ end
30
+
26
31
  api_response = make_api_call query
27
32
  reply = parse_response api_response, query
28
33
  reply += post_script
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-wolfram-alpha'
3
- spec.version = '0.2.3'
3
+ spec.version = '0.3.0'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita interface to Wolfram Alpha.}
@@ -61,4 +61,10 @@ describe Lita::Handlers::OnewheelWolframAlpha, :lita_handler => true do
61
61
  send_command 'alpha x^2 <as a service>'
62
62
  expect(replies.last).to eq('http://www2.wolframalpha.com/Calculate/MSP/MSP8620hdi8ba18h005cd0000268f85ce36b8h331?MSPStoreType=image/gif&s=15 as a service')
63
63
  end
64
+
65
+ # it 'will add .0 to a fraction' do
66
+ # mock_fixture('onedividedby2')
67
+ # send_command 'alpha 1/2'
68
+ # expect(replies.last).to eq('0.5')
69
+ # end
64
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-wolfram-alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-14 00:00:00.000000000 Z
11
+ date: 2018-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita