iex-ruby-client 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1d8c001f1114dd5ab9f27b690016712e9905101
4
- data.tar.gz: e83ec278ba32506b1588acd2a967c953c848faa6
3
+ metadata.gz: 1595523ca5b890b51b9d49ac27d9def034b3ca5b
4
+ data.tar.gz: 602da622ca41fa7940fd1045a69d931e66b55faf
5
5
  SHA512:
6
- metadata.gz: ce07c54a50cfe1213ab8447bd833e9a03feb8ed5468026c8ec4e6b146611d6acdf1f9a76a4f300c36460c32d1ebd9bc8a0ced76bd27e9eb1182a5cc0423e414a
7
- data.tar.gz: d9fdecb64180ccdbbf696f62dbb7b588d9ac1f7b7f1d0f898308f5b4156b1a05f13a8f94a02a08cd6f9cb406b83ae4a1b71b00928af5f2c8c1bc76028a3c4918
6
+ metadata.gz: 4a02a7bf63c7585adb5ee7a006c6984e524a05aaa23505707a7dd34312c1b2f8997c266270b281b4f00f75b8f9c1a78e4f857863ec324c4152a37829b24594b5
7
+ data.tar.gz: 0be37668d735d10df0234a8b204c54ff59498be73ff36c7a9147207fa6650fad0c8abac962f80f31f11502830d2d2ac04642c4d4cbb51fafb6d18cee64fc3a67
@@ -1,3 +1,7 @@
1
+ ### 0.3.1 (2018/05/23)
2
+
3
+ * [#3](https://github.com/dblock/iex-ruby-client/issues/3): Fix: do not error on undefined properties - [@dblock](https://github.com/dblock).
4
+
1
5
  ### 0.3.0 (2018/05/22)
2
6
 
3
7
  * Added `IEX::Resources::Chart#get` - [@dblock](https://github.com/dblock).
@@ -1,4 +1,6 @@
1
1
  module IEX
2
2
  class Resource < Hashie::Trash
3
+ include Hashie::Extensions::IgnoreUndeclared
4
+
3
5
  end
4
6
  end
@@ -1,3 +1,3 @@
1
1
  module IEX
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.14.0
11
+ - Faraday v0.15.1
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
@@ -21,7 +21,7 @@ http_interactions:
21
21
  Server:
22
22
  - nginx
23
23
  Date:
24
- - Tue, 22 May 2018 20:13:00 GMT
24
+ - Wed, 23 May 2018 22:04:57 GMT
25
25
  Content-Type:
26
26
  - text/html; charset=utf-8
27
27
  Transfer-Encoding:
@@ -29,8 +29,8 @@ http_interactions:
29
29
  Connection:
30
30
  - keep-alive
31
31
  Set-Cookie:
32
- - ctoken=7b2950e131e948bca00f5eed64893da3; Domain=.iextrading.com; Path=/; Expires=Wed,
33
- 23 May 2018 08:13:00 GMT; Secure
32
+ - ctoken=f4ba51dd9d4e416588d63390db37709b; Domain=.iextrading.com; Path=/; Expires=Thu,
33
+ 24 May 2018 10:04:57 GMT; Secure
34
34
  Content-Security-Policy:
35
35
  - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
36
36
  'unsafe-inline'; font-src data:; frame-src 'self'; connect-src 'self' https://auth.iextrading.com
@@ -61,5 +61,5 @@ http_interactions:
61
61
  encoding: ASCII-8BIT
62
62
  string: Unknown symbol
63
63
  http_version:
64
- recorded_at: Tue, 22 May 2018 20:13:00 GMT
64
+ recorded_at: Wed, 23 May 2018 22:04:57 GMT
65
65
  recorded_with: VCR 4.0.0
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.14.0
11
+ - Faraday v0.15.1
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
@@ -21,16 +21,16 @@ http_interactions:
21
21
  Server:
22
22
  - nginx
23
23
  Date:
24
- - Tue, 22 May 2018 20:12:59 GMT
24
+ - Wed, 23 May 2018 22:04:57 GMT
25
25
  Content-Type:
26
26
  - application/json; charset=utf-8
27
27
  Content-Length:
28
- - '874'
28
+ - '915'
29
29
  Connection:
30
30
  - keep-alive
31
31
  Set-Cookie:
32
- - ctoken=124dc8691fb84575bc5d622d323ab8bb; Domain=.iextrading.com; Path=/; Expires=Wed,
33
- 23 May 2018 08:12:59 GMT; Secure
32
+ - ctoken=087fe43d41f94d2fa909aef7ec6b84be; Domain=.iextrading.com; Path=/; Expires=Thu,
33
+ 24 May 2018 10:04:57 GMT; Secure
34
34
  Content-Security-Policy:
35
35
  - default-src 'self'; child-src 'none'; object-src 'none'; style-src 'self'
36
36
  'unsafe-inline'; font-src data:; frame-src 'self'; connect-src 'self' https://auth.iextrading.com
@@ -62,8 +62,8 @@ http_interactions:
62
62
  body:
63
63
  encoding: UTF-8
64
64
  string: '{"symbol":"MSFT","companyName":"Microsoft Corporation","primaryExchange":"Nasdaq
65
- Global Select","sector":"Technology","calculationPrice":"tops","open":97.71,"openTime":1526995800716,"close":97.6,"closeTime":1526932800235,"high":98.17,"low":97.2,"latestPrice":97.54,"latestSource":"IEX
66
- real time price","latestTime":"3:59:47 PM","latestUpdate":1527019187506,"latestVolume":13670424,"iexRealtimePrice":97.54,"iexRealtimeSize":100,"iexLastUpdated":1527019187506,"delayedPrice":97.375,"delayedPriceTime":1527019077341,"extendedPrice":97.71,"extendedPriceTime":1526995800696,"previousClose":97.6,"change":-0.06,"changePercent":-0.00061,"iexMarketPercent":0.01322,"iexVolume":180723,"avgTotalVolume":26330377,"iexBidPrice":0,"iexBidSize":0,"iexAskPrice":0,"iexAskSize":0,"marketCap":749419084443,"peRatio":28.86,"week52High":98.69,"week52Low":67.5,"ytdChange":0.14582232709940235}'
65
+ Global Select","sector":"Technology","calculationPrice":"close","open":96.68,"openTime":1527082200673,"close":98.66,"closeTime":1527105600450,"high":98.73,"low":96.32,"latestPrice":98.66,"latestSource":"Close","latestTime":"May
66
+ 23, 2018","latestUpdate":1527105600450,"latestVolume":20535596,"iexRealtimePrice":98.68,"iexRealtimeSize":42,"iexLastUpdated":1527105595797,"delayedPrice":98.66,"delayedPriceTime":1527105600450,"extendedPrice":98.56,"extendedChange":-0.1,"extendedChangePercent":-0.00101,"extendedPriceTime":1527109075453,"previousClose":97.5,"change":1.16,"changePercent":0.0119,"iexMarketPercent":0.01326,"iexVolume":272302,"avgTotalVolume":25931612,"iexBidPrice":0,"iexBidSize":0,"iexAskPrice":0,"iexAskSize":0,"marketCap":758024265646,"peRatio":29.19,"week52High":98.69,"week52Low":68.02,"ytdChange":0.1446483288134399}'
67
67
  http_version:
68
- recorded_at: Tue, 22 May 2018 20:12:59 GMT
68
+ recorded_at: Wed, 23 May 2018 22:04:57 GMT
69
69
  recorded_with: VCR 4.0.0
@@ -9,21 +9,21 @@ describe IEX::Resources::Quote do
9
9
  expect(subject.symbol).to eq 'MSFT'
10
10
  expect(subject.primary_exchange).to eq 'Nasdaq Global Select'
11
11
  expect(subject.company_name).to eq 'Microsoft Corporation'
12
- expect(subject.market_cap).to eq 749_419_084_443
12
+ expect(subject.market_cap).to eq 758_024_265_646
13
13
  end
14
14
  it 'coerces numbers' do
15
- expect(subject.latest_price).to eq 97.54
16
- expect(subject.change).to eq -0.06
15
+ expect(subject.latest_price).to eq 98.66
16
+ expect(subject.change).to eq 1.16
17
17
  expect(subject.week_52_high).to eq 98.69
18
- expect(subject.week_52_low).to eq 67.5
19
- expect(subject.change_percent).to eq -0.00061
20
- expect(subject.change_percent_s).to eq '-0.06%'
18
+ expect(subject.week_52_low).to eq 68.02
19
+ expect(subject.change_percent).to eq 0.0119
20
+ expect(subject.change_percent_s).to eq '+1.19%'
21
21
  end
22
22
  it 'coerces times' do
23
- expect(subject.latest_update).to eq 1_527_019_187_506
24
- expect(subject.latest_update_t).to eq Time.at(1_527_019_187)
25
- expect(subject.iex_last_updated).to eq 1_527_019_187_506
26
- expect(subject.iex_last_updated_t).to eq Time.at(1_527_019_187)
23
+ expect(subject.latest_update).to eq 1_527_105_600_450
24
+ expect(subject.latest_update_t).to eq Time.at(1_527_105_600)
25
+ expect(subject.iex_last_updated).to eq 1_527_105_595_797
26
+ expect(subject.iex_last_updated_t).to eq Time.at(1_527_105_595)
27
27
  end
28
28
  end
29
29
  context 'invalid symbol', vcr: { cassette_name: 'quote/invalid' } do
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: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-22 00:00:00.000000000 Z
11
+ date: 2018-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: 1.3.6
206
206
  requirements: []
207
207
  rubyforge_project:
208
- rubygems_version: 2.6.13
208
+ rubygems_version: 2.6.12
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: IEX Finance API Ruby client with support for retrieving stock quotes.