descartes 0.8.3.5 → 0.8.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: a7d746b56fa3fd4a89282be6bc3a8bc7d8e2db69
4
- data.tar.gz: 2ce29f8941c4116645885d385c79653f05810b4a
3
+ metadata.gz: be9e7f1dcf85945b9abb3240b64cc07befcd4b8b
4
+ data.tar.gz: b4e2bbbb1f6e40b05c5eb2c5f995ee3155dbdc91
5
5
  SHA512:
6
- metadata.gz: 71b77d5d7867ad722cd39f1ab63114cbfdedf3847ed057221a9c3c7f7a57f1d497dc800ffb9a4d2890ecdd9394d01cc8aafb1f63e1f937a1ba14b1d3f31ec4e6
7
- data.tar.gz: 603faa90a886cdfbdd51244aab723189c034252fc0ff1f97e77f7f1deb1a33d9d67e381e2437aa695178fcd5245570a709fb715ae35683a10ac59ba49746a5b0
6
+ metadata.gz: ecf0dc34e9f5fc7d6cdf4c9fac685e08dd7fd0460248f6890d076d1ed8743d3ec19f6bedce7781dc8b14861da1e5af0fde52e2f6f971c94d52ae54f92f2d279c
7
+ data.tar.gz: 5491cfbe1b34d9b9802a210c5d8454e744f81b2fb5bf65a22cb0026d09555b82530d9ea3b8b05511393dfee48bef44e425850e5b63fbb8ce31c2f1d53f43c91d
@@ -18,7 +18,7 @@ require 'nokogiri'
18
18
  class Descartes
19
19
  class Currency
20
20
  include Cinch::Plugin
21
- match /[0-9]+ [A-Za-z]+ to [A-Za-z]+/, use_prefix: false
21
+ match /[0-9]+ [A-Za-z]+ to [A-Za-z]+$/, use_prefix: false
22
22
 
23
23
  def execute(m)
24
24
  amount = m.params[1].match /[0-9]+/
@@ -29,7 +29,8 @@ class Descartes
29
29
  to = 'jpy' if to == 'yen'
30
30
 
31
31
  url = "http://www.xe.com/currencyconverter/convert/?Amount=#{amount}&From=#{from}&To=#{to}"
32
- m.reply Nokogiri::HTML(open(url)).xpath('//tr[@class="uccRes"]').children[4].text
32
+ res = Nokogiri::HTML(open(url)).xpath('//tr[@class="uccRes"]').children[4].text
33
+ m.reply res unless res.strip.empty?
33
34
  end
34
35
  end
35
36
  end
@@ -14,6 +14,6 @@
14
14
 
15
15
  class Descartes
16
16
  def self.version
17
- '0.8.3.5'
17
+ '0.8.4'
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descartes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3.5
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cinch