currency_spy 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  module CurrencySpy
2
2
  # Stores the version of the currency_spy gem
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
@@ -18,7 +18,7 @@ module CurrencySpy
18
18
  def medium_rate
19
19
  regexp = Regexp.new("#{currency_code} / PLN")
20
20
  res = nil
21
- page.search("//td[@name='pair']").each do |td|
21
+ page.search("//span[@name='pair']").each do |td|
22
22
  if (regexp.match(td.content))
23
23
  res = td.next_element.content.to_f
24
24
  end
@@ -29,9 +29,8 @@ module CurrencySpy
29
29
  # The hour of the rate
30
30
  def rate_time
31
31
  regexp = Regexp.new(currency_code)
32
- time_regexp = Regexp.new(/\d+:\d+/)
33
32
  res = nil
34
- page.search("//td[@name='pair']").each do |td|
33
+ page.search("//span[@name='pair']").each do |td|
35
34
  if (regexp.match(td.content))
36
35
  hour = td.next_element.next_element.content
37
36
  res = DateTime.parse(hour)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lukasz Badura
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-12 00:00:00 +01:00
17
+ date: 2011-03-26 23:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency