currency_data 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +27 -0
- data/Rakefile +8 -0
- data/currency_data.gemspec +24 -0
- data/data/currencies.json +2297 -0
- data/lib/currency_data/version.rb +3 -0
- data/lib/currency_data.rb +21 -0
- data/spec/currency_data_spec.rb +33 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b5b0fce59025b4a8016c1f91755cbd7cdcb598a3
|
4
|
+
data.tar.gz: 01ee6da7fb62dcc33fcbe865a94000856347ab10
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 534731944184013f4d66c86945eb61e61a7e02b10c70d58686b38839d152cf4ef3e7c2ed6649965fec6faae7e972f044c8b5f64d857b972692f887d364cebafe
|
7
|
+
data.tar.gz: 36583b2cc568a4ef9029c99c4d17a96684be17d51c1b7b1b7a9565ea0aed3e6688092c75af7f9497a663d55f50ca34b650ce48812d95724e32913b0305e0d6d6
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Bucky Box Limited
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# CurrencyData
|
2
|
+
|
3
|
+
Information about currencies.
|
4
|
+
|
5
|
+
This RubyGem comes with a JSON file containing information about all ISO currencies.
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
nzd = CurrencyData.find("NZD")
|
11
|
+
nzd.iso_code #=> "NZD"
|
12
|
+
nzd.name #=> "New Zealand Dollar"
|
13
|
+
nzd.symbol #=> "$"
|
14
|
+
nzd.alternate_symbols #=> ["NZ$"]
|
15
|
+
nzd.subunit #=> "Cent"
|
16
|
+
nzd.subunit_to_unit #=> 100
|
17
|
+
nzd.symbol_first #=> true
|
18
|
+
nzd.html_entity #=> "$"
|
19
|
+
nzd.decimal_mark #=> "."
|
20
|
+
nzd.thousands_separator #=> ","
|
21
|
+
nzd.iso_numeric #=> "554"
|
22
|
+
```
|
23
|
+
|
24
|
+
## Kudos
|
25
|
+
|
26
|
+
Thanks to the Money Gem contributors for maintaining this [JSON file](https://github.com/RubyMoney/money/blob/master/config/currency_iso.json).
|
27
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'currency_data/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "currency_data"
|
8
|
+
spec.version = CurrencyData::VERSION
|
9
|
+
spec.authors = ["Cédric Félizard"]
|
10
|
+
spec.email = ["cedric@felizard.fr"]
|
11
|
+
spec.description = %q{Information about currencies.}
|
12
|
+
spec.summary = %q{Currency Data}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
end
|