exchange-rates-generator 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -17,14 +17,17 @@ Partially sponsored by the kind folks at Intercity (http://www.intercity.co.nz).
17
17
 
18
18
  == SYNOPSIS:
19
19
 
20
- Generate a Ruby class for convert NZD amounts to other currencies, using the default ECB source.
20
+ Generate a Ruby class for converting NZD amounts to other currencies, using the default ECB source.
21
21
 
22
- <tt>./generate_exchange_rates -c nzd -f ruby</tt>
22
+ <tt>generate_exchange_rates -c nzd -f ruby</tt>
23
23
 
24
+ This results in a file called "nzd_exchange_rates.rb" being created in the current working dir.
24
25
 
25
- Generate a Ruby library for convert NZD amounts to other currencies, using the default ECB source.
26
+ Generate a Javascript library for converting NZD amounts to other currencies, using the default ECB source.
26
27
 
27
- <tt>./generate_exchange_rates -c usd -f javascript</tt>
28
+ <tt>generate_exchange_rates -c usd -f javascript</tt>
29
+
30
+ This results in a file called "usd_exchange_rates.js" being created in the current working dir.
28
31
 
29
32
  == REQUIREMENTS:
30
33
 
@@ -7,7 +7,7 @@ require 'extlib'
7
7
  require 'logger'
8
8
 
9
9
  module ExchangeRatesGenerator
10
- VERSION = '0.0.5'
10
+ VERSION = '0.0.6'
11
11
 
12
12
  def self.log_to=(l)
13
13
  @log_to = l
@@ -30,6 +30,8 @@ module ExchangeRatesGenerator
30
30
  end
31
31
  end
32
32
 
33
+ require 'exchange-rates-generator/errors'
34
+
33
35
  require 'exchange-rates-generator/formatters/base'
34
36
  require 'exchange-rates-generator/formatters/ruby'
35
37
  require 'exchange-rates-generator/formatters/javascript'
@@ -73,8 +73,8 @@ Available Sources:
73
73
  exit
74
74
  end
75
75
 
76
- path = options[:path]
77
- path ||= "exchange_rates.#{formatter.default_extension.to_s}"
76
+ path = options[:path] || "."
77
+ path = File.join(path, "#{options[:currency].to_s.downcase}_exchange_rates.#{formatter.default_extension.to_s}")
78
78
 
79
79
  begin
80
80
  File.open(path, 'w') do |file|
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rolly
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-16 00:00:00 +13:00
17
+ date: 2010-03-18 00:00:00 +13:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency