pubnub 4.6.2 → 5.0.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.
Potentially problematic release.
This version of pubnub might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/.github/CODEOWNERS +3 -1
 - data/.github/workflows/commands-handler.yml +27 -0
 - data/.github/workflows/release/versions.json +17 -0
 - data/.github/workflows/release.yml +58 -0
 - data/.github/workflows/run_acceptance_tests.yml +46 -0
 - data/.gitignore +18 -0
 - data/.pubnub.yml +30 -4
 - data/.travis.yml +0 -4
 - data/CHANGELOG.md +35 -8
 - data/Gemfile +2 -0
 - data/Gemfile.lock +42 -1
 - data/VERSION +1 -1
 - data/config/cucumber.yml +7 -0
 - data/features/step_definitions/access_steps.rb +258 -0
 - data/features/support/env.rb +15 -0
 - data/features/support/helper.rb +39 -0
 - data/features/support/hooks.rb +98 -0
 - data/lib/pubnub/cbor.rb +182 -0
 - data/lib/pubnub/client/events.rb +1 -1
 - data/lib/pubnub/client/getters_setters.rb +5 -0
 - data/lib/pubnub/client/paged_history.rb +144 -17
 - data/lib/pubnub/client.rb +14 -5
 - data/lib/pubnub/constants.rb +10 -7
 - data/lib/pubnub/event.rb +21 -10
 - data/lib/pubnub/events/grant_token.rb +172 -0
 - data/lib/pubnub/events/revoke_token.rb +66 -0
 - data/lib/pubnub/validators/client.rb +1 -0
 - data/lib/pubnub/validators/common_validator.rb +17 -0
 - data/lib/pubnub/validators/grant_token.rb +51 -0
 - data/lib/pubnub/validators/revoke_token.rb +31 -0
 - data/lib/pubnub/version.rb +1 -1
 - data/lib/pubnub.rb +1 -0
 - metadata +22 -4
 
| 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Toplevel Pubnub module.
         
     | 
| 
      
 2 
     | 
    
         
            +
            module Pubnub
         
     | 
| 
      
 3 
     | 
    
         
            +
              # Validator module that holds all validators modules
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Validator
         
     | 
| 
      
 5 
     | 
    
         
            +
                # Validator for Grant event
         
     | 
| 
      
 6 
     | 
    
         
            +
                module RevokeToken
         
     | 
| 
      
 7 
     | 
    
         
            +
                  include CommonValidator
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                  def validate!
         
     | 
| 
      
 10 
     | 
    
         
            +
                    validate_keys!
         
     | 
| 
      
 11 
     | 
    
         
            +
                    validate_token!
         
     | 
| 
      
 12 
     | 
    
         
            +
                  end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                  private
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                  def validate_keys!
         
     | 
| 
      
 17 
     | 
    
         
            +
                    raise(
         
     | 
| 
      
 18 
     | 
    
         
            +
                      ArgumentError.new(object: self, message: ':subscribe_key is required for revoke token event.'),
         
     | 
| 
      
 19 
     | 
    
         
            +
                      ':subscribe_key is required for grant token event.'
         
     | 
| 
      
 20 
     | 
    
         
            +
                    ) if @subscribe_key.nil? || @subscribe_key.empty?
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                  def validate_token!
         
     | 
| 
      
 24 
     | 
    
         
            +
                    raise(
         
     | 
| 
      
 25 
     | 
    
         
            +
                      ArgumentError.new(object: self, message: ':token is required for revoke token event.'),
         
     | 
| 
      
 26 
     | 
    
         
            +
                      ':token is required for revoke token event.'
         
     | 
| 
      
 27 
     | 
    
         
            +
                    ) if @token.nil? || @token.empty?
         
     | 
| 
      
 28 
     | 
    
         
            +
                  end
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/pubnub/version.rb
    CHANGED
    
    
    
        data/lib/pubnub.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pubnub
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 5.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - PubNub
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-01-13 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: addressable
         
     | 
| 
         @@ -130,6 +130,10 @@ files: 
     | 
|
| 
       130 
130 
     | 
    
         
             
            - ".bundle/config"
         
     | 
| 
       131 
131 
     | 
    
         
             
            - ".codeclimate.yml"
         
     | 
| 
       132 
132 
     | 
    
         
             
            - ".github/CODEOWNERS"
         
     | 
| 
      
 133 
     | 
    
         
            +
            - ".github/workflows/commands-handler.yml"
         
     | 
| 
      
 134 
     | 
    
         
            +
            - ".github/workflows/release.yml"
         
     | 
| 
      
 135 
     | 
    
         
            +
            - ".github/workflows/release/versions.json"
         
     | 
| 
      
 136 
     | 
    
         
            +
            - ".github/workflows/run_acceptance_tests.yml"
         
     | 
| 
       133 
137 
     | 
    
         
             
            - ".github/workflows/validate-pubnub-yml.yml"
         
     | 
| 
       134 
138 
     | 
    
         
             
            - ".github/workflows/validate-yml.js"
         
     | 
| 
       135 
139 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
         @@ -145,7 +149,12 @@ files: 
     | 
|
| 
       145 
149 
     | 
    
         
             
            - README.md
         
     | 
| 
       146 
150 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       147 
151 
     | 
    
         
             
            - VERSION
         
     | 
| 
      
 152 
     | 
    
         
            +
            - config/cucumber.yml
         
     | 
| 
       148 
153 
     | 
    
         
             
            - docs.md
         
     | 
| 
      
 154 
     | 
    
         
            +
            - features/step_definitions/access_steps.rb
         
     | 
| 
      
 155 
     | 
    
         
            +
            - features/support/env.rb
         
     | 
| 
      
 156 
     | 
    
         
            +
            - features/support/helper.rb
         
     | 
| 
      
 157 
     | 
    
         
            +
            - features/support/hooks.rb
         
     | 
| 
       149 
158 
     | 
    
         
             
            - gemfiles/celluloid_017.gemfile
         
     | 
| 
       150 
159 
     | 
    
         
             
            - gemfiles/celluloid_017.gemfile.lock
         
     | 
| 
       151 
160 
     | 
    
         
             
            - gemfiles/celluloid_018.gemfile
         
     | 
| 
         @@ -155,6 +164,7 @@ files: 
     | 
|
| 
       155 
164 
     | 
    
         
             
            - gemfiles/concurrent-ruby-1.0.5.gem
         
     | 
| 
       156 
165 
     | 
    
         
             
            - gemfiles/concurrent-ruby-edge-0.3.1.gem
         
     | 
| 
       157 
166 
     | 
    
         
             
            - lib/pubnub.rb
         
     | 
| 
      
 167 
     | 
    
         
            +
            - lib/pubnub/cbor.rb
         
     | 
| 
       158 
168 
     | 
    
         
             
            - lib/pubnub/client.rb
         
     | 
| 
       159 
169 
     | 
    
         
             
            - lib/pubnub/client/events.rb
         
     | 
| 
       160 
170 
     | 
    
         
             
            - lib/pubnub/client/getters_setters.rb
         
     | 
| 
         @@ -180,6 +190,7 @@ files: 
     | 
|
| 
       180 
190 
     | 
    
         
             
            - lib/pubnub/events/get_memberships.rb
         
     | 
| 
       181 
191 
     | 
    
         
             
            - lib/pubnub/events/get_uuid_metadata.rb
         
     | 
| 
       182 
192 
     | 
    
         
             
            - lib/pubnub/events/grant.rb
         
     | 
| 
      
 193 
     | 
    
         
            +
            - lib/pubnub/events/grant_token.rb
         
     | 
| 
       183 
194 
     | 
    
         
             
            - lib/pubnub/events/heartbeat.rb
         
     | 
| 
       184 
195 
     | 
    
         
             
            - lib/pubnub/events/here_now.rb
         
     | 
| 
       185 
196 
     | 
    
         
             
            - lib/pubnub/events/history.rb
         
     | 
| 
         @@ -195,6 +206,7 @@ files: 
     | 
|
| 
       195 
206 
     | 
    
         
             
            - lib/pubnub/events/remove_memberships.rb
         
     | 
| 
       196 
207 
     | 
    
         
             
            - lib/pubnub/events/remove_uuid_metadata.rb
         
     | 
| 
       197 
208 
     | 
    
         
             
            - lib/pubnub/events/revoke.rb
         
     | 
| 
      
 209 
     | 
    
         
            +
            - lib/pubnub/events/revoke_token.rb
         
     | 
| 
       198 
210 
     | 
    
         
             
            - lib/pubnub/events/set_channel_members.rb
         
     | 
| 
       199 
211 
     | 
    
         
             
            - lib/pubnub/events/set_channel_metadata.rb
         
     | 
| 
       200 
212 
     | 
    
         
             
            - lib/pubnub/events/set_memberships.rb
         
     | 
| 
         @@ -235,6 +247,7 @@ files: 
     | 
|
| 
       235 
247 
     | 
    
         
             
            - lib/pubnub/validators/get_memberships.rb
         
     | 
| 
       236 
248 
     | 
    
         
             
            - lib/pubnub/validators/get_uuid_metadata.rb
         
     | 
| 
       237 
249 
     | 
    
         
             
            - lib/pubnub/validators/grant.rb
         
     | 
| 
      
 250 
     | 
    
         
            +
            - lib/pubnub/validators/grant_token.rb
         
     | 
| 
       238 
251 
     | 
    
         
             
            - lib/pubnub/validators/heartbeat.rb
         
     | 
| 
       239 
252 
     | 
    
         
             
            - lib/pubnub/validators/here_now.rb
         
     | 
| 
       240 
253 
     | 
    
         
             
            - lib/pubnub/validators/history.rb
         
     | 
| 
         @@ -250,6 +263,7 @@ files: 
     | 
|
| 
       250 
263 
     | 
    
         
             
            - lib/pubnub/validators/remove_memberships.rb
         
     | 
| 
       251 
264 
     | 
    
         
             
            - lib/pubnub/validators/remove_uuid_metadata.rb
         
     | 
| 
       252 
265 
     | 
    
         
             
            - lib/pubnub/validators/revoke.rb
         
     | 
| 
      
 266 
     | 
    
         
            +
            - lib/pubnub/validators/revoke_token.rb
         
     | 
| 
       253 
267 
     | 
    
         
             
            - lib/pubnub/validators/set_channel_members.rb
         
     | 
| 
       254 
268 
     | 
    
         
             
            - lib/pubnub/validators/set_channel_metadata.rb
         
     | 
| 
       255 
269 
     | 
    
         
             
            - lib/pubnub/validators/set_memberships.rb
         
     | 
| 
         @@ -281,8 +295,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       281 
295 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       282 
296 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       283 
297 
     | 
    
         
             
            requirements: []
         
     | 
| 
       284 
     | 
    
         
            -
            rubygems_version: 3.2 
     | 
| 
      
 298 
     | 
    
         
            +
            rubygems_version: 3.1.2
         
     | 
| 
       285 
299 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       286 
300 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       287 
301 
     | 
    
         
             
            summary: PubNub Official Ruby gem.
         
     | 
| 
       288 
     | 
    
         
            -
            test_files: 
     | 
| 
      
 302 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 303 
     | 
    
         
            +
            - features/step_definitions/access_steps.rb
         
     | 
| 
      
 304 
     | 
    
         
            +
            - features/support/env.rb
         
     | 
| 
      
 305 
     | 
    
         
            +
            - features/support/helper.rb
         
     | 
| 
      
 306 
     | 
    
         
            +
            - features/support/hooks.rb
         
     |