cbr_rates 0.1.0 → 0.1.1

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: a110ec71dd85ae6e834167e6882e73746aa7f9d659c16cebc2aacd333bf8cb3f
4
- data.tar.gz: 0bdeb40b9d31ddb0d2ce5525d45fe8403ba5c36042bbba3b67e6ba9509d7468f
3
+ metadata.gz: 6ef118de85329c5329d6413ee9907675c52f10d343d885f2b57a0ee9e8ffab5b
4
+ data.tar.gz: 977f3830d325ede3c2c7ce2fc48a65f13d952ba48d44a7f2e6bab742a1ae119e
5
5
  SHA512:
6
- metadata.gz: 3ed29be595000346af0c902aa6709a2ac1412da822fbcd6f55ff4615fc07bc087d1a4e5e6285449fec01878400bea6d33492a77f7584f888a4fb36151dc207dc
7
- data.tar.gz: a3c00ea2b8f0ce47d88a25c0a5fe5acc3874b25fdc5bd619fde81df42f66a1b29205d33b8ef368b891b7cff9093d77c0f7cd1397a57b95dbabc81baa5bbd98b0
6
+ metadata.gz: 8fb9c33c19c4ae2388d647be109b9a35a0dfe07f306ce21eae1277dbf37a396007677febe8c538e95fb0fce041feeb229eb7a437e30aa1fcc899c45ac2fd7362
7
+ data.tar.gz: c29a3c767b48b5073ed9aee04a675b8909d82ae2a580e62a477192f6ccdcad7894052bf1853e174cceada07c268208b7a2c796ac39909d685b80777c98a617dc
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 TODO: Write your name
3
+ Copyright (c) 2020 Eugene Zolotarev, Vadim Venediktov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,40 +1,39 @@
1
- # CbrRates
1
+ # Котировки валют с Банка России
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cbr_rates`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ ## Установка
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Добавьте
6
6
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
7
+ ``` rb
12
8
  gem 'cbr_rates'
13
9
  ```
14
10
 
15
- And then execute:
11
+ И сделайте
16
12
 
17
- $ bundle install
13
+ bundle
18
14
 
19
- Or install it yourself as:
15
+ Или сделайте
20
16
 
21
- $ gem install cbr_rates
17
+ gem install cbr_rates
22
18
 
23
- ## Usage
19
+ ## Использование
24
20
 
25
- TODO: Write usage instructions here
21
+ ``` rb
22
+ require 'cbr_rates'
26
23
 
27
- ## Development
24
+ usd = Money.new('1_50', 'USD')
28
25
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+ result = CbrRates.new.exchange(usd, 'CAD')
30
27
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+ puts "1.50 USD -> CAD: #{result.format}"
29
+ ```
32
30
 
33
- ## Contributing
31
+ Как обращаться с объектом `Money` см. в [документации](https://github.com/RubyMoney/money) этого гема.
34
32
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cbr_rates.
33
+ ## Помочь в разработке
36
34
 
35
+ Шлите ваши пулреквесты в https://github.com/goodprogrammer-ru/cbr_rates.
37
36
 
38
- ## License
37
+ ## Лицензия
39
38
 
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
39
+ [MIT License](https://opensource.org/licenses/MIT)
@@ -1,7 +1,5 @@
1
1
  require_relative '../lib/cbr_rates'
2
2
 
3
- Money.locale_backend = :currency
4
-
5
3
  usd = Money.new('1_50', 'USD')
6
4
 
7
5
  result = CbrRates.new.exchange(usd, 'CAD')
@@ -5,6 +5,7 @@ require 'money'
5
5
  require 'nokogiri'
6
6
 
7
7
  Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN
8
+ Money.locale_backend = :currency
8
9
 
9
10
  class CbrRates
10
11
  attr_reader :refreshed_at
@@ -1,3 +1,3 @@
1
1
  class CbrRates
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbr_rates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Zolotarev