exchange_jpy 0.1.1 → 0.1.3

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: 6205c51f13c38e17bdfb3b9077a445501f37e44f8ff18458b020da4eb6a21b0f
4
- data.tar.gz: a21db85816bfe914f0f1da27454af1101d3e012e63e48a92ec0aad43b66d5116
3
+ metadata.gz: b9aaaf291e1a5e3fd03558a6fd43f361807e883bd30224c2ee8a5ee3e8ee5775
4
+ data.tar.gz: f85f69d8fd319c841030dba5de67f82fc86f9ef34ba3e97d3ee5927e5e7debdb
5
5
  SHA512:
6
- metadata.gz: 605792c07d7b92782e6420347592351fc2a4a038339ff7094d776691de6479ead856fc43f7945a411579ac8e793431f87be73e36a3ea468060d35a1b0cd4574c
7
- data.tar.gz: ec82437ed766bea68f3bd048234671e621f90e3b9642a6c2b3a66ad7d3c333ff1866ded7cbcc53bd835362afbacbaebc6d4c371f0a849b5e2a256e71242d6ec0
6
+ metadata.gz: b9adcf0461152abb604573377ecb93230b5db27f29f0804996abf3de17a8a1ef87acabf8a9ed0be151d1ddd45b789dc5a8ec71f6b1fd0fe6ef3bf2c5f837f27d
7
+ data.tar.gz: 465ef29ce7394929ebd9ed6bbf6022fb549cd5d18d43c057f04e9fabb7f348e4cbe1d12da62f7b333ac866c97cdd694eb4b742acf28eecdc81ee0af490368217
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exchange_jpy (0.1.0)
4
+ exchange_jpy (0.1.1)
5
5
  thor
6
6
 
7
7
  GEM
data/exchange_jpy.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Yoshimasa Yuri"]
9
9
  spec.email = ["yurimore.tm@gmail.com"]
10
10
 
11
- spec.summary = "Show Exchange Rates."
12
- spec.description = "Show Exchange Rates."
11
+ spec.summary = "Show current exchange rate from currency_code to JPY."
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.1"
4
+ VERSION = "0.1.3"
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)
29
- currency_code = ARGV[1] || "GBP"
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)
@@ -36,9 +35,9 @@ class ExchangeJpyCLI < Thor
36
35
  end
37
36
  end
38
37
 
39
- desc "currency_jpy [currency_code] [money]", "Exchange from [currency_code] to JPY"
38
+ desc "exchange [currency_code] [amount]", "Exchange [currency_code] [amount] into JPY"
40
39
 
41
- def currency_jpy(currency_code = ARGV[1] || "GBP", money = ARGV[2] || "1")
40
+ def exchange(currency_code = ARGV[1] || "GBP", money = ARGV[2] || "1")
42
41
  currency_rate = CurrencyRate.new
43
42
  jpy = currency_rate.currency_rate(currency_code)
44
43
  if (jpy == nil)
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.1
4
+ version: 0.1.3
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:
@@ -71,5 +71,5 @@ requirements: []
71
71
  rubygems_version: 3.2.32
72
72
  signing_key:
73
73
  specification_version: 4
74
- summary: Show Exchange Rates.
74
+ summary: Show current exchange rate from currency_code to JPY.
75
75
  test_files: []