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
data/spec/unit/s3_cacher_spec.rb
CHANGED
@@ -2,8 +2,25 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Omnibus
|
4
4
|
describe S3Cache do
|
5
|
-
let(:ruby_19)
|
6
|
-
|
5
|
+
let(:ruby_19) do
|
6
|
+
double('ruby_19',
|
7
|
+
name: 'ruby',
|
8
|
+
version: '1.9.3',
|
9
|
+
fetcher: double(Fetcher,
|
10
|
+
checksum: 'abcd1234',
|
11
|
+
),
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
let(:python_27) do
|
16
|
+
double('python',
|
17
|
+
name: 'python',
|
18
|
+
version: '2.7',
|
19
|
+
fetcher: double(Fetcher,
|
20
|
+
checksum: 'defg5678',
|
21
|
+
),
|
22
|
+
)
|
23
|
+
end
|
7
24
|
|
8
25
|
describe '.list' do
|
9
26
|
let(:keys) { %w(ruby-1.9.3-abcd1234 python-2.7.defg5678) }
|
@@ -56,8 +73,8 @@ module Omnibus
|
|
56
73
|
before { allow(S3Cache).to receive(:missing).and_return(softwares) }
|
57
74
|
|
58
75
|
it 'fetches the missing software' do
|
59
|
-
expect(
|
60
|
-
expect(
|
76
|
+
expect(ruby_19).to receive(:fetch)
|
77
|
+
expect(python_27).to receive(:fetch)
|
61
78
|
|
62
79
|
S3Cache.fetch_missing
|
63
80
|
end
|
@@ -80,7 +97,7 @@ module Omnibus
|
|
80
97
|
|
81
98
|
context 'when the package does not have a checksum' do
|
82
99
|
it 'raises an exception' do
|
83
|
-
expect { S3Cache.key_for(double(name: 'ruby', version: '1.9.3', checksum: nil)) }
|
100
|
+
expect { S3Cache.key_for(double(name: 'ruby', version: '1.9.3', fetcher: double(Fetcher, checksum: nil))) }
|
84
101
|
.to raise_error(InsufficientSpecification)
|
85
102
|
end
|
86
103
|
end
|
data/spec/unit/software_spec.rb
CHANGED
@@ -2,32 +2,24 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Omnibus
|
4
4
|
describe Software do
|
5
|
-
let(:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
install_dir: '/monkeys',
|
12
|
-
shasum: 'ABCD1234',
|
13
|
-
overrides: {}
|
14
|
-
)
|
15
|
-
|
16
|
-
allow(project).to receive(:is_a?)
|
17
|
-
.with(Project)
|
18
|
-
.and_return(true)
|
19
|
-
|
20
|
-
project
|
21
|
-
}
|
5
|
+
let(:project) do
|
6
|
+
Project.new.evaluate do
|
7
|
+
name 'project'
|
8
|
+
install_dir '/opt/project'
|
9
|
+
end
|
10
|
+
end
|
22
11
|
|
23
|
-
subject
|
12
|
+
subject do
|
13
|
+
described_class.new(project).evaluate do
|
14
|
+
name 'software'
|
15
|
+
default_version '1.2.3'
|
24
16
|
|
25
|
-
|
26
|
-
|
17
|
+
source url: 'http://example.com/',
|
18
|
+
md5: 'abcd1234'
|
19
|
+
end
|
27
20
|
end
|
28
21
|
|
29
22
|
it_behaves_like 'a cleanroom getter', :project
|
30
|
-
it_behaves_like 'a cleanroom getter', :override_version
|
31
23
|
it_behaves_like 'a cleanroom setter', :name, %|name 'libxml2'|
|
32
24
|
it_behaves_like 'a cleanroom setter', :description, %|description 'The XML magician'|
|
33
25
|
it_behaves_like 'a cleanroom setter', :always_build, %|always_build true|
|
@@ -37,26 +29,18 @@ module Omnibus
|
|
37
29
|
it_behaves_like 'a cleanroom setter', :version, %|version '1.2.3'|
|
38
30
|
it_behaves_like 'a cleanroom setter', :whitelist_file, %|whitelist_file '/opt/whatever'|
|
39
31
|
it_behaves_like 'a cleanroom setter', :relative_path, %|relative_path '/path/to/extracted'|
|
40
|
-
it_behaves_like 'a cleanroom setter', :dependencies, %|dependencies 'a', 'b', 'c'|
|
41
32
|
it_behaves_like 'a cleanroom setter', :build, %|build {}|
|
42
33
|
it_behaves_like 'a cleanroom getter', :project_dir
|
43
34
|
it_behaves_like 'a cleanroom getter', :build_dir
|
44
35
|
it_behaves_like 'a cleanroom getter', :install_dir
|
45
|
-
it_behaves_like 'a cleanroom getter', :install_path
|
46
|
-
it_behaves_like 'a cleanroom getter', :platform
|
47
|
-
it_behaves_like 'a cleanroom getter', :architecture
|
48
36
|
it_behaves_like 'a cleanroom getter', :with_standard_compiler_flags
|
49
37
|
it_behaves_like 'a cleanroom setter', :with_embedded_path, %|with_embedded_path({ 'foo' => 'bar' })|
|
50
38
|
it_behaves_like 'a cleanroom setter', :prepend_path, %|prepend_path({ 'foo' => 'bar' })|
|
51
|
-
it_behaves_like 'a cleanroom getter', :source_dir
|
52
|
-
it_behaves_like 'a cleanroom getter', :cache_dir
|
53
|
-
it_behaves_like 'a cleanroom getter', :config
|
54
39
|
|
55
40
|
context 'when a source_uri is present' do
|
56
41
|
let(:uri) { URI.parse('http://example.com/foo.tar.gz') }
|
57
42
|
before { allow(subject).to receive(:source_uri).and_return(uri) }
|
58
43
|
|
59
|
-
it_behaves_like 'a cleanroom getter', :downloaded_file
|
60
44
|
it_behaves_like 'a cleanroom getter', :project_file
|
61
45
|
end
|
62
46
|
|
@@ -66,35 +50,35 @@ module Omnibus
|
|
66
50
|
|
67
51
|
it "sets the defaults" do
|
68
52
|
expect(subject.with_standard_compiler_flags).to eq(
|
69
|
-
'LDFLAGS' => '-Wl,-rpath,/
|
70
|
-
'CFLAGS' => '-I/
|
71
|
-
'LD_RUN_PATH' => '/
|
72
|
-
'PKG_CONFIG_PATH' => '/
|
53
|
+
'LDFLAGS' => '-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib',
|
54
|
+
'CFLAGS' => '-I/opt/project/embedded/include',
|
55
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
56
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
73
57
|
)
|
74
58
|
end
|
75
59
|
it 'ovesrride LDFLAGS' do
|
76
60
|
expect(subject.with_standard_compiler_flags('LDFLAGS' => 'foo')).to eq(
|
77
|
-
'LDFLAGS' => '-Wl,-rpath,/
|
78
|
-
'CFLAGS' => '-I/
|
79
|
-
'LD_RUN_PATH' => '/
|
80
|
-
'PKG_CONFIG_PATH' => '/
|
61
|
+
'LDFLAGS' => '-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib',
|
62
|
+
'CFLAGS' => '-I/opt/project/embedded/include',
|
63
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
64
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
81
65
|
)
|
82
66
|
end
|
83
67
|
it 'ovesrride CFLAGS' do
|
84
68
|
expect(subject.with_standard_compiler_flags('CFLAGS'=>'foo')).to eq(
|
85
|
-
'LDFLAGS' => '-Wl,-rpath,/
|
86
|
-
'CFLAGS' => '-I/
|
87
|
-
'LD_RUN_PATH' => '/
|
88
|
-
'PKG_CONFIG_PATH' => '/
|
69
|
+
'LDFLAGS' => '-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib',
|
70
|
+
'CFLAGS' => '-I/opt/project/embedded/include',
|
71
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
72
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
89
73
|
)
|
90
74
|
end
|
91
75
|
it 'presserve anything else' do
|
92
76
|
expect(subject.with_standard_compiler_flags('numberwang'=>4)).to eq(
|
93
77
|
'numberwang' => 4,
|
94
|
-
'LDFLAGS' => '-Wl,-rpath,/
|
95
|
-
'CFLAGS' => '-I/
|
96
|
-
'LD_RUN_PATH' => '/
|
97
|
-
'PKG_CONFIG_PATH' => '/
|
78
|
+
'LDFLAGS' => '-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib',
|
79
|
+
'CFLAGS' => '-I/opt/project/embedded/include',
|
80
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
81
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
98
82
|
)
|
99
83
|
end
|
100
84
|
end
|
@@ -109,11 +93,11 @@ module Omnibus
|
|
109
93
|
|
110
94
|
it 'sets the defaults' do
|
111
95
|
expect(subject.with_standard_compiler_flags).to eq(
|
112
|
-
'LDFLAGS' => '-R/
|
113
|
-
'CFLAGS' => '-I/
|
114
|
-
'LD_RUN_PATH' => '/
|
115
|
-
'LD_OPTIONS' => '-R/
|
116
|
-
'PKG_CONFIG_PATH' => '/
|
96
|
+
'LDFLAGS' => '-R/opt/project/embedded/lib -L/opt/project/embedded/lib -static-libgcc',
|
97
|
+
'CFLAGS' => '-I/opt/project/embedded/include',
|
98
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
99
|
+
'LD_OPTIONS' => '-R/opt/project/embedded/lib',
|
100
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
117
101
|
)
|
118
102
|
end
|
119
103
|
end
|
@@ -123,10 +107,10 @@ module Omnibus
|
|
123
107
|
|
124
108
|
it 'sets the defaults' do
|
125
109
|
expect(subject.with_standard_compiler_flags).to eq(
|
126
|
-
'LDFLAGS' => '-L/
|
127
|
-
'CFLAGS' => '-I/
|
128
|
-
'LD_RUN_PATH' => '/
|
129
|
-
'PKG_CONFIG_PATH' => '/
|
110
|
+
'LDFLAGS' => '-L/opt/project/embedded/lib',
|
111
|
+
'CFLAGS' => '-I/opt/project/embedded/include',
|
112
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
113
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
130
114
|
)
|
131
115
|
end
|
132
116
|
end
|
@@ -143,13 +127,13 @@ module Omnibus
|
|
143
127
|
expect(subject.with_standard_compiler_flags).to eq(
|
144
128
|
'CC' => 'xlc -q64',
|
145
129
|
'CXX' => 'xlC -q64',
|
146
|
-
'CFLAGS' => '-q64 -I/
|
147
|
-
'LDFLAGS' => '-q64 -L/
|
130
|
+
'CFLAGS' => '-q64 -I/opt/project/embedded/include -O',
|
131
|
+
'LDFLAGS' => '-q64 -L/opt/project/embedded/lib -Wl,-blibpath:/opt/project/embedded/lib:/usr/lib:/lib',
|
148
132
|
'LD' => 'ld -b64',
|
149
133
|
'OBJECT_MODE' => '64',
|
150
134
|
'ARFLAGS' => '-X64 cru',
|
151
|
-
'LD_RUN_PATH' => '/
|
152
|
-
'PKG_CONFIG_PATH' => '/
|
135
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
136
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
153
137
|
)
|
154
138
|
end
|
155
139
|
end
|
@@ -166,13 +150,13 @@ module Omnibus
|
|
166
150
|
expect(subject.with_standard_compiler_flags(nil, aix: { use_gcc: true })).to eq(
|
167
151
|
'CC' => 'gcc -maix64',
|
168
152
|
'CXX' => 'g++ -maix64',
|
169
|
-
'CFLAGS' => '-maix64 -O -I/
|
170
|
-
'LDFLAGS' => '-L/
|
153
|
+
'CFLAGS' => '-maix64 -O -I/opt/project/embedded/include',
|
154
|
+
'LDFLAGS' => '-L/opt/project/embedded/lib -Wl,-blibpath:/opt/project/embedded/lib:/usr/lib:/lib',
|
171
155
|
'LD' => 'ld -b64',
|
172
156
|
'OBJECT_MODE' => '64',
|
173
157
|
'ARFLAGS' => '-X64 cru',
|
174
|
-
'LD_RUN_PATH' => '/
|
175
|
-
'PKG_CONFIG_PATH' => '/
|
158
|
+
'LD_RUN_PATH' => '/opt/project/embedded/lib',
|
159
|
+
'PKG_CONFIG_PATH' => '/opt/project/embedded/lib/pkgconfig'
|
176
160
|
)
|
177
161
|
end
|
178
162
|
end
|
@@ -196,14 +180,14 @@ module Omnibus
|
|
196
180
|
|
197
181
|
it 'prepends the embedded bin to PATH' do
|
198
182
|
expect(subject.with_embedded_path).to eq(
|
199
|
-
'PATH' => '/
|
183
|
+
'PATH' => '/opt/project/bin:/opt/project/embedded/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin'
|
200
184
|
)
|
201
185
|
end
|
202
186
|
|
203
187
|
it 'with_embedded_path merges with a hash argument' do
|
204
188
|
expect(subject.with_embedded_path('numberwang' => 4)).to eq(
|
205
189
|
'numberwang' => 4,
|
206
|
-
'PATH' => '/
|
190
|
+
'PATH' => '/opt/project/bin:/opt/project/embedded/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin'
|
207
191
|
)
|
208
192
|
end
|
209
193
|
|
@@ -217,7 +201,7 @@ module Omnibus
|
|
217
201
|
context 'on Windows' do
|
218
202
|
before do
|
219
203
|
stub_ohai(platform: 'windows', version: '2012')
|
220
|
-
allow(project).to receive(:install_dir).and_return('c:/
|
204
|
+
allow(project).to receive(:install_dir).and_return('c:/opt/project')
|
221
205
|
stub_env('Path', windows_path)
|
222
206
|
end
|
223
207
|
|
@@ -233,14 +217,14 @@ module Omnibus
|
|
233
217
|
|
234
218
|
it 'prepends the embedded bin to PATH' do
|
235
219
|
expect(subject.with_embedded_path).to eq(
|
236
|
-
'Path' => 'c:/
|
220
|
+
'Path' => 'c:/opt/project/bin;c:/opt/project/embedded/bin;c:/Ruby999/bin;c:/Windows/system32;c:/Windows;c:/Windows/System32/Wbem'
|
237
221
|
)
|
238
222
|
end
|
239
223
|
|
240
224
|
it 'with_embedded_path merges with a hash argument' do
|
241
225
|
expect(subject.with_embedded_path('numberwang' => 4)).to eq(
|
242
226
|
'numberwang' => 4,
|
243
|
-
'Path' => 'c:/
|
227
|
+
'Path' => 'c:/opt/project/bin;c:/opt/project/embedded/bin;c:/Ruby999/bin;c:/Windows/system32;c:/Windows;c:/Windows/System32/Wbem'
|
244
228
|
)
|
245
229
|
end
|
246
230
|
|
@@ -252,14 +236,25 @@ module Omnibus
|
|
252
236
|
end
|
253
237
|
end
|
254
238
|
|
239
|
+
describe '#ohai' do
|
240
|
+
before { stub_ohai(platform: 'ubuntu', version: '12.04') }
|
241
|
+
|
242
|
+
it 'is a DSL method' do
|
243
|
+
expect(subject).to have_exposed_method(:ohai)
|
244
|
+
end
|
245
|
+
|
246
|
+
it 'delegates to the Ohai class' do
|
247
|
+
expect(subject.ohai).to be(Ohai)
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
255
251
|
describe '#<=>' do
|
256
|
-
let(:zlib) {
|
257
|
-
let(:erchef) {
|
258
|
-
let(:bacon) {
|
252
|
+
let(:zlib) { described_class.new(project).tap { |s| s.name('zlib') } }
|
253
|
+
let(:erchef) { described_class.new(project).tap { |s| s.name('erchef') } }
|
254
|
+
let(:bacon) { described_class.new(project).tap { |s| s.name('bacon') } }
|
259
255
|
|
260
256
|
it 'compares projects by name' do
|
261
257
|
list = [zlib, erchef, bacon]
|
262
|
-
|
263
258
|
expect(list.sort.map(&:name)).to eq(%w(bacon erchef zlib))
|
264
259
|
end
|
265
260
|
end
|
@@ -278,167 +273,39 @@ module Omnibus
|
|
278
273
|
end
|
279
274
|
end
|
280
275
|
|
281
|
-
describe '#override_version' do
|
282
|
-
it 'returns the override version' do
|
283
|
-
allow(subject).to receive(:overrides).and_return(version: '1.2.3')
|
284
|
-
expect(subject.override_version).to eq('1.2.3')
|
285
|
-
end
|
286
|
-
|
287
|
-
it 'outputs a deprecation message' do
|
288
|
-
output = capture_logging { subject.override_version }
|
289
|
-
expect(output).to include('DEPRECATED')
|
290
|
-
end
|
291
|
-
end
|
292
|
-
|
293
|
-
describe '#given_version' do
|
294
|
-
it 'returns the version' do
|
295
|
-
allow(subject).to receive(:default_version).and_return('4.5.6')
|
296
|
-
expect(subject.given_version).to eq('4.5.6')
|
297
|
-
end
|
298
|
-
|
299
|
-
it 'outputs a deprecation message' do
|
300
|
-
output = capture_logging { subject.given_version }
|
301
|
-
expect(output).to include('DEPRECATED')
|
302
|
-
end
|
303
|
-
end
|
304
|
-
|
305
|
-
describe '#version' do
|
306
|
-
it 'sets the given version' do
|
307
|
-
subject.version('1.2.3')
|
308
|
-
expect(subject.given_version).to eq('1.2.3')
|
309
|
-
end
|
310
|
-
|
311
|
-
it 'outputs a deprecation message' do
|
312
|
-
output = capture_logging { subject.version('1.2.3') }
|
313
|
-
expect(output).to include('DEPRECATED')
|
314
|
-
end
|
315
|
-
end
|
316
|
-
|
317
276
|
context 'testing repo-level version overrides' do
|
318
|
-
let(:software_name) { 'zlib' }
|
319
|
-
let(:default_version) { '1.2.6' }
|
320
|
-
let(:expected_version) { '1.2.6' }
|
321
|
-
let(:expected_override_version) { nil }
|
322
|
-
let(:expected_md5) { '618e944d7c7cd6521551e30b32322f4a' }
|
323
|
-
let(:expected_url) { 'http://downloads.sourceforge.net/project/libpng/zlib/1.2.6/zlib-1.2.6.tar.gz' }
|
324
|
-
|
325
|
-
shared_examples_for 'a software definition' do
|
326
|
-
it 'should have the same name' do
|
327
|
-
expect(subject.name).to eq(software_name)
|
328
|
-
end
|
329
|
-
|
330
|
-
it 'should have the same version' do
|
331
|
-
expect(subject.version).to eq(expected_version)
|
332
|
-
end
|
333
|
-
|
334
|
-
it 'should have the right default_version' do
|
335
|
-
expect(subject.default_version).to eq(default_version)
|
336
|
-
end
|
337
|
-
|
338
|
-
it 'should have nil for an override_version' do
|
339
|
-
expect(subject.override_version).to eq(expected_override_version)
|
340
|
-
end
|
341
|
-
|
342
|
-
it 'should have the right source md5' do
|
343
|
-
expect(subject.source[:md5]).to eq(expected_md5)
|
344
|
-
end
|
345
|
-
|
346
|
-
it 'should have the right source url' do
|
347
|
-
expect(subject.source[:url]).to eq(expected_url)
|
348
|
-
end
|
349
|
-
|
350
|
-
it 'should have the right checksum' do
|
351
|
-
expect(subject.checksum).to eq(expected_md5)
|
352
|
-
end
|
353
|
-
|
354
|
-
it 'should have the right source_uri' do
|
355
|
-
expect(subject.source_uri).to eq(URI.parse(expected_url))
|
356
|
-
end
|
357
|
-
end
|
358
|
-
|
359
277
|
context 'without overrides' do
|
360
|
-
|
278
|
+
it 'returns the original values' do
|
279
|
+
expect(subject.version).to eq('1.2.3')
|
280
|
+
expect(subject.source).to eq(url: 'http://example.com/', md5: 'abcd1234')
|
281
|
+
end
|
361
282
|
end
|
362
283
|
|
363
284
|
context 'with overrides for different software' do
|
364
|
-
|
365
|
-
subject { Software.load(project, software_file, overrides) }
|
285
|
+
before { project.override(:chaos_monkey, version: '1.2.8') }
|
366
286
|
|
367
|
-
|
287
|
+
it 'does not change the software' do
|
288
|
+
expect(subject.version).to eq('1.2.3')
|
289
|
+
end
|
368
290
|
end
|
369
291
|
|
370
292
|
context 'with overrides for this software' do
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
let(:expected_md5) { '44d667c142d7cda120332623eab69f40' }
|
375
|
-
let(:expected_url) { 'http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz' }
|
376
|
-
|
377
|
-
subject { Software.load(project, software_file, overrides) }
|
378
|
-
|
379
|
-
it_behaves_like 'a software definition'
|
380
|
-
end
|
381
|
-
|
382
|
-
context 'with an overide in the project' do
|
383
|
-
let(:expected_version) { '1.2.8' }
|
384
|
-
let(:expected_override_version) { '1.2.8' }
|
385
|
-
let(:expected_md5) { '44d667c142d7cda120332623eab69f40' }
|
386
|
-
let(:expected_url) { 'http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz' }
|
387
|
-
|
388
|
-
before do
|
389
|
-
allow(project).to receive(:overrides)
|
390
|
-
.and_return(zlib: { version: '1.2.8' })
|
391
|
-
end
|
392
|
-
|
393
|
-
it_behaves_like 'a software definition'
|
293
|
+
context 'version' do
|
294
|
+
let(:version) { '2.0.0.pre' }
|
295
|
+
before { project.override(:software, version: '2.0.0.pre') }
|
394
296
|
|
395
|
-
|
396
|
-
|
397
|
-
let(:expected_url) { 'http://foo.bar/zlib-1.2.8.tar.gz' }
|
398
|
-
|
399
|
-
before do
|
400
|
-
allow(project).to receive(:overrides)
|
401
|
-
.and_return(zlib: { version: '1.2.8', source: { url: expected_url, md5: expected_md5 } })
|
297
|
+
it 'returns the correct version' do
|
298
|
+
expect(subject.version).to eq(version)
|
402
299
|
end
|
403
|
-
|
404
|
-
it_behaves_like 'a software definition'
|
405
|
-
end
|
406
|
-
end
|
407
|
-
end
|
408
|
-
|
409
|
-
context 'while getting version_for_cache' do
|
410
|
-
let(:fetcher) { nil }
|
411
|
-
let(:software_name) { 'zlib' }
|
412
|
-
let(:default_version) { '1.2.6' }
|
413
|
-
|
414
|
-
def get_version_for_cache(expected_version)
|
415
|
-
subject.instance_variable_set(:@fetcher, fetcher)
|
416
|
-
expect(subject.version_for_cache).to eq(expected_version)
|
417
|
-
end
|
418
|
-
|
419
|
-
context 'without a fetcher' do
|
420
|
-
it 'should return the default version' do
|
421
|
-
get_version_for_cache('1.2.6')
|
422
300
|
end
|
423
|
-
end
|
424
301
|
|
425
|
-
|
426
|
-
|
302
|
+
context 'source' do
|
303
|
+
let(:source) { { url: 'http://new.example.com', md5: 'defg5678' } }
|
304
|
+
before { project.override(:software, source: source) }
|
427
305
|
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
end
|
432
|
-
|
433
|
-
context 'with a GitFetcher' do
|
434
|
-
let(:fetcher) do
|
435
|
-
a = GitFetcher.new(subject)
|
436
|
-
allow(a).to receive(:target_revision).and_return('4b19a96d57bff9bbf4764d7323b92a0944009b9e')
|
437
|
-
a
|
438
|
-
end
|
439
|
-
|
440
|
-
it 'should return the git sha' do
|
441
|
-
get_version_for_cache('4b19a96d57bff9bbf4764d7323b92a0944009b9e')
|
306
|
+
it 'returns the correct source' do
|
307
|
+
expect(subject.source).to eq(source)
|
308
|
+
end
|
442
309
|
end
|
443
310
|
end
|
444
311
|
end
|
@@ -448,12 +315,7 @@ module Omnibus
|
|
448
315
|
let(:path) { '/software.rb' }
|
449
316
|
let(:file) { double(File) }
|
450
317
|
|
451
|
-
subject
|
452
|
-
software = described_class.new(project, {}, path)
|
453
|
-
software.name('software')
|
454
|
-
software.version('1.0.0')
|
455
|
-
software
|
456
|
-
end
|
318
|
+
before { subject.instance_variable_set(:@filepath, path) }
|
457
319
|
|
458
320
|
before do
|
459
321
|
allow(File).to receive(:exist?)
|
@@ -465,20 +327,15 @@ module Omnibus
|
|
465
327
|
end
|
466
328
|
|
467
329
|
it 'returns the correct shasum' do
|
468
|
-
expect(subject.shasum).to eq('
|
330
|
+
expect(subject.shasum).to eq('69dcce6da5580abe1da581e3f09d81e13ac676c48790eb0aa44d0ca2f93a16de')
|
469
331
|
end
|
470
332
|
end
|
471
333
|
|
472
334
|
context 'when a filepath is not given' do
|
473
|
-
subject
|
474
|
-
software = described_class.new(project, {})
|
475
|
-
software.name('software')
|
476
|
-
software.version('1.0.0')
|
477
|
-
software
|
478
|
-
end
|
335
|
+
before { subject.send(:remove_instance_variable, :@filepath) }
|
479
336
|
|
480
337
|
it 'returns the correct shasum' do
|
481
|
-
expect(subject.shasum).to eq('
|
338
|
+
expect(subject.shasum).to eq('acd88f56f17b7cbc146f351a9265b652bcf96d544821e7bc1e9663c80617276d')
|
482
339
|
end
|
483
340
|
end
|
484
341
|
end
|