exchange_jpy 0.1.1 → 0.1.2
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 +1 -1
 - data/lib/exchange_jpy/version.rb +1 -1
 - data/lib/exchange_jpy.rb +5 -5
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b76e8e773bfd0fcb38fe50a22773d44f7ae4a20018834fbb28075d36b194574b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 99ead04d1efcfa78120a7abcd3d9b30987dc5f97e99a9d74edbfea99081492f2
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 7d343d666dda4bb04c8b71e2af9eb56e48b4b790cd53038a07ca69fdf347d6351b3fde8fd15e69cc49b9801b88727ae5b150f1e650493f539657e283ca06484b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c30c20d339ef6ccfa57ceec34449c75d653221f0580bd04a26d08f31aacd0b61633e6dfd382d9d7b55d6edba89d486e00cfe40b886a8a6d9a55c8e3d0b1923b6
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/exchange_jpy.gemspec
    CHANGED
    
    | 
         @@ -8,7 +8,7 @@ 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  
     | 
| 
      
 11 
     | 
    
         
            +
              spec.summary = "Show current exchange rate from currency_code to JPY."
         
     | 
| 
       12 
12 
     | 
    
         
             
              spec.description = "Show Exchange Rates."
         
     | 
| 
       13 
13 
     | 
    
         
             
              #spec.homepage = "TODO: Put your gem's website or public repo URL here."
         
     | 
| 
       14 
14 
     | 
    
         
             
              spec.license = "MIT"
         
     | 
    
        data/lib/exchange_jpy/version.rb
    CHANGED
    
    
    
        data/lib/exchange_jpy.rb
    CHANGED
    
    | 
         @@ -23,10 +23,10 @@ class ExchangeJpyCLI < Thor 
     | 
|
| 
       23 
23 
     | 
    
         
             
                print("Access to ", str)
         
     | 
| 
       24 
24 
     | 
    
         
             
              end
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
     | 
    
         
            -
              desc "currency_rate [currency_code]", " 
     | 
| 
      
 26 
     | 
    
         
            +
              desc "currency_rate [currency_code]", "Show current exchange rate from [currency_code] to JPY"
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
              def currency_rate(currency_code)
         
     | 
| 
       29 
     | 
    
         
            -
                currency_code = 
     | 
| 
      
 28 
     | 
    
         
            +
              def currency_rate(currency_code = ARGV[1] || "GBP")
         
     | 
| 
      
 29 
     | 
    
         
            +
                #currency_code =
         
     | 
| 
       30 
30 
     | 
    
         
             
                currency_rate = CurrencyRate.new
         
     | 
| 
       31 
31 
     | 
    
         
             
                jpy = currency_rate.currency_rate(currency_code)
         
     | 
| 
       32 
32 
     | 
    
         
             
                if (jpy == nil)
         
     | 
| 
         @@ -36,9 +36,9 @@ class ExchangeJpyCLI < Thor 
     | 
|
| 
       36 
36 
     | 
    
         
             
                end
         
     | 
| 
       37 
37 
     | 
    
         
             
              end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
              desc " 
     | 
| 
      
 39 
     | 
    
         
            +
              desc "exchange [currency_code] [amount]", "Exchange  [currency_code] [amount] into JPY"
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
              def  
     | 
| 
      
 41 
     | 
    
         
            +
              def exchange(currency_code = ARGV[1] || "GBP", money = ARGV[2] || "1")
         
     | 
| 
       42 
42 
     | 
    
         
             
                currency_rate = CurrencyRate.new
         
     | 
| 
       43 
43 
     | 
    
         
             
                jpy = currency_rate.currency_rate(currency_code)
         
     | 
| 
       44 
44 
     | 
    
         
             
                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.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Yoshimasa Yuri
         
     | 
| 
         @@ -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: []
         
     |