mux_tf 0.4.3 → 0.4.8
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/mux_tf.rb +1 -0
- data/lib/mux_tf/cli/current.rb +3 -1
- data/lib/mux_tf/plan_formatter.rb +10 -1
- data/lib/mux_tf/plan_summary_handler.rb +1 -0
- data/lib/mux_tf/version.rb +1 -1
- metadata +7 -7
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 9360bb62c3df497bb64e7cbbab15025e1a9f3618b74a3469db097329832f365e
         | 
| 4 | 
            +
              data.tar.gz: 646cb9832629e10c63c9a80982ce931d22fc1dd9c32f32dfc79edd9f8e864ba9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: fb7fed0568c1d001a168623a0071c469f3be6b812235f962901f63505108869dfee859f62f2ac773f444b4a128552ca487711f6d7b4ce117d0008bfa30f6b056
         | 
| 7 | 
            +
              data.tar.gz: d31b175be20f0b94d02c9bff65b27925984463b268d1dd3378a2d347e42b7f476aa1a1264b6c74c4fa03a64a3c03d39e0f0b1a6a8b318bde346ee7b5c6e3dc8c
         | 
    
        data/lib/mux_tf.rb
    CHANGED
    
    
    
        data/lib/mux_tf/cli/current.rb
    CHANGED
    
    | @@ -178,7 +178,8 @@ module MuxTf | |
| 178 178 | 
             
                      define_cmd("apply", summary: "Apply the current plan") do |_opts, _args, _cmd|
         | 
| 179 179 | 
             
                        status = tf_apply(filename: PLAN_FILENAME)
         | 
| 180 180 | 
             
                        if status.success?
         | 
| 181 | 
            -
                           | 
| 181 | 
            +
                          plan_status = run_plan
         | 
| 182 | 
            +
                          throw :stop, :done if plan_status == :ok
         | 
| 182 183 | 
             
                        else
         | 
| 183 184 | 
             
                          log "Apply Failed!"
         | 
| 184 185 | 
             
                        end
         | 
| @@ -289,6 +290,7 @@ module MuxTf | |
| 289 290 | 
             
                      when :unknown
         | 
| 290 291 | 
             
                        # nothing
         | 
| 291 292 | 
             
                      end
         | 
| 293 | 
            +
                      plan_status
         | 
| 292 294 | 
             
                    end
         | 
| 293 295 |  | 
| 294 296 | 
             
                    def run_upgrade
         | 
| @@ -16,8 +16,10 @@ module MuxTf | |
| 16 16 | 
             
                    parser = StatefulParser.new(normalizer: pastel.method(:strip))
         | 
| 17 17 | 
             
                    parser.state(:info, /^Acquiring state lock/)
         | 
| 18 18 | 
             
                    parser.state(:error, /Error locking state/, %i[none blank info])
         | 
| 19 | 
            +
                    parser.state(:refreshing, /^.+: Refreshing state... \[id=/, %i[none info])
         | 
| 19 20 | 
             
                    parser.state(:refreshing, /Refreshing Terraform state in-memory prior to plan.../, %i[none blank info])
         | 
| 20 21 | 
             
                    parser.state(:refresh_done, /^----------+$/, [:refreshing])
         | 
| 22 | 
            +
                    parser.state(:refresh_done, /^$/, [:refreshing])
         | 
| 21 23 | 
             
                    parser.state(:plan_info, /Terraform will perform the following actions:/, [:refresh_done])
         | 
| 22 24 | 
             
                    parser.state(:plan_summary, /^Plan:/, [:plan_info])
         | 
| 23 25 |  | 
| @@ -75,7 +77,7 @@ module MuxTf | |
| 75 77 | 
             
                        when :plan_summary
         | 
| 76 78 | 
             
                          log line, depth: 2
         | 
| 77 79 | 
             
                        else
         | 
| 78 | 
            -
                          p [state, line]
         | 
| 80 | 
            +
                          p [state, pastel.strip(line)]
         | 
| 79 81 | 
             
                        end
         | 
| 80 82 | 
             
                      end
         | 
| 81 83 | 
             
                    }
         | 
| @@ -124,6 +126,10 @@ module MuxTf | |
| 124 126 | 
             
                            next
         | 
| 125 127 | 
             
                          end
         | 
| 126 128 | 
             
                          case stripped_line
         | 
| 129 | 
            +
                          when /^Downloading (?<repo>[^ ]+) (?<version>[^ ]+) for (?<module>[^ ]+)\.\.\./
         | 
| 130 | 
            +
                            print "D"
         | 
| 131 | 
            +
                          when /^- (?<module>[^ ]+) in (?<path>.+)$/
         | 
| 132 | 
            +
                            print "."
         | 
| 127 133 | 
             
                          when ""
         | 
| 128 134 | 
             
                            puts
         | 
| 129 135 | 
             
                          else
         | 
| @@ -180,6 +186,9 @@ module MuxTf | |
| 180 186 | 
             
                            next
         | 
| 181 187 | 
             
                          end
         | 
| 182 188 | 
             
                          case stripped_line
         | 
| 189 | 
            +
                          when /^- Reusing previous version of (?<module>.+) from the dependency lock file$/
         | 
| 190 | 
            +
                            info = $LAST_MATCH_INFO.named_captures
         | 
| 191 | 
            +
                            log "- [FROM-LOCK] #{info["module"]}", depth: 2
         | 
| 183 192 | 
             
                          when /^- (?<module>.+) is built in to Terraform$/
         | 
| 184 193 | 
             
                            info = $LAST_MATCH_INFO.named_captures
         | 
| 185 194 | 
             
                            log "- [BUILTIN] #{info["module"]}", depth: 2
         | 
    
        data/lib/mux_tf/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: mux_tf
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.4. | 
| 4 | 
            +
              version: 0.4.8
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Piotr Banasik
         | 
| 8 | 
            -
            autorequire: | 
| 8 | 
            +
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-03-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activesupport
         | 
| @@ -122,7 +122,7 @@ dependencies: | |
| 122 122 | 
             
                - - ">="
         | 
| 123 123 | 
             
                  - !ruby/object:Gem::Version
         | 
| 124 124 | 
             
                    version: '0'
         | 
| 125 | 
            -
            description: | 
| 125 | 
            +
            description:
         | 
| 126 126 | 
             
            email:
         | 
| 127 127 | 
             
            - piotr@jane.app
         | 
| 128 128 | 
             
            executables:
         | 
| @@ -155,7 +155,7 @@ licenses: | |
| 155 155 | 
             
            metadata:
         | 
| 156 156 | 
             
              homepage_uri: https://github.com/piotrb/mux_tf
         | 
| 157 157 | 
             
              source_code_uri: https://github.com/piotrb/mux_tf
         | 
| 158 | 
            -
            post_install_message: | 
| 158 | 
            +
            post_install_message:
         | 
| 159 159 | 
             
            rdoc_options: []
         | 
| 160 160 | 
             
            require_paths:
         | 
| 161 161 | 
             
            - lib
         | 
| @@ -170,8 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 170 170 | 
             
                - !ruby/object:Gem::Version
         | 
| 171 171 | 
             
                  version: '0'
         | 
| 172 172 | 
             
            requirements: []
         | 
| 173 | 
            -
            rubygems_version: 3. | 
| 174 | 
            -
            signing_key: | 
| 173 | 
            +
            rubygems_version: 3.1.4
         | 
| 174 | 
            +
            signing_key:
         | 
| 175 175 | 
             
            specification_version: 4
         | 
| 176 176 | 
             
            summary: Terraform Multiplexing Scripts
         | 
| 177 177 | 
             
            test_files: []
         |