azure-contrib 0.0.11 → 0.0.12
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/azure-contrib/service_bus_service.rb +19 -0
- data/lib/azure-contrib/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 9418ccdef476d7c73758258da3d650175341fc1c
         | 
| 4 | 
            +
              data.tar.gz: 4434cbce0e53d937ca455db5582c164c8df6422c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 370fb0b9b9c1f9cbf36ea123cfb3a143f3fe785706fada49eeb88344223c4428bf6136fce79b5e45e60b79a91eb1f5d34d484ff2a922f6ed5884c05b7a09ce54
         | 
| 7 | 
            +
              data.tar.gz: 3e41158dd0f39a763c58e50b2f5947be18ada5c6b2b798b7f0db8e902b7ba4cc4c4e00237ccff6622559ee1fa56920f0415d22f871844ed0172b9f26f95c21d2
         | 
| @@ -0,0 +1,19 @@ | |
| 1 | 
            +
            module Azure
         | 
| 2 | 
            +
              class ServiceBusService
         | 
| 3 | 
            +
                  # TODO: This needs to be moved to the contrib lib
         | 
| 4 | 
            +
                def find_or_create_topic(name)
         | 
| 5 | 
            +
                  topic = self.list_topics.find {|topic| topic.name == name }
         | 
| 6 | 
            +
                  topic = self.create_topic(name) if topic.nil?
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                  topic
         | 
| 9 | 
            +
                end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                # TODO: This needs to be moved to the contrib lib
         | 
| 12 | 
            +
                def find_or_create_subscription(topic, name)
         | 
| 13 | 
            +
                  subscription = self.list_subscriptions(topic.name).find {|subscription| subscription.name == name }
         | 
| 14 | 
            +
                  subscription = self.create_subscription(topic.name, name) if subscription.nil?
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                  subscription
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: azure-contrib
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.12
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - David Michael
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014-07- | 
| 11 | 
            +
            date: 2014-07-31 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -109,6 +109,7 @@ files: | |
| 109 109 | 
             
            - azure-contrib.gemspec
         | 
| 110 110 | 
             
            - lib/azure-contrib.rb
         | 
| 111 111 | 
             
            - lib/azure-contrib/blob_service.rb
         | 
| 112 | 
            +
            - lib/azure-contrib/service_bus_service.rb
         | 
| 112 113 | 
             
            - lib/azure-contrib/shared_access_signature.rb
         | 
| 113 114 | 
             
            - lib/azure-contrib/version.rb
         | 
| 114 115 | 
             
            homepage: ''
         |