escobar 0.3.12 → 0.3.13
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/escobar.rb +3 -2
- data/lib/escobar/heroku/app.rb +4 -0
- data/lib/escobar/heroku/config_vars.rb +34 -0
- data/lib/escobar/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: e71745bfcd53e7c75a54b5694813bd011d29fe29
         | 
| 4 | 
            +
              data.tar.gz: b2feb2071751806a09f9ca8b18919fc125e12b41
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 9810909eff6588fef615bcb68571aae1036ee4072804d14d86de26f8266d9dabe503f104bd3acc735f1e525d577b9c95f7e1f223a617190b8f4fdaec57242cfb
         | 
| 7 | 
            +
              data.tar.gz: 4778ac1e78dae976db05cd1b5bc2cc79dfc4460297a0543d9cea14ef1b0b7052ff7fdef3b6b3d7c54f443a2b27c855192c3c18e79feb064af2d048c6eb3d20df
         | 
    
        data/lib/escobar.rb
    CHANGED
    
    | @@ -56,7 +56,8 @@ require_relative "./escobar/heroku/app" | |
| 56 56 | 
             
            require_relative "./escobar/heroku/build"
         | 
| 57 57 | 
             
            require_relative "./escobar/heroku/build_request"
         | 
| 58 58 | 
             
            require_relative "./escobar/heroku/client"
         | 
| 59 | 
            -
            require_relative "./escobar/heroku/coupling"
         | 
| 60 59 | 
             
            require_relative "./escobar/heroku/dynos"
         | 
| 61 | 
            -
            require_relative "./escobar/heroku/pipeline"
         | 
| 62 60 | 
             
            require_relative "./escobar/heroku/release"
         | 
| 61 | 
            +
            require_relative "./escobar/heroku/coupling"
         | 
| 62 | 
            +
            require_relative "./escobar/heroku/pipeline"
         | 
| 63 | 
            +
            require_relative "./escobar/heroku/config_vars"
         | 
    
        data/lib/escobar/heroku/app.rb
    CHANGED
    
    
| @@ -0,0 +1,34 @@ | |
| 1 | 
            +
            module Escobar
         | 
| 2 | 
            +
              module Heroku
         | 
| 3 | 
            +
                # Class representing a heroku application's environment variables
         | 
| 4 | 
            +
                class ConfigVars
         | 
| 5 | 
            +
                  attr_reader :client, :app_id
         | 
| 6 | 
            +
                  def initialize(client, app_id)
         | 
| 7 | 
            +
                    @app_id = app_id
         | 
| 8 | 
            +
                    @client = client
         | 
| 9 | 
            +
                  end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  # Retrieve an environmental variable by name
         | 
| 12 | 
            +
                  def [](key)
         | 
| 13 | 
            +
                    values[key]
         | 
| 14 | 
            +
                  end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                  def values
         | 
| 17 | 
            +
                    @info ||= info
         | 
| 18 | 
            +
                  end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                  def info
         | 
| 21 | 
            +
                    if info_json["id"] == "two_factor" &&
         | 
| 22 | 
            +
                       info_json["message"].match(/second authentication factor/)
         | 
| 23 | 
            +
                      {}
         | 
| 24 | 
            +
                    else
         | 
| 25 | 
            +
                      info_json
         | 
| 26 | 
            +
                    end
         | 
| 27 | 
            +
                  end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                  def info_json
         | 
| 30 | 
            +
                    @info_json ||= client.heroku.get("/apps/#{app_id}/config-vars")
         | 
| 31 | 
            +
                  end
         | 
| 32 | 
            +
                end
         | 
| 33 | 
            +
              end
         | 
| 34 | 
            +
            end
         | 
    
        data/lib/escobar/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: escobar
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.13
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Corey Donohoe
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017-02- | 
| 11 | 
            +
            date: 2017-02-14 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: faraday
         | 
| @@ -194,6 +194,7 @@ files: | |
| 194 194 | 
             
            - lib/escobar/heroku/build.rb
         | 
| 195 195 | 
             
            - lib/escobar/heroku/build_request.rb
         | 
| 196 196 | 
             
            - lib/escobar/heroku/client.rb
         | 
| 197 | 
            +
            - lib/escobar/heroku/config_vars.rb
         | 
| 197 198 | 
             
            - lib/escobar/heroku/coupling.rb
         | 
| 198 199 | 
             
            - lib/escobar/heroku/dynos.rb
         | 
| 199 200 | 
             
            - lib/escobar/heroku/pipeline.rb
         |