puppetfile_editor 0.3.0 → 0.3.1
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/CHANGELOG.md +8 -0
 - data/lib/puppetfile_editor/module.rb +5 -2
 - data/lib/puppetfile_editor/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 15d075f0af7a73918a550b8b6715625d21053027
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: af35e9d77f745314e1640640bc1bfe3047a29b63
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: bd7f060fbc0721a622949db87dc395e1f8043c7cd8c9992664bf137b8a51c7139037eb45f4783deb62b8158af769ec21e61fca2d4aff923ff78c94d450de556a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d0852ba1a1311a560faa38143dd0b01bf545a03c4c6e27f08cdfece923d3df1fb3aa29f0e26fa5b065d382043b387977f6501c3561d1b0c8a24a1546a49f6872
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. 
     | 
|
| 
       4 
4 
     | 
    
         
             
            The format is based on [Keep a Changelog](http://keepachangelog.com/)
         
     | 
| 
       5 
5 
     | 
    
         
             
            and this project adheres to [Semantic Versioning](http://semver.org/).
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
      
 7 
     | 
    
         
            +
            ## [Unreleased]
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ## [0.3.1] - 2017-10-04
         
     | 
| 
      
 10 
     | 
    
         
            +
            ### Fixed
         
     | 
| 
      
 11 
     | 
    
         
            +
            - `kept at` behavior:
         
     | 
| 
      
 12 
     | 
    
         
            +
              - `changeset` is now also part of the version to be kept back (`hg`, `git` modules).
         
     | 
| 
      
 13 
     | 
    
         
            +
              - Various cases where the version should have been kept, but wasn't, have now been fixed.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       7 
15 
     | 
    
         
             
            ## [0.3.0] - 2017-09-27
         
     | 
| 
       8 
16 
     | 
    
         
             
            ### Added
         
     | 
| 
       9 
17 
     | 
    
         
             
            - Puppetfile can be instantiated using provided contents.
         
     | 
| 
         @@ -58,12 +58,14 @@ module PuppetfileEditor 
     | 
|
| 
       58 
58 
     | 
    
         
             
                def merge_with(mod, force = false)
         
     | 
| 
       59 
59 
     | 
    
         
             
                  unless mod.type == @type
         
     | 
| 
       60 
60 
     | 
    
         
             
                    set_message("type mismatch ('#{@type}' vs '#{mod.type}')", :type_mismatched)
         
     | 
| 
      
 61 
     | 
    
         
            +
                    return
         
     | 
| 
       61 
62 
     | 
    
         
             
                  end
         
     | 
| 
       62 
63 
     | 
    
         
             
                  case @type
         
     | 
| 
       63 
64 
     | 
    
         
             
                    when :hg, :git
         
     | 
| 
       64 
65 
     | 
    
         
             
                      new = mod.params.reject { |param, _| param.eql? @type }
         
     | 
| 
       65 
     | 
    
         
            -
                      if !force && new.keys == [:tag] && ( 
     | 
| 
      
 66 
     | 
    
         
            +
                      if !force && new.keys == [:tag] && (!([:branch, :ref, :changeset] & @params.keys).empty?)
         
     | 
| 
       66 
67 
     | 
    
         
             
                        set_message("kept at #{full_version}", :wont_upgrade)
         
     | 
| 
      
 68 
     | 
    
         
            +
                        return
         
     | 
| 
       67 
69 
     | 
    
         
             
                      end
         
     | 
| 
       68 
70 
     | 
    
         
             
                      if full_version == mod.full_version
         
     | 
| 
       69 
71 
     | 
    
         
             
                        set_message("versions match (#{full_version})", :matched)
         
     | 
| 
         @@ -71,13 +73,14 @@ module PuppetfileEditor 
     | 
|
| 
       71 
73 
     | 
    
         
             
                      else
         
     | 
| 
       72 
74 
     | 
    
         
             
                        set_message("updated (#{full_version} to #{mod.full_version})", :updated)
         
     | 
| 
       73 
75 
     | 
    
         
             
                      end
         
     | 
| 
       74 
     | 
    
         
            -
                      @params.delete_if { |param, _| [:branch, :tag, :ref].include? param }
         
     | 
| 
      
 76 
     | 
    
         
            +
                      @params.delete_if { |param, _| [:branch, :tag, :ref, :changeset].include? param }
         
     | 
| 
       75 
77 
     | 
    
         
             
                      @params.merge!(new)
         
     | 
| 
       76 
78 
     | 
    
         
             
                      calculate_indent
         
     | 
| 
       77 
79 
     | 
    
         
             
                    when :forge
         
     | 
| 
       78 
80 
     | 
    
         
             
                      unless force
         
     | 
| 
       79 
81 
     | 
    
         
             
                        if mod.params.nil? or mod.params.is_a? Symbol
         
     | 
| 
       80 
82 
     | 
    
         
             
                          set_message("won't upgrade to #{mod.full_version}", :wont_upgrade)
         
     | 
| 
      
 83 
     | 
    
         
            +
                          return
         
     | 
| 
       81 
84 
     | 
    
         
             
                        end
         
     | 
| 
       82 
85 
     | 
    
         
             
                      end
         
     | 
| 
       83 
86 
     | 
    
         
             
                      if full_version == mod.full_version
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: puppetfile_editor
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Eugene Piven
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-10-04 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |