Skip to content

Commit

Permalink
[xcodes] fix issue where xcodes action wouldn't accept beta versions …
Browse files Browse the repository at this point in the history
…of Xcode (#21434)
  • Loading branch information
apps4everyone committed Aug 28, 2023
1 parent ff74e77 commit 65db20a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
3 changes: 0 additions & 3 deletions fastlane/lib/fastlane/helper/xcodes_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ def self.find_xcodes_binary_path
module Verify
def self.requirement(req)
UI.user_error!("Version must be specified") if req.nil? || req.to_s.strip.size == 0
Gem::Requirement.new(req.to_s)
rescue Gem::Requirement::BadRequirementError
UI.user_error!("The requirement '#{req}' is not a valid RubyGems style requirement")
end
end
end
Expand Down
10 changes: 0 additions & 10 deletions fastlane/spec/actions_specs/xcversion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
double("XcodeInstall::Xcode", version: "7.3", path: "/Test/Xcode7.3")
end

context "with an invalid requirement" do
it "raises an error" do
expect do
Fastlane::FastFile.new.parse("lane :test do
xcversion version: '= aaaa'
end").runner.execute(:test)
end.to raise_error("The requirement '= aaaa' is not a valid RubyGems style requirement")
end
end

context "with a valid requirement" do
before do
require "xcode/install"
Expand Down
16 changes: 0 additions & 16 deletions fastlane/spec/helper/xcodes_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,6 @@
expect { subject.class::Verify.requirement(argument) }.to raise_error(FastlaneCore::Interface::FastlaneError, 'Version must be specified')
end
end

context "when argument is not in RubyGems style" do
let(:argument) { "banana" }

it "raises user error" do
expect { subject.class::Verify.requirement(argument) }.to raise_error(FastlaneCore::Interface::FastlaneError, "The requirement '#{argument}' is not a valid RubyGems style requirement")
end
end

context "when argument is in RubyGems style" do
let(:argument) { "1.2.3" }

it "returns Gem::Requirement instance" do
expect(subject.class::Verify.requirement(argument)).to be_an_instance_of(Gem::Requirement)
end
end
end
end
end

0 comments on commit 65db20a

Please sign in to comment.