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.
Files changed (302) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +140 -10
  3. data/CHANGELOG.md +181 -8
  4. data/README.md +63 -35
  5. data/Rakefile +1 -1
  6. data/docs/omnibus-build-cache.md b/data/docs/Build → Cache.md +0 -0
  7. data/docs/Building on Debian.md +59 -0
  8. data/docs/Building on OSX.md +61 -35
  9. data/docs/Building on RHEL.md +74 -0
  10. data/docs/Building on Windows.md +40 -81
  11. data/features/commands/build.feature +1 -2
  12. data/features/commands/clean.feature +1 -1
  13. data/lib/omnibus.rb +111 -204
  14. data/lib/omnibus/build_version.rb +3 -20
  15. data/lib/omnibus/build_version_dsl.rb +2 -3
  16. data/lib/omnibus/builder.rb +103 -211
  17. data/lib/omnibus/cleaner.rb +5 -7
  18. data/lib/omnibus/cli.rb +1 -4
  19. data/lib/omnibus/cli/base.rb +9 -16
  20. data/lib/omnibus/compressor.rb +60 -0
  21. data/{spec/data/complicated/config/software/version-manifest.rb → lib/omnibus/compressors/base.rb} +17 -12
  22. data/lib/omnibus/compressors/dmg.rb +312 -0
  23. data/lib/omnibus/{null_builder.rb → compressors/null.rb} +10 -4
  24. data/lib/omnibus/compressors/tgz.rb +141 -0
  25. data/lib/omnibus/config.rb +89 -83
  26. data/lib/omnibus/core_extensions.rb +1 -0
  27. data/lib/omnibus/core_extensions/open_uri.rb +58 -0
  28. data/lib/omnibus/digestable.rb +9 -3
  29. data/lib/omnibus/exceptions.rb +116 -175
  30. data/lib/omnibus/fetcher.rb +97 -138
  31. data/lib/omnibus/fetchers/git_fetcher.rb +130 -165
  32. data/lib/omnibus/fetchers/net_fetcher.rb +205 -164
  33. data/lib/omnibus/fetchers/{s3_cache_fetcher.rb → null_fetcher.rb} +27 -17
  34. data/lib/omnibus/fetchers/path_fetcher.rb +74 -32
  35. data/lib/omnibus/file_syncer.rb +149 -0
  36. data/lib/omnibus/generator.rb +103 -32
  37. data/lib/omnibus/generator_files/.kitchen.yml.erb +5 -1
  38. data/lib/omnibus/generator_files/Gemfile.erb +13 -7
  39. data/lib/omnibus/generator_files/config/projects/project.rb.erb +28 -0
  40. data/lib/omnibus/generator_files/config/software/zlib.rb.erb +55 -0
  41. data/lib/omnibus/generator_files/omnibus.rb.erb +5 -7
  42. data/lib/omnibus/git_cache.rb +11 -13
  43. data/lib/omnibus/logger.rb +76 -22
  44. data/lib/omnibus/logging.rb +1 -1
  45. data/lib/omnibus/metadata.rb +264 -0
  46. data/lib/omnibus/ohai.rb +0 -51
  47. data/lib/omnibus/package.rb +4 -228
  48. data/lib/omnibus/packager.rb +71 -0
  49. data/lib/omnibus/packagers/base.rb +118 -176
  50. data/lib/omnibus/packagers/bff.rb +136 -0
  51. data/lib/omnibus/packagers/deb.rb +389 -0
  52. data/lib/omnibus/packagers/makeself.rb +114 -0
  53. data/lib/omnibus/packagers/msi.rb +346 -0
  54. data/lib/omnibus/packagers/pkg.rb +278 -0
  55. data/lib/omnibus/packagers/rpm.rb +438 -0
  56. data/lib/omnibus/packagers/solaris.rb +110 -0
  57. data/lib/omnibus/project.rb +263 -666
  58. data/lib/omnibus/publisher.rb +3 -3
  59. data/lib/omnibus/s3_cache.rb +21 -30
  60. data/lib/omnibus/software.rb +132 -271
  61. data/lib/omnibus/templating.rb +66 -0
  62. data/lib/omnibus/thread_pool.rb +109 -0
  63. data/lib/omnibus/util.rb +137 -15
  64. data/lib/omnibus/version.rb +1 -1
  65. data/omnibus.gemspec +2 -2
  66. data/resources/bff/gen.template.erb +22 -0
  67. data/resources/bff/postinstall.sh +0 -0
  68. data/resources/bff/unpostinstall.sh +0 -0
  69. data/resources/deb/conffiles.erb +3 -0
  70. data/resources/deb/control.erb +25 -0
  71. data/resources/deb/md5sums.erb +3 -0
  72. data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/background.png +0 -0
  73. data/resources/dmg/create_dmg.osascript.erb +17 -0
  74. data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/icon.png +0 -0
  75. data/{bin → resources/makeself}/makeself-header.sh +0 -0
  76. data/{bin → resources/makeself}/makeself.sh +0 -0
  77. data/{lib/omnibus/generator_files/package_scripts/makeselfinst.erb → resources/makeself/post_extract.sh.erb} +4 -4
  78. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/LICENSE.rtf +0 -0
  79. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/banner_background.bmp +0 -0
  80. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/dialog_background.bmp +0 -0
  81. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project.ico +0 -0
  82. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_16x16.ico +0 -0
  83. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_32x32.ico +0 -0
  84. data/{spec/fixtures/sample/files/windows_msi/Resources/localization-en-us.wxl → resources/msi/localization-en-us.wxl.erb} +3 -4
  85. data/resources/msi/parameters.wxi.erb +9 -0
  86. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/source.wxs.erb +14 -15
  87. data/{lib/omnibus/generator_files/mac_pkg → resources/pkg}/background.png +0 -0
  88. data/resources/pkg/distribution.xml.erb +21 -0
  89. data/resources/pkg/license.html.erb +3 -0
  90. data/resources/pkg/welcome.html.erb +7 -0
  91. data/resources/rpm/rpmmacros.erb +3 -0
  92. data/resources/rpm/signing.erb +40 -0
  93. data/resources/rpm/spec.erb +70 -0
  94. data/spec/functional/builder_spec.rb +90 -111
  95. data/spec/functional/fetchers/git_fetcher_spec.rb +130 -0
  96. data/spec/functional/fetchers/net_fetcher_spec.rb +110 -0
  97. data/spec/functional/fetchers/path_fetcher_spec.rb +97 -0
  98. data/spec/functional/file_syncer_spec.rb +206 -0
  99. data/spec/functional/templating_spec.rb +73 -0
  100. data/spec/spec_helper.rb +31 -94
  101. data/spec/support/env_helpers.rb +20 -0
  102. data/spec/support/examples.rb +56 -0
  103. data/spec/support/file_helpers.rb +46 -0
  104. data/spec/support/git_helpers.rb +107 -0
  105. data/spec/support/logging_helpers.rb +33 -0
  106. data/spec/support/matchers.rb +36 -0
  107. data/spec/support/ohai_helpers.rb +22 -0
  108. data/spec/support/path_helpers.rb +19 -0
  109. data/spec/support/shell_helpers.rb +14 -0
  110. data/spec/unit/build_version_dsl_spec.rb +0 -17
  111. data/spec/unit/build_version_spec.rb +1 -19
  112. data/spec/unit/builder_spec.rb +158 -46
  113. data/spec/unit/compressor_spec.rb +45 -0
  114. data/spec/unit/compressors/base_spec.rb +26 -0
  115. data/spec/unit/compressors/dmg_spec.rb +291 -0
  116. data/spec/unit/compressors/null_spec.rb +23 -0
  117. data/spec/unit/compressors/tgz_spec.rb +67 -0
  118. data/spec/unit/config_spec.rb +27 -34
  119. data/spec/unit/digestable_spec.rb +4 -4
  120. data/spec/unit/fetchers/git_fetcher_spec.rb +110 -39
  121. data/spec/unit/fetchers/net_fetcher_spec.rb +182 -72
  122. data/spec/unit/fetchers/path_fetcher_spec.rb +111 -0
  123. data/spec/unit/generator_spec.rb +137 -0
  124. data/spec/unit/git_cache_spec.rb +24 -34
  125. data/spec/unit/library_spec.rb +21 -82
  126. data/spec/unit/metadata_spec.rb +207 -0
  127. data/spec/unit/ohai_spec.rb +0 -7
  128. data/spec/unit/omnibus_spec.rb +41 -36
  129. data/spec/unit/package_spec.rb +1 -216
  130. data/spec/unit/packagers/base_spec.rb +76 -190
  131. data/spec/unit/packagers/bff_spec.rb +160 -0
  132. data/spec/unit/packagers/deb_spec.rb +324 -0
  133. data/spec/unit/packagers/makeself_spec.rb +80 -0
  134. data/spec/unit/packagers/msi_spec.rb +267 -0
  135. data/spec/unit/packagers/pkg_spec.rb +219 -0
  136. data/spec/unit/packagers/rpm_spec.rb +328 -0
  137. data/spec/unit/project_spec.rb +217 -80
  138. data/spec/unit/publisher_spec.rb +6 -2
  139. data/spec/unit/publishers/artifactory_publisher_spec.rb +1 -1
  140. data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
  141. data/spec/unit/s3_cacher_spec.rb +22 -5
  142. data/spec/unit/software_spec.rb +89 -232
  143. data/spec/unit/util_spec.rb +188 -0
  144. metadata +159 -402
  145. data/features/commands/_deprecated.feature +0 -84
  146. data/lib/omnibus/cleanroom.rb +0 -141
  147. data/lib/omnibus/cli/deprecated.rb +0 -132
  148. data/lib/omnibus/generator_files/mac_pkg/license.html.erb +0 -1
  149. data/lib/omnibus/generator_files/mac_pkg/welcome.html.erb +0 -9
  150. data/lib/omnibus/generator_files/project.rb.erb +0 -20
  151. data/lib/omnibus/generator_files/software/c-example.rb.erb +0 -42
  152. data/lib/omnibus/generator_files/software/erlang-example.rb.erb +0 -38
  153. data/lib/omnibus/generator_files/software/ruby-example.rb.erb +0 -24
  154. data/lib/omnibus/generator_files/windows_msi/localization-en-us.wxl.erb +0 -20
  155. data/lib/omnibus/generator_files/windows_msi/parameters.wxi.erb +0 -9
  156. data/lib/omnibus/packagers/mac_dmg.rb +0 -235
  157. data/lib/omnibus/packagers/mac_pkg.rb +0 -176
  158. data/lib/omnibus/packagers/windows_msi.rb +0 -109
  159. data/spec/data/complicated/config/patches/bzip2/makefile_take_env_vars.patch +0 -15
  160. data/spec/data/complicated/config/patches/couchdb/patch_for_couchjs_stack.patch +0 -19
  161. data/spec/data/complicated/config/patches/gd/gd-2.0.33-configure-libpng.patch +0 -100
  162. data/spec/data/complicated/config/patches/keepalived/keepalived-1.2.9_opscode_centos_5.patch +0 -15
  163. data/spec/data/complicated/config/patches/libedit/freebsd-vi-fix.patch +0 -24
  164. data/spec/data/complicated/config/patches/libiconv/libiconv-1.14_srclib_stdio.in.h-remove-gets-declarations.patch +0 -29
  165. data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-makefile-dest-fix.patch +0 -35
  166. data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-malloc-fix.patch +0 -13
  167. data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch +0 -1035
  168. data/spec/data/complicated/config/patches/logrotate/logrotate_basedir_override.patch +0 -12
  169. data/spec/data/complicated/config/patches/ncurses/ncurses-5.9-solaris-xopen_source_extended-detection.patch +0 -11
  170. data/spec/data/complicated/config/patches/ncurses/ncurses-clang.patch +0 -42
  171. data/spec/data/complicated/config/patches/ncurses/patch-aa +0 -23
  172. data/spec/data/complicated/config/patches/ncurses/patch-ab +0 -44
  173. data/spec/data/complicated/config/patches/ncurses/patch-ac +0 -40
  174. data/spec/data/complicated/config/patches/ncurses/patch-ad +0 -12
  175. data/spec/data/complicated/config/patches/ncurses/patch-aix-configure +0 -23
  176. data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesf.h +0 -22
  177. data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesm.h +0 -22
  178. data/spec/data/complicated/config/patches/nrpe/fix_for_runit.patch +0 -64
  179. data/spec/data/complicated/config/patches/openssl/openssl-1.0.1f-do-not-build-docs.patch +0 -101
  180. data/spec/data/complicated/config/patches/postgresql/postgresql-9.1.2-configure-ncurses-fix.patch +0 -12
  181. data/spec/data/complicated/config/patches/ruby/patch-configure +0 -103
  182. data/spec/data/complicated/config/patches/ruby/ruby-aix-configure.patch +0 -10
  183. data/spec/data/complicated/config/patches/ruby/ruby-openssl-1.0.1c.patch +0 -42
  184. data/spec/data/complicated/config/patches/ruby/ruby_aix_1_9_3_448_ssl_EAGAIN.patch +0 -57
  185. data/spec/data/complicated/config/patches/ruby/rvm-cflags.patch +0 -27
  186. data/spec/data/complicated/config/projects/angrychef.rb +0 -32
  187. data/spec/data/complicated/config/projects/chef-windows.rb +0 -32
  188. data/spec/data/complicated/config/projects/chef.rb +0 -32
  189. data/spec/data/complicated/config/projects/chefdk-windows.rb +0 -41
  190. data/spec/data/complicated/config/projects/chefdk.rb +0 -44
  191. data/spec/data/complicated/config/software/appbundler.rb +0 -25
  192. data/spec/data/complicated/config/software/autoconf.rb +0 -35
  193. data/spec/data/complicated/config/software/automake.rb +0 -39
  194. data/spec/data/complicated/config/software/berkshelf.rb +0 -44
  195. data/spec/data/complicated/config/software/bundler.rb +0 -25
  196. data/spec/data/complicated/config/software/bzip2.rb +0 -46
  197. data/spec/data/complicated/config/software/cacerts.rb +0 -44
  198. data/spec/data/complicated/config/software/chef-client-msi.rb +0 -87
  199. data/spec/data/complicated/config/software/chef-gem.rb +0 -26
  200. data/spec/data/complicated/config/software/chef-vault.rb +0 -43
  201. data/spec/data/complicated/config/software/chef-windows.rb +0 -158
  202. data/spec/data/complicated/config/software/chef.rb +0 -170
  203. data/spec/data/complicated/config/software/chefdk.rb +0 -103
  204. data/spec/data/complicated/config/software/couchdb.rb +0 -53
  205. data/spec/data/complicated/config/software/curl.rb +0 -48
  206. data/spec/data/complicated/config/software/erlang.rb +0 -65
  207. data/spec/data/complicated/config/software/expat.rb +0 -21
  208. data/spec/data/complicated/config/software/fcgi.rb +0 -56
  209. data/spec/data/complicated/config/software/fcgiwrap.rb +0 -41
  210. data/spec/data/complicated/config/software/gd.rb +0 -56
  211. data/spec/data/complicated/config/software/gdbm.rb +0 -40
  212. data/spec/data/complicated/config/software/gecode.rb +0 -48
  213. data/spec/data/complicated/config/software/git.rb +0 -40
  214. data/spec/data/complicated/config/software/help2man.rb +0 -30
  215. data/spec/data/complicated/config/software/icu.rb +0 -40
  216. data/spec/data/complicated/config/software/jre.rb +0 -48
  217. data/spec/data/complicated/config/software/keepalived.rb +0 -43
  218. data/spec/data/complicated/config/software/libarchive.rb +0 -50
  219. data/spec/data/complicated/config/software/libedit.rb +0 -69
  220. data/spec/data/complicated/config/software/libffi.rb +0 -71
  221. data/spec/data/complicated/config/software/libgcc.rb +0 -39
  222. data/spec/data/complicated/config/software/libiconv.rb +0 -55
  223. data/spec/data/complicated/config/software/libjpeg.rb +0 -39
  224. data/spec/data/complicated/config/software/libpng.rb +0 -38
  225. data/spec/data/complicated/config/software/libtool.rb +0 -52
  226. data/spec/data/complicated/config/software/libwrap.rb +0 -50
  227. data/spec/data/complicated/config/software/libxml2.rb +0 -51
  228. data/spec/data/complicated/config/software/libxslt.rb +0 -52
  229. data/spec/data/complicated/config/software/libyaml-windows.rb +0 -43
  230. data/spec/data/complicated/config/software/libyaml.rb +0 -62
  231. data/spec/data/complicated/config/software/logrotate.rb +0 -41
  232. data/spec/data/complicated/config/software/makedepend.rb +0 -73
  233. data/spec/data/complicated/config/software/mysql2.rb +0 -42
  234. data/spec/data/complicated/config/software/nagios-plugins.rb +0 -53
  235. data/spec/data/complicated/config/software/nagios.rb +0 -66
  236. data/spec/data/complicated/config/software/ncurses.rb +0 -149
  237. data/spec/data/complicated/config/software/nginx.rb +0 -40
  238. data/spec/data/complicated/config/software/nodejs.rb +0 -44
  239. data/spec/data/complicated/config/software/nokogiri.rb +0 -55
  240. data/spec/data/complicated/config/software/nrpe.rb +0 -61
  241. data/spec/data/complicated/config/software/ohai.rb +0 -64
  242. data/spec/data/complicated/config/software/omnibus-ctl.rb +0 -34
  243. data/spec/data/complicated/config/software/openresty.rb +0 -67
  244. data/spec/data/complicated/config/software/openssl.rb +0 -158
  245. data/spec/data/complicated/config/software/pcre.rb +0 -42
  246. data/spec/data/complicated/config/software/perl-extutils-embed.rb +0 -15
  247. data/spec/data/complicated/config/software/perl-extutils-makemaker.rb +0 -15
  248. data/spec/data/complicated/config/software/perl.rb +0 -48
  249. data/spec/data/complicated/config/software/perl_pg_driver.rb +0 -12
  250. data/spec/data/complicated/config/software/php.rb +0 -41
  251. data/spec/data/complicated/config/software/pip.rb +0 -30
  252. data/spec/data/complicated/config/software/pkg-config.rb +0 -66
  253. data/spec/data/complicated/config/software/popt.rb +0 -47
  254. data/spec/data/complicated/config/software/postgresql.rb +0 -51
  255. data/spec/data/complicated/config/software/preparation.rb +0 -30
  256. data/spec/data/complicated/config/software/pygments.rb +0 -25
  257. data/spec/data/complicated/config/software/python.rb +0 -49
  258. data/spec/data/complicated/config/software/rabbitmq.rb +0 -36
  259. data/spec/data/complicated/config/software/rebar.rb +0 -36
  260. data/spec/data/complicated/config/software/redis.rb +0 -33
  261. data/spec/data/complicated/config/software/rsync.rb +0 -48
  262. data/spec/data/complicated/config/software/ruby-windows-devkit.rb +0 -30
  263. data/spec/data/complicated/config/software/ruby-windows.rb +0 -30
  264. data/spec/data/complicated/config/software/ruby.rb +0 -162
  265. data/spec/data/complicated/config/software/rubygems-customization.rb +0 -57
  266. data/spec/data/complicated/config/software/rubygems.rb +0 -37
  267. data/spec/data/complicated/config/software/runit.rb +0 -118
  268. data/spec/data/complicated/config/software/server-jre.rb +0 -46
  269. data/spec/data/complicated/config/software/setuptools.rb +0 -30
  270. data/spec/data/complicated/config/software/spawn-fcgi.rb +0 -40
  271. data/spec/data/complicated/config/software/sphinx.rb +0 -26
  272. data/spec/data/complicated/config/software/spidermonkey.rb +0 -60
  273. data/spec/data/complicated/config/software/sqitch.rb +0 -24
  274. data/spec/data/complicated/config/software/test-kitchen.rb +0 -39
  275. data/spec/data/complicated/config/software/unicorn.rb +0 -27
  276. data/spec/data/complicated/config/software/util-macros.rb +0 -46
  277. data/spec/data/complicated/config/software/xproto.rb +0 -46
  278. data/spec/data/complicated/config/software/yajl.rb +0 -30
  279. data/spec/data/complicated/config/software/zlib.rb +0 -67
  280. data/spec/data/overrides/bad_line.overrides +0 -3
  281. data/spec/data/overrides/good.overrides +0 -5
  282. data/spec/data/overrides/with_dupes.overrides +0 -4
  283. data/spec/data/projects/chefdk.rb +0 -41
  284. data/spec/data/projects/sample.rb +0 -13
  285. data/spec/data/software/erchef.rb +0 -42
  286. data/spec/data/software/zlib.rb +0 -67
  287. data/spec/fixtures/sample/files/mac_dmg/Resources/background.png +0 -0
  288. data/spec/fixtures/sample/files/mac_dmg/Resources/icon.png +0 -0
  289. data/spec/fixtures/sample/files/mac_pkg/Resources/background.png +0 -0
  290. data/spec/fixtures/sample/files/mac_pkg/Resources/license.html +0 -1
  291. data/spec/fixtures/sample/files/mac_pkg/Resources/welcome.html +0 -9
  292. data/spec/fixtures/sample/files/windows_msi/Resources/assets/LICENSE.rtf +0 -8
  293. data/spec/fixtures/sample/files/windows_msi/Resources/assets/banner_background.bmp +0 -0
  294. data/spec/fixtures/sample/files/windows_msi/Resources/assets/dialog_background.bmp +0 -0
  295. data/spec/fixtures/sample/files/windows_msi/Resources/assets/project.ico +0 -0
  296. data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_16x16.ico +0 -0
  297. data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_32x32.ico +0 -0
  298. data/spec/fixtures/sample/files/windows_msi/Resources/parameters.wxi.erb +0 -9
  299. data/spec/fixtures/sample/files/windows_msi/Resources/source.wxs +0 -74
  300. data/spec/integration/packagers/mac_spec.rb +0 -58
  301. data/spec/integration/packagers/windows_spec.rb +0 -70
  302. data/spec/unit/packagers/mac_pkg_spec.rb +0 -151
@@ -2,8 +2,25 @@ require 'spec_helper'
2
2
 
3
3
  module Omnibus
4
4
  describe S3Cache do
5
- let(:ruby_19) { double(name: 'ruby', version: '1.9.3', checksum: 'abcd1234') }
6
- let(:python_27) { double(name: 'python', version: '2.7', checksum: 'defg5678') }
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(S3Cache).to receive(:fetch).with(ruby_19)
60
- expect(S3Cache).to receive(:fetch).with(python_27)
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
@@ -2,32 +2,24 @@ require 'spec_helper'
2
2
 
3
3
  module Omnibus
4
4
  describe Software do
5
- let(:software_name) { 'erchef' }
6
- let(:software_file) { software_path(software_name) }
7
-
8
- let(:project) {
9
- project = double(Project,
10
- name: 'chef',
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 { Software.load(project, software_file) }
12
+ subject do
13
+ described_class.new(project).evaluate do
14
+ name 'software'
15
+ default_version '1.2.3'
24
16
 
25
- before do
26
- allow_any_instance_of(Software).to receive(:render_tasks)
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,/monkeys/embedded/lib -L/monkeys/embedded/lib',
70
- 'CFLAGS' => '-I/monkeys/embedded/include',
71
- 'LD_RUN_PATH' => '/monkeys/embedded/lib',
72
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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,/monkeys/embedded/lib -L/monkeys/embedded/lib',
78
- 'CFLAGS' => '-I/monkeys/embedded/include',
79
- 'LD_RUN_PATH' => '/monkeys/embedded/lib',
80
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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,/monkeys/embedded/lib -L/monkeys/embedded/lib',
86
- 'CFLAGS' => '-I/monkeys/embedded/include',
87
- 'LD_RUN_PATH' => '/monkeys/embedded/lib',
88
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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,/monkeys/embedded/lib -L/monkeys/embedded/lib',
95
- 'CFLAGS' => '-I/monkeys/embedded/include',
96
- 'LD_RUN_PATH' => '/monkeys/embedded/lib',
97
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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/monkeys/embedded/lib -L/monkeys/embedded/lib -static-libgcc',
113
- 'CFLAGS' => '-I/monkeys/embedded/include',
114
- 'LD_RUN_PATH' => '/monkeys/embedded/lib',
115
- 'LD_OPTIONS' => '-R/monkeys/embedded/lib',
116
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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/monkeys/embedded/lib',
127
- 'CFLAGS' => '-I/monkeys/embedded/include',
128
- 'LD_RUN_PATH' => '/monkeys/embedded/lib',
129
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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/monkeys/embedded/include -O',
147
- 'LDFLAGS' => '-q64 -L/monkeys/embedded/lib -Wl,-blibpath:/monkeys/embedded/lib:/usr/lib:/lib',
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' => '/monkeys/embedded/lib',
152
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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/monkeys/embedded/include',
170
- 'LDFLAGS' => '-L/monkeys/embedded/lib -Wl,-blibpath:/monkeys/embedded/lib:/usr/lib:/lib',
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' => '/monkeys/embedded/lib',
175
- 'PKG_CONFIG_PATH' => '/monkeys/embedded/lib/pkgconfig'
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' => '/monkeys/bin:/monkeys/embedded/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin'
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' => '/monkeys/bin:/monkeys/embedded/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin'
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:/monkeys')
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:/monkeys/bin;c:/monkeys/embedded/bin;c:/Ruby999/bin;c:/Windows/system32;c:/Windows;c:/Windows/System32/Wbem'
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:/monkeys/bin;c:/monkeys/embedded/bin;c:/Ruby999/bin;c:/Windows/system32;c:/Windows;c:/Windows/System32/Wbem'
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) { Software.new(project).tap { |s| s.name('zlib') } }
257
- let(:erchef) { Software.new(project).tap { |s| s.name('erchef') } }
258
- let(:bacon) { Software.new(project).tap { |s| s.name('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
- it_behaves_like 'a software definition'
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
- let(:overrides) { { 'chaos_monkey' => '1.2.8' } }
365
- subject { Software.load(project, software_file, overrides) }
285
+ before { project.override(:chaos_monkey, version: '1.2.8') }
366
286
 
367
- it_behaves_like 'a software definition'
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
- let(:expected_version) { '1.2.8' }
372
- let(:expected_override_version) { '1.2.8' }
373
- let(:overrides) { { software_name => expected_override_version } }
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
- context 'with the source overridden' do
396
- let(:expected_md5) { '1234567890' }
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
- context 'with a NetFetcher' do
426
- let(:fetcher) { NetFetcher.new(subject) }
302
+ context 'source' do
303
+ let(:source) { { url: 'http://new.example.com', md5: 'defg5678' } }
304
+ before { project.override(:software, source: source) }
427
305
 
428
- it 'should return the default version' do
429
- get_version_for_cache('1.2.6')
430
- end
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 do
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('348b605ee8e8325ad32a4837f0784aa2203b19a87a820dd4456dd5a798a62713')
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 do
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('333f0052cc38f15e7f6c4d5b3e2a5337a01888f621e162476ecbf5eb91ae8a30')
338
+ expect(subject.shasum).to eq('acd88f56f17b7cbc146f351a9265b652bcf96d544821e7bc1e9663c80617276d')
482
339
  end
483
340
  end
484
341
  end