From 17feb2abfc3643124151279014a1905329df339a Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 11 Jun 2020 16:40:53 -0700 Subject: [PATCH] vendor: go get github.com/apparentlymart/go-versions@v1.0.0 This new version permits omitting the space between the operator and the boundary in a ruby-style version constraint, like ">1.0.0" instead of "> 1.0.0". --- command/testdata/init-get-providers/main.tf | 5 ++++- go.mod | 2 +- go.sum | 2 ++ .../go-versions/versions/constraints/ruby_style.go | 6 +++--- vendor/modules.txt | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/command/testdata/init-get-providers/main.tf b/command/testdata/init-get-providers/main.tf index 71841670f..aa288acaa 100644 --- a/command/testdata/init-get-providers/main.tf +++ b/command/testdata/init-get-providers/main.tf @@ -7,5 +7,8 @@ provider "greater-than" { } provider "between" { - version = "> 1.0.0 , < 3.0.0" + # The second constraint here intentionally has + # no space after the < operator to make sure + # that we can parse that form too. + version = "> 1.0.0 , <3.0.0" } diff --git a/go.mod b/go.mod index bf9506ec6..dffb3696d 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/apparentlymart/go-cidr v1.0.1 github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 github.com/apparentlymart/go-userdirs v0.0.0-20190512014041-4a23807e62b9 - github.com/apparentlymart/go-versions v0.0.2-0.20180815153302-64b99f7cb171 + github.com/apparentlymart/go-versions v1.0.0 github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect github.com/armon/go-radix v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1a5f70cb9..f9cbf6e1d 100644 --- a/go.sum +++ b/go.sum @@ -83,6 +83,8 @@ github.com/apparentlymart/go-userdirs v0.0.0-20190512014041-4a23807e62b9 h1:GRMI github.com/apparentlymart/go-userdirs v0.0.0-20190512014041-4a23807e62b9/go.mod h1:7kfpUbyCdGJ9fDRCp3fopPQi5+cKNHgTE4ZuNrO71Cw= github.com/apparentlymart/go-versions v0.0.2-0.20180815153302-64b99f7cb171 h1:19Seu/H5gq3Ugtx+CGenwF89SDG3S1REX5i6PJj3RK4= github.com/apparentlymart/go-versions v0.0.2-0.20180815153302-64b99f7cb171/go.mod h1:JXY95WvQrPJQtudvNARshgWajS7jNNlM90altXIPNyI= +github.com/apparentlymart/go-versions v1.0.0 h1:4A4CekGuwDUQqc+uTXCrdb9Y98JZsML2sdfNTeVjsK4= +github.com/apparentlymart/go-versions v1.0.0/go.mod h1:YF5j7IQtrOAOnsGkniupEA5bfCjzd7i14yu0shZavyM= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= diff --git a/vendor/github.com/apparentlymart/go-versions/versions/constraints/ruby_style.go b/vendor/github.com/apparentlymart/go-versions/versions/constraints/ruby_style.go index 59b2ecd34..6e9fc354c 100644 --- a/vendor/github.com/apparentlymart/go-versions/versions/constraints/ruby_style.go +++ b/vendor/github.com/apparentlymart/go-versions/versions/constraints/ruby_style.go @@ -136,9 +136,9 @@ func parseRubyStyle(str string) (SelectionSpec, string, error) { switch raw.sep { case "": - if raw.op != "" { - return spec, remain, fmt.Errorf("a space separator is required after the operator %q", raw.op) - } + // No separator is always okay. Although all of the examples in the + // rubygems docs show a space separator, the parser doesn't actually + // require it. case " ": if raw.op == "" { return spec, remain, fmt.Errorf("extraneous spaces at start of specification") diff --git a/vendor/modules.txt b/vendor/modules.txt index 7b676af01..9a73207f7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -100,7 +100,7 @@ github.com/apparentlymart/go-userdirs/macosbase github.com/apparentlymart/go-userdirs/userdirs github.com/apparentlymart/go-userdirs/windowsbase github.com/apparentlymart/go-userdirs/xdgbase -# github.com/apparentlymart/go-versions v0.0.2-0.20180815153302-64b99f7cb171 +# github.com/apparentlymart/go-versions v1.0.0 ## explicit github.com/apparentlymart/go-versions/versions github.com/apparentlymart/go-versions/versions/constraints