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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/iex/resources/resource.rb +2 -0
- data/lib/iex/version.rb +1 -1
- data/spec/fixtures/iex/quote/invalid.yml +5 -5
- data/spec/fixtures/iex/quote/msft.yml +8 -8
- data/spec/iex/resources/quote_spec.rb +10 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1595523ca5b890b51b9d49ac27d9def034b3ca5b
|
4
|
+
data.tar.gz: 602da622ca41fa7940fd1045a69d931e66b55faf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a02a7bf63c7585adb5ee7a006c6984e524a05aaa23505707a7dd34312c1b2f8997c266270b281b4f00f75b8f9c1a78e4f857863ec324c4152a37829b24594b5
|
7
|
+
data.tar.gz: 0be37668d735d10df0234a8b204c54ff59498be73ff36c7a9147207fa6650fad0c8abac962f80f31f11502830d2d2ac04642c4d4cbb51fafb6d18cee64fc3a67
|
data/CHANGELOG.md
CHANGED
@@ -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).
|
data/lib/iex/version.rb
CHANGED
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.
|
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
|
-
-
|
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=
|
33
|
-
|
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:
|
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.
|
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
|
-
-
|
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
|
-
- '
|
28
|
+
- '915'
|
29
29
|
Connection:
|
30
30
|
- keep-alive
|
31
31
|
Set-Cookie:
|
32
|
-
- ctoken=
|
33
|
-
|
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":"
|
66
|
-
|
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:
|
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
|
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
|
16
|
-
expect(subject.change).to eq
|
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
|
19
|
-
expect(subject.change_percent).to eq
|
20
|
-
expect(subject.change_percent_s).to eq '
|
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
|
24
|
-
expect(subject.latest_update_t).to eq Time.at(
|
25
|
-
expect(subject.iex_last_updated).to eq
|
26
|
-
expect(subject.iex_last_updated_t).to eq Time.at(
|
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.
|
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-
|
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.
|
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.
|