flow-reference 0.2.85 → 0.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/io_flow_reference_v0.rb +1 -1
- metadata +7 -31
- data/.apidoc +0 -7
- data/.gitignore +0 -3
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -36
- data/LICENSE +0 -21
- data/README.md +0 -49
- data/bin/build-currency.rb +0 -46
- data/bin/download.bash +0 -7
- data/bin/generate.bash +0 -3
- data/data/continents.json +0 -259
- data/data/countries.json +0 -2675
- data/data/currencies.json +0 -862
- data/data/languages.json +0 -1318
- data/data/locales.json +0 -3182
- data/data/payment-methods.json +0 -280
- data/data/regions.json +0 -4880
- data/flow-reference.gemspec +0 -16
- data/spec/common/basic_spec.rb +0 -30
- data/spec/spec_helper.rb +0 -7
data/flow-reference.gemspec
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
require_relative './lib/flow-reference'
|
|
2
|
-
|
|
3
|
-
Gem::Specification.new 'flow-reference' do |gem|
|
|
4
|
-
gem.version = Io::Flow::Reference::V0::Client::Constants::VERSION
|
|
5
|
-
gem.summary = 'Flow helpers'
|
|
6
|
-
gem.description = 'Flow helper libraries for working with https://api.flow.io'
|
|
7
|
-
gem.homepage = 'https://www.flow.io'
|
|
8
|
-
gem.license = 'MIT'
|
|
9
|
-
gem.authors = ['Michael Bryzek', 'Dino Reic']
|
|
10
|
-
gem.email = 'mbryzek@alum.mit.edu'
|
|
11
|
-
gem.files = `git ls-files`.split($\)
|
|
12
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
13
|
-
gem.test_files = gem.files.grep(%r{spec/})
|
|
14
|
-
|
|
15
|
-
# gem.add_runtime_dependency 'flowcommerce'
|
|
16
|
-
end
|
data/spec/common/basic_spec.rb
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
RSpec.describe Flow::Reference::Currencies do
|
|
4
|
-
|
|
5
|
-
it 'checks loading of currency model' do
|
|
6
|
-
currency_class = ::Io::Flow::Reference::V0::Models::Currency
|
|
7
|
-
|
|
8
|
-
expect(Flow::Reference::Currencies.find('usd').class).to eq(currency_class)
|
|
9
|
-
expect(Flow::Reference::Currencies.find(' usd ').class).to eq(currency_class)
|
|
10
|
-
expect(Flow::Reference::Currencies.find('USD').class).to eq(currency_class)
|
|
11
|
-
expect(Flow::Reference::Currencies.find('JPY').class).to eq(currency_class)
|
|
12
|
-
|
|
13
|
-
expect(Flow::Reference::Currencies.find('other')).to be_nil
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
it 'checks to_cents conversion' do
|
|
17
|
-
expect(Flow::Reference::Currencies::Data.Usd.to_cents("10.52")).to eq(1052)
|
|
18
|
-
expect(Flow::Reference::Currencies::Data.Usd.to_cents("10.524")).to eq(1052)
|
|
19
|
-
expect(Flow::Reference::Currencies::Data.Usd.to_cents("10.525")).to eq(1053)
|
|
20
|
-
expect(Flow::Reference::Currencies::Data.Cad.to_cents("10.525")).to eq(1053)
|
|
21
|
-
expect(Flow::Reference::Currencies::Data.Usd.to_cents(100)).to eq(10000)
|
|
22
|
-
expect(Flow::Reference::Currencies::Data.Mro.to_cents("105")).to eq(1050)
|
|
23
|
-
expect(Flow::Reference::Currencies::Data.Mro.to_cents("105.55")).to eq(1056)
|
|
24
|
-
|
|
25
|
-
# Japan Jen has no cents
|
|
26
|
-
expect(Flow::Reference::Currencies::Data.Jpy.to_cents("105")).to eq(105)
|
|
27
|
-
expect(Flow::Reference::Currencies::Data.Jpy.to_cents(105)).to eq(105)
|
|
28
|
-
expect(Flow::Reference::Currencies.find('JPY').to_cents(105)).to eq(105)
|
|
29
|
-
end
|
|
30
|
-
end
|