eodhd.rb 0.14.0 → 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5e7ba5c1bceffbc1bded24d8143fc41d9fe9989f59008b9da914727d1c98296
4
- data.tar.gz: ee6da505ccba36b0be5a901aaae1bd142ed418d4bfbb9c7dce38f43ff46e3d7d
3
+ metadata.gz: 44210fb44fe2ba7e5988aa8dc632eb795d2d758f29b004e9723e28564c65c4f5
4
+ data.tar.gz: 98581f3f62c684146b423f66f48bef85545ec335c9c831ac80dc41cccb925138
5
5
  SHA512:
6
- metadata.gz: d1d0fab70a78b53a94213297720fef33053edd2c4922ce95b6d536989037eaf907b59886b262db33e2e4d1b4ff3a76a0ec33ee1e017059191b78ade0f9ec9043
7
- data.tar.gz: f872f8c9f5b7d289a7ae6469bf6c6bfe851bc9d2c81f8aff010d2fc40984d8aae5b90de8c895d9f929cc4d42cf689138e6ccfc6ea5ea3fafa06c197527582ad5
6
+ metadata.gz: 6021c0cbd10ac0c9d4527f5c08888159aba35ca0286679f041d13599387eb7bc4ee0826abe6b835f47ba1e333f3082c45fcedc9b16e58e641a949d7e864b79ea
7
+ data.tar.gz: 43a689fb9bcc2c83fc082090717bdf0defd1add686c9bb1b370bba6b60b70f2b4ac14cde375ada26f85d87e8726452b300be170b5f6354bd91638a6059bd8986
data/eodhd.rb.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'eodhd.rb'
3
3
 
4
- spec.version = '0.14.0'
5
- spec.date = '2025-03-21'
4
+ spec.version = '0.14.2'
5
+ spec.date = '2025-03-26'
6
6
 
7
7
  spec.summary = "Access the eodhd.com API with Ruby."
8
8
  spec.description = "Access the eodhd.com API with Ruby."
@@ -9,8 +9,7 @@
9
9
  # iv. Crypto: wss://ws.eodhistoricaldata.com/ws/crypto?api_token=XXX
10
10
 
11
11
  require 'iodine'
12
- require 'JSON'
13
- require 'UnixTime'
12
+ require 'json' # This line doesn't seem to be necessary in Ruby 3.
14
13
 
15
14
  class Eodhd
16
15
  class WebSocketClient
@@ -102,6 +101,18 @@ class Eodhd
102
101
  end
103
102
  end # class << self
104
103
 
104
+ attr_accessor\
105
+ :api_token,
106
+ :asset_class,
107
+ :consumer
108
+
109
+ attr_reader\
110
+ :symbols
111
+
112
+ def symbols=(symbols)
113
+ @symbols = format_symbols(symbols)
114
+ end
115
+
105
116
  def run
106
117
  Iodine.threads = 1
107
118
  Iodine.connect(url: url, handler: Handler.new(symbols: @symbols, consumer: @consumer))
@@ -112,11 +123,6 @@ class Eodhd
112
123
 
113
124
  private
114
125
 
115
- attr_accessor\
116
- :api_token,
117
- :asset_class,
118
- :symbols
119
-
120
126
  def initialize(api_token:, asset_class:, symbols:, consumer:)
121
127
  @api_token = api_token
122
128
  @asset_class = asset_class # crypto, forex, us-quote, us
data/lib/eodhd.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # Eodhd.rb
2
2
  # Eodhd
3
3
 
4
- # 20250321
5
- # 0.14.0
4
+ # 20250326
5
+ # 0.14.2
6
6
 
7
7
  # Changes since 0.13:
8
8
  # -/0: Add WebSockets.
@@ -14,6 +14,12 @@
14
14
  # 6. + Eodhd#forex_stream
15
15
  # 7. + Eodhd#crypto_stream
16
16
  # 8. Moved Eodhd::Error from Eodhd::Client to a separate file.
17
+ # 0/1: Some fixes for the WebSocketClient interface.
18
+ # 9. ~ Eodhd::WebSocketClient: + attr_accessor :consumer
19
+ # 10. ~ Eodhd::WebSocketClient: /attr_accessor :symbols/attr_reader :symbols/
20
+ # 11. + Eodhd::WebSocketClient#symbols=
21
+ # 1/2: Remove reference to currently unused library UnixTime.
22
+ # 12. ~ Eodhd::WebSocketClient: - require 'UnixTime'
17
23
 
18
24
  require_relative 'Eodhd/Client'
19
25
  require_relative 'Eodhd/EodBulkLastDay'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eodhd.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-21 00:00:00.000000000 Z
10
+ date: 2025-03-26 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: http.rb
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.6.5
64
+ rubygems_version: 3.6.6
65
65
  specification_version: 4
66
66
  summary: Access the eodhd.com API with Ruby.
67
67
  test_files: []