Skip to content

Commit

Permalink
fix(delete-messages): fix issue with channel encoding (#137)
Browse files Browse the repository at this point in the history
fix(delete-messages): fix issue with channel encoding

Fix issue because of which channel hasn't been encoded properly with endpoint call.
  • Loading branch information
parfeon authored Nov 23, 2022
1 parent 7dbc04d commit b3800ac
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 14 deletions.
13 changes: 9 additions & 4 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
version: "5.1.1"
version: "5.1.2"
changelog:
- date: 2022-11-23
version: v5.1.2
changes:
- type: bug
text: "Fix issue because of which channel hasn't been encoded properly with endpoint call."
- date: 2022-10-26
version: v5.1.1
changes:
Expand Down Expand Up @@ -637,7 +642,7 @@ sdks:
- x86-64
- distribution-type: package
distribution-repository: RubyGems
package-name: pubnub-5.1.1.gem
package-name: pubnub-5.1.2.gem
location: https://rubygems.org/gems/pubnub
requires:
- name: addressable
Expand Down Expand Up @@ -742,8 +747,8 @@ sdks:
- x86-64
- distribution-type: library
distribution-repository: GitHub release
package-name: pubnub-5.1.1.gem
location: https://github.com/pubnub/ruby/releases/download/v5.1.1/pubnub-5.1.1.gem
package-name: pubnub-5.1.2.gem
location: https://github.com/pubnub/ruby/releases/download/v5.1.2/pubnub-5.1.2.gem
requires:
- name: addressable
min-version: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 2.7.6
ruby 3.0.0
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v5.1.2
November 23 2022

#### Fixed
- Fix issue because of which channel hasn't been encoded properly with endpoint call.

## v5.1.1
October 26 2022

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ group :test do
gem 'rspec-retry'
gem 'rspec-expectations'
gem 'rubocop'
gem 'simplecov', '>= 0.12', require: false
gem 'simplecov', '>= 0.21.2', require: false
gem 'vcr'
gem 'webmock'
gem 'cucumber'
Expand Down
12 changes: 7 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
pubnub (5.1.1)
pubnub (5.1.2)
addressable (>= 2.0.0)
concurrent-ruby (~> 1.1.5)
concurrent-ruby-edge (~> 0.5.0)
Expand Down Expand Up @@ -61,7 +61,7 @@ GEM
cucumber-messages (~> 17.0, >= 17.0.1)
debug_inspector (0.0.3)
diff-lcs (1.4.4)
docile (1.3.2)
docile (1.4.0)
dry-configurable (0.11.6)
concurrent-ruby (~> 1.0)
dry-core (~> 0.4, >= 0.4.7)
Expand Down Expand Up @@ -161,10 +161,12 @@ GEM
parser (>= 2.7.1.4)
ruby-progressbar (1.10.1)
safe_yaml (1.0.5)
simplecov (0.18.5)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
spoon (0.0.6)
ffi
sys-uname (1.2.2)
Expand Down Expand Up @@ -194,7 +196,7 @@ DEPENDENCIES
rspec-expectations
rspec-retry
rubocop
simplecov (>= 0.12)
simplecov (>= 0.21.2)
vcr
webmock

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.1
5.1.2

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/pubnub/events/delete_messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def path
'sub-key',
@subscribe_key,
'channel',
@channel
Formatter.format_channel(@channel, true)
].join('/')
end

Expand Down
2 changes: 1 addition & 1 deletion lib/pubnub/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Toplevel Pubnub module.
module Pubnub
VERSION = '5.1.1'.freeze
VERSION = '5.1.2'.freeze
end
7 changes: 7 additions & 0 deletions spec/examples/delete_messages_examples_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
end
end

it "works with channel which contains non-URL friendly characters" do
VCR.use_cassette("examples/delete_messages_channel_non_url_friendly_name", record: :once) do
envelope = pubnub.delete_messages(channel: 'demo@pubnub')
expect(envelope.value.status[:code]).to eq 200
end
end

it "works with channel and start specified" do
VCR.use_cassette("examples/delete_messages_channel_start", record: :once) do
envelope = pubnub.delete_messages(channel: :demo, start: "15040071432538531")
Expand Down

0 comments on commit b3800ac

Please sign in to comment.