istox 0.1.70 → 0.1.71
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 +4 -4
 - data/lib/istox/helpers/publisher.rb +13 -2
 - data/lib/istox/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 69033a8f25d30221966588ac8e9fd5fc434248a0d6df329d1875bc8386e21883
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6411cc37f7fb8306edc7ebda4d9592db1fc7a1263f194eb89085074e718dcbb0
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 78f2d321f16219dcb434dd635561fdc8c58ed517ae28d424b51131a92dc7951a9324f1bf60f96e6aea1f581da6dbd27cd9e570ab0784e236a69327a7d8affe34
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c8b75fd04794cfe8ea2b44db2e402c9aea81260f98900d05ab74e81ceb52c8d9bbaa9c36fbd957ea97b3fc9d337c095e1b7c2eeeb3e92fed6c58434e2ecf554f
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Istox
         
     | 
| 
       2 
2 
     | 
    
         
             
              class Publisher
         
     | 
| 
       3 
3 
     | 
    
         
             
                class << self
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
       5 
5 
     | 
    
         
             
                  def initialize!(amqp_config_path)
         
     | 
| 
       6 
6 
     | 
    
         
             
                    @@amqp_config_path = amqp_config_path
         
     | 
| 
       7 
7 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -17,6 +17,17 @@ module Istox 
     | 
|
| 
       17 
17 
     | 
    
         
             
                    end
         
     | 
| 
       18 
18 
     | 
    
         
             
                  end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
      
 20 
     | 
    
         
            +
                  def publish_to_fanout(exchange, routing_key, message)
         
     | 
| 
      
 21 
     | 
    
         
            +
                    Rails.logger.info 'Before publish retrieve data..'
         
     | 
| 
      
 22 
     | 
    
         
            +
                    durable = data.fetch('publish')[exchange]['durable']
         
     | 
| 
      
 23 
     | 
    
         
            +
                    Rails.logger.info "Publishing message: #{message} with exchange: #{exchange} routing key: #{routing_key}"
         
     | 
| 
      
 24 
     | 
    
         
            +
                    enqueue do
         
     | 
| 
      
 25 
     | 
    
         
            +
                      $channel
         
     | 
| 
      
 26 
     | 
    
         
            +
                        .fanout(exchange, durable: durable)
         
     | 
| 
      
 27 
     | 
    
         
            +
                        .publish(message.to_json, routing_key: routing_key, durable: durable)
         
     | 
| 
      
 28 
     | 
    
         
            +
                    end
         
     | 
| 
      
 29 
     | 
    
         
            +
                  end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
       20 
31 
     | 
    
         
             
                  private
         
     | 
| 
       21 
32 
     | 
    
         | 
| 
       22 
33 
     | 
    
         
             
                  def enqueue
         
     | 
| 
         @@ -33,4 +44,4 @@ module Istox 
     | 
|
| 
       33 
44 
     | 
    
         
             
                  end
         
     | 
| 
       34 
45 
     | 
    
         
             
                end
         
     | 
| 
       35 
46 
     | 
    
         
             
              end
         
     | 
| 
       36 
     | 
    
         
            -
            end
         
     | 
| 
      
 47 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/istox/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: istox
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.71
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Siong Leng
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2019-08- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2019-08-19 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bunny
         
     | 
| 
         @@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       316 
316 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       317 
317 
     | 
    
         
             
            requirements: []
         
     | 
| 
       318 
318 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       319 
     | 
    
         
            -
            rubygems_version: 2.7. 
     | 
| 
      
 319 
     | 
    
         
            +
            rubygems_version: 2.7.8
         
     | 
| 
       320 
320 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       321 
321 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       322 
322 
     | 
    
         
             
            summary: istox backend shared gem
         
     |