omnibus 3.2.2 → 4.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +140 -10
- data/CHANGELOG.md +181 -8
- data/README.md +63 -35
- data/Rakefile +1 -1
- data/docs/omnibus-build-cache.md b/data/docs/Build → Cache.md +0 -0
- data/docs/Building on Debian.md +59 -0
- data/docs/Building on OSX.md +61 -35
- data/docs/Building on RHEL.md +74 -0
- data/docs/Building on Windows.md +40 -81
- data/features/commands/build.feature +1 -2
- data/features/commands/clean.feature +1 -1
- data/lib/omnibus.rb +111 -204
- data/lib/omnibus/build_version.rb +3 -20
- data/lib/omnibus/build_version_dsl.rb +2 -3
- data/lib/omnibus/builder.rb +103 -211
- data/lib/omnibus/cleaner.rb +5 -7
- data/lib/omnibus/cli.rb +1 -4
- data/lib/omnibus/cli/base.rb +9 -16
- data/lib/omnibus/compressor.rb +60 -0
- data/{spec/data/complicated/config/software/version-manifest.rb → lib/omnibus/compressors/base.rb} +17 -12
- data/lib/omnibus/compressors/dmg.rb +312 -0
- data/lib/omnibus/{null_builder.rb → compressors/null.rb} +10 -4
- data/lib/omnibus/compressors/tgz.rb +141 -0
- data/lib/omnibus/config.rb +89 -83
- data/lib/omnibus/core_extensions.rb +1 -0
- data/lib/omnibus/core_extensions/open_uri.rb +58 -0
- data/lib/omnibus/digestable.rb +9 -3
- data/lib/omnibus/exceptions.rb +116 -175
- data/lib/omnibus/fetcher.rb +97 -138
- data/lib/omnibus/fetchers/git_fetcher.rb +130 -165
- data/lib/omnibus/fetchers/net_fetcher.rb +205 -164
- data/lib/omnibus/fetchers/{s3_cache_fetcher.rb → null_fetcher.rb} +27 -17
- data/lib/omnibus/fetchers/path_fetcher.rb +74 -32
- data/lib/omnibus/file_syncer.rb +149 -0
- data/lib/omnibus/generator.rb +103 -32
- data/lib/omnibus/generator_files/.kitchen.yml.erb +5 -1
- data/lib/omnibus/generator_files/Gemfile.erb +13 -7
- data/lib/omnibus/generator_files/config/projects/project.rb.erb +28 -0
- data/lib/omnibus/generator_files/config/software/zlib.rb.erb +55 -0
- data/lib/omnibus/generator_files/omnibus.rb.erb +5 -7
- data/lib/omnibus/git_cache.rb +11 -13
- data/lib/omnibus/logger.rb +76 -22
- data/lib/omnibus/logging.rb +1 -1
- data/lib/omnibus/metadata.rb +264 -0
- data/lib/omnibus/ohai.rb +0 -51
- data/lib/omnibus/package.rb +4 -228
- data/lib/omnibus/packager.rb +71 -0
- data/lib/omnibus/packagers/base.rb +118 -176
- data/lib/omnibus/packagers/bff.rb +136 -0
- data/lib/omnibus/packagers/deb.rb +389 -0
- data/lib/omnibus/packagers/makeself.rb +114 -0
- data/lib/omnibus/packagers/msi.rb +346 -0
- data/lib/omnibus/packagers/pkg.rb +278 -0
- data/lib/omnibus/packagers/rpm.rb +438 -0
- data/lib/omnibus/packagers/solaris.rb +110 -0
- data/lib/omnibus/project.rb +263 -666
- data/lib/omnibus/publisher.rb +3 -3
- data/lib/omnibus/s3_cache.rb +21 -30
- data/lib/omnibus/software.rb +132 -271
- data/lib/omnibus/templating.rb +66 -0
- data/lib/omnibus/thread_pool.rb +109 -0
- data/lib/omnibus/util.rb +137 -15
- data/lib/omnibus/version.rb +1 -1
- data/omnibus.gemspec +2 -2
- data/resources/bff/gen.template.erb +22 -0
- data/resources/bff/postinstall.sh +0 -0
- data/resources/bff/unpostinstall.sh +0 -0
- data/resources/deb/conffiles.erb +3 -0
- data/resources/deb/control.erb +25 -0
- data/resources/deb/md5sums.erb +3 -0
- data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/background.png +0 -0
- data/resources/dmg/create_dmg.osascript.erb +17 -0
- data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/icon.png +0 -0
- data/{bin → resources/makeself}/makeself-header.sh +0 -0
- data/{bin → resources/makeself}/makeself.sh +0 -0
- data/{lib/omnibus/generator_files/package_scripts/makeselfinst.erb → resources/makeself/post_extract.sh.erb} +4 -4
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/LICENSE.rtf +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/banner_background.bmp +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/dialog_background.bmp +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project.ico +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_16x16.ico +0 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_32x32.ico +0 -0
- data/{spec/fixtures/sample/files/windows_msi/Resources/localization-en-us.wxl → resources/msi/localization-en-us.wxl.erb} +3 -4
- data/resources/msi/parameters.wxi.erb +9 -0
- data/{lib/omnibus/generator_files/windows_msi → resources/msi}/source.wxs.erb +14 -15
- data/{lib/omnibus/generator_files/mac_pkg → resources/pkg}/background.png +0 -0
- data/resources/pkg/distribution.xml.erb +21 -0
- data/resources/pkg/license.html.erb +3 -0
- data/resources/pkg/welcome.html.erb +7 -0
- data/resources/rpm/rpmmacros.erb +3 -0
- data/resources/rpm/signing.erb +40 -0
- data/resources/rpm/spec.erb +70 -0
- data/spec/functional/builder_spec.rb +90 -111
- data/spec/functional/fetchers/git_fetcher_spec.rb +130 -0
- data/spec/functional/fetchers/net_fetcher_spec.rb +110 -0
- data/spec/functional/fetchers/path_fetcher_spec.rb +97 -0
- data/spec/functional/file_syncer_spec.rb +206 -0
- data/spec/functional/templating_spec.rb +73 -0
- data/spec/spec_helper.rb +31 -94
- data/spec/support/env_helpers.rb +20 -0
- data/spec/support/examples.rb +56 -0
- data/spec/support/file_helpers.rb +46 -0
- data/spec/support/git_helpers.rb +107 -0
- data/spec/support/logging_helpers.rb +33 -0
- data/spec/support/matchers.rb +36 -0
- data/spec/support/ohai_helpers.rb +22 -0
- data/spec/support/path_helpers.rb +19 -0
- data/spec/support/shell_helpers.rb +14 -0
- data/spec/unit/build_version_dsl_spec.rb +0 -17
- data/spec/unit/build_version_spec.rb +1 -19
- data/spec/unit/builder_spec.rb +158 -46
- data/spec/unit/compressor_spec.rb +45 -0
- data/spec/unit/compressors/base_spec.rb +26 -0
- data/spec/unit/compressors/dmg_spec.rb +291 -0
- data/spec/unit/compressors/null_spec.rb +23 -0
- data/spec/unit/compressors/tgz_spec.rb +67 -0
- data/spec/unit/config_spec.rb +27 -34
- data/spec/unit/digestable_spec.rb +4 -4
- data/spec/unit/fetchers/git_fetcher_spec.rb +110 -39
- data/spec/unit/fetchers/net_fetcher_spec.rb +182 -72
- data/spec/unit/fetchers/path_fetcher_spec.rb +111 -0
- data/spec/unit/generator_spec.rb +137 -0
- data/spec/unit/git_cache_spec.rb +24 -34
- data/spec/unit/library_spec.rb +21 -82
- data/spec/unit/metadata_spec.rb +207 -0
- data/spec/unit/ohai_spec.rb +0 -7
- data/spec/unit/omnibus_spec.rb +41 -36
- data/spec/unit/package_spec.rb +1 -216
- data/spec/unit/packagers/base_spec.rb +76 -190
- data/spec/unit/packagers/bff_spec.rb +160 -0
- data/spec/unit/packagers/deb_spec.rb +324 -0
- data/spec/unit/packagers/makeself_spec.rb +80 -0
- data/spec/unit/packagers/msi_spec.rb +267 -0
- data/spec/unit/packagers/pkg_spec.rb +219 -0
- data/spec/unit/packagers/rpm_spec.rb +328 -0
- data/spec/unit/project_spec.rb +217 -80
- data/spec/unit/publisher_spec.rb +6 -2
- data/spec/unit/publishers/artifactory_publisher_spec.rb +1 -1
- data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
- data/spec/unit/s3_cacher_spec.rb +22 -5
- data/spec/unit/software_spec.rb +89 -232
- data/spec/unit/util_spec.rb +188 -0
- metadata +159 -402
- data/features/commands/_deprecated.feature +0 -84
- data/lib/omnibus/cleanroom.rb +0 -141
- data/lib/omnibus/cli/deprecated.rb +0 -132
- data/lib/omnibus/generator_files/mac_pkg/license.html.erb +0 -1
- data/lib/omnibus/generator_files/mac_pkg/welcome.html.erb +0 -9
- data/lib/omnibus/generator_files/project.rb.erb +0 -20
- data/lib/omnibus/generator_files/software/c-example.rb.erb +0 -42
- data/lib/omnibus/generator_files/software/erlang-example.rb.erb +0 -38
- data/lib/omnibus/generator_files/software/ruby-example.rb.erb +0 -24
- data/lib/omnibus/generator_files/windows_msi/localization-en-us.wxl.erb +0 -20
- data/lib/omnibus/generator_files/windows_msi/parameters.wxi.erb +0 -9
- data/lib/omnibus/packagers/mac_dmg.rb +0 -235
- data/lib/omnibus/packagers/mac_pkg.rb +0 -176
- data/lib/omnibus/packagers/windows_msi.rb +0 -109
- data/spec/data/complicated/config/patches/bzip2/makefile_take_env_vars.patch +0 -15
- data/spec/data/complicated/config/patches/couchdb/patch_for_couchjs_stack.patch +0 -19
- data/spec/data/complicated/config/patches/gd/gd-2.0.33-configure-libpng.patch +0 -100
- data/spec/data/complicated/config/patches/keepalived/keepalived-1.2.9_opscode_centos_5.patch +0 -15
- data/spec/data/complicated/config/patches/libedit/freebsd-vi-fix.patch +0 -24
- data/spec/data/complicated/config/patches/libiconv/libiconv-1.14_srclib_stdio.in.h-remove-gets-declarations.patch +0 -29
- data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-makefile-dest-fix.patch +0 -35
- data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-malloc-fix.patch +0 -13
- data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch +0 -1035
- data/spec/data/complicated/config/patches/logrotate/logrotate_basedir_override.patch +0 -12
- data/spec/data/complicated/config/patches/ncurses/ncurses-5.9-solaris-xopen_source_extended-detection.patch +0 -11
- data/spec/data/complicated/config/patches/ncurses/ncurses-clang.patch +0 -42
- data/spec/data/complicated/config/patches/ncurses/patch-aa +0 -23
- data/spec/data/complicated/config/patches/ncurses/patch-ab +0 -44
- data/spec/data/complicated/config/patches/ncurses/patch-ac +0 -40
- data/spec/data/complicated/config/patches/ncurses/patch-ad +0 -12
- data/spec/data/complicated/config/patches/ncurses/patch-aix-configure +0 -23
- data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesf.h +0 -22
- data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesm.h +0 -22
- data/spec/data/complicated/config/patches/nrpe/fix_for_runit.patch +0 -64
- data/spec/data/complicated/config/patches/openssl/openssl-1.0.1f-do-not-build-docs.patch +0 -101
- data/spec/data/complicated/config/patches/postgresql/postgresql-9.1.2-configure-ncurses-fix.patch +0 -12
- data/spec/data/complicated/config/patches/ruby/patch-configure +0 -103
- data/spec/data/complicated/config/patches/ruby/ruby-aix-configure.patch +0 -10
- data/spec/data/complicated/config/patches/ruby/ruby-openssl-1.0.1c.patch +0 -42
- data/spec/data/complicated/config/patches/ruby/ruby_aix_1_9_3_448_ssl_EAGAIN.patch +0 -57
- data/spec/data/complicated/config/patches/ruby/rvm-cflags.patch +0 -27
- data/spec/data/complicated/config/projects/angrychef.rb +0 -32
- data/spec/data/complicated/config/projects/chef-windows.rb +0 -32
- data/spec/data/complicated/config/projects/chef.rb +0 -32
- data/spec/data/complicated/config/projects/chefdk-windows.rb +0 -41
- data/spec/data/complicated/config/projects/chefdk.rb +0 -44
- data/spec/data/complicated/config/software/appbundler.rb +0 -25
- data/spec/data/complicated/config/software/autoconf.rb +0 -35
- data/spec/data/complicated/config/software/automake.rb +0 -39
- data/spec/data/complicated/config/software/berkshelf.rb +0 -44
- data/spec/data/complicated/config/software/bundler.rb +0 -25
- data/spec/data/complicated/config/software/bzip2.rb +0 -46
- data/spec/data/complicated/config/software/cacerts.rb +0 -44
- data/spec/data/complicated/config/software/chef-client-msi.rb +0 -87
- data/spec/data/complicated/config/software/chef-gem.rb +0 -26
- data/spec/data/complicated/config/software/chef-vault.rb +0 -43
- data/spec/data/complicated/config/software/chef-windows.rb +0 -158
- data/spec/data/complicated/config/software/chef.rb +0 -170
- data/spec/data/complicated/config/software/chefdk.rb +0 -103
- data/spec/data/complicated/config/software/couchdb.rb +0 -53
- data/spec/data/complicated/config/software/curl.rb +0 -48
- data/spec/data/complicated/config/software/erlang.rb +0 -65
- data/spec/data/complicated/config/software/expat.rb +0 -21
- data/spec/data/complicated/config/software/fcgi.rb +0 -56
- data/spec/data/complicated/config/software/fcgiwrap.rb +0 -41
- data/spec/data/complicated/config/software/gd.rb +0 -56
- data/spec/data/complicated/config/software/gdbm.rb +0 -40
- data/spec/data/complicated/config/software/gecode.rb +0 -48
- data/spec/data/complicated/config/software/git.rb +0 -40
- data/spec/data/complicated/config/software/help2man.rb +0 -30
- data/spec/data/complicated/config/software/icu.rb +0 -40
- data/spec/data/complicated/config/software/jre.rb +0 -48
- data/spec/data/complicated/config/software/keepalived.rb +0 -43
- data/spec/data/complicated/config/software/libarchive.rb +0 -50
- data/spec/data/complicated/config/software/libedit.rb +0 -69
- data/spec/data/complicated/config/software/libffi.rb +0 -71
- data/spec/data/complicated/config/software/libgcc.rb +0 -39
- data/spec/data/complicated/config/software/libiconv.rb +0 -55
- data/spec/data/complicated/config/software/libjpeg.rb +0 -39
- data/spec/data/complicated/config/software/libpng.rb +0 -38
- data/spec/data/complicated/config/software/libtool.rb +0 -52
- data/spec/data/complicated/config/software/libwrap.rb +0 -50
- data/spec/data/complicated/config/software/libxml2.rb +0 -51
- data/spec/data/complicated/config/software/libxslt.rb +0 -52
- data/spec/data/complicated/config/software/libyaml-windows.rb +0 -43
- data/spec/data/complicated/config/software/libyaml.rb +0 -62
- data/spec/data/complicated/config/software/logrotate.rb +0 -41
- data/spec/data/complicated/config/software/makedepend.rb +0 -73
- data/spec/data/complicated/config/software/mysql2.rb +0 -42
- data/spec/data/complicated/config/software/nagios-plugins.rb +0 -53
- data/spec/data/complicated/config/software/nagios.rb +0 -66
- data/spec/data/complicated/config/software/ncurses.rb +0 -149
- data/spec/data/complicated/config/software/nginx.rb +0 -40
- data/spec/data/complicated/config/software/nodejs.rb +0 -44
- data/spec/data/complicated/config/software/nokogiri.rb +0 -55
- data/spec/data/complicated/config/software/nrpe.rb +0 -61
- data/spec/data/complicated/config/software/ohai.rb +0 -64
- data/spec/data/complicated/config/software/omnibus-ctl.rb +0 -34
- data/spec/data/complicated/config/software/openresty.rb +0 -67
- data/spec/data/complicated/config/software/openssl.rb +0 -158
- data/spec/data/complicated/config/software/pcre.rb +0 -42
- data/spec/data/complicated/config/software/perl-extutils-embed.rb +0 -15
- data/spec/data/complicated/config/software/perl-extutils-makemaker.rb +0 -15
- data/spec/data/complicated/config/software/perl.rb +0 -48
- data/spec/data/complicated/config/software/perl_pg_driver.rb +0 -12
- data/spec/data/complicated/config/software/php.rb +0 -41
- data/spec/data/complicated/config/software/pip.rb +0 -30
- data/spec/data/complicated/config/software/pkg-config.rb +0 -66
- data/spec/data/complicated/config/software/popt.rb +0 -47
- data/spec/data/complicated/config/software/postgresql.rb +0 -51
- data/spec/data/complicated/config/software/preparation.rb +0 -30
- data/spec/data/complicated/config/software/pygments.rb +0 -25
- data/spec/data/complicated/config/software/python.rb +0 -49
- data/spec/data/complicated/config/software/rabbitmq.rb +0 -36
- data/spec/data/complicated/config/software/rebar.rb +0 -36
- data/spec/data/complicated/config/software/redis.rb +0 -33
- data/spec/data/complicated/config/software/rsync.rb +0 -48
- data/spec/data/complicated/config/software/ruby-windows-devkit.rb +0 -30
- data/spec/data/complicated/config/software/ruby-windows.rb +0 -30
- data/spec/data/complicated/config/software/ruby.rb +0 -162
- data/spec/data/complicated/config/software/rubygems-customization.rb +0 -57
- data/spec/data/complicated/config/software/rubygems.rb +0 -37
- data/spec/data/complicated/config/software/runit.rb +0 -118
- data/spec/data/complicated/config/software/server-jre.rb +0 -46
- data/spec/data/complicated/config/software/setuptools.rb +0 -30
- data/spec/data/complicated/config/software/spawn-fcgi.rb +0 -40
- data/spec/data/complicated/config/software/sphinx.rb +0 -26
- data/spec/data/complicated/config/software/spidermonkey.rb +0 -60
- data/spec/data/complicated/config/software/sqitch.rb +0 -24
- data/spec/data/complicated/config/software/test-kitchen.rb +0 -39
- data/spec/data/complicated/config/software/unicorn.rb +0 -27
- data/spec/data/complicated/config/software/util-macros.rb +0 -46
- data/spec/data/complicated/config/software/xproto.rb +0 -46
- data/spec/data/complicated/config/software/yajl.rb +0 -30
- data/spec/data/complicated/config/software/zlib.rb +0 -67
- data/spec/data/overrides/bad_line.overrides +0 -3
- data/spec/data/overrides/good.overrides +0 -5
- data/spec/data/overrides/with_dupes.overrides +0 -4
- data/spec/data/projects/chefdk.rb +0 -41
- data/spec/data/projects/sample.rb +0 -13
- data/spec/data/software/erchef.rb +0 -42
- data/spec/data/software/zlib.rb +0 -67
- data/spec/fixtures/sample/files/mac_dmg/Resources/background.png +0 -0
- data/spec/fixtures/sample/files/mac_dmg/Resources/icon.png +0 -0
- data/spec/fixtures/sample/files/mac_pkg/Resources/background.png +0 -0
- data/spec/fixtures/sample/files/mac_pkg/Resources/license.html +0 -1
- data/spec/fixtures/sample/files/mac_pkg/Resources/welcome.html +0 -9
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/LICENSE.rtf +0 -8
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/banner_background.bmp +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/dialog_background.bmp +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/project.ico +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_16x16.ico +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_32x32.ico +0 -0
- data/spec/fixtures/sample/files/windows_msi/Resources/parameters.wxi.erb +0 -9
- data/spec/fixtures/sample/files/windows_msi/Resources/source.wxs +0 -74
- data/spec/integration/packagers/mac_spec.rb +0 -58
- data/spec/integration/packagers/windows_spec.rb +0 -70
- data/spec/unit/packagers/mac_pkg_spec.rb +0 -151
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
tell application "Finder"
|
2
|
+
tell disk "<%= volume_name %>"
|
3
|
+
open
|
4
|
+
set current view of container window to icon view
|
5
|
+
set toolbar visible of container window to false
|
6
|
+
set statusbar visible of container window to false
|
7
|
+
set the bounds of container window to {<%= window_bounds %>}
|
8
|
+
set theViewOptions to the icon view options of container window
|
9
|
+
set arrangement of theViewOptions to not arranged
|
10
|
+
set icon size of theViewOptions to 72
|
11
|
+
set background picture of theViewOptions to file ".support:background.png"
|
12
|
+
delay 5
|
13
|
+
set position of item "<%= pkg_name %>" of container window to {<%= pkg_position %>}
|
14
|
+
update without registering applications
|
15
|
+
delay 5
|
16
|
+
end tell
|
17
|
+
end tell
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
#
|
3
|
-
#
|
3
|
+
# Installs <%= friendly_name %>
|
4
4
|
#
|
5
5
|
|
6
6
|
PROGNAME=`basename $0`
|
7
7
|
INSTALLER_DIR=`dirname $0`
|
8
|
-
DEST_DIR=<%=
|
9
|
-
CONFIG_DIR=/etc/<%=
|
8
|
+
DEST_DIR=<%= install_dir %>
|
9
|
+
CONFIG_DIR=/etc/<%= name %>
|
10
10
|
USAGE="usage: $0"
|
11
11
|
|
12
12
|
error_exit()
|
@@ -22,6 +22,6 @@ cp -R $INSTALLER_DIR $DEST_DIR || error_exit "Cannot install to $DEST_DIR"
|
|
22
22
|
rm -f $DEST_DIR/$PROGNAME
|
23
23
|
|
24
24
|
# You may want to symlink your packages bin files into /usr/bin
|
25
|
-
# ln -sf $DEST_DIR/bin/<%=
|
25
|
+
# ln -sf $DEST_DIR/bin/<%= name %> /usr/bin || error_exit "Cannot link <%= name %> to /usr/bin"
|
26
26
|
|
27
27
|
exit 0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
3
|
-
<!-- http://wix.codeplex.com/SourceControl/changeset/view/792e101c5cf7#src%2fext%2fUIExtension%2fwixlib%2fWixUI_en-us.wxl -->
|
4
3
|
<String Id="LANG">1033</String>
|
5
|
-
<String Id="ProductName"
|
6
|
-
<String Id="ManufacturerName"
|
4
|
+
<String Id="ProductName"><%= friendly_name %></String>
|
5
|
+
<String Id="ManufacturerName"><%= maintainer %></String>
|
7
6
|
<String Id="WelcomeDlgTitle">{\WixUI_Font_Bigger}Welcome to the [ProductName] Setup Wizard</String>
|
8
7
|
|
9
8
|
<String Id="LicenseAgreementDlgTitle">{\WixUI_Font_Title_White}End-User License Agreement</String>
|
@@ -16,5 +15,5 @@
|
|
16
15
|
|
17
16
|
<String Id="VerifyReadyDlgInstallTitle">{\WixUI_Font_Title_White}Ready to install [ProductName]</String>
|
18
17
|
|
19
|
-
<String Id="FeatureMainName"
|
18
|
+
<String Id="FeatureMainName"><%= friendly_name %></String>
|
20
19
|
</WixLocalization>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Include>
|
3
|
+
<?define VersionNumber="<%= version %>" ?>
|
4
|
+
<?define DisplayVersionNumber="<%= display_version %>" ?>
|
5
|
+
<?define UpgradeCode="<%= upgrade_code %>" ?>
|
6
|
+
<% parameters.each do |key, value| -%>
|
7
|
+
<?define <%= key %>="<%= value %>" ?>
|
8
|
+
<% end -%>
|
9
|
+
</Include>
|
@@ -15,15 +15,14 @@
|
|
15
15
|
Define the minimum supported installer version (2.0).
|
16
16
|
The install should be done for the whole machine not just the current user
|
17
17
|
-->
|
18
|
-
<Package InstallerVersion="200" InstallPrivileges="elevated"
|
19
|
-
Compressed="yes" InstallScope="perMachine" />
|
18
|
+
<Package InstallerVersion="200" InstallPrivileges="elevated" Compressed="yes" InstallScope="perMachine" />
|
20
19
|
|
21
20
|
<Media Id="1" Cabinet="Project.cab" EmbedCab="yes" CompressionLevel="high" />
|
22
21
|
|
23
22
|
<!-- Major upgrade -->
|
24
23
|
<Upgrade Id="$(var.UpgradeCode)">
|
25
24
|
<UpgradeVersion OnlyDetect="yes" Minimum="$(var.VersionNumber)" IncludeMinimum="no" Property="NEWERVERSIONDETECTED" />
|
26
|
-
<UpgradeVersion Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="$(var.VersionNumber)" IncludeMaximum="
|
25
|
+
<UpgradeVersion Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="$(var.VersionNumber)" IncludeMaximum="yes" Property="OLDERVERSIONBEINGUPGRADED" />
|
27
26
|
</Upgrade>
|
28
27
|
|
29
28
|
<InstallExecuteSequence>
|
@@ -31,27 +30,28 @@
|
|
31
30
|
</InstallExecuteSequence>
|
32
31
|
|
33
32
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
34
|
-
<Directory Id="
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
<Directory Id="WINDOWSVOLUME">
|
34
|
+
<% hierarchy.each.with_index do |(name, id), index| -%>
|
35
|
+
<%= ' '*index %><Directory Id="<%= id %>" Name="<%= name %>">
|
36
|
+
<% end -%>
|
37
|
+
<% hierarchy.keys.each.with_index do |_, index| -%>
|
38
|
+
<%= ' '*(hierarchy.size - index-1) %></Directory>
|
39
|
+
<% end -%>
|
40
40
|
</Directory>
|
41
41
|
</Directory>
|
42
42
|
|
43
|
+
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]" />
|
44
|
+
|
43
45
|
<!-- Set the components defined in our fragment files that will be used for our feature -->
|
44
|
-
<Feature Id="ProjectFeature" Title="!(loc.FeatureMainName)" Absent="disallow" AllowAdvertise="no" Level="1" ConfigurableDirectory="
|
46
|
+
<Feature Id="ProjectFeature" Title="!(loc.FeatureMainName)" Absent="disallow" AllowAdvertise="no" Level="1" ConfigurableDirectory="<%= wix_install_dir %>">
|
45
47
|
<ComponentGroupRef Id="ProjectDir" />
|
46
48
|
</Feature>
|
47
49
|
|
48
|
-
<!--
|
49
|
-
UI Stuff
|
50
|
-
-->
|
50
|
+
<!-- UI Stuff -->
|
51
51
|
<Icon Id="project.ico" SourceFile="Resources\assets\project_16x16.ico"/>
|
52
52
|
<Property Id="ARPPRODUCTICON" Value="project.ico" />
|
53
53
|
<Property Id="ARPHELPLINK" Value="http://www.getchef.com/" />
|
54
|
-
<Property Id="WIXUI_INSTALLDIR" Value="
|
54
|
+
<Property Id="WIXUI_INSTALLDIR" Value="<%= wix_install_dir %>" />
|
55
55
|
|
56
56
|
<UIRef Id="ProjectUI_InstallDir"/>
|
57
57
|
<UI Id="ProjectUI_InstallDir">
|
@@ -69,6 +69,5 @@
|
|
69
69
|
<WixVariable Id="WixUIInfoIco" Value="Resources\assets\project_32x32.ico" />
|
70
70
|
<WixVariable Id="WixUINewIco" Value="Resources\assets\project_16x16.ico" />
|
71
71
|
<WixVariable Id="WixUIUpIco" Value="Resources\assets\project_16x16.ico" />
|
72
|
-
|
73
72
|
</Product>
|
74
73
|
</Wix>
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<installer-gui-script minSpecVersion="1">
|
3
|
+
<title><%= friendly_name %></title>
|
4
|
+
<background file="background.png" alignment="bottomleft" mime-type="image/png"/>
|
5
|
+
<welcome file="welcome.html" mime-type="text/html"/>
|
6
|
+
<license file="license.html" mime-type="text/html"/>
|
7
|
+
|
8
|
+
<!-- Generated by productbuild - - synthesize -->
|
9
|
+
<pkg-ref id="<%= identifier %>"/>
|
10
|
+
<options customize="never" require-scripts="false"/>
|
11
|
+
<choices-outline>
|
12
|
+
<line choice="default">
|
13
|
+
<line choice="<%= identifier %>"/>
|
14
|
+
</line>
|
15
|
+
</choices-outline>
|
16
|
+
<choice id="default"/>
|
17
|
+
<choice id="<%= identifier %>" visible="false">
|
18
|
+
<pkg-ref id="<%= identifier %>"/>
|
19
|
+
</choice>
|
20
|
+
<pkg-ref id="<%= identifier %>" version="<%= version %>" onConclusion="none"><%= component_pkg %></pkg-ref>
|
21
|
+
</installer-gui-script>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
This will install <%= friendly_name %> on your Mac.
|
2
|
+
|
3
|
+
--------------------------------------------------
|
4
|
+
|
5
|
+
This is a generic Omnibus welcome message. If you are building Mac OS X packages, you should generate a custom welcome file to suit your needs.
|
6
|
+
|
7
|
+
If you are not the creator of <%= friendly_name %>, the presence of this message is likely a bug and should be reported to the creator.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
unless (rpm_cmd = ARGV[0])
|
4
|
+
STDERR.puts 'Usage: sign-rpm RPM_COMMAND'
|
5
|
+
exit 1
|
6
|
+
end
|
7
|
+
|
8
|
+
password = '<%= passphrase %>'
|
9
|
+
|
10
|
+
require 'pty'
|
11
|
+
|
12
|
+
puts rpm_cmd
|
13
|
+
PTY.spawn(rpm_cmd) do |r, w, pid|
|
14
|
+
prompt = r.read(19)
|
15
|
+
|
16
|
+
# match the expected prompt exactly, since that's the only way we know if
|
17
|
+
# something went wrong.
|
18
|
+
unless prompt == 'Enter pass phrase: '
|
19
|
+
STDERR.puts "unexpected output from `#{rpm_cmd}`: '#{prompt}'"
|
20
|
+
Process.kill(:KILL, pid)
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
|
24
|
+
STDOUT.puts prompt
|
25
|
+
w.write("#{password}\n")
|
26
|
+
|
27
|
+
# Keep printing output unti the command exits
|
28
|
+
loop do
|
29
|
+
begin
|
30
|
+
line = r.gets
|
31
|
+
puts line
|
32
|
+
if line =~ /failed/
|
33
|
+
STDERR.puts 'RPM signing failure'
|
34
|
+
exit 1
|
35
|
+
end
|
36
|
+
rescue Errno::EIO
|
37
|
+
break
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Disable any shell actions, replace them with simply 'true'
|
2
|
+
%define __spec_prep_post true
|
3
|
+
%define __spec_prep_pre true
|
4
|
+
%define __spec_build_post true
|
5
|
+
%define __spec_build_pre true
|
6
|
+
%define __spec_install_post true
|
7
|
+
%define __spec_install_pre true
|
8
|
+
%define __spec_clean_post true
|
9
|
+
%define __spec_clean_pre true
|
10
|
+
|
11
|
+
# Use md5
|
12
|
+
%define _binary_filedigest_algorithm 1
|
13
|
+
|
14
|
+
# Use gzip payload compression
|
15
|
+
%define _binary_payload w9.gzdio
|
16
|
+
|
17
|
+
# Metadata
|
18
|
+
Name: <%= name %>
|
19
|
+
Version: <%= version %>
|
20
|
+
Release: <%= iteration %>
|
21
|
+
Summary: <%= description.split("\n").first.empty? ? "_" : description.split("\n").first %>
|
22
|
+
BuildArch: <%= architecture %>
|
23
|
+
AutoReqProv: no
|
24
|
+
BuildRoot: %buildroot
|
25
|
+
Prefix: /
|
26
|
+
Group: <%= category %>
|
27
|
+
License: <%= license %>
|
28
|
+
Vendor: <%= vendor %>
|
29
|
+
URL: <%= homepage %>
|
30
|
+
Packager: <%= maintainer %>
|
31
|
+
<% dependencies.each do |name| -%>
|
32
|
+
Requires: <%= name %>
|
33
|
+
<% end -%>
|
34
|
+
<% conflicts.each do |name| -%>
|
35
|
+
Conflicts: <%= name %>
|
36
|
+
<% end -%>
|
37
|
+
<% conflicts.each do |name| -%>
|
38
|
+
Obsoletes: <%= name %>
|
39
|
+
<%- end -%>
|
40
|
+
<% # RPM rejects descriptions with blank lines (even between content) -%>
|
41
|
+
%description
|
42
|
+
<%= description.gsub(/^\s*$/, " .") %>
|
43
|
+
|
44
|
+
%prep
|
45
|
+
# noop
|
46
|
+
|
47
|
+
%build
|
48
|
+
# noop
|
49
|
+
|
50
|
+
%install
|
51
|
+
# noop
|
52
|
+
|
53
|
+
%clean
|
54
|
+
# noop
|
55
|
+
|
56
|
+
<% scripts.each do |name, contents| -%>
|
57
|
+
%<%= name %>
|
58
|
+
<%= contents %>
|
59
|
+
<% end -%>
|
60
|
+
|
61
|
+
%files
|
62
|
+
%defattr(-,<%= user %>,<%= group %>,-)
|
63
|
+
<% # Output config files and then regular files -%>
|
64
|
+
<% config_files.each do |file| -%>
|
65
|
+
%config(noreplace) <%= file %>
|
66
|
+
<% end -%>
|
67
|
+
<% # List all files -%>
|
68
|
+
<% files.each do |file| -%>
|
69
|
+
<%= file %>
|
70
|
+
<% end -%>
|
@@ -2,14 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Omnibus
|
4
4
|
describe Builder do
|
5
|
-
|
6
|
-
double(Software,
|
7
|
-
name: 'chefdk',
|
8
|
-
install_dir: File.join(tmp_path, 'chefdk'),
|
9
|
-
project_dir: File.join(tmp_path, 'chefdk', 'cache'),
|
10
|
-
overridden?: false,
|
11
|
-
)
|
12
|
-
end
|
5
|
+
include_examples 'a software'
|
13
6
|
|
14
7
|
#
|
15
8
|
# Fakes the embedded bin path to whatever exists in bundler. This is useful
|
@@ -17,28 +10,12 @@ module Omnibus
|
|
17
10
|
# a real Ruby just for functional tests.
|
18
11
|
#
|
19
12
|
def fake_embedded_bin(name)
|
20
|
-
|
21
|
-
|
22
|
-
FileUtils.mkdir_p(bin)
|
23
|
-
FileUtils.ln_s(Bundler.which(name), File.join(bin, name))
|
13
|
+
create_directory(bin_dir)
|
14
|
+
create_link(Bundler.which(name), File.join(bin_dir, name))
|
24
15
|
end
|
25
16
|
|
26
17
|
subject { described_class.new(software) }
|
27
18
|
|
28
|
-
before do
|
29
|
-
Config.project_root(tmp_path)
|
30
|
-
Config.build_retries(0)
|
31
|
-
Config.use_git_caching(false)
|
32
|
-
Config.software_gems(nil)
|
33
|
-
|
34
|
-
# Make the directories
|
35
|
-
FileUtils.mkdir_p(software.install_dir)
|
36
|
-
FileUtils.mkdir_p(software.project_dir)
|
37
|
-
FileUtils.mkdir_p(File.join(tmp_path, 'config', 'software'))
|
38
|
-
FileUtils.mkdir_p(File.join(tmp_path, 'config', 'patches'))
|
39
|
-
FileUtils.mkdir_p(File.join(tmp_path, 'config', 'templates'))
|
40
|
-
end
|
41
|
-
|
42
19
|
describe '#command' do
|
43
20
|
it 'executes the command' do
|
44
21
|
path = File.join(software.install_dir, 'file.txt')
|
@@ -49,10 +26,15 @@ module Omnibus
|
|
49
26
|
end
|
50
27
|
end
|
51
28
|
|
29
|
+
describe '#make' do
|
30
|
+
it 'is waiting for a good samaritan to write tests' do
|
31
|
+
skip
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
52
35
|
describe '#patch' do
|
53
36
|
it 'applies the patch' do
|
54
|
-
configure = File.join(
|
55
|
-
FileUtils.mkdir_p(File.dirname(configure))
|
37
|
+
configure = File.join(project_dir, 'configure')
|
56
38
|
File.open(configure, 'w') do |f|
|
57
39
|
f.write <<-EOH.gsub(/^ {12}/, '')
|
58
40
|
THING="-e foo"
|
@@ -60,8 +42,7 @@ module Omnibus
|
|
60
42
|
EOH
|
61
43
|
end
|
62
44
|
|
63
|
-
patch = File.join(
|
64
|
-
FileUtils.mkdir_p(File.dirname(patch))
|
45
|
+
patch = File.join(patches_dir, 'apply.patch')
|
65
46
|
File.open(patch, 'w') do |f|
|
66
47
|
f.write <<-EOH.gsub(/^ {12}/, '')
|
67
48
|
--- a/configure
|
@@ -80,8 +61,7 @@ module Omnibus
|
|
80
61
|
|
81
62
|
describe '#ruby' do
|
82
63
|
it 'executes the command as the embdedded ruby' do
|
83
|
-
ruby = File.join(
|
84
|
-
FileUtils.mkdir_p(File.dirname(ruby))
|
64
|
+
ruby = File.join(scripts_dir, 'setup.rb')
|
85
65
|
File.open(ruby, 'w') do |f|
|
86
66
|
f.write <<-EOH.gsub(/^ {12}/, '')
|
87
67
|
File.write("#{software.install_dir}/test.txt", 'This is content!')
|
@@ -94,7 +74,7 @@ module Omnibus
|
|
94
74
|
subject.build
|
95
75
|
|
96
76
|
path = "#{software.install_dir}/test.txt"
|
97
|
-
expect(
|
77
|
+
expect(path).to be_a_file
|
98
78
|
expect(File.read(path)).to eq('This is content!')
|
99
79
|
end
|
100
80
|
end
|
@@ -118,7 +98,7 @@ module Omnibus
|
|
118
98
|
fake_embedded_bin('gem')
|
119
99
|
|
120
100
|
subject.gem("build #{gemspec}")
|
121
|
-
subject.gem("install #{
|
101
|
+
subject.gem("install #{project_dir}/example-1.0.0.gem")
|
122
102
|
output = capture_logging { subject.build }
|
123
103
|
|
124
104
|
expect(output).to include('gem build')
|
@@ -186,14 +166,13 @@ module Omnibus
|
|
186
166
|
output = capture_logging { subject.build }
|
187
167
|
|
188
168
|
expect(output).to include('A complex operation')
|
189
|
-
expect(
|
169
|
+
expect("#{software.project_dir}/bacon").to be_a_file
|
190
170
|
end
|
191
171
|
end
|
192
172
|
|
193
173
|
describe '#erb' do
|
194
174
|
it 'renders the erb' do
|
195
|
-
erb = File.join(
|
196
|
-
FileUtils.mkdir_p(File.dirname(erb))
|
175
|
+
erb = File.join(templates_dir, 'example.erb')
|
197
176
|
File.open(erb, 'w') do |f|
|
198
177
|
f.write <<-EOH.gsub(/^ {12}/, '')
|
199
178
|
<%= a %>
|
@@ -210,7 +189,7 @@ module Omnibus
|
|
210
189
|
)
|
211
190
|
subject.build
|
212
191
|
|
213
|
-
expect(
|
192
|
+
expect(destination).to be_a_file
|
214
193
|
expect(File.read(destination)).to eq("foo\nbar\n")
|
215
194
|
end
|
216
195
|
end
|
@@ -218,24 +197,24 @@ module Omnibus
|
|
218
197
|
describe '#mkdir' do
|
219
198
|
it 'creates the directory' do
|
220
199
|
path = File.join(tmp_path, 'scratch')
|
221
|
-
|
200
|
+
remove_directory(path)
|
222
201
|
|
223
202
|
subject.mkdir(path)
|
224
203
|
subject.build
|
225
204
|
|
226
|
-
expect(
|
205
|
+
expect(path).to be_a_directory
|
227
206
|
end
|
228
207
|
end
|
229
208
|
|
230
209
|
describe '#touch' do
|
231
210
|
it 'creates the file' do
|
232
211
|
path = File.join(tmp_path, 'file')
|
233
|
-
|
212
|
+
remove_file(path)
|
234
213
|
|
235
214
|
subject.touch(path)
|
236
215
|
subject.build
|
237
216
|
|
238
|
-
expect(
|
217
|
+
expect(path).to be_a_file
|
239
218
|
end
|
240
219
|
|
241
220
|
it 'creates the containing directory' do
|
@@ -245,29 +224,29 @@ module Omnibus
|
|
245
224
|
subject.touch(path)
|
246
225
|
subject.build
|
247
226
|
|
248
|
-
expect(
|
227
|
+
expect(path).to be_a_file
|
249
228
|
end
|
250
229
|
end
|
251
230
|
|
252
231
|
describe '#delete' do
|
253
232
|
it 'deletes the directory' do
|
254
233
|
path = File.join(tmp_path, 'scratch')
|
255
|
-
|
234
|
+
create_directory(path)
|
256
235
|
|
257
236
|
subject.delete(path)
|
258
237
|
subject.build
|
259
238
|
|
260
|
-
expect(
|
239
|
+
expect(path).to_not be_a_directory
|
261
240
|
end
|
262
241
|
|
263
242
|
it 'deletes the file' do
|
264
243
|
path = File.join(tmp_path, 'file')
|
265
|
-
|
244
|
+
create_file(path)
|
266
245
|
|
267
246
|
subject.delete(path)
|
268
247
|
subject.build
|
269
248
|
|
270
|
-
expect(
|
249
|
+
expect(path).to_not be_a_file
|
271
250
|
end
|
272
251
|
|
273
252
|
it 'accepts a glob pattern' do
|
@@ -279,8 +258,8 @@ module Omnibus
|
|
279
258
|
subject.delete("#{tmp_path}/**/file_*")
|
280
259
|
subject.build
|
281
260
|
|
282
|
-
expect(
|
283
|
-
expect(
|
261
|
+
expect(path_a).to_not be_a_file
|
262
|
+
expect(path_b).to_not be_a_file
|
284
263
|
end
|
285
264
|
end
|
286
265
|
|
@@ -288,12 +267,12 @@ module Omnibus
|
|
288
267
|
it 'copies the file' do
|
289
268
|
path_a = File.join(tmp_path, 'file1')
|
290
269
|
path_b = File.join(tmp_path, 'file2')
|
291
|
-
|
270
|
+
create_file(path_a)
|
292
271
|
|
293
272
|
subject.copy(path_a, path_b)
|
294
273
|
subject.build
|
295
274
|
|
296
|
-
expect(
|
275
|
+
expect(path_b).to be_a_file
|
297
276
|
expect(File.read(path_b)).to eq(File.read(path_a))
|
298
277
|
end
|
299
278
|
|
@@ -311,9 +290,9 @@ module Omnibus
|
|
311
290
|
subject.copy(directory, destination)
|
312
291
|
subject.build
|
313
292
|
|
314
|
-
expect(
|
315
|
-
expect(
|
316
|
-
expect(
|
293
|
+
expect(destination).to be_a_directory
|
294
|
+
expect("#{destination}/file_a").to be_a_file
|
295
|
+
expect("#{destination}/file_b").to be_a_file
|
317
296
|
end
|
318
297
|
|
319
298
|
it 'accepts a glob pattern' do
|
@@ -331,9 +310,9 @@ module Omnibus
|
|
331
310
|
subject.copy("#{directory}/*", destination)
|
332
311
|
subject.build
|
333
312
|
|
334
|
-
expect(
|
335
|
-
expect(
|
336
|
-
expect(
|
313
|
+
expect(destination).to be_a_directory
|
314
|
+
expect("#{destination}/file_a").to be_a_file
|
315
|
+
expect("#{destination}/file_b").to be_a_file
|
337
316
|
end
|
338
317
|
end
|
339
318
|
|
@@ -341,13 +320,13 @@ module Omnibus
|
|
341
320
|
it 'moves the file' do
|
342
321
|
path_a = File.join(tmp_path, 'file1')
|
343
322
|
path_b = File.join(tmp_path, 'file2')
|
344
|
-
|
323
|
+
create_file(path_a)
|
345
324
|
|
346
325
|
subject.move(path_a, path_b)
|
347
326
|
subject.build
|
348
327
|
|
349
|
-
expect(
|
350
|
-
expect(
|
328
|
+
expect(path_b).to be_a_file
|
329
|
+
expect(path_a).to_not be_a_file
|
351
330
|
end
|
352
331
|
|
353
332
|
it 'moves the directory and entries' do
|
@@ -364,11 +343,11 @@ module Omnibus
|
|
364
343
|
subject.move(directory, destination)
|
365
344
|
subject.build
|
366
345
|
|
367
|
-
expect(
|
368
|
-
expect(
|
369
|
-
expect(
|
346
|
+
expect(destination).to be_a_directory
|
347
|
+
expect("#{destination}/file_a").to be_a_file
|
348
|
+
expect("#{destination}/file_b").to be_a_file
|
370
349
|
|
371
|
-
expect(
|
350
|
+
expect(directory).to_not be_a_directory
|
372
351
|
end
|
373
352
|
|
374
353
|
it 'accepts a glob pattern' do
|
@@ -386,11 +365,11 @@ module Omnibus
|
|
386
365
|
subject.move("#{directory}/*", destination)
|
387
366
|
subject.build
|
388
367
|
|
389
|
-
expect(
|
390
|
-
expect(
|
391
|
-
expect(
|
368
|
+
expect(destination).to be_a_directory
|
369
|
+
expect("#{destination}/file_a").to be_a_file
|
370
|
+
expect("#{destination}/file_b").to be_a_file
|
392
371
|
|
393
|
-
expect(
|
372
|
+
expect(directory).to be_a_directory
|
394
373
|
end
|
395
374
|
end
|
396
375
|
|
@@ -398,12 +377,12 @@ module Omnibus
|
|
398
377
|
it 'links the file' do
|
399
378
|
path_a = File.join(tmp_path, 'file1')
|
400
379
|
path_b = File.join(tmp_path, 'file2')
|
401
|
-
|
380
|
+
create_file(path_a)
|
402
381
|
|
403
382
|
subject.link(path_a, path_b)
|
404
383
|
subject.build
|
405
384
|
|
406
|
-
expect(
|
385
|
+
expect(path_b).to be_a_symlink
|
407
386
|
end
|
408
387
|
|
409
388
|
it 'links the directory' do
|
@@ -414,7 +393,7 @@ module Omnibus
|
|
414
393
|
subject.link(directory, destination)
|
415
394
|
subject.build
|
416
395
|
|
417
|
-
expect(
|
396
|
+
expect(destination).to be_a_symlink
|
418
397
|
end
|
419
398
|
|
420
399
|
it 'accepts a glob pattern' do
|
@@ -432,8 +411,8 @@ module Omnibus
|
|
432
411
|
subject.link("#{directory}/*", destination)
|
433
412
|
subject.build
|
434
413
|
|
435
|
-
expect(
|
436
|
-
expect(
|
414
|
+
expect("#{destination}/file_a").to be_a_symlink
|
415
|
+
expect("#{destination}/file_b").to be_a_symlink
|
437
416
|
end
|
438
417
|
end
|
439
418
|
|
@@ -464,13 +443,13 @@ module Omnibus
|
|
464
443
|
subject.sync(source, destination)
|
465
444
|
subject.build
|
466
445
|
|
467
|
-
expect(
|
468
|
-
expect(
|
469
|
-
expect(
|
470
|
-
expect(
|
471
|
-
expect(
|
472
|
-
expect(
|
473
|
-
expect(
|
446
|
+
expect("#{destination}/file_a").to be_a_file
|
447
|
+
expect("#{destination}/file_b").to be_a_file
|
448
|
+
expect("#{destination}/file_c").to be_a_file
|
449
|
+
expect("#{destination}/folder/file_d").to be_a_file
|
450
|
+
expect("#{destination}/folder/file_e").to be_a_file
|
451
|
+
expect("#{destination}/.dot_folder/file_f").to be_a_file
|
452
|
+
expect("#{destination}/.file_g").to be_a_file
|
474
453
|
end
|
475
454
|
end
|
476
455
|
|
@@ -486,18 +465,18 @@ module Omnibus
|
|
486
465
|
subject.sync(source, destination)
|
487
466
|
subject.build
|
488
467
|
|
489
|
-
expect(
|
490
|
-
expect(
|
491
|
-
expect(
|
492
|
-
expect(
|
493
|
-
expect(
|
494
|
-
expect(
|
495
|
-
expect(
|
496
|
-
|
497
|
-
expect(
|
498
|
-
expect(
|
499
|
-
expect(
|
500
|
-
expect(
|
468
|
+
expect("#{destination}/file_a").to be_a_file
|
469
|
+
expect("#{destination}/file_b").to be_a_file
|
470
|
+
expect("#{destination}/file_c").to be_a_file
|
471
|
+
expect("#{destination}/folder/file_d").to be_a_file
|
472
|
+
expect("#{destination}/folder/file_e").to be_a_file
|
473
|
+
expect("#{destination}/.dot_folder/file_f").to be_a_file
|
474
|
+
expect("#{destination}/.file_g").to be_a_file
|
475
|
+
|
476
|
+
expect("#{destination}/existing_folder").to_not be_a_directory
|
477
|
+
expect("#{destination}/.existing_folder").to_not be_a_directory
|
478
|
+
expect("#{destination}/existing_file").to_not be_a_file
|
479
|
+
expect("#{destination}/.existing_file").to_not be_a_file
|
501
480
|
end
|
502
481
|
end
|
503
482
|
|
@@ -506,14 +485,14 @@ module Omnibus
|
|
506
485
|
subject.sync(source, destination, exclude: '.dot_folder')
|
507
486
|
subject.build
|
508
487
|
|
509
|
-
expect(
|
510
|
-
expect(
|
511
|
-
expect(
|
512
|
-
expect(
|
513
|
-
expect(
|
514
|
-
expect(
|
515
|
-
expect(
|
516
|
-
expect(
|
488
|
+
expect("#{destination}/file_a").to be_a_file
|
489
|
+
expect("#{destination}/file_b").to be_a_file
|
490
|
+
expect("#{destination}/file_c").to be_a_file
|
491
|
+
expect("#{destination}/folder/file_d").to be_a_file
|
492
|
+
expect("#{destination}/folder/file_e").to be_a_file
|
493
|
+
expect("#{destination}/.dot_folder").to_not be_a_directory
|
494
|
+
expect("#{destination}/.dot_folder/file_f").to_not be_a_file
|
495
|
+
expect("#{destination}/.file_g").to be_a_file
|
517
496
|
end
|
518
497
|
|
519
498
|
it 'removes existing files and folders in destination' do
|
@@ -525,17 +504,17 @@ module Omnibus
|
|
525
504
|
subject.sync(source, destination, exclude: '.dot_folder')
|
526
505
|
subject.build
|
527
506
|
|
528
|
-
expect(
|
529
|
-
expect(
|
530
|
-
expect(
|
531
|
-
expect(
|
532
|
-
expect(
|
533
|
-
expect(
|
534
|
-
expect(
|
535
|
-
expect(
|
536
|
-
|
537
|
-
expect(
|
538
|
-
expect(
|
507
|
+
expect("#{destination}/file_a").to be_a_file
|
508
|
+
expect("#{destination}/file_b").to be_a_file
|
509
|
+
expect("#{destination}/file_c").to be_a_file
|
510
|
+
expect("#{destination}/folder/file_d").to be_a_file
|
511
|
+
expect("#{destination}/folder/file_e").to be_a_file
|
512
|
+
expect("#{destination}/.dot_folder").to_not be_a_directory
|
513
|
+
expect("#{destination}/.dot_folder/file_f").to_not be_a_file
|
514
|
+
expect("#{destination}/.file_g").to be_a_file
|
515
|
+
|
516
|
+
expect("#{destination}/existing_folder").to_not be_a_directory
|
517
|
+
expect("#{destination}/existing_file").to_not be_a_file
|
539
518
|
end
|
540
519
|
end
|
541
520
|
end
|