lib/omnibus/config.rb in omnibus-5.4.0 vs lib/omnibus/config.rb in omnibus-5.5.0
- old
+ new
@@ -12,11 +12,11 @@
# 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 'singleton'
+require "singleton"
module Omnibus
class Config
include Cleanroom
include NullArgumentable
@@ -98,69 +98,69 @@
# - Defaults to +C:\omnibus-ruby+ on Windows
# - Defaults to +/var/cache/omnibus+ on other platforms
#
# @return [String]
default(:base_dir) do
- if Ohai['platform'] == 'windows'
- 'C:/omnibus-ruby'
+ if Ohai["platform"] == "windows"
+ "C:/omnibus-ruby"
else
- '/var/cache/omnibus'
+ "/var/cache/omnibus"
end
end
# The absolute path to the directory on the virtual machine where
# code will be cached.
#
# @return [String]
- default(:cache_dir) { File.join(base_dir, 'cache') }
+ default(:cache_dir) { File.join(base_dir, "cache") }
# The absolute path to the directory on the virtual machine where
# git caching will occur and software's will be progressively cached.
#
# @return [String]
default(:git_cache_dir) do
- File.join(base_dir, 'cache', 'git_cache')
+ File.join(base_dir, "cache", "git_cache")
end
# The absolute path to the directory on the virtual machine where
# source code will be downloaded.
#
# @return [String]
- default(:source_dir) { File.join(base_dir, 'src') }
+ default(:source_dir) { File.join(base_dir, "src") }
# The absolute path to the directory on the virtual machine where
# software will be built.
#
# @return [String]
- default(:build_dir) { File.join(base_dir, 'build') }
+ default(:build_dir) { File.join(base_dir, "build") }
# The absolute path to the directory on the virtual machine where
# packages will be constructed.
#
# @return [String]
- default(:package_dir) { File.join(base_dir, 'pkg') }
+ default(:package_dir) { File.join(base_dir, "pkg") }
# @deprecated Do not use this method.
#
# @return [String]
default(:package_tmp) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.package_tmp. This value is no longer used."
end
end
# The relative path of the directory containing {Omnibus::Project}
# DSL files. This is relative to {#project_root}.
#
# @return [String]
- default(:project_dir, 'config/projects')
+ default(:project_dir, "config/projects")
# The relative path of the directory containing {Omnibus::Software}
# DSL files. This is relative {#project_root}.
#
# @return [String]
- default(:software_dir, 'config/software')
+ default(:software_dir, "config/software")
# The root directory in which to look for {Omnibus::Project} and
# {Omnibus::Software} DSL files.
#
# @return [String]
@@ -176,52 +176,52 @@
# Package OSX pkg files inside a DMG
#
# @return [true, false]
default(:build_dmg) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.build_dmg. This value is no longer part of the " \
"config and is implied when defining a `compressor' block in the project."
end
end
# The starting x,y and ending x,y positions for the created DMG window.
#
# @return [String]
default(:dmg_window_bounds) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.dmg_window_bounds. This value is no longer part of the " \
"config and should be defined in the `compressor' block in the project."
end
end
# The starting x,y position where the .pkg file should live in the DMG
# window.
#
# @return [String]
default(:dmg_pkg_position) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.dmg_pkg_position. This value is no longer part of the " \
"config and should be defined in the `compressor' block in the project."
end
end
# Sign the pkg package.
#
# @return [true, false]
default(:sign_pkg) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.sign_pkg. This value is no longer part of the config and " \
"should be defined in the `package' block in the project."
end
end
# The identity to sign the pkg with.
#
# @return [String]
default(:signing_identity) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.signing_identity. This value is no longer part of the " \
"config and should be defined in the `package' block in the project."
end
end
@@ -235,21 +235,21 @@
# Sign the rpm package.
#
# @return [true, false]
default(:sign_rpm) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.sign_rpm. This value is no longer part of the config and " \
"should be defined in the `package' block in the project."
end
end
# The passphrase to sign the RPM with.
#
# @return [String]
default(:rpm_signing_passphrase) do
- Omnibus.logger.deprecated('Config') do
+ Omnibus.logger.deprecated("Config") do
"Config.rpm_signing_passphrase. This value is no longer part of the " \
"config and should be defined in the `package' block in the project."
end
end
@@ -292,11 +292,11 @@
# The region of the S3 bucket you want to cache software artifacts in.
# Defaults to 'us-east-1'
#
# @return [String]
default(:s3_region) do
- 'us-east-1'
+ "us-east-1"
end
# --------------------------------------------------
# @!endgroup
#
@@ -435,20 +435,20 @@
#
# /GEM_ROOT/config/software/*
#
# @return [Array<String>]
default(:software_gems) do
- ['omnibus-software']
+ ["omnibus-software"]
end
# Solaris linker mapfile to use, if needed
# see http://docs.oracle.com/cd/E23824_01/html/819-0690/chapter5-1.html
# Path is relative to the 'files' directory in your omnibus project
#
# For example:
#
- # /PATH/files/my_map_file
+ # /PATH/files/my_map_file
#
# @return [String, nil]
default(:solaris_linker_mapfile, "files/mapfiles/solaris")
# Architecture to target when building on windows. This option
@@ -458,12 +458,12 @@
# See the windows_arch_i386? software definition dsl
# methods.
#
# @return [:x86, :x64]
default(:windows_arch) do
- if Ohai['kernel']['machine'] == 'x86_64'
- Omnibus.logger.deprecated('Config') do
+ if Ohai["kernel"]["machine"] == "x86_64"
+ Omnibus.logger.deprecated("Config") do
"windows_arch is defaulting to :x86. In Omnibus 5, it will " \
"default to :x64 if the machine architecture is x86_64. " \
"If you would like to continue building 32 bit packages, please "\
"manually set windows_arch in your omnibus.rb file to :x86."
end
@@ -500,15 +500,26 @@
# explicitly in config, it will attempt to determine via Ohai in
# the builder, and failing that will default to 3
#
# @return [Integer]
default(:workers) do
- if Ohai['cpu'] && Ohai['cpu']['total']
- Ohai['cpu']['total'].to_i + 1
+ if Ohai["cpu"] && Ohai["cpu"]["total"]
+ Ohai["cpu"]["total"].to_i + 1
else
3
end
end
+
+ # Fail the build or warn when build encounters a licensing warning.
+ #
+ # @return [true, false]
+ default(:fatal_licensing_warnings, false)
+
+ # Fail the build or warn when build encounters a transitive dependency
+ # licensing warning.
+ #
+ # @return [true, false]
+ default(:fatal_transitive_dependency_licensing_warnings, false)
# --------------------------------------------------
# @!endgroup
#