mirror of
https://github.com/inspec/inspec
synced 2024-12-18 09:03:12 +00:00
73d46f9c49
In #1454, we welcomed a newly-revamped JUnit formatter which has a dependency on Nokogiri. Unfortunately, this had led us to problems getting InSpec included in Chef omnibus builds (see chef/chef#5937) because Chef is using Ruby 2.4.1 and the Nokogiri maintainers have not yet released a windows binary gem that supports Ruby 2.4.x. This has led to breaking builds in Chef's CI platform and would block the acceptance of chef/chef#5937. This change replaces Nokogiri use with REXML instead. While REXML can be slower than Nokogiri, it does not require native extensions and is supported on all Chef platforms. Signed-off-by: Adam Leff <adam@leff.co>
49 lines
1.4 KiB
Ruby
49 lines
1.4 KiB
Ruby
# encoding: utf-8
|
|
#
|
|
# Copyright:: Copyright 2016, Chef Software Inc.
|
|
# License:: Apache License, Version 2.0
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
require_relative '../../../lib/inspec/version.rb'
|
|
|
|
name 'inspec'
|
|
|
|
dependency 'ruby'
|
|
dependency 'rubygems'
|
|
dependency 'bundler'
|
|
dependency 'rb-readline'
|
|
dependency 'appbundler'
|
|
|
|
license :project_license
|
|
|
|
default_version "v#{Inspec::VERSION}"
|
|
|
|
source path: "#{Omnibus::Config.project_root}/../",
|
|
options: { exclude: ['omnibus'] }
|
|
|
|
build do
|
|
env = with_standard_compiler_flags(with_embedded_path)
|
|
|
|
# Remove existing built gems in case they exist in the current dir
|
|
delete "#{name}-*.gem"
|
|
|
|
# We bundle install to ensure the versions of gems we are going to
|
|
# appbundle-lock to are definitely installed
|
|
bundle 'install --without test integration tools maintenance', env: env
|
|
|
|
gem "build #{name}.gemspec", env: env
|
|
gem "install #{name}-*.gem --no-document", env: env
|
|
|
|
appbundle 'inspec', env: env
|
|
end
|