diff --git a/gradle/lib/dependabot/gradle/version.rb b/gradle/lib/dependabot/gradle/version.rb index ad6c6d6e87..86b69808c8 100644 --- a/gradle/lib/dependabot/gradle/version.rb +++ b/gradle/lib/dependabot/gradle/version.rb @@ -21,7 +21,7 @@ class Version < Gem::Version "b" => 2, "beta" => 2, "m" => 3, "milestone" => 3, "rc" => 4, "cr" => 4, "pr" => 4, - "snapshot" => 5, + "snapshot" => 5, "dev" => 5, "ga" => 6, "" => 6, "final" => 6, "sp" => 7 }.freeze diff --git a/gradle/spec/dependabot/gradle/version_spec.rb b/gradle/spec/dependabot/gradle/version_spec.rb index 89d127af87..471e100267 100644 --- a/gradle/spec/dependabot/gradle/version_spec.rb +++ b/gradle/spec/dependabot/gradle/version_spec.rb @@ -92,6 +92,11 @@ let(:version_string) { "1.2.1-1.3.40-eap13-67" } it { is_expected.to eq(true) } end + + context "with a dev token" do + let(:version_string) { "1.2.1-dev-65" } + it { is_expected.to eq(true) } + end end describe "#<=>" do diff --git a/maven/lib/dependabot/maven/version.rb b/maven/lib/dependabot/maven/version.rb index 8c583ecceb..21f5783e77 100644 --- a/maven/lib/dependabot/maven/version.rb +++ b/maven/lib/dependabot/maven/version.rb @@ -21,8 +21,8 @@ class Version < Gem::Version "a" => 1, "alpha" => 1, "b" => 2, "beta" => 2, "m" => 3, "milestone" => 3, - "rc" => 4, "cr" => 4, - "snapshot" => 5, + "rc" => 4, "cr" => 4, "pr" => 4, + "snapshot" => 5, "dev" => 5, "ga" => 6, "" => 6, "final" => 6, "sp" => 7 }.freeze diff --git a/maven/spec/dependabot/maven/version_spec.rb b/maven/spec/dependabot/maven/version_spec.rb index 34e47dd90a..585c190834 100644 --- a/maven/spec/dependabot/maven/version_spec.rb +++ b/maven/spec/dependabot/maven/version_spec.rb @@ -92,6 +92,16 @@ let(:version_string) { "1.0.0.sp7" } it { is_expected.to eq(false) } end + + context "with a pre-release" do + let(:version_string) { "2.10.0.pr3" } + it { is_expected.to eq(true) } + end + + context "with a dev token" do + let(:version_string) { "1.2.1-dev-65" } + it { is_expected.to eq(true) } + end end describe "#<=>" do