Skip to content

Commit b3800ac

Browse files
authored
fix(delete-messages): fix issue with channel encoding (#137)
fix(delete-messages): fix issue with channel encoding Fix issue because of which channel hasn't been encoded properly with endpoint call.
1 parent 7dbc04d commit b3800ac

File tree

10 files changed

+79
-14
lines changed

10 files changed

+79
-14
lines changed

.pubnub.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
2-
version: "5.1.1"
2+
version: "5.1.2"
33
changelog:
4+
- date: 2022-11-23
5+
version: v5.1.2
6+
changes:
7+
- type: bug
8+
text: "Fix issue because of which channel hasn't been encoded properly with endpoint call."
49
- date: 2022-10-26
510
version: v5.1.1
611
changes:
@@ -637,7 +642,7 @@ sdks:
637642
- x86-64
638643
- distribution-type: package
639644
distribution-repository: RubyGems
640-
package-name: pubnub-5.1.1.gem
645+
package-name: pubnub-5.1.2.gem
641646
location: https://rubygems.org/gems/pubnub
642647
requires:
643648
- name: addressable
@@ -742,8 +747,8 @@ sdks:
742747
- x86-64
743748
- distribution-type: library
744749
distribution-repository: GitHub release
745-
package-name: pubnub-5.1.1.gem
746-
location: https://github.com/pubnub/ruby/releases/download/v5.1.1/pubnub-5.1.1.gem
750+
package-name: pubnub-5.1.2.gem
751+
location: https://github.com/pubnub/ruby/releases/download/v5.1.2/pubnub-5.1.2.gem
747752
requires:
748753
- name: addressable
749754
min-version: 2.0.0

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 2.7.6
1+
ruby 3.0.0

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v5.1.2
2+
November 23 2022
3+
4+
#### Fixed
5+
- Fix issue because of which channel hasn't been encoded properly with endpoint call.
6+
17
## v5.1.1
28
October 26 2022
39

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ group :test do
99
gem 'rspec-retry'
1010
gem 'rspec-expectations'
1111
gem 'rubocop'
12-
gem 'simplecov', '>= 0.12', require: false
12+
gem 'simplecov', '>= 0.21.2', require: false
1313
gem 'vcr'
1414
gem 'webmock'
1515
gem 'cucumber'

Gemfile.lock

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
pubnub (5.1.1)
4+
pubnub (5.1.2)
55
addressable (>= 2.0.0)
66
concurrent-ruby (~> 1.1.5)
77
concurrent-ruby-edge (~> 0.5.0)
@@ -61,7 +61,7 @@ GEM
6161
cucumber-messages (~> 17.0, >= 17.0.1)
6262
debug_inspector (0.0.3)
6363
diff-lcs (1.4.4)
64-
docile (1.3.2)
64+
docile (1.4.0)
6565
dry-configurable (0.11.6)
6666
concurrent-ruby (~> 1.0)
6767
dry-core (~> 0.4, >= 0.4.7)
@@ -161,10 +161,12 @@ GEM
161161
parser (>= 2.7.1.4)
162162
ruby-progressbar (1.10.1)
163163
safe_yaml (1.0.5)
164-
simplecov (0.18.5)
164+
simplecov (0.21.2)
165165
docile (~> 1.1)
166166
simplecov-html (~> 0.11)
167-
simplecov-html (0.12.2)
167+
simplecov_json_formatter (~> 0.1)
168+
simplecov-html (0.12.3)
169+
simplecov_json_formatter (0.1.4)
168170
spoon (0.0.6)
169171
ffi
170172
sys-uname (1.2.2)
@@ -194,7 +196,7 @@ DEPENDENCIES
194196
rspec-expectations
195197
rspec-retry
196198
rubocop
197-
simplecov (>= 0.12)
199+
simplecov (>= 0.21.2)
198200
vcr
199201
webmock
200202

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.1
1+
5.1.2

fixtures/vcr_cassettes/examples/delete_messages_channel_non_url_friendly_name.yml

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/pubnub/events/delete_messages.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def path
3131
'sub-key',
3232
@subscribe_key,
3333
'channel',
34-
@channel
34+
Formatter.format_channel(@channel, true)
3535
].join('/')
3636
end
3737

lib/pubnub/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Toplevel Pubnub module.
22
module Pubnub
3-
VERSION = '5.1.1'.freeze
3+
VERSION = '5.1.2'.freeze
44
end

spec/examples/delete_messages_examples_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
end
2323
end
2424

25+
it "works with channel which contains non-URL friendly characters" do
26+
VCR.use_cassette("examples/delete_messages_channel_non_url_friendly_name", record: :once) do
27+
envelope = pubnub.delete_messages(channel: 'demo@pubnub')
28+
expect(envelope.value.status[:code]).to eq 200
29+
end
30+
end
31+
2532
it "works with channel and start specified" do
2633
VCR.use_cassette("examples/delete_messages_channel_start", record: :once) do
2734
envelope = pubnub.delete_messages(channel: :demo, start: "15040071432538531")

0 commit comments

Comments
 (0)