paho-mqtt 1.0.5 → 1.0.6
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 +5 -5
 - data/lib/paho_mqtt/handler.rb +5 -2
 - data/lib/paho_mqtt/ssl_helper.rb +1 -1
 - data/lib/paho_mqtt/subscriber.rb +2 -2
 - data/lib/paho_mqtt/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f72a4a93df7ac3c4660b9f0ee7a5c8cb68b188c60782f4fd03c63f39f30321ea
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a84a45e964b18c73b64b376e263622a84c807266ba8ff6e615cf1a587956de3a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 73b2d7de679fe898c86e031efe8fe966dc2b3428d6985a9d24a81ff166d235122643fdf74f0c5b2559b362fb47635f0d58eefeba6358c90e18f1634c3b03f547
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a6a170ebdc2b5bdfa166913b8de5284f1066c1b24cb272a72bc68fe24d2cb8beea7f820ef436ff0651fe24929f521750aea90e68964c299912459771fe256af2
         
     | 
    
        data/lib/paho_mqtt/handler.rb
    CHANGED
    
    | 
         @@ -123,7 +123,8 @@ module PahoMqtt 
     | 
|
| 
       123 
123 
     | 
    
         
             
                  max_qos = packet.return_codes
         
     | 
| 
       124 
124 
     | 
    
         
             
                  id = packet.id
         
     | 
| 
       125 
125 
     | 
    
         
             
                  topics = []
         
     | 
| 
       126 
     | 
    
         
            -
                   
     | 
| 
      
 126 
     | 
    
         
            +
                  topics = @subscriber.add_subscription(max_qos, id, topics)
         
     | 
| 
      
 127 
     | 
    
         
            +
                  unless topics.empty?
         
     | 
| 
       127 
128 
     | 
    
         
             
                    @on_suback.call(topics) unless @on_suback.nil?
         
     | 
| 
       128 
129 
     | 
    
         
             
                  end
         
     | 
| 
       129 
130 
     | 
    
         
             
                end
         
     | 
| 
         @@ -131,7 +132,9 @@ module PahoMqtt 
     | 
|
| 
       131 
132 
     | 
    
         
             
                def handle_unsuback(packet)
         
     | 
| 
       132 
133 
     | 
    
         
             
                  id = packet.id
         
     | 
| 
       133 
134 
     | 
    
         
             
                  topics = []
         
     | 
| 
       134 
     | 
    
         
            -
                   
     | 
| 
      
 135 
     | 
    
         
            +
                  topics = @subscriber.remove_subscription(id, topics)
         
     | 
| 
      
 136 
     | 
    
         
            +
                  unless topcis.empty?
         
     | 
| 
      
 137 
     | 
    
         
            +
                    puts "PAHO TOPICS: #{topics}"
         
     | 
| 
       135 
138 
     | 
    
         
             
                    @on_unsuback.call(topics) unless @on_unsuback.nil?
         
     | 
| 
       136 
139 
     | 
    
         
             
                  end
         
     | 
| 
       137 
140 
     | 
    
         
             
                end
         
     | 
    
        data/lib/paho_mqtt/ssl_helper.rb
    CHANGED
    
    | 
         @@ -23,7 +23,7 @@ module PahoMqtt 
     | 
|
| 
       23 
23 
     | 
    
         
             
                  set_cert(cert_path, ssl_context)
         
     | 
| 
       24 
24 
     | 
    
         
             
                  set_key(key_path, ssl_context)
         
     | 
| 
       25 
25 
     | 
    
         
             
                  set_root_ca(ca_path, ssl_context)
         
     | 
| 
       26 
     | 
    
         
            -
                  ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER unless ca_path.nil?
         
     | 
| 
      
 26 
     | 
    
         
            +
                  #ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER unless ca_path.nil?
         
     | 
| 
       27 
27 
     | 
    
         
             
                  ssl_context
         
     | 
| 
       28 
28 
     | 
    
         
             
                end
         
     | 
| 
       29 
29 
     | 
    
         | 
    
        data/lib/paho_mqtt/subscriber.rb
    CHANGED
    
    | 
         @@ -72,7 +72,7 @@ module PahoMqtt 
     | 
|
| 
       72 
72 
     | 
    
         
             
                  @subscribed_mutex.synchronize {
         
     | 
| 
       73 
73 
     | 
    
         
             
                    @subscribed_topics.concat(adjust_qos)
         
     | 
| 
       74 
74 
     | 
    
         
             
                  }
         
     | 
| 
       75 
     | 
    
         
            -
                   
     | 
| 
      
 75 
     | 
    
         
            +
                  return adjust_qos
         
     | 
| 
       76 
76 
     | 
    
         
             
                end
         
     | 
| 
       77 
77 
     | 
    
         | 
| 
       78 
78 
     | 
    
         
             
                def remove_subscription(packet_id, to_unsub)
         
     | 
| 
         @@ -92,7 +92,7 @@ module PahoMqtt 
     | 
|
| 
       92 
92 
     | 
    
         
             
                      @subscribed_topics.delete_if { |topic| PahoMqtt.match_filter(topic.first, filter) }
         
     | 
| 
       93 
93 
     | 
    
         
             
                    end
         
     | 
| 
       94 
94 
     | 
    
         
             
                  }
         
     | 
| 
       95 
     | 
    
         
            -
                   
     | 
| 
      
 95 
     | 
    
         
            +
                  return to_unsub
         
     | 
| 
       96 
96 
     | 
    
         
             
                end
         
     | 
| 
       97 
97 
     | 
    
         | 
| 
       98 
98 
     | 
    
         
             
                def send_subscribe(topics, new_id)
         
     | 
    
        data/lib/paho_mqtt/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: paho-mqtt
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Pierre Goudet
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-02-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       118 
118 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       119 
119 
     | 
    
         
             
            requirements: []
         
     | 
| 
       120 
120 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       121 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 121 
     | 
    
         
            +
            rubygems_version: 2.7.4
         
     | 
| 
       122 
122 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       123 
123 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       124 
124 
     | 
    
         
             
            summary: A simple mqtt client gem
         
     |