Skip to content

Commit

Permalink
App: skip arch check for .xcconfig files
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoody committed Mar 9, 2017
1 parent 79ca591 commit bb2ae00
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/run_loop/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ def skip_executable_check?(file)
lproj_asset?(file) ||
code_signing_asset?(file) ||
core_data_asset?(file) ||
font?(file)
font?(file) ||
build_artifact?(file)
end

# @!visibility private
Expand Down Expand Up @@ -371,6 +372,11 @@ def font?(file)

extension == ".ttf" || extension == ".otf"
end

# @!visibility private
def build_artifact?(file)
File.extname(file) == ".xcconfig"
end
end
end

13 changes: 12 additions & 1 deletion spec/lib/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
expect(app).to receive(:code_signing_asset?).with(path).and_return(false)
expect(app).to receive(:core_data_asset?).with(path).and_return(false)
expect(app).to receive(:font?).with(path).and_return(false)
expect(app).to receive(:build_artifact?).with(path).and_return(false)

expect(app.send(:skip_executable_check?, path)).to be_falsey
end
Expand Down Expand Up @@ -482,7 +483,7 @@
end

describe "#font?" do
it "returns trues" do
it "returns true" do
expect(app.send(:font?, "path/to/my.ttf")).to be_truthy
expect(app.send(:font?, "path/to/my.otf")).to be_truthy
end
Expand All @@ -492,6 +493,16 @@
end
end

describe "#build_artifact?" do
it "returns true for .xcconfig" do
expect(app.send(:build_artifact?, "path/to/my.xcconfig")).to be_truthy
end

it "returns false for other files" do
expect(app.send(:build_artifact?, "path/to/my.extension")).to be_falsey
end
end

it "#lipo" do
actual = app.send(:lipo)
expect(actual).to be_a_kind_of(RunLoop::Lipo)
Expand Down

0 comments on commit bb2ae00

Please sign in to comment.