omnibus 5.4.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -3
- data/CHANGELOG.md +21 -0
- data/Gemfile +8 -5
- data/README.md +3 -1
- data/Rakefile +20 -13
- data/appveyor.yml +4 -3
- data/bin/omnibus +3 -3
- data/features/commands/manifest.feature +19 -5
- data/features/step_definitions/generator_steps.rb +5 -6
- data/features/support/env.rb +4 -4
- data/lib/omnibus/build_version.rb +14 -14
- data/lib/omnibus/build_version_dsl.rb +3 -3
- data/lib/omnibus/builder.rb +50 -61
- data/lib/omnibus/changelog.rb +2 -2
- data/lib/omnibus/changelog_printer.rb +4 -4
- data/lib/omnibus/cleaner.rb +4 -4
- data/lib/omnibus/cli/base.rb +15 -15
- data/lib/omnibus/cli/cache.rb +13 -13
- data/lib/omnibus/cli/changelog.rb +8 -9
- data/lib/omnibus/cli/publish.rb +12 -13
- data/lib/omnibus/cli.rb +26 -27
- data/lib/omnibus/compressor.rb +6 -6
- data/lib/omnibus/compressors/base.rb +7 -2
- data/lib/omnibus/compressors/dmg.rb +12 -12
- data/lib/omnibus/compressors/null.rb +1 -1
- data/lib/omnibus/compressors/tgz.rb +8 -8
- data/lib/omnibus/config.rb +37 -26
- data/lib/omnibus/core_extensions/open_uri.rb +3 -3
- data/lib/omnibus/core_extensions.rb +1 -1
- data/lib/omnibus/digestable.rb +5 -4
- data/lib/omnibus/download_helpers.rb +7 -6
- data/lib/omnibus/exceptions.rb +29 -13
- data/lib/omnibus/fetcher.rb +0 -1
- data/lib/omnibus/fetchers/git_fetcher.rb +7 -7
- data/lib/omnibus/fetchers/net_fetcher.rb +19 -19
- data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
- data/lib/omnibus/file_syncer.rb +3 -3
- data/lib/omnibus/generator.rb +60 -47
- data/lib/omnibus/git_cache.rb +33 -22
- data/lib/omnibus/git_repository.rb +5 -5
- data/lib/omnibus/health_check.rb +122 -119
- data/lib/omnibus/instrumentation.rb +1 -1
- data/lib/omnibus/licensing.rb +348 -60
- data/lib/omnibus/logger.rb +12 -9
- data/lib/omnibus/logging.rb +1 -1
- data/lib/omnibus/manifest.rb +4 -4
- data/lib/omnibus/manifest_diff.rb +6 -7
- data/lib/omnibus/manifest_entry.rb +1 -1
- data/lib/omnibus/metadata.rb +36 -36
- data/lib/omnibus/ohai.rb +6 -7
- data/lib/omnibus/package.rb +1 -1
- data/lib/omnibus/packager.rb +37 -28
- data/lib/omnibus/packagers/appx.rb +86 -0
- data/lib/omnibus/packagers/base.rb +21 -18
- data/lib/omnibus/packagers/bff.rb +22 -24
- data/lib/omnibus/packagers/deb.rb +20 -20
- data/lib/omnibus/packagers/ips.rb +18 -17
- data/lib/omnibus/packagers/makeself.rb +7 -7
- data/lib/omnibus/packagers/msi.rb +38 -193
- data/lib/omnibus/packagers/pkg.rb +16 -16
- data/lib/omnibus/packagers/rpm.rb +53 -54
- data/lib/omnibus/packagers/solaris.rb +14 -14
- data/lib/omnibus/packagers/windows_base.rb +192 -0
- data/lib/omnibus/project.rb +45 -43
- data/lib/omnibus/publisher.rb +3 -3
- data/lib/omnibus/publishers/artifactory_publisher.rb +39 -39
- data/lib/omnibus/publishers/s3_publisher.rb +7 -7
- data/lib/omnibus/reports.rb +10 -10
- data/lib/omnibus/s3_cache.rb +7 -7
- data/lib/omnibus/s3_helpers.rb +8 -7
- data/lib/omnibus/semantic_version.rb +1 -1
- data/lib/omnibus/software.rb +131 -81
- data/lib/omnibus/sugarable.rb +10 -10
- data/lib/omnibus/templating.rb +5 -5
- data/lib/omnibus/thread_pool.rb +1 -1
- data/lib/omnibus/util.rb +5 -5
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus.rb +65 -65
- data/omnibus.gemspec +34 -32
- data/resources/appx/AppxManifest.xml.erb +18 -0
- data/resources/appx/assets/clear.png +0 -0
- data/spec/fixtures/licensing/license_scout/snoopy/ruby_bundler-bundler-audit-0.5.0-COPYING.txt +674 -0
- data/spec/fixtures/licensing/license_scout/snoopy/ruby_bundler-inifile-3.0.0-README.md +215 -0
- data/spec/fixtures/licensing/license_scout/snoopy/snoopy-dependency-licenses.json +24 -0
- data/spec/fixtures/licensing/license_scout/zlib/ruby_bundler-inifile-3.0.0-README.md +215 -0
- data/spec/fixtures/licensing/license_scout/zlib/ruby_bundler-mime-types-3.1-Licence.rdoc +25 -0
- data/spec/fixtures/licensing/license_scout/zlib/ruby_bundler-mini_portile2-2.1.0-LICENSE.txt +20 -0
- data/spec/fixtures/licensing/license_scout/zlib/zlib-dependency-licenses.json +32 -0
- data/spec/functional/builder_spec.rb +149 -150
- data/spec/functional/fetchers/git_fetcher_spec.rb +69 -71
- data/spec/functional/fetchers/net_fetcher_spec.rb +79 -79
- data/spec/functional/fetchers/path_fetcher_spec.rb +19 -20
- data/spec/functional/file_syncer_spec.rb +74 -74
- data/spec/functional/licensing_spec.rb +344 -35
- data/spec/functional/templating_spec.rb +17 -17
- data/spec/spec_helper.rb +20 -20
- data/spec/support/examples.rb +21 -15
- data/spec/support/file_helpers.rb +1 -1
- data/spec/support/git_helpers.rb +37 -37
- data/spec/support/matchers.rb +3 -3
- data/spec/support/ohai_helpers.rb +4 -4
- data/spec/support/path_helpers.rb +2 -2
- data/spec/support/shell_helpers.rb +2 -2
- data/spec/unit/build_version_dsl_spec.rb +5 -5
- data/spec/unit/build_version_spec.rb +63 -63
- data/spec/unit/builder_spec.rb +86 -70
- data/spec/unit/changelog_spec.rb +4 -4
- data/spec/unit/changelogprinter_spec.rb +130 -0
- data/spec/unit/cleanroom_spec.rb +11 -11
- data/spec/unit/compressor_spec.rb +16 -16
- data/spec/unit/compressors/base_spec.rb +6 -6
- data/spec/unit/compressors/dmg_spec.rb +76 -76
- data/spec/unit/compressors/null_spec.rb +4 -4
- data/spec/unit/compressors/tgz_spec.rb +20 -20
- data/spec/unit/config_spec.rb +44 -43
- data/spec/unit/digestable_spec.rb +13 -13
- data/spec/unit/fetcher_spec.rb +11 -12
- data/spec/unit/fetchers/git_fetcher_spec.rb +31 -31
- data/spec/unit/fetchers/net_fetcher_spec.rb +172 -173
- data/spec/unit/fetchers/path_fetcher_spec.rb +18 -18
- data/spec/unit/generator_spec.rb +38 -38
- data/spec/unit/git_cache_spec.rb +56 -54
- data/spec/unit/git_repository_spec.rb +2 -2
- data/spec/unit/health_check_spec.rb +40 -40
- data/spec/unit/library_spec.rb +35 -35
- data/spec/unit/manifest_diff_spec.rb +10 -11
- data/spec/unit/manifest_spec.rb +17 -17
- data/spec/unit/metadata_spec.rb +152 -152
- data/spec/unit/ohai_spec.rb +5 -5
- data/spec/unit/omnibus_spec.rb +31 -31
- data/spec/unit/package_spec.rb +20 -20
- data/spec/unit/packager_spec.rb +48 -42
- data/spec/unit/packagers/appx_spec.rb +165 -0
- data/spec/unit/packagers/base_spec.rb +34 -34
- data/spec/unit/packagers/bff_spec.rb +60 -60
- data/spec/unit/packagers/deb_spec.rb +71 -71
- data/spec/unit/packagers/ips_spec.rb +45 -45
- data/spec/unit/packagers/makeself_spec.rb +22 -22
- data/spec/unit/packagers/msi_spec.rb +141 -147
- data/spec/unit/packagers/pkg_spec.rb +59 -60
- data/spec/unit/packagers/rpm_spec.rb +125 -126
- data/spec/unit/packagers/solaris_spec.rb +52 -52
- data/spec/unit/project_spec.rb +137 -135
- data/spec/unit/publisher_spec.rb +70 -70
- data/spec/unit/publishers/artifactory_publisher_spec.rb +85 -85
- data/spec/unit/publishers/s3_publisher_spec.rb +36 -36
- data/spec/unit/s3_cacher_spec.rb +34 -34
- data/spec/unit/s3_helpers_spec.rb +6 -6
- data/spec/unit/semantic_version_spec.rb +2 -2
- data/spec/unit/software_spec.rb +346 -384
- data/spec/unit/sugarable_spec.rb +10 -10
- data/spec/unit/util_spec.rb +60 -60
- metadata +54 -6
- data/.rubocop.yml +0 -48
data/lib/omnibus.rb
CHANGED
@@ -14,13 +14,13 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
-
require
|
17
|
+
require "omnibus/core_extensions"
|
18
18
|
|
19
|
-
require
|
20
|
-
require
|
19
|
+
require "cleanroom"
|
20
|
+
require "pathname"
|
21
21
|
|
22
|
-
require
|
23
|
-
require
|
22
|
+
require "omnibus/exceptions"
|
23
|
+
require "omnibus/version"
|
24
24
|
|
25
25
|
module Omnibus
|
26
26
|
#
|
@@ -28,64 +28,64 @@ module Omnibus
|
|
28
28
|
#
|
29
29
|
# @return [String]
|
30
30
|
#
|
31
|
-
DEFAULT_CONFIG =
|
32
|
-
|
33
|
-
autoload :Builder,
|
34
|
-
autoload :BuildVersion,
|
35
|
-
autoload :BuildVersionDSL,
|
36
|
-
autoload :Cleaner,
|
37
|
-
autoload :Compressor,
|
38
|
-
autoload :Config,
|
39
|
-
autoload :Digestable,
|
40
|
-
autoload :Error,
|
41
|
-
autoload :Fetcher,
|
42
|
-
autoload :FileSyncer,
|
43
|
-
autoload :Generator,
|
44
|
-
autoload :GitCache,
|
45
|
-
autoload :HealthCheck,
|
46
|
-
autoload :Instrumentation,
|
47
|
-
autoload :Library,
|
48
|
-
autoload :Logger,
|
49
|
-
autoload :Logging,
|
50
|
-
autoload :Metadata,
|
51
|
-
autoload :NullArgumentable,
|
52
|
-
autoload :Ohai,
|
53
|
-
autoload :Package,
|
54
|
-
autoload :Packager,
|
55
|
-
autoload :Project,
|
56
|
-
autoload :Publisher,
|
57
|
-
autoload :Reports,
|
58
|
-
autoload :S3Cache,
|
59
|
-
autoload :Software,
|
60
|
-
autoload :Sugarable,
|
61
|
-
autoload :Templating,
|
62
|
-
autoload :ThreadPool,
|
63
|
-
autoload :Util,
|
64
|
-
autoload :Licensing,
|
65
|
-
|
66
|
-
autoload :GitFetcher,
|
67
|
-
autoload :NetFetcher,
|
68
|
-
autoload :NullFetcher,
|
69
|
-
autoload :PathFetcher,
|
70
|
-
|
71
|
-
autoload :ArtifactoryPublisher,
|
72
|
-
autoload :NullPublisher,
|
73
|
-
autoload :S3Publisher,
|
74
|
-
|
75
|
-
autoload :Manifest,
|
76
|
-
autoload :ManifestEntry,
|
77
|
-
autoload :ManifestDiff,
|
78
|
-
|
79
|
-
autoload :ChangeLog,
|
80
|
-
autoload :GitRepository,
|
81
|
-
|
82
|
-
autoload :SemanticVersion,
|
31
|
+
DEFAULT_CONFIG = "omnibus.rb".freeze
|
32
|
+
|
33
|
+
autoload :Builder, "omnibus/builder"
|
34
|
+
autoload :BuildVersion, "omnibus/build_version"
|
35
|
+
autoload :BuildVersionDSL, "omnibus/build_version_dsl"
|
36
|
+
autoload :Cleaner, "omnibus/cleaner"
|
37
|
+
autoload :Compressor, "omnibus/compressor"
|
38
|
+
autoload :Config, "omnibus/config"
|
39
|
+
autoload :Digestable, "omnibus/digestable"
|
40
|
+
autoload :Error, "omnibus/exceptions"
|
41
|
+
autoload :Fetcher, "omnibus/fetcher"
|
42
|
+
autoload :FileSyncer, "omnibus/file_syncer"
|
43
|
+
autoload :Generator, "omnibus/generator"
|
44
|
+
autoload :GitCache, "omnibus/git_cache"
|
45
|
+
autoload :HealthCheck, "omnibus/health_check"
|
46
|
+
autoload :Instrumentation, "omnibus/instrumentation"
|
47
|
+
autoload :Library, "omnibus/library"
|
48
|
+
autoload :Logger, "omnibus/logger"
|
49
|
+
autoload :Logging, "omnibus/logging"
|
50
|
+
autoload :Metadata, "omnibus/metadata"
|
51
|
+
autoload :NullArgumentable, "omnibus/null_argumentable"
|
52
|
+
autoload :Ohai, "omnibus/ohai"
|
53
|
+
autoload :Package, "omnibus/package"
|
54
|
+
autoload :Packager, "omnibus/packager"
|
55
|
+
autoload :Project, "omnibus/project"
|
56
|
+
autoload :Publisher, "omnibus/publisher"
|
57
|
+
autoload :Reports, "omnibus/reports"
|
58
|
+
autoload :S3Cache, "omnibus/s3_cache"
|
59
|
+
autoload :Software, "omnibus/software"
|
60
|
+
autoload :Sugarable, "omnibus/sugarable"
|
61
|
+
autoload :Templating, "omnibus/templating"
|
62
|
+
autoload :ThreadPool, "omnibus/thread_pool"
|
63
|
+
autoload :Util, "omnibus/util"
|
64
|
+
autoload :Licensing, "omnibus/licensing"
|
65
|
+
|
66
|
+
autoload :GitFetcher, "omnibus/fetchers/git_fetcher"
|
67
|
+
autoload :NetFetcher, "omnibus/fetchers/net_fetcher"
|
68
|
+
autoload :NullFetcher, "omnibus/fetchers/null_fetcher"
|
69
|
+
autoload :PathFetcher, "omnibus/fetchers/path_fetcher"
|
70
|
+
|
71
|
+
autoload :ArtifactoryPublisher, "omnibus/publishers/artifactory_publisher"
|
72
|
+
autoload :NullPublisher, "omnibus/publishers/null_publisher"
|
73
|
+
autoload :S3Publisher, "omnibus/publishers/s3_publisher"
|
74
|
+
|
75
|
+
autoload :Manifest, "omnibus/manifest"
|
76
|
+
autoload :ManifestEntry, "omnibus/manifest_entry"
|
77
|
+
autoload :ManifestDiff, "omnibus/manifest_diff"
|
78
|
+
|
79
|
+
autoload :ChangeLog, "omnibus/changelog"
|
80
|
+
autoload :GitRepository, "omnibus/git_repository"
|
81
|
+
|
82
|
+
autoload :SemanticVersion, "omnibus/semantic_version"
|
83
83
|
|
84
84
|
module Command
|
85
|
-
autoload :Base,
|
86
|
-
autoload :Cache,
|
87
|
-
autoload :Publish,
|
88
|
-
autoload :ChangeLog,
|
85
|
+
autoload :Base, "omnibus/cli/base"
|
86
|
+
autoload :Cache, "omnibus/cli/cache"
|
87
|
+
autoload :Publish, "omnibus/cli/publish"
|
88
|
+
autoload :ChangeLog, "omnibus/cli/changelog"
|
89
89
|
end
|
90
90
|
|
91
91
|
class << self
|
@@ -169,8 +169,8 @@ module Omnibus
|
|
169
169
|
def which(executable)
|
170
170
|
if File.file?(executable) && File.executable?(executable)
|
171
171
|
executable
|
172
|
-
elsif ENV[
|
173
|
-
path = ENV[
|
172
|
+
elsif ENV["PATH"]
|
173
|
+
path = ENV["PATH"].split(File::PATH_SEPARATOR).find do |path|
|
174
174
|
File.executable?(File.join(path, executable))
|
175
175
|
end
|
176
176
|
|
@@ -207,7 +207,7 @@ module Omnibus
|
|
207
207
|
# @return [Pathname]
|
208
208
|
#
|
209
209
|
def source_root
|
210
|
-
@source_root ||= Pathname.new(File.expand_path(
|
210
|
+
@source_root ||= Pathname.new(File.expand_path("../..", __FILE__))
|
211
211
|
end
|
212
212
|
|
213
213
|
#
|
@@ -278,7 +278,7 @@ module Omnibus
|
|
278
278
|
def basename_map(paths)
|
279
279
|
paths.inject({}) do |hash, directory|
|
280
280
|
Dir.glob("#{directory}/*.rb").each do |path|
|
281
|
-
name = File.basename(path,
|
281
|
+
name = File.basename(path, ".rb")
|
282
282
|
hash[name] ||= path
|
283
283
|
end
|
284
284
|
|
data/omnibus.gemspec
CHANGED
@@ -1,48 +1,50 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "omnibus/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
|
-
gem.name =
|
7
|
+
gem.name = "omnibus"
|
8
8
|
gem.version = Omnibus::VERSION
|
9
|
-
gem.license =
|
10
|
-
gem.author =
|
11
|
-
gem.email =
|
12
|
-
gem.summary =
|
9
|
+
gem.license = "Apache 2.0"
|
10
|
+
gem.author = "Chef Software, Inc."
|
11
|
+
gem.email = "releng@getchef.com"
|
12
|
+
gem.summary = "Omnibus is a framework for building self-installing, full-stack software builds."
|
13
13
|
gem.description = gem.summary
|
14
|
-
gem.homepage =
|
14
|
+
gem.homepage = "https://github.com/opscode/omnibus"
|
15
15
|
|
16
|
-
gem.required_ruby_version =
|
16
|
+
gem.required_ruby_version = ">= 2.1"
|
17
17
|
|
18
18
|
gem.files = `git ls-files`.split($/)
|
19
|
-
gem.bindir =
|
20
|
-
gem.executables = %w
|
19
|
+
gem.bindir = "bin"
|
20
|
+
gem.executables = %w{omnibus}
|
21
21
|
gem.test_files = gem.files.grep(/^(test|spec|features)\//)
|
22
|
-
gem.require_paths = [
|
22
|
+
gem.require_paths = ["lib"]
|
23
23
|
|
24
24
|
# https://github.com/ksubrama/pedump, branch 'patch-1'
|
25
25
|
# is declared in the Gemfile because of its outdated
|
26
26
|
# dependency on multipart-post (~> 1.1.4)
|
27
|
-
gem.add_dependency
|
28
|
-
gem.add_dependency
|
29
|
-
gem.add_dependency
|
30
|
-
gem.add_dependency
|
31
|
-
gem.add_dependency
|
32
|
-
gem.add_dependency
|
33
|
-
gem.add_dependency
|
34
|
-
gem.add_dependency
|
35
|
-
gem.add_dependency "ffi-yajl",
|
27
|
+
gem.add_dependency "chef-sugar", "~> 3.3"
|
28
|
+
gem.add_dependency "cleanroom", "~> 1.0"
|
29
|
+
gem.add_dependency "mixlib-shellout", "~> 2.0"
|
30
|
+
gem.add_dependency "mixlib-versioning"
|
31
|
+
gem.add_dependency "ohai", "~> 8.0"
|
32
|
+
gem.add_dependency "ruby-progressbar", "~> 1.7"
|
33
|
+
gem.add_dependency "aws-sdk", "~> 2"
|
34
|
+
gem.add_dependency "thor", "~> 0.18"
|
35
|
+
gem.add_dependency "ffi-yajl", "~> 2.2"
|
36
|
+
gem.add_dependency "license_scout"
|
36
37
|
|
37
|
-
gem.add_development_dependency
|
38
|
-
gem.add_development_dependency
|
39
|
-
gem.add_development_dependency
|
40
|
-
gem.add_development_dependency
|
41
|
-
gem.add_development_dependency
|
42
|
-
gem.add_development_dependency
|
43
|
-
gem.add_development_dependency
|
44
|
-
gem.add_development_dependency
|
45
|
-
gem.add_development_dependency
|
46
|
-
gem.add_development_dependency
|
47
|
-
gem.add_development_dependency
|
38
|
+
gem.add_development_dependency "bundler"
|
39
|
+
gem.add_development_dependency "artifactory", "~> 2.0"
|
40
|
+
gem.add_development_dependency "aruba", "~> 0.5"
|
41
|
+
gem.add_development_dependency "chefstyle", "~> 0.3"
|
42
|
+
gem.add_development_dependency "fauxhai", "~> 3.2"
|
43
|
+
gem.add_development_dependency "rspec", "~> 3.0"
|
44
|
+
gem.add_development_dependency "rspec-json_expectations"
|
45
|
+
gem.add_development_dependency "rspec-its"
|
46
|
+
gem.add_development_dependency "webmock"
|
47
|
+
gem.add_development_dependency "rake"
|
48
|
+
gem.add_development_dependency "appbundler"
|
49
|
+
gem.add_development_dependency "pry"
|
48
50
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
|
3
|
+
<Identity Name="<%= name %>"
|
4
|
+
Version="<%= version %>"
|
5
|
+
Publisher="<%= certificate_subject %>" />
|
6
|
+
<Properties>
|
7
|
+
<DisplayName><%= friendly_name %></DisplayName>
|
8
|
+
<PublisherDisplayName><%= maintainer.encode(:xml => :attr) %></PublisherDisplayName>
|
9
|
+
<Logo>clear.png</Logo>
|
10
|
+
</Properties>
|
11
|
+
<Prerequisites>
|
12
|
+
<OSMinVersion>6.3</OSMinVersion>
|
13
|
+
<OSMaxVersionTested>99.99</OSMaxVersionTested>
|
14
|
+
</Prerequisites>
|
15
|
+
<Resources>
|
16
|
+
<Resource Language="en-us" />
|
17
|
+
</Resources>
|
18
|
+
</Package>
|
Binary file
|