dependabot-terraform 0.221.0 → 0.223.0
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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f32719a4c6d6c1d5861998b0a6bb7174906ef8c0d7c921e0fb2bf6554ebe7c12
         | 
| 4 | 
            +
              data.tar.gz: 8cca6f8e43aa766ce636b924d68ff063786aa20f049fab003671f3a7dd75bc4f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 36987323b03b92c1249cfb4d326ae750a7fe2fdccb681f7ff934228224d821c1c47eb863913f9b4e9035e330092317d0bdec0aa752b11662338abcae380e0c72
         | 
| 7 | 
            +
              data.tar.gz: d3b8803c5347aae404699f60a9faa7044f49eface32945d7a728c5cc09b26aa813d4b02ad29ce5ec35fd42c0fb9039a04e743b5fa62d002d9719b964254b5dde
         | 
| @@ -68,7 +68,11 @@ module Dependabot | |
| 68 68 | 
             
                      modules.each do |details|
         | 
| 69 69 | 
             
                        next unless details["source"]
         | 
| 70 70 |  | 
| 71 | 
            -
                         | 
| 71 | 
            +
                        source = source_from(details)
         | 
| 72 | 
            +
                        # Cannot update nil (interpolation sources) or local path modules, skip
         | 
| 73 | 
            +
                        next if source.nil? || source[:type] == "path"
         | 
| 74 | 
            +
             | 
| 75 | 
            +
                        dependency_set << build_terragrunt_dependency(file, source)
         | 
| 72 76 | 
             
                      end
         | 
| 73 77 | 
             
                    end
         | 
| 74 78 | 
             
                  end
         | 
| @@ -141,15 +145,8 @@ module Dependabot | |
| 141 145 | 
             
                    details.is_a?(String)
         | 
| 142 146 | 
             
                  end
         | 
| 143 147 |  | 
| 144 | 
            -
                  def build_terragrunt_dependency(file,  | 
| 145 | 
            -
                     | 
| 146 | 
            -
                    dep_name =
         | 
| 147 | 
            -
                      if Source.from_url(source[:url])
         | 
| 148 | 
            -
                        Source.from_url(source[:url]).repo
         | 
| 149 | 
            -
                      else
         | 
| 150 | 
            -
                        source[:url]
         | 
| 151 | 
            -
                      end
         | 
| 152 | 
            -
             | 
| 148 | 
            +
                  def build_terragrunt_dependency(file, source)
         | 
| 149 | 
            +
                    dep_name = Source.from_url(source[:url]) ? Source.from_url(source[:url]).repo : source[:url]
         | 
| 153 150 | 
             
                    version = version_from_ref(source[:ref])
         | 
| 154 151 |  | 
| 155 152 | 
             
                    Dependency.new(
         | 
| @@ -178,6 +175,8 @@ module Dependabot | |
| 178 175 | 
             
                        git_source_details_from(bare_source)
         | 
| 179 176 | 
             
                      when :registry
         | 
| 180 177 | 
             
                        registry_source_details_from(bare_source)
         | 
| 178 | 
            +
                      when :interpolation
         | 
| 179 | 
            +
                        return nil
         | 
| 181 180 | 
             
                      end
         | 
| 182 181 |  | 
| 183 182 | 
             
                    source_details[:proxy_url] = raw_source if raw_source != bare_source
         | 
| @@ -261,6 +260,7 @@ module Dependabot | |
| 261 260 |  | 
| 262 261 | 
             
                  # rubocop:disable Metrics/PerceivedComplexity
         | 
| 263 262 | 
             
                  def source_type(source_string)
         | 
| 263 | 
            +
                    return :interpolation if source_string.include?("${")
         | 
| 264 264 | 
             
                    return :path if source_string.start_with?(".")
         | 
| 265 265 | 
             
                    return :github if source_string.start_with?("github.com/")
         | 
| 266 266 | 
             
                    return :bitbucket if source_string.start_with?("bitbucket.org/")
         | 
| @@ -21,13 +21,7 @@ module Dependabot | |
| 21 21 | 
             
                  end
         | 
| 22 22 |  | 
| 23 23 | 
             
                  def new_source_type
         | 
| 24 | 
            -
                     | 
| 25 | 
            -
                      dependency.requirements.map { |r| r.fetch(:source) }.uniq.compact
         | 
| 26 | 
            -
             | 
| 27 | 
            -
                    return "default" if sources.empty?
         | 
| 28 | 
            -
                    raise "Multiple sources! #{sources.join(', ')}" if sources.count > 1
         | 
| 29 | 
            -
             | 
| 30 | 
            -
                    sources.first[:type] || sources.first.fetch("type")
         | 
| 24 | 
            +
                    dependency.source_type
         | 
| 31 25 | 
             
                  end
         | 
| 32 26 |  | 
| 33 27 | 
             
                  def find_source_from_git_url
         | 
| @@ -11,7 +11,7 @@ module Dependabot | |
| 11 11 | 
             
                  # optional 'v' prefix to release tag names, which Terraform supports.
         | 
| 12 12 | 
             
                  # https://www.terraform.io/docs/registry/modules/publish.html#requirements
         | 
| 13 13 | 
             
                  OPERATORS = OPS.keys.map { |key| Regexp.quote(key) }.join("|").freeze
         | 
| 14 | 
            -
                  PATTERN_RAW = "\\s*(#{OPERATORS})?\\s*v?(#{Gem::Version::VERSION_PATTERN})\\s*"
         | 
| 14 | 
            +
                  PATTERN_RAW = "\\s*(#{OPERATORS})?\\s*v?(#{Gem::Version::VERSION_PATTERN})\\s*".freeze
         | 
| 15 15 | 
             
                  PATTERN = /\A#{PATTERN_RAW}\z/
         | 
| 16 16 |  | 
| 17 17 | 
             
                  def self.parse(obj)
         | 
| @@ -169,11 +169,7 @@ module Dependabot | |
| 169 169 | 
             
                  end
         | 
| 170 170 |  | 
| 171 171 | 
             
                  def dependency_source_details
         | 
| 172 | 
            -
                     | 
| 173 | 
            -
             | 
| 174 | 
            -
                    raise "Multiple sources! #{sources.join(', ')}" if sources.count > 1
         | 
| 175 | 
            -
             | 
| 176 | 
            -
                    sources.first
         | 
| 172 | 
            +
                    dependency.source_details(allowed_types: ELIGIBLE_SOURCE_TYPES)
         | 
| 177 173 | 
             
                  end
         | 
| 178 174 |  | 
| 179 175 | 
             
                  def git_dependency?
         | 
| @@ -189,13 +185,6 @@ module Dependabot | |
| 189 185 | 
             
                        raise_on_ignored: raise_on_ignored
         | 
| 190 186 | 
             
                      )
         | 
| 191 187 | 
             
                  end
         | 
| 192 | 
            -
             | 
| 193 | 
            -
                  def eligible_sources_from(requirements)
         | 
| 194 | 
            -
                    requirements.
         | 
| 195 | 
            -
                      map { |r| r.fetch(:source) }.
         | 
| 196 | 
            -
                      select { |source| ELIGIBLE_SOURCE_TYPES.include?(source[:type].to_s) }.
         | 
| 197 | 
            -
                      uniq.compact
         | 
| 198 | 
            -
                  end
         | 
| 199 188 | 
             
                end
         | 
| 200 189 | 
             
              end
         | 
| 201 190 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: dependabot-terraform
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.223.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Dependabot
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-07- | 
| 11 | 
            +
            date: 2023-07-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: dependabot-common
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - '='
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 0. | 
| 19 | 
            +
                    version: 0.223.0
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - '='
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 0. | 
| 26 | 
            +
                    version: 0.223.0
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: debug
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -203,7 +203,7 @@ licenses: | |
| 203 203 | 
             
            - Nonstandard
         | 
| 204 204 | 
             
            metadata:
         | 
| 205 205 | 
             
              bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
         | 
| 206 | 
            -
              changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0. | 
| 206 | 
            +
              changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.223.0
         | 
| 207 207 | 
             
            post_install_message: 
         | 
| 208 208 | 
             
            rdoc_options: []
         | 
| 209 209 | 
             
            require_paths:
         |