iex-ruby-client 1.5.0 → 1.6.0
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/CHANGELOG.md +3 -0
- data/UPGRADING.md +8 -0
- data/iex-ruby-client.gemspec +1 -1
- data/lib/iex/endpoints/historial_prices.rb +2 -2
- data/lib/iex/resources/resource.rb +5 -1
- data/lib/iex/version.rb +1 -1
- data/lib/iex-ruby-client.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842d8fd485aebd159c318088ca1137348555a4a2106e4e4089da3e13ecc596eb
|
4
|
+
data.tar.gz: dc2046dd1efbd5c0593134fa99daf5a280f62c629c2779d785f5f34f41896c6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543f9a5bea937226e974b430654c53d4fab1f4cbb79d025784888f6a4924aeb2c59bcceb2214257a78544274c217f555594cc100a9820dae2b8f90d72ef9b1ae
|
7
|
+
data.tar.gz: 205d65bf85cfd152e4cddb8f6344658cea65a12201aceba42a43a52a524efcbf02e9695ddfa543c99b5fc90f402b096e490fe6341697fbb07e7de5a5a7961c72
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
### 1.6.0 (2021/10/17)
|
2
|
+
* [#110](https://github.com/dblock/iex-ruby-client/pull/110): Drop `money_helper` dependency and utilize `money` gem directly - [@agrberg](https://github.com/agrberg).
|
3
|
+
|
1
4
|
### 1.5.0 (2021/08/15)
|
2
5
|
* [#105](https://github.com/dblock/iex-ruby-client/pull/105): Added support for fetching latest foreign exchange rates - [@mathu97](https://github.com/mathu97).
|
3
6
|
* [#106](https://github.com/dblock/iex-ruby-client/pull/106): Added support for fetching a single key stat with `key_stat(symbol, stat)` endpoint - [@agrberg](https://github.com/agrberg).
|
data/UPGRADING.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
Upgrading iex-ruby-client
|
2
2
|
=========================
|
3
3
|
|
4
|
+
### Upgrading to >= 1.6.0
|
5
|
+
|
6
|
+
[#110](https://github.com/dblock/iex-ruby-client/pull/110) drops the dependency on `money_helper` in favor of using the `money` library directly.
|
7
|
+
|
8
|
+
Previously the `money_helper` library set `Money.locale_backend = :currency` globally. The default is `I18n` which looks up the thousands separator and decimal marker. Depending on your project you may need to set this value if you use `Money#format` without the `thousands_separator` or `decimal_mark` options. You are less likely to require this in a Rails project.
|
9
|
+
|
10
|
+
This represents a change in the `money` library's method of handling defaults and is similar to the deprecation warning the library provides until you set `Money.rounding_mode=`.
|
11
|
+
|
4
12
|
### Upgrading to >= 1.0.0
|
5
13
|
|
6
14
|
On June 1, 2019, IEX API has been sunset for all non-IEX data. IEX Cloud, a non-Exchange platform, continues to provide access to third-party data sources and requires a token. When upgrading to 1.0.0, create an account and get a `publishable token` from [IEX Cloud Console](https://iexcloud.io).
|
data/iex-ruby-client.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency 'faraday', '>= 0.17'
|
20
20
|
s.add_dependency 'faraday_middleware'
|
21
21
|
s.add_dependency 'hashie'
|
22
|
-
s.add_dependency '
|
22
|
+
s.add_dependency 'money', '~> 6.0'
|
23
23
|
s.add_development_dependency 'rake', '~> 10'
|
24
24
|
s.add_development_dependency 'rspec'
|
25
25
|
s.add_development_dependency 'rubocop', '0.72.0'
|
@@ -3,8 +3,8 @@ module IEX
|
|
3
3
|
module HistoricalPrices
|
4
4
|
def historical_prices(symbol, options = {})
|
5
5
|
if options[:range] == 'date'
|
6
|
-
raise ArgumentError unless options[:date]
|
7
|
-
raise ArgumentError unless options[:chartByDay]
|
6
|
+
raise ArgumentError unless options[:date]
|
7
|
+
raise ArgumentError unless options[:chartByDay]
|
8
8
|
end
|
9
9
|
|
10
10
|
options = options.dup
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module IEX
|
2
4
|
module Resources
|
3
5
|
class Resource < Hashie::Trash
|
@@ -27,7 +29,9 @@ module IEX
|
|
27
29
|
end
|
28
30
|
|
29
31
|
def self.to_dollar(amount:, ignore_cents: true)
|
30
|
-
|
32
|
+
return nil unless amount
|
33
|
+
|
34
|
+
Money.new(amount * 100, 'USD').format(decimal_mark: '.', no_cents: ignore_cents, thousands_separator: ',')
|
31
35
|
end
|
32
36
|
end
|
33
37
|
end
|
data/lib/iex/version.rb
CHANGED
data/lib/iex-ruby-client.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iex-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: money
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '6.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '6.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|