simple_currency 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
1
- # simple_currency
1
+ #simple_currency
2
2
 
3
3
  A really simple currency converter using XavierMedia API.
4
4
  Compatible with Ruby 1.8, 1.9 and JRuby.
5
5
 
6
- ## Notes
6
+ ##Notes
7
7
 
8
8
  Since version 1.2, simple_currency no longer uses Xurrency API in its
9
9
  background, due to restrictions on the number of daily requests. If you
@@ -11,51 +11,51 @@ would like to use it, please use the [fork by Alfonso
11
11
  Jiménez](http://github.com/alfonsojimenez/simple_currency), author and
12
12
  maintainer of xurrency.com service.
13
13
 
14
- ## Usage
14
+ ##Usage
15
15
 
16
16
  Just require it and all your numeric stuff gets this fancy DSL for free:
17
17
 
18
- 30.eur.to_usd
19
- # => 38.08
18
+ 30.eur.to_usd
19
+ # => 38.08
20
20
 
21
- 150.eur.to_usd
22
- # => 190.4
23
- 239.usd.to_eur
24
- # => 187.98
25
- # These don't even hit the Internets!
26
- # (They take advantage of Rails cache)
21
+ 150.eur.to_usd
22
+ # => 190.4
23
+ 239.usd.to_eur
24
+ # => 187.98
25
+ # These don't even hit the Internets!
26
+ # (They take advantage of Rails cache)
27
27
 
28
- 70.usd.to_chf
29
- # => 71.9
28
+ 70.usd.to_chf
29
+ # => 71.9
30
30
 
31
31
  But what if you want to do the currency exchange according to a specific date
32
32
  in the past? Just do this:
33
33
 
34
- # You can use any time or date object
35
- 42.eur.at(1.year.ago).to_usd
36
- # => 60.12
37
- 42.eur.at(Time.parse('2009-09-01')).to_usd
38
- # => 60.12
34
+ # You can use any time or date object
35
+ 42.eur.at(1.year.ago).to_usd
36
+ # => 60.12
37
+ 42.eur.at(Time.parse('2009-09-01')).to_usd
38
+ # => 60.12
39
39
 
40
- ## Installation
40
+ ##Installation
41
41
 
42
- ### Rails 3
42
+ ###Rails 3
43
43
 
44
44
  In your Gemfile:
45
45
 
46
46
  gem "simple_currency"
47
47
 
48
- ### Not using Rails?
48
+ ###Not using Rails?
49
49
 
50
50
  Then you have to manually install the gem:
51
51
 
52
- gem install simple_currency
52
+ gem install simple_currency
53
53
 
54
54
  And manually require it as well:
55
55
 
56
- require "simple_currency"
56
+ require "simple_currency"
57
57
 
58
- ## Note on Patches/Pull Requests
58
+ ##Note on Patches/Pull Requests
59
59
 
60
60
  * Fork the project.
61
61
  * Make your feature addition or bug fix.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -138,7 +138,7 @@ module CurrencyConvertible
138
138
  uri = URI.parse(api_url)
139
139
 
140
140
  retries = 10
141
- not_found_retries=2
141
+ not_found_retries=10
142
142
  xml_response = nil
143
143
  begin
144
144
  Timeout::timeout(1){
@@ -5,46 +5,45 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple_currency}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey"]
12
- s.date = %q{2010-10-03}
12
+ s.date = %q{2010-10-04}
13
13
  s.description = %q{A really simple currency converter using XavierMedia API. It's Ruby 1.8, 1.9 and JRuby compatible, and it also takes advantage of Rails cache when available.}
14
14
  s.email = %q{info@codegram.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".autotest",
21
- ".bundle/config",
22
- ".gitignore",
23
- ".rspec",
24
- ".rvmrc",
25
- "Gemfile",
26
- "Gemfile.lock",
27
- "LICENSE",
28
- "README.rdoc",
29
- "Rakefile",
30
- "VERSION",
31
- "autotest/discover.rb",
32
- "lib/core_ext/numeric.rb",
33
- "lib/simple_currency.rb",
34
- "lib/simple_currency/currency_convertible.rb",
35
- "simple_currency.gemspec",
36
- "spec/simple_currency_spec.rb",
37
- "spec/spec_helper.rb",
38
- "spec/support/xavier.xml"
21
+ ".bundle/config",
22
+ ".gitignore",
23
+ ".rspec",
24
+ ".rvmrc",
25
+ "Gemfile",
26
+ "Gemfile.lock",
27
+ "LICENSE",
28
+ "README.md",
29
+ "Rakefile",
30
+ "VERSION",
31
+ "autotest/discover.rb",
32
+ "lib/core_ext/numeric.rb",
33
+ "lib/simple_currency.rb",
34
+ "lib/simple_currency/currency_convertible.rb",
35
+ "simple_currency.gemspec",
36
+ "spec/simple_currency_spec.rb",
37
+ "spec/spec_helper.rb",
38
+ "spec/support/xavier.xml"
39
39
  ]
40
40
  s.homepage = %q{http://github.com/codegram/simple_currency}
41
- s.rdoc_options = ["--charset=UTF-8"]
42
41
  s.require_paths = ["lib"]
43
42
  s.rubygems_version = %q{1.3.7}
44
43
  s.summary = %q{A really simple currency converter using XavierMedia API.}
45
44
  s.test_files = [
46
45
  "spec/simple_currency_spec.rb",
47
- "spec/spec_helper.rb"
46
+ "spec/spec_helper.rb"
48
47
  ]
49
48
 
50
49
  if s.respond_to? :specification_version then
@@ -52,6 +51,7 @@ Gem::Specification.new do |s|
52
51
  s.specification_version = 3
53
52
 
54
53
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
+ s.add_runtime_dependency(%q<crack>, [">= 0"])
55
55
  s.add_runtime_dependency(%q<crack>, [">= 0.1.8"])
56
56
  s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
57
57
  s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.22"])
@@ -59,6 +59,7 @@ Gem::Specification.new do |s|
59
59
  s.add_development_dependency(%q<rails>, [">= 3.0.0"])
60
60
  s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
61
61
  else
62
+ s.add_dependency(%q<crack>, [">= 0"])
62
63
  s.add_dependency(%q<crack>, [">= 0.1.8"])
63
64
  s.add_dependency(%q<jeweler>, [">= 1.4.0"])
64
65
  s.add_dependency(%q<rspec>, [">= 2.0.0.beta.22"])
@@ -67,6 +68,7 @@ Gem::Specification.new do |s|
67
68
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
68
69
  end
69
70
  else
71
+ s.add_dependency(%q<crack>, [">= 0"])
70
72
  s.add_dependency(%q<crack>, [">= 0.1.8"])
71
73
  s.add_dependency(%q<jeweler>, [">= 1.4.0"])
72
74
  s.add_dependency(%q<rspec>, [">= 2.0.0.beta.22"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_currency
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Oriol Gual
@@ -17,13 +17,28 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-10-03 00:00:00 +02:00
20
+ date: 2010-10-04 00:00:00 +02:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
+ type: :runtime
25
+ prerelease: false
24
26
  name: crack
27
+ version_requirements: &id001 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ hash: 3
33
+ segments:
34
+ - 0
35
+ version: "0"
36
+ requirement: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ type: :runtime
25
39
  prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
40
+ name: crack
41
+ version_requirements: &id002 !ruby/object:Gem::Requirement
27
42
  none: false
28
43
  requirements:
29
44
  - - ">="
@@ -34,12 +49,12 @@ dependencies:
34
49
  - 1
35
50
  - 8
36
51
  version: 0.1.8
37
- type: :runtime
38
- version_requirements: *id001
52
+ requirement: *id002
39
53
  - !ruby/object:Gem::Dependency
40
- name: jeweler
54
+ type: :development
41
55
  prerelease: false
42
- requirement: &id002 !ruby/object:Gem::Requirement
56
+ name: jeweler
57
+ version_requirements: &id003 !ruby/object:Gem::Requirement
43
58
  none: false
44
59
  requirements:
45
60
  - - ">="
@@ -50,12 +65,12 @@ dependencies:
50
65
  - 4
51
66
  - 0
52
67
  version: 1.4.0
53
- type: :development
54
- version_requirements: *id002
68
+ requirement: *id003
55
69
  - !ruby/object:Gem::Dependency
56
- name: rspec
70
+ type: :development
57
71
  prerelease: false
58
- requirement: &id003 !ruby/object:Gem::Requirement
72
+ name: rspec
73
+ version_requirements: &id004 !ruby/object:Gem::Requirement
59
74
  none: false
60
75
  requirements:
61
76
  - - ">="
@@ -68,12 +83,12 @@ dependencies:
68
83
  - beta
69
84
  - 22
70
85
  version: 2.0.0.beta.22
71
- type: :development
72
- version_requirements: *id003
86
+ requirement: *id004
73
87
  - !ruby/object:Gem::Dependency
74
- name: fakeweb
88
+ type: :development
75
89
  prerelease: false
76
- requirement: &id004 !ruby/object:Gem::Requirement
90
+ name: fakeweb
91
+ version_requirements: &id005 !ruby/object:Gem::Requirement
77
92
  none: false
78
93
  requirements:
79
94
  - - ">="
@@ -84,12 +99,12 @@ dependencies:
84
99
  - 3
85
100
  - 0
86
101
  version: 1.3.0
87
- type: :development
88
- version_requirements: *id004
102
+ requirement: *id005
89
103
  - !ruby/object:Gem::Dependency
90
- name: rails
104
+ type: :development
91
105
  prerelease: false
92
- requirement: &id005 !ruby/object:Gem::Requirement
106
+ name: rails
107
+ version_requirements: &id006 !ruby/object:Gem::Requirement
93
108
  none: false
94
109
  requirements:
95
110
  - - ">="
@@ -100,12 +115,12 @@ dependencies:
100
115
  - 0
101
116
  - 0
102
117
  version: 3.0.0
103
- type: :development
104
- version_requirements: *id005
118
+ requirement: *id006
105
119
  - !ruby/object:Gem::Dependency
106
- name: bundler
120
+ type: :development
107
121
  prerelease: false
108
- requirement: &id006 !ruby/object:Gem::Requirement
122
+ name: bundler
123
+ version_requirements: &id007 !ruby/object:Gem::Requirement
109
124
  none: false
110
125
  requirements:
111
126
  - - ">="
@@ -116,8 +131,7 @@ dependencies:
116
131
  - 0
117
132
  - 0
118
133
  version: 1.0.0
119
- type: :development
120
- version_requirements: *id006
134
+ requirement: *id007
121
135
  description: A really simple currency converter using XavierMedia API. It's Ruby 1.8, 1.9 and JRuby compatible, and it also takes advantage of Rails cache when available.
122
136
  email: info@codegram.com
123
137
  executables: []
@@ -126,7 +140,7 @@ extensions: []
126
140
 
127
141
  extra_rdoc_files:
128
142
  - LICENSE
129
- - README.rdoc
143
+ - README.md
130
144
  files:
131
145
  - .autotest
132
146
  - .bundle/config
@@ -136,7 +150,7 @@ files:
136
150
  - Gemfile
137
151
  - Gemfile.lock
138
152
  - LICENSE
139
- - README.rdoc
153
+ - README.md
140
154
  - Rakefile
141
155
  - VERSION
142
156
  - autotest/discover.rb
@@ -152,8 +166,8 @@ homepage: http://github.com/codegram/simple_currency
152
166
  licenses: []
153
167
 
154
168
  post_install_message:
155
- rdoc_options:
156
- - --charset=UTF-8
169
+ rdoc_options: []
170
+
157
171
  require_paths:
158
172
  - lib
159
173
  required_ruby_version: !ruby/object:Gem::Requirement