Merge pull request #6027 from vitorgalvao/remove_to_slashes
hbc: remove all *_to_slashes
This commit is contained in:
commit
1aaffda62f
@ -5,7 +5,6 @@ module Cask
|
|||||||
"." => :dots,
|
"." => :dots,
|
||||||
"-" => :hyphens,
|
"-" => :hyphens,
|
||||||
"_" => :underscores,
|
"_" => :underscores,
|
||||||
"/" => :slashes,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
DIVIDER_REGEX = /(#{DIVIDERS.keys.map { |v| Regexp.quote(v) }.join('|')})/.freeze
|
DIVIDER_REGEX = /(#{DIVIDERS.keys.map { |v| Regexp.quote(v) }.join('|')})/.freeze
|
||||||
|
@ -171,11 +171,6 @@ describe Cask::DSL::Version, :cask do
|
|||||||
"1.2.3_4-5" => "1_2_3_4-5"
|
"1.2.3_4-5" => "1_2_3_4-5"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#dots_to_slashes" do
|
|
||||||
include_examples "version expectations hash", :dots_to_slashes,
|
|
||||||
"1.2.3_4-5" => "1/2/3_4-5"
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "#hyphens_to_dots" do
|
describe "#hyphens_to_dots" do
|
||||||
include_examples "version expectations hash", :hyphens_to_dots,
|
include_examples "version expectations hash", :hyphens_to_dots,
|
||||||
"1.2.3_4-5" => "1.2.3_4.5"
|
"1.2.3_4-5" => "1.2.3_4.5"
|
||||||
@ -186,11 +181,6 @@ describe Cask::DSL::Version, :cask do
|
|||||||
"1.2.3_4-5" => "1.2.3_4_5"
|
"1.2.3_4-5" => "1.2.3_4_5"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#hyphens_to_slashes" do
|
|
||||||
include_examples "version expectations hash", :hyphens_to_slashes,
|
|
||||||
"1.2.3_4-5" => "1.2.3_4/5"
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "#underscores_to_dots" do
|
describe "#underscores_to_dots" do
|
||||||
include_examples "version expectations hash", :underscores_to_dots,
|
include_examples "version expectations hash", :underscores_to_dots,
|
||||||
"1.2.3_4-5" => "1.2.3.4-5"
|
"1.2.3_4-5" => "1.2.3.4-5"
|
||||||
@ -201,11 +191,6 @@ describe Cask::DSL::Version, :cask do
|
|||||||
"1.2.3_4-5" => "1.2.3-4-5"
|
"1.2.3_4-5" => "1.2.3-4-5"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#underscores_to_slashes" do
|
|
||||||
include_examples "version expectations hash", :underscores_to_slashes,
|
|
||||||
"1.2.3_4-5" => "1.2.3/4-5"
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "#no_dots" do
|
describe "#no_dots" do
|
||||||
include_examples "version expectations hash", :no_dots,
|
include_examples "version expectations hash", :no_dots,
|
||||||
"1.2.3_4-5" => "123_4-5"
|
"1.2.3_4-5" => "123_4-5"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user