exchange_jpy 0.1.2 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b76e8e773bfd0fcb38fe50a22773d44f7ae4a20018834fbb28075d36b194574b
4
- data.tar.gz: 99ead04d1efcfa78120a7abcd3d9b30987dc5f97e99a9d74edbfea99081492f2
3
+ metadata.gz: 86e5d7bd407335f4e7ecf317e4dea7d2e4e1696ff682c9ce5cf6b8db65685873
4
+ data.tar.gz: c50290fa88e76d203272879def155cfbff7623f8913fff3b846d9f45810ea433
5
5
  SHA512:
6
- metadata.gz: 7d343d666dda4bb04c8b71e2af9eb56e48b4b790cd53038a07ca69fdf347d6351b3fde8fd15e69cc49b9801b88727ae5b150f1e650493f539657e283ca06484b
7
- data.tar.gz: c30c20d339ef6ccfa57ceec34449c75d653221f0580bd04a26d08f31aacd0b61633e6dfd382d9d7b55d6edba89d486e00cfe40b886a8a6d9a55c8e3d0b1923b6
6
+ metadata.gz: 3d1fccfa9bd77ecac9b897c38b6542dc6be71fc1085792b342dda18cd5d685d1a45f62709c9efa4a7bc65531988f3f318250fa4aaaf42bd8eb32b6439624a8ac
7
+ data.tar.gz: 961e9f96566f22c898c153b294cb205c5057340a01f5e954df4e9fa5d503877cbd08d4105f7733dbd3575f8d0cc114398da11c8ecdfe8811821e872eb1c2db43
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exchange_jpy (0.1.1)
4
+ exchange_jpy (0.1.3)
5
5
  thor
6
6
 
7
7
  GEM
data/exchange_jpy.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["yurimore.tm@gmail.com"]
10
10
 
11
11
  spec.summary = "Show current exchange rate from currency_code to JPY."
12
- spec.description = "Show Exchange Rates."
12
+ spec.description = "Show current exchange rate from currency_code to JPY."
13
13
  #spec.homepage = "TODO: Put your gem's website or public repo URL here."
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 2.6.0"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExchangeJpy
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/exchange_jpy.rb CHANGED
@@ -16,17 +16,16 @@ class ExchangeJpyCLI < Thor
16
16
  puts "Hello #{name}."
17
17
  end
18
18
 
19
- desc "currency_code", "Indicates the url of the currency code table"
19
+ desc "code", "Indicates the url of the currency code table"
20
20
 
21
- def currency_code
21
+ def code
22
22
  str = "https://www.iban.jp/currency-codes"
23
23
  print("Access to ", str)
24
24
  end
25
25
 
26
- desc "currency_rate [currency_code]", "Show current exchange rate from [currency_code] to JPY"
26
+ desc "rate [currency_code]", "Show current exchange rate from [currency_code] to JPY"
27
27
 
28
- def currency_rate(currency_code = ARGV[1] || "GBP")
29
- #currency_code =
28
+ def rate(currency_code = ARGV[1] || "GBP")
30
29
  currency_rate = CurrencyRate.new
31
30
  jpy = currency_rate.currency_rate(currency_code)
32
31
  if (jpy == nil)
@@ -43,7 +42,7 @@ class ExchangeJpyCLI < Thor
43
42
  jpy = currency_rate.currency_rate(currency_code)
44
43
  if (jpy == nil)
45
44
  puts "Sorry. The currency code doesn't exist."
46
- elsif (money.match(/(mil)/).to_s == "mil")
45
+ elsif (money.match(/(m)/).to_s == "m")
47
46
  #p money.match(/[mil]/)
48
47
  jpy_money = jpy.to_s
49
48
  figure = money.match(/(\d*)/).to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exchange_jpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshimasa Yuri
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description: Show Exchange Rates.
27
+ description: Show current exchange rate from currency_code to JPY.
28
28
  email:
29
29
  - yurimore.tm@gmail.com
30
30
  executables: