Skip to content

Commit

Permalink
Merge pull request dependabot#1404 from dependabot/feelepxyz/gradle-p…
Browse files Browse the repository at this point in the history
…re-release

Gradle: Support pre-release syntax 1.0.0pr
  • Loading branch information
feelepxyz authored Sep 26, 2019
2 parents 00851be + 4b53b66 commit 86d1070
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/lib/dependabot/gradle/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Version < Gem::Version
"a" => 1, "alpha" => 1,
"b" => 2, "beta" => 2,
"m" => 3, "milestone" => 3,
"rc" => 4, "cr" => 4,
"rc" => 4, "cr" => 4, "pr" => 4,
"snapshot" => 5,
"ga" => 6, "" => 6, "final" => 6,
"sp" => 7
Expand Down
5 changes: 5 additions & 0 deletions gradle/spec/dependabot/gradle/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
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 release" do
let(:version_string) { "1.0.0" }
it { is_expected.to eq(false) }
Expand Down

0 comments on commit 86d1070

Please sign in to comment.