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 +4 -4
 - data/Gemfile.lock +1 -1
 - data/exchange_jpy.gemspec +2 -2
 - data/lib/exchange_jpy/version.rb +1 -1
 - data/lib/exchange_jpy.rb +6 -7
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b9aaaf291e1a5e3fd03558a6fd43f361807e883bd30224c2ee8a5ee3e8ee5775
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f85f69d8fd319c841030dba5de67f82fc86f9ef34ba3e97d3ee5927e5e7debdb
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: b9adcf0461152abb604573377ecb93230b5db27f29f0804996abf3de17a8a1ef87acabf8a9ed0be151d1ddd45b789dc5a8ec71f6b1fd0fe6ef3bf2c5f837f27d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 465ef29ce7394929ebd9ed6bbf6022fb549cd5d18d43c057f04e9fabb7f348e4cbe1d12da62f7b333ac866c97cdd694eb4b742acf28eecdc81ee0af490368217
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        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  
     | 
| 
       12 
     | 
    
         
            -
              spec.description = "Show  
     | 
| 
      
 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"
         
     | 
    
        data/lib/exchange_jpy/version.rb
    CHANGED
    
    
    
        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 " 
     | 
| 
      
 19 
     | 
    
         
            +
              desc "code", "Indicates the url of the currency code table"
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
              def  
     | 
| 
      
 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 " 
     | 
| 
      
 26 
     | 
    
         
            +
              desc "rate [currency_code]", "Show current exchange rate from [currency_code] to JPY"
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
              def  
     | 
| 
       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 " 
     | 
| 
      
 38 
     | 
    
         
            +
              desc "exchange [currency_code] [amount]", "Exchange  [currency_code] [amount] into JPY"
         
     | 
| 
       40 
39 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
              def  
     | 
| 
      
 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. 
     | 
| 
      
 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  
     | 
| 
      
 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  
     | 
| 
      
 74 
     | 
    
         
            +
            summary: Show current exchange rate from currency_code to JPY.
         
     | 
| 
       75 
75 
     | 
    
         
             
            test_files: []
         
     |