lightstreamer 0.15 → 0.17

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
  SHA256:
3
- metadata.gz: e7a5166d6a0e3ab3612f9a13848ca9475ea0f0fae7139d5ad70bdf9fbe6b0a43
4
- data.tar.gz: 3b0e4316482c751fedcc86b76fb7f202c3b5863df8559a47c7fc211c8556f1aa
3
+ metadata.gz: 22d6394912f32257858b27528d71a94e1c2f46b3c9f1e0f9448e43ebc2672706
4
+ data.tar.gz: 03ce8688d71c7246e9535c40d37773aab2fe84b9af71f2d870c7bab2036659ce
5
5
  SHA512:
6
- metadata.gz: 13f500f634589f1197eb2810b7f51f06a52b80827a7b62a8f8e37db4d3eac132651e7bde105b78b33c96df14d9c856c9ceadd673a00296a2ff06f5118da9103d
7
- data.tar.gz: 17e84feb6e0b66561ee2b9d4b40be8ed70ab882fa374a3e49d217ec0f9aa542605fb2c6c57b68cb7e40cc6d0bc572d9ef5b6659351435481bfc2550135d89d4f
6
+ metadata.gz: c05e7ba7568241f1e0d3d90e4d5134dc2b66b6ab756b5b4c8a1ad33af008b669d442cd664c33286acfc580495c54a22ed8b5adfc4861a766e8cfc296b7880c16
7
+ data.tar.gz: 243d7d4c9096742261fa559caffe0ef2c68e7cecc008fa9fda68c57428e7e65f42443db1cabe8e0659f03d9280aa63d374a30e676d07a8ddae38979263464fc7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Lightstreamer Changelog
2
2
 
3
+ ### 0.17 — March 27, 2023
4
+
5
+ - Updated supported Ruby version range to 2.7 - 3.2.
6
+ - Updated dependency versions.
7
+ - Switched from Travis CI to GitHub Actions.
8
+ - Removed CodeClimate.
9
+
10
+ ### 0.16 — April 27, 2020
11
+
12
+ - Updated supported Ruby version range to 2.5 - 2.7.
13
+ - Updated dependency versions.
14
+
3
15
  ### 0.15 — September 12, 2019
4
16
 
5
17
  - Updated supported Ruby version range to 2.4 - 2.6.
data/LICENSE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
  =====================
3
3
 
4
- Copyright © 2015-2019 Richard Viney
4
+ Copyright © 2015-2020 Richard Viney
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person
7
7
  obtaining a copy of this software and associated documentation
data/README.md CHANGED
@@ -1,9 +1,7 @@
1
1
  # Ruby Lightstreamer Client Gem
2
2
 
3
3
  [![Gem][gem-badge]][gem-link]
4
- [![Build Status][travis-ci-badge]][travis-ci-link]
5
- [![Test Coverage][test-coverage-badge]][test-coverage-link]
6
- [![Code Climate][code-climate-badge]][code-climate-link]
4
+ [![Build Status][ci-badge]][ci-link]
7
5
  [![Documentation][documentation-badge]][documentation-link]
8
6
  [![License][license-badge]][license-link]
9
7
 
@@ -39,8 +37,8 @@ $ gem install lightstreamer
39
37
 
40
38
  The two primary classes that make up the public API are:
41
39
 
42
- - [`Lightstreamer::Session`](http://www.rubydoc.info/github/richard-viney/lightstreamer/master/Lightstreamer/Session)
43
- - [`Lightstreamer::Subscription`](http://www.rubydoc.info/github/richard-viney/lightstreamer/master/Lightstreamer/Subscription)
40
+ - [`Lightstreamer::Session`](http://www.rubydoc.info/github/richard-viney/lightstreamer/main/Lightstreamer/Session)
41
+ - [`Lightstreamer::Subscription`](http://www.rubydoc.info/github/richard-viney/lightstreamer/main/Lightstreamer/Subscription)
44
42
 
45
43
  The following code demonstrates how to create a Lightstreamer session, build a subscription, then use a thread-safe
46
44
  queue to print streaming output as it arrives.
@@ -105,7 +103,7 @@ lightstreamer help stream
105
103
 
106
104
  ## Documentation
107
105
 
108
- API documentation is available [here](http://www.rubydoc.info/github/richard-viney/lightstreamer/master).
106
+ API documentation is available [here](http://www.rubydoc.info/github/richard-viney/lightstreamer/main).
109
107
 
110
108
  ## Contributors
111
109
 
@@ -113,13 +111,9 @@ Gem created by Richard Viney. All contributions welcome.
113
111
 
114
112
  [gem-link]: https://rubygems.org/gems/lightstreamer
115
113
  [gem-badge]: https://badge.fury.io/rb/lightstreamer.svg
116
- [travis-ci-link]: http://travis-ci.org/richard-viney/lightstreamer
117
- [travis-ci-badge]: https://travis-ci.org/richard-viney/lightstreamer.svg?branch=master
118
- [test-coverage-link]: https://codeclimate.com/github/richard-viney/lightstreamer/test_coverage
119
- [test-coverage-badge]: https://api.codeclimate.com/v1/badges/75ed2d421612ef3be0c1/test_coverage
120
- [code-climate-link]: https://codeclimate.com/github/richard-viney/lightstreamer
121
- [code-climate-badge]: https://api.codeclimate.com/v1/badges/75ed2d421612ef3be0c1/maintainability
122
- [documentation-link]: https://inch-ci.org/github/richard-viney/lightstreamer
123
- [documentation-badge]: https://inch-ci.org/github/richard-viney/lightstreamer.svg?branch=master
124
- [license-link]: https://github.com/richard-viney/lightstreamer/blob/master/LICENSE.md
114
+ [ci-link]: https://github.com/richard-viney/lightstreamer/actions
115
+ [ci-badge]: https://github.com/richard-viney/lightstreamer/workflows/ci/badge.svg?branch=main
116
+ [documentation-link]: https://inch-ci.org/github/richard-viney/lightstreamer?branch=main
117
+ [documentation-badge]: https://inch-ci.org/github/richard-viney/lightstreamer.svg?branch=main
118
+ [license-link]: https://github.com/richard-viney/lightstreamer/blob/main/LICENSE.md
125
119
  [license-badge]: https://img.shields.io/badge/license-MIT-blue.svg
@@ -48,16 +48,16 @@ module Lightstreamer
48
48
  def create_session
49
49
  @session = Lightstreamer::Session.new session_options
50
50
  @session.connect
51
- @session.on_message_result(&method(:on_message_result))
52
- @session.on_error(&method(:on_error))
51
+ @session.on_message_result { |sequence, numbers, error| on_message_result sequence, numbers, error }
52
+ @session.on_error { |error| on_error error }
53
53
  end
54
54
 
55
55
  def create_subscription
56
56
  subscription = @session.build_subscription subscription_options
57
57
 
58
- subscription.on_data(&method(:on_data))
59
- subscription.on_overflow(&method(:on_overflow))
60
- subscription.on_end_of_snapshot(&method(:on_end_of_snapshot))
58
+ subscription.on_data { |sub, item_name, item_data, new_data| on_data sub, item_name, item_data, new_data }
59
+ subscription.on_overflow { |sub, item_name, overflow_size| on_overflow sub, item_name, overflow_size }
60
+ subscription.on_end_of_snapshot { |sub, item_name| on_end_of_snapshot sub, item_name }
61
61
 
62
62
  subscription.start
63
63
  end
@@ -25,7 +25,7 @@ module Lightstreamer
25
25
  message.item_index = match.captures[0].to_i - 1
26
26
  return unless message.item_index < items.size
27
27
 
28
- message.data = parse_field_values match.captures[1..-1], fields
28
+ message.data = parse_field_values match.captures[1..], fields
29
29
 
30
30
  message
31
31
  end
@@ -52,7 +52,7 @@ module Lightstreamer
52
52
  return '' if value == '$'
53
53
  return nil if value == '#'
54
54
 
55
- value = value[1..-1] if /^(\$|#)/.match?(value)
55
+ value = value[1..] if /^(\$|#)/.match?(value)
56
56
 
57
57
  decode_escape_sequences value
58
58
  end
@@ -63,7 +63,7 @@ module Lightstreamer
63
63
  string = decode_surrogate_pair_escape_sequences string
64
64
 
65
65
  string.gsub(/\\u[A-F\d]{4}/i) do |escape_sequence|
66
- codepoint = escape_sequence[2..-1].hex
66
+ codepoint = escape_sequence[2..].hex
67
67
 
68
68
  # Codepoints greater than 0xD7FF are invalid and so are removed
69
69
  codepoint < 0xD800 ? [codepoint].pack('U') : ''
@@ -129,7 +129,7 @@ module Lightstreamer
129
129
  @header = StreamConnectionHeader.new
130
130
 
131
131
  buffer = StreamBuffer.new
132
- options[:response_block] = ->(data, _, _) { buffer.process data, &method(:process_stream_line) }
132
+ options[:response_block] = ->(data, _, _) { buffer.process(data) { |line| process_stream_line line } }
133
133
  options[:expects] = 200
134
134
 
135
135
  Excon.post url, options
@@ -175,7 +175,7 @@ module Lightstreamer
175
175
  if /^LOOP( \d+|)$/.match?(line)
176
176
  @loop = true
177
177
  elsif /^END( \d+|)$/.match?(line)
178
- @error = Errors::SessionEndError.new line[4..-1]
178
+ @error = Errors::SessionEndError.new line[4..]
179
179
  elsif !line.empty?
180
180
  @queue.push line
181
181
  end
@@ -1,4 +1,4 @@
1
1
  module Lightstreamer
2
2
  # The version of this gem.
3
- VERSION = '0.15'.freeze
3
+ VERSION = '0.17'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightstreamer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.15'
4
+ version: '0.17'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Viney
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-12 00:00:00.000000000 Z
11
+ date: 2023-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -16,154 +16,154 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.66'
19
+ version: '0.99'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.66'
26
+ version: '0.99'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.20'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.20'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: factory_bot
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '6.2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: '6.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: github-markup
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '4.0'
62
62
  type: :development
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: '3.0'
68
+ version: '4.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: redcarpet
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.3'
75
+ version: '3.6'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.3'
82
+ version: '3.6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.8'
89
+ version: '3.12'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.8'
96
+ version: '3.12'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-mocks
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.8'
103
+ version: '3.12'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.8'
110
+ version: '3.12'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.74'
117
+ version: '1.48'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.74'
124
+ version: '1.48'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop-performance
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.4'
131
+ version: '1.16'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.4'
138
+ version: '1.16'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.35'
145
+ version: '2.19'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.35'
152
+ version: '2.19'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0.17'
159
+ version: '0.21'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0.17'
166
+ version: '0.21'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: yard
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +178,7 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0.9'
181
- description:
181
+ description:
182
182
  email: richard.viney@gmail.com
183
183
  executables:
184
184
  - lightstreamer
@@ -208,8 +208,9 @@ files:
208
208
  homepage: https://github.com/richard-viney/lightstreamer
209
209
  licenses:
210
210
  - MIT
211
- metadata: {}
212
- post_install_message:
211
+ metadata:
212
+ rubygems_mfa_required: 'true'
213
+ post_install_message:
213
214
  rdoc_options: []
214
215
  require_paths:
215
216
  - lib
@@ -217,16 +218,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
218
  requirements:
218
219
  - - ">="
219
220
  - !ruby/object:Gem::Version
220
- version: 2.4.0
221
+ version: '2.7'
221
222
  required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  requirements:
223
224
  - - ">="
224
225
  - !ruby/object:Gem::Version
225
226
  version: '0'
226
227
  requirements: []
227
- rubyforge_project:
228
- rubygems_version: 2.7.6
229
- signing_key:
228
+ rubygems_version: 3.4.6
229
+ signing_key:
230
230
  specification_version: 4
231
231
  summary: Library and command-line client for accessing a Lightstreamer server.
232
232
  test_files: []