websocket-client-simple 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2de6863ed3ec4f702c28cb4143bb949facf6fd18efda61eb236410131cb4dfa7
4
- data.tar.gz: a5ebee3d4e74eb177ad70ea111497b2c4aa515ed6ddff523ff0840f7bd0355ac
3
+ metadata.gz: ccdf4ed7409765786ec398e74ea090136c9f679184c3039133814536973521bf
4
+ data.tar.gz: 42192d8a9646cf946088837f7c0b98b7a4340b47d99b9194e0b30653371a5363
5
5
  SHA512:
6
- metadata.gz: 25239fc6f496ff3838112f1b6360a52d6be6d651fc3354ae7e61cdae3712cfe491d870c5af6874583e42fead682420f9757dee1483391f9df31b5c25b4a921c2
7
- data.tar.gz: 3fc6b6f1abbb20157f58a80d9fb47bb65ace236620ca786bb7eaae3fd51b134be15bd4e2b34ecbc5a7f2fa94cfd9c392b583f29bc335c359eb749bcccf607d72
6
+ metadata.gz: 8d5c97bd4abb94b73ac64180b53861d4db98b775c24fbbbf9c36d5141a559bc239de7902fd2ca32786a7b185b2e36d24dc94fe335d8c06597b40d1774d3f49c4
7
+ data.tar.gz: b1585685d2e4c1e56200750bed8654ab3a16700fd7587d1036a62d633d277e63502010001778dbf57293dac644d9157591552becbffcfdcae0744cc5681f3f88
@@ -9,13 +9,13 @@ on:
9
9
  - cron: "0 0 * * 6" # At 00:00 on Saturday
10
10
  jobs:
11
11
  test:
12
- runs-on: ubuntu-20.04
12
+ runs-on: ubuntu-22.04
13
13
  strategy:
14
14
  matrix:
15
- ruby: ["3.1", "3.0", "2.7", "2.6"]
15
+ ruby: ["3.2", "3.1", "3.0", "2.7", "2.6"]
16
16
  name: Ruby ${{ matrix.ruby }}
17
17
  steps:
18
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v3
19
19
  - uses: ruby/setup-ruby@v1
20
20
  with:
21
21
  ruby-version: ${{ matrix.ruby }}
data/CHANGELOG.md ADDED
@@ -0,0 +1,85 @@
1
+ # Changelog
2
+
3
+ ## Not yet released
4
+
5
+ ## 0.7.0 - 2023-08-04
6
+ * Expose add accessor `Client#thread` #22 by @jlaffaye
7
+ * Rewrite changelog as a Markdown
8
+
9
+ ## 0.6.1 - 2023-03-10
10
+ * Make `#open?` safe to use when `@handshake` is `nil` #20 by @cyberarm
11
+
12
+ ## 0.6.0 - 2022-09-22
13
+ * Add option `cert_store` for passing cert store to SSLSocket context #12 by @DerekStride
14
+ * Set `OpenSSL::SSL::SSLSocket#sync_close` to `true` #12 by @DerekStride
15
+
16
+ ## 0.5.1 - 2022-01-01
17
+ * Add `closed?` method to `WebSocket::Client::Simple` #8 by @fuyuton
18
+ * rescue when `OpenSSL::SSL::SSLError` raised #10 by @fuyuton
19
+
20
+ ## 0.5.0 - 2021-12-31
21
+ * Change TLS context defaults to system's default. The previous defaults were `ssl_version=SSLv23` and `verify_mode=VERIFY_NONE`, which are insecure nowadays. #5
22
+ * thank you for contributing @eagletmt
23
+ * Made the necessary changes to use SNI. #6
24
+ * thank you for contributing @fuyuton
25
+
26
+ ## 0.4.0 - 2021-12-30
27
+ * Drop support of ruby 2.5 or older versions as explicit.
28
+
29
+ ## 0.3.1 - 2021-12-30
30
+ * The development of this repository has moved to https://github.com/ruby-jp/websocket-client-simple
31
+
32
+ ## 0.3.0 - 2016-12-30
33
+ * `connect` method runs a given block before connecting WebSocket [#12](https://github.com/shokai/websocket-client-simple/issues/12)
34
+ * thank you for suggestion @codekitchen
35
+
36
+ ## 0.2.5 - 2016-02-18
37
+ * bugfixed sending when broken pipe [#15](https://github.com/shokai/websocket-client-simple/pull/15)
38
+ * add `:verify_mode` option for SSL Context [#14](https://github.com/shokai/websocket-client-simple/pull/14)
39
+ * thank you for contributing @michaelvilensky
40
+
41
+ ## 0.2.4 - 2015-11-12
42
+ * support handshake headers [#11](https://github.com/shokai/websocket-client-simple/pull/11)
43
+ * thank you for contributing @mathieugagne
44
+
45
+ ## 0.2.3 - 2015-10-26
46
+ * kill thread at end of method [#10](https://github.com/shokai/websocket-client-simple/pull/10)
47
+ * thank you for contributing @hansy
48
+
49
+ ## 0.2.2 - 2014-11-18
50
+ * bugfix socket reading
51
+
52
+ ## 0.2.0 - 2014-06-07
53
+ * SSL support with `wss://` and `https://` scheme [#6](https://github.com/shokai/websocket-client-simple/pull/6)
54
+ * thank you for contributing @mallowlabs
55
+
56
+ ## 0.1.0 - 2014-05-08
57
+ * add accessor `Client#handshake` [#5](https://github.com/shokai/websocket-client-simple/issues/5)
58
+ * bugfix socket reading
59
+
60
+ ## 0.0.9 - 2014-04-03
61
+ * emit `error` in receive thread
62
+ * rescue only `Errno::EPIPE`, not all Errors
63
+
64
+ ## 0.0.8 - 2014-01-29
65
+ * bugfix `Client#close` #4
66
+
67
+ ## 0.0.7 - 2014-01-29
68
+ * send CLOSE frame in `Client#close` [#4](https://github.com/shokai/websocket-client-simple/issues/4)
69
+ ## 0.0.6 - 2014-01-17
70
+ * add function `Client#open?`
71
+
72
+ ## 0.0.5 - 2013-03-23
73
+ * kill read thread on close
74
+
75
+ ## 0.0.4 - 2013-03-23
76
+ * fix sample and README
77
+
78
+ ## 0.0.3 - 2013-03-23
79
+ * `:type => :text` option in send
80
+
81
+ ## 0.0.2 - 2013-03-22
82
+ * remove unnecessary sleep
83
+
84
+ ## 0.0.1 - 2013-03-22
85
+ * release
@@ -11,7 +11,7 @@ module WebSocket
11
11
 
12
12
  class Client
13
13
  include EventEmitter
14
- attr_reader :url, :handshake
14
+ attr_reader :url, :handshake, :thread
15
15
 
16
16
  def connect(url, options={})
17
17
  return if @socket
@@ -97,7 +97,7 @@ module WebSocket
97
97
  end
98
98
 
99
99
  def open?
100
- @handshake.finished? and !@closed
100
+ @handshake&.finished? and !@closed
101
101
  end
102
102
 
103
103
  def closed?
@@ -1,7 +1,7 @@
1
1
  module WebSocket
2
2
  module Client
3
3
  module Simple
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
6
6
  end
7
7
  end
@@ -1,11 +1,11 @@
1
1
  require File.expand_path 'test_helper', File.dirname(__FILE__)
2
2
 
3
- class TestWebSocketClientSimple < MiniTest::Test
4
-
3
+ class TestWebSocketClientSimple < Minitest::Test
4
+
5
5
  def test_onopen
6
-
6
+
7
7
  EM::run{
8
-
8
+
9
9
  EchoServer.start
10
10
 
11
11
  res = nil
@@ -27,7 +27,7 @@ class TestWebSocketClientSimple < MiniTest::Test
27
27
  EM::stop_event_loop
28
28
  end
29
29
  }
30
-
30
+
31
31
  end
32
-
32
+
33
33
  end
@@ -1,6 +1,6 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- class TestWebSocketClientSimple < MiniTest::Test
3
+ class TestWebSocketClientSimple < Minitest::Test
4
4
 
5
5
  def test_echo
6
6
  msgs = ['foo','bar','baz']
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  if spec.respond_to?(:metadata)
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = spec.homepage
19
- spec.metadata["changelog_uri"] = "https://github.com/ruby-jp/websocket-client-simple/blob/master/History.txt"
19
+ spec.metadata["changelog_uri"] = "https://github.com/ruby-jp/websocket-client-simple/blob/master/CHANGELOG.md"
20
20
  end
21
21
 
22
22
  spec.post_install_message = "The development of this gem has moved to #{spec.homepage}."
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websocket-client-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto
8
8
  - Yusuke Nakamura
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-09-22 00:00:00.000000000 Z
12
+ date: 2023-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -119,8 +119,8 @@ extra_rdoc_files: []
119
119
  files:
120
120
  - ".github/workflows/test.yml"
121
121
  - ".gitignore"
122
+ - CHANGELOG.md
122
123
  - Gemfile
123
- - History.txt
124
124
  - LICENSE.txt
125
125
  - README.md
126
126
  - Rakefile
@@ -142,7 +142,7 @@ licenses:
142
142
  metadata:
143
143
  homepage_uri: https://github.com/ruby-jp/websocket-client-simple
144
144
  source_code_uri: https://github.com/ruby-jp/websocket-client-simple
145
- changelog_uri: https://github.com/ruby-jp/websocket-client-simple/blob/master/History.txt
145
+ changelog_uri: https://github.com/ruby-jp/websocket-client-simple/blob/master/CHANGELOG.md
146
146
  post_install_message: The development of this gem has moved to https://github.com/ruby-jp/websocket-client-simple.
147
147
  rdoc_options: []
148
148
  require_paths:
@@ -158,8 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.1.6
162
- signing_key:
161
+ rubygems_version: 3.3.7
162
+ signing_key:
163
163
  specification_version: 4
164
164
  summary: Simple WebSocket Client for Ruby
165
165
  test_files:
data/History.txt DELETED
@@ -1,103 +0,0 @@
1
- === Not yet released
2
-
3
- == 0.6.0 2022-09-22
4
-
5
- * Add option `cert_store` for passing cert store to SSLSocket context #12 by @DerekStride
6
- * Set `OpenSSL::SSL::SSLSocket#sync_close` to `true` #12 by @DerekStride
7
-
8
- === 0.5.1 2022-01-01
9
-
10
- * Add `closed?` method to `WebSocket::Client::Simple` #8 by @fuyuton
11
- * rescue when `OpenSSL::SSL::SSLError` raised #10 by @fuyuton
12
-
13
- === 0.5.0 2021-12-31
14
-
15
- * Change TLS context defaults to system's default. The previous defaults were ssl_version=SSLv23 and verify_mode=VERIFY_NONE, which are insecure nowadays. #5
16
- * thank you for contributing @eagletmt
17
- * Made the necessary changes to use SNI. #6
18
- * thank you for contributing @fuyuton
19
-
20
- === 0.4.0 2021-12-30
21
-
22
- * Drop support of ruby 2.5 or older versions as explicit.
23
-
24
- === 0.3.1 2021-12-30
25
-
26
- * The development of this repository has moved to https://github.com/ruby-jp/websocket-client-simple
27
-
28
- === 0.3.0 2016-02-20
29
-
30
- * "connect" method runs a given block before connecting WebSocket #12
31
- * thank you for suggestion @codekitchen
32
-
33
- === 0.2.5 2016-02-18
34
-
35
- * bugfixed sending when broken pipe #15
36
- * add :verify_mode option for SSL Context #14
37
- * thank you for contributing @michaelvilensky
38
-
39
- === 0.2.4 2015-11-12
40
-
41
- * support handshake headers #11
42
- * thank you for contributing @mathieugagne
43
-
44
- === 0.2.3 2015-10-26
45
-
46
- * kill thread at end of method
47
- * thank you for contributing @hansy
48
-
49
- === 0.2.2 2014-11-18
50
-
51
- * add :ssl_version option to specify version of SSL/TLS
52
- * thank you for contributing @tonybyrne
53
-
54
- === 0.2.1 2014-10-19
55
-
56
- * bugfix socket reading
57
-
58
- === 0.2.0 2014-06-07
59
-
60
- * SSL support with wss:// and https:// scheme
61
- * thank you for contributing @mallowlabs
62
-
63
- === 0.1.0 2014-05-08
64
-
65
- * add accessor Client#handshake #5
66
- * bugfix socket reading
67
-
68
- === 0.0.9 2014-04-03
69
-
70
- * emit "error" in receive thread
71
- * rescue only Errno::EPIPE, not all Errors
72
-
73
- === 0.0.8 2014-01-29
74
-
75
- * bugfix Client#close #4
76
-
77
- === 0.0.7 2014-01-29
78
-
79
- * send CLOSE frame in Client#close #4
80
-
81
- === 0.0.6 2014-01-17
82
-
83
- * add function Client#open?
84
-
85
- === 0.0.5 2013-03-23
86
-
87
- * kill read thread on close
88
-
89
- === 0.0.4 2013-03-23
90
-
91
- * fix sample and README
92
-
93
- === 0.0.3 2013-03-23
94
-
95
- * :type => :text option in send
96
-
97
- === 0.0.2 2013-03-22
98
-
99
- * remove unnecessary sleep
100
-
101
- === 0.0.1 2013-03-22
102
-
103
- * release