omnibus 6.0.1 → 6.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/lib/omnibus/build_version.rb +1 -1
- data/lib/omnibus/builder.rb +1 -1
- data/lib/omnibus/changelog.rb +1 -1
- data/lib/omnibus/compressors/dmg.rb +18 -6
- data/lib/omnibus/core_extensions/open_uri.rb +1 -1
- data/lib/omnibus/exceptions.rb +103 -103
- data/lib/omnibus/fetchers/net_fetcher.rb +8 -6
- data/lib/omnibus/generator_files/.kitchen.local.yml.erb +10 -0
- data/lib/omnibus/generator_files/.kitchen.yml.erb +41 -0
- data/lib/omnibus/generator_files/Gemfile.erb +3 -3
- data/lib/omnibus/git_repository.rb +1 -1
- data/lib/omnibus/licensing.rb +1 -0
- data/lib/omnibus/metadata.rb +15 -15
- data/lib/omnibus/packager.rb +11 -10
- data/lib/omnibus/packagers/appx.rb +4 -4
- data/lib/omnibus/packagers/base.rb +19 -0
- data/lib/omnibus/packagers/bff.rb +13 -13
- data/lib/omnibus/packagers/deb.rb +14 -14
- data/lib/omnibus/packagers/ips.rb +7 -7
- data/lib/omnibus/packagers/msi.rb +73 -25
- data/lib/omnibus/packagers/pkg.rb +10 -10
- data/lib/omnibus/packagers/pkgsrc.rb +5 -5
- data/lib/omnibus/packagers/rpm.rb +31 -31
- data/lib/omnibus/packagers/solaris.rb +2 -2
- data/lib/omnibus/packagers/windows_base.rb +2 -2
- data/lib/omnibus/project.rb +4 -0
- data/lib/omnibus/publishers/artifactory_publisher.rb +17 -17
- data/lib/omnibus/publishers/s3_publisher.rb +20 -6
- data/lib/omnibus/s3_cache.rb +5 -5
- data/lib/omnibus/s3_helpers.rb +6 -4
- data/lib/omnibus/software.rb +7 -12
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus/whitelist.rb +1 -0
- data/omnibus.gemspec +6 -7
- data/spec/functional/builder_spec.rb +1 -1
- data/spec/functional/licensing_spec.rb +49 -49
- data/spec/functional/templating_spec.rb +3 -3
- data/spec/support/git_helpers.rb +5 -5
- data/spec/unit/changelog_spec.rb +7 -7
- data/spec/unit/changelogprinter_spec.rb +5 -5
- data/spec/unit/compressors/dmg_spec.rb +7 -2
- data/spec/unit/generator_spec.rb +6 -34
- data/spec/unit/manifest_diff_spec.rb +18 -18
- data/spec/unit/metadata_spec.rb +10 -19
- data/spec/unit/packager_spec.rb +7 -7
- data/spec/unit/packagers/base_spec.rb +17 -0
- data/spec/unit/packagers/deb_spec.rb +1 -1
- data/spec/unit/packagers/ips_spec.rb +1 -1
- data/spec/unit/packagers/msi_spec.rb +45 -0
- data/spec/unit/packagers/pkg_spec.rb +1 -1
- data/spec/unit/packagers/rpm_spec.rb +1 -46
- data/spec/unit/packagers/solaris_spec.rb +3 -3
- data/spec/unit/software_spec.rb +2 -53
- data/spec/unit/util_spec.rb +1 -1
- metadata +21 -28
@@ -32,7 +32,7 @@ module Omnibus
|
|
32
32
|
raise "Could not find #{name} in bundler environment" unless source
|
33
33
|
|
34
34
|
target = File.join(embedded_bin_dir, name)
|
35
|
-
create_link(source, target) unless File.
|
35
|
+
create_link(source, target) unless File.exist?(target)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -449,27 +449,27 @@ module Omnibus
|
|
449
449
|
|
450
450
|
let(:expected_license_texts) do
|
451
451
|
[
|
452
|
-
|
453
|
-
This product includes inifile 3.0.0
|
454
|
-
which is a 'ruby_bundler' dependency of 'zlib',
|
455
|
-
and which is available under a 'MIT' License.
|
456
|
-
For details, see:
|
457
|
-
#{install_dir}/LICENSES/ruby_bundler-inifile-3.0.0-README.md
|
458
|
-
EOH
|
459
|
-
|
460
|
-
This product includes mime-types 3.1
|
461
|
-
which is a 'ruby_bundler' dependency of 'zlib',
|
462
|
-
and which is available under a 'MIT' License.
|
463
|
-
For details, see:
|
464
|
-
#{install_dir}/LICENSES/ruby_bundler-mime-types-3.1-Licence.rdoc
|
465
|
-
EOH
|
466
|
-
|
467
|
-
This product includes mini_portile2 2.1.0
|
468
|
-
which is a 'ruby_bundler' dependency of 'zlib',
|
469
|
-
and which is available under a 'MIT' License.
|
470
|
-
For details, see:
|
471
|
-
#{install_dir}/LICENSES/ruby_bundler-mini_portile2-2.1.0-LICENSE.txt
|
472
|
-
EOH
|
452
|
+
<<~EOH,
|
453
|
+
This product includes inifile 3.0.0
|
454
|
+
which is a 'ruby_bundler' dependency of 'zlib',
|
455
|
+
and which is available under a 'MIT' License.
|
456
|
+
For details, see:
|
457
|
+
#{install_dir}/LICENSES/ruby_bundler-inifile-3.0.0-README.md
|
458
|
+
EOH
|
459
|
+
<<~EOH,
|
460
|
+
This product includes mime-types 3.1
|
461
|
+
which is a 'ruby_bundler' dependency of 'zlib',
|
462
|
+
and which is available under a 'MIT' License.
|
463
|
+
For details, see:
|
464
|
+
#{install_dir}/LICENSES/ruby_bundler-mime-types-3.1-Licence.rdoc
|
465
|
+
EOH
|
466
|
+
<<~EOH,
|
467
|
+
This product includes mini_portile2 2.1.0
|
468
|
+
which is a 'ruby_bundler' dependency of 'zlib',
|
469
|
+
and which is available under a 'MIT' License.
|
470
|
+
For details, see:
|
471
|
+
#{install_dir}/LICENSES/ruby_bundler-mini_portile2-2.1.0-LICENSE.txt
|
472
|
+
EOH
|
473
473
|
]
|
474
474
|
end
|
475
475
|
|
@@ -508,34 +508,34 @@ EOH
|
|
508
508
|
|
509
509
|
let(:expected_license_texts) do
|
510
510
|
[
|
511
|
-
|
512
|
-
This product includes inifile 3.0.0
|
513
|
-
which is a 'ruby_bundler' dependency of 'snoopy', 'zlib',
|
514
|
-
and which is available under a 'MIT' License.
|
515
|
-
For details, see:
|
516
|
-
#{install_dir}/LICENSES/ruby_bundler-inifile-3.0.0-README.md
|
517
|
-
EOH
|
518
|
-
|
519
|
-
This product includes mime-types 3.1
|
520
|
-
which is a 'ruby_bundler' dependency of 'zlib',
|
521
|
-
and which is available under a 'MIT' License.
|
522
|
-
For details, see:
|
523
|
-
#{install_dir}/LICENSES/ruby_bundler-mime-types-3.1-Licence.rdoc
|
524
|
-
EOH
|
525
|
-
|
526
|
-
This product includes mini_portile2 2.1.0
|
527
|
-
which is a 'ruby_bundler' dependency of 'zlib',
|
528
|
-
and which is available under a 'MIT' License.
|
529
|
-
For details, see:
|
530
|
-
#{install_dir}/LICENSES/ruby_bundler-mini_portile2-2.1.0-LICENSE.txt
|
531
|
-
EOH
|
532
|
-
|
533
|
-
This product includes bundler-audit 0.5.0
|
534
|
-
which is a 'ruby_bundler' dependency of 'snoopy',
|
535
|
-
and which is available under a 'GPLv3' License.
|
536
|
-
For details, see:
|
537
|
-
#{install_dir}/LICENSES/ruby_bundler-bundler-audit-0.5.0-COPYING.txt
|
538
|
-
EOH
|
511
|
+
<<~EOH,
|
512
|
+
This product includes inifile 3.0.0
|
513
|
+
which is a 'ruby_bundler' dependency of 'snoopy', 'zlib',
|
514
|
+
and which is available under a 'MIT' License.
|
515
|
+
For details, see:
|
516
|
+
#{install_dir}/LICENSES/ruby_bundler-inifile-3.0.0-README.md
|
517
|
+
EOH
|
518
|
+
<<~EOH,
|
519
|
+
This product includes mime-types 3.1
|
520
|
+
which is a 'ruby_bundler' dependency of 'zlib',
|
521
|
+
and which is available under a 'MIT' License.
|
522
|
+
For details, see:
|
523
|
+
#{install_dir}/LICENSES/ruby_bundler-mime-types-3.1-Licence.rdoc
|
524
|
+
EOH
|
525
|
+
<<~EOH,
|
526
|
+
This product includes mini_portile2 2.1.0
|
527
|
+
which is a 'ruby_bundler' dependency of 'zlib',
|
528
|
+
and which is available under a 'MIT' License.
|
529
|
+
For details, see:
|
530
|
+
#{install_dir}/LICENSES/ruby_bundler-mini_portile2-2.1.0-LICENSE.txt
|
531
|
+
EOH
|
532
|
+
<<~EOH,
|
533
|
+
This product includes bundler-audit 0.5.0
|
534
|
+
which is a 'ruby_bundler' dependency of 'snoopy',
|
535
|
+
and which is available under a 'GPLv3' License.
|
536
|
+
For details, see:
|
537
|
+
#{install_dir}/LICENSES/ruby_bundler-bundler-audit-0.5.0-COPYING.txt
|
538
|
+
EOH
|
539
539
|
|
540
540
|
]
|
541
541
|
end
|
@@ -19,14 +19,14 @@ module Omnibus
|
|
19
19
|
<% if false -%>
|
20
20
|
This is magic!
|
21
21
|
<% end -%>
|
22
|
-
|
22
|
+
EOH
|
23
23
|
end
|
24
24
|
|
25
25
|
let(:options) do
|
26
26
|
{
|
27
27
|
destination: destination,
|
28
|
-
variables:
|
29
|
-
mode:
|
28
|
+
variables: variables,
|
29
|
+
mode: mode,
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
data/spec/support/git_helpers.rb
CHANGED
@@ -111,12 +111,12 @@ module Omnibus
|
|
111
111
|
#
|
112
112
|
time = Time.at(680227200).utc.strftime("%c %z")
|
113
113
|
env = {
|
114
|
-
"GIT_AUTHOR_NAME"
|
115
|
-
"GIT_AUTHOR_EMAIL"
|
116
|
-
"GIT_AUTHOR_DATE"
|
117
|
-
"GIT_COMMITTER_NAME"
|
114
|
+
"GIT_AUTHOR_NAME" => "omnibus",
|
115
|
+
"GIT_AUTHOR_EMAIL" => "omnibus@getchef.com",
|
116
|
+
"GIT_AUTHOR_DATE" => time,
|
117
|
+
"GIT_COMMITTER_NAME" => "omnibus",
|
118
118
|
"GIT_COMMITTER_EMAIL" => "omnibus@gechef.com",
|
119
|
-
"GIT_COMMITTER_DATE"
|
119
|
+
"GIT_COMMITTER_DATE" => time,
|
120
120
|
}
|
121
121
|
|
122
122
|
shellout!("git #{command}", env: env)
|
data/spec/unit/changelog_spec.rb
CHANGED
@@ -4,7 +4,7 @@ module Omnibus
|
|
4
4
|
describe ChangeLog do
|
5
5
|
describe "#new" do
|
6
6
|
it "sets the start_ref to the latest tag if none is set" do
|
7
|
-
repo = double(GitRepository, :
|
7
|
+
repo = double(GitRepository, latest_tag: "1.0")
|
8
8
|
expect(ChangeLog.new(nil, "2.0", repo).start_ref).to eq("1.0")
|
9
9
|
end
|
10
10
|
|
@@ -15,38 +15,38 @@ module Omnibus
|
|
15
15
|
|
16
16
|
describe "#changelog_entries" do
|
17
17
|
it "returns any git log lines with the ChangeLog: tag, removing the tag" do
|
18
|
-
repo = double(GitRepository, :
|
18
|
+
repo = double(GitRepository, commit_messages: ["ChangeLog-Entry: foobar\n",
|
19
19
|
"ChangeLog-Entry: wombat\n"])
|
20
20
|
changelog = ChangeLog.new("0.0.1", "0.0.2", repo)
|
21
21
|
expect(changelog.changelog_entries).to eq(%W{foobar\n wombat\n})
|
22
22
|
end
|
23
23
|
|
24
24
|
it "returns an empty array if there were no changelog entries" do
|
25
|
-
repo = double(GitRepository, :
|
25
|
+
repo = double(GitRepository, commit_messages: [])
|
26
26
|
changelog = ChangeLog.new("0.0.1", "0.0.2", repo)
|
27
27
|
expect(changelog.changelog_entries).to eq([])
|
28
28
|
end
|
29
29
|
|
30
30
|
it "does not return git messages without a ChangeLog: tag" do
|
31
|
-
repo = double(GitRepository, :
|
31
|
+
repo = double(GitRepository, commit_messages: %W{foobar\n wombat\n})
|
32
32
|
changelog = ChangeLog.new("0.0.1", "0.0.2", repo)
|
33
33
|
expect(changelog.changelog_entries).to eq([])
|
34
34
|
end
|
35
35
|
|
36
36
|
it "does not return blank lines" do
|
37
|
-
repo = double(GitRepository, :
|
37
|
+
repo = double(GitRepository, commit_messages: %W{\n \n})
|
38
38
|
changelog = ChangeLog.new("0.0.1", "0.0.2", repo)
|
39
39
|
expect(changelog.changelog_entries).to eq([])
|
40
40
|
end
|
41
41
|
|
42
42
|
it "can handle multi-line ChangeLog entries" do
|
43
|
-
repo = double(GitRepository, :
|
43
|
+
repo = double(GitRepository, commit_messages: ["ChangeLog-Entry: foobar\n", "foobaz\n"])
|
44
44
|
changelog = ChangeLog.new("0.0.1", "0.0.2", repo)
|
45
45
|
expect(changelog.changelog_entries).to eq(["foobar\nfoobaz\n"])
|
46
46
|
end
|
47
47
|
|
48
48
|
it "end a ChangeLog entry at the first blank line" do
|
49
|
-
repo = double(GitRepository, :
|
49
|
+
repo = double(GitRepository, commit_messages: ["ChangeLog-Entry: foobar\n", "\n", "foobaz\n"])
|
50
50
|
changelog = ChangeLog.new("0.0.1", "0.0.2", repo)
|
51
51
|
expect(changelog.changelog_entries).to eq(["foobar\n"])
|
52
52
|
end
|
@@ -6,11 +6,11 @@ module Omnibus
|
|
6
6
|
describe ChangeLogPrinter do
|
7
7
|
describe "#print" do
|
8
8
|
def manifest_entry_for(name, dv, lv, source_type = :local)
|
9
|
-
Omnibus::ManifestEntry.new(name, { :
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
9
|
+
Omnibus::ManifestEntry.new(name, { described_version: dv,
|
10
|
+
locked_version: lv,
|
11
|
+
locked_source: {
|
12
|
+
git: "git://#{name}@example.com" },
|
13
|
+
source_type: source_type,
|
14
14
|
})
|
15
15
|
end
|
16
16
|
|
@@ -86,11 +86,9 @@ module Omnibus
|
|
86
86
|
expect(subject).to receive(:shellout!)
|
87
87
|
.with <<-EOH.gsub(/^ {12}/, "")
|
88
88
|
hdiutil create \\
|
89
|
-
-srcfolder "#{staging_dir}/Resources" \\
|
90
89
|
-volname "Project One" \\
|
91
90
|
-fs HFS+ \\
|
92
91
|
-fsargs "-c c=64,a=16,e=16" \\
|
93
|
-
-format UDRW \\
|
94
92
|
-size 512000k \\
|
95
93
|
"#{staging_dir}/project-writable.dmg"
|
96
94
|
EOH
|
@@ -130,6 +128,13 @@ module Omnibus
|
|
130
128
|
end
|
131
129
|
end
|
132
130
|
|
131
|
+
describe "#copy_assets_to_dmg" do
|
132
|
+
it "logs a message" do
|
133
|
+
output = capture_logging { subject.copy_assets_to_dmg }
|
134
|
+
expect(output).to include("Copying assets into dmg")
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
133
138
|
describe "#set_volume_icon" do
|
134
139
|
it "logs a message" do
|
135
140
|
output = capture_logging { subject.set_volume_icon }
|
data/spec/unit/generator_spec.rb
CHANGED
@@ -51,9 +51,7 @@ module Omnibus
|
|
51
51
|
it "generates the proper file structure" do
|
52
52
|
Generator.new(["name"], path: tmp_path, bff_assets: true).invoke_all
|
53
53
|
|
54
|
-
expect(structure).to include(
|
55
|
-
omnibus-name/resources/name/bff/gen.template.erb
|
56
|
-
})
|
54
|
+
expect(structure).to include("omnibus-name/resources/name/bff/gen.template.erb")
|
57
55
|
end
|
58
56
|
end
|
59
57
|
|
@@ -61,11 +59,7 @@ module Omnibus
|
|
61
59
|
it "generates the proper file structure" do
|
62
60
|
Generator.new(["name"], path: tmp_path, deb_assets: true).invoke_all
|
63
61
|
|
64
|
-
expect(structure).to include(
|
65
|
-
omnibus-name/resources/name/deb/conffiles.erb
|
66
|
-
omnibus-name/resources/name/deb/control.erb
|
67
|
-
omnibus-name/resources/name/deb/md5sums.erb
|
68
|
-
})
|
62
|
+
expect(structure).to include("omnibus-name/resources/name/deb/conffiles.erb", "omnibus-name/resources/name/deb/control.erb", "omnibus-name/resources/name/deb/md5sums.erb")
|
69
63
|
end
|
70
64
|
end
|
71
65
|
|
@@ -73,10 +67,7 @@ module Omnibus
|
|
73
67
|
it "generates the proper file structure" do
|
74
68
|
Generator.new(["name"], path: tmp_path, dmg_assets: true).invoke_all
|
75
69
|
|
76
|
-
expect(structure).to include(
|
77
|
-
omnibus-name/resources/name/dmg/background.png
|
78
|
-
omnibus-name/resources/name/dmg/icon.png
|
79
|
-
})
|
70
|
+
expect(structure).to include("omnibus-name/resources/name/dmg/background.png", "omnibus-name/resources/name/dmg/icon.png")
|
80
71
|
end
|
81
72
|
end
|
82
73
|
|
@@ -84,17 +75,7 @@ module Omnibus
|
|
84
75
|
it "generates the proper file structure" do
|
85
76
|
Generator.new(["name"], path: tmp_path, msi_assets: true).invoke_all
|
86
77
|
|
87
|
-
expect(structure).to include(
|
88
|
-
omnibus-name/resources/name/msi/assets/LICENSE.rtf
|
89
|
-
omnibus-name/resources/name/msi/assets/banner_background.bmp
|
90
|
-
omnibus-name/resources/name/msi/assets/dialog_background.bmp
|
91
|
-
omnibus-name/resources/name/msi/assets/project.ico
|
92
|
-
omnibus-name/resources/name/msi/assets/project_16x16.ico
|
93
|
-
omnibus-name/resources/name/msi/assets/project_32x32.ico
|
94
|
-
omnibus-name/resources/name/msi/localization-en-us.wxl.erb
|
95
|
-
omnibus-name/resources/name/msi/parameters.wxi.erb
|
96
|
-
omnibus-name/resources/name/msi/source.wxs.erb
|
97
|
-
})
|
78
|
+
expect(structure).to include("omnibus-name/resources/name/msi/assets/LICENSE.rtf", "omnibus-name/resources/name/msi/assets/banner_background.bmp", "omnibus-name/resources/name/msi/assets/dialog_background.bmp", "omnibus-name/resources/name/msi/assets/project.ico", "omnibus-name/resources/name/msi/assets/project_16x16.ico", "omnibus-name/resources/name/msi/assets/project_32x32.ico", "omnibus-name/resources/name/msi/localization-en-us.wxl.erb", "omnibus-name/resources/name/msi/parameters.wxi.erb", "omnibus-name/resources/name/msi/source.wxs.erb")
|
98
79
|
end
|
99
80
|
end
|
100
81
|
|
@@ -102,12 +83,7 @@ module Omnibus
|
|
102
83
|
it "generates the proper file structure" do
|
103
84
|
Generator.new(["name"], path: tmp_path, pkg_assets: true).invoke_all
|
104
85
|
|
105
|
-
expect(structure).to include(
|
106
|
-
omnibus-name/resources/name/pkg/background.png
|
107
|
-
omnibus-name/resources/name/pkg/license.html.erb
|
108
|
-
omnibus-name/resources/name/pkg/welcome.html.erb
|
109
|
-
omnibus-name/resources/name/pkg/distribution.xml.erb
|
110
|
-
})
|
86
|
+
expect(structure).to include("omnibus-name/resources/name/pkg/background.png", "omnibus-name/resources/name/pkg/license.html.erb", "omnibus-name/resources/name/pkg/welcome.html.erb", "omnibus-name/resources/name/pkg/distribution.xml.erb")
|
111
87
|
end
|
112
88
|
end
|
113
89
|
|
@@ -115,11 +91,7 @@ module Omnibus
|
|
115
91
|
it "generates the proper file structure" do
|
116
92
|
Generator.new(["name"], path: tmp_path, rpm_assets: true).invoke_all
|
117
93
|
|
118
|
-
expect(structure).to include(
|
119
|
-
omnibus-name/resources/name/rpm/rpmmacros.erb
|
120
|
-
omnibus-name/resources/name/rpm/signing.erb
|
121
|
-
omnibus-name/resources/name/rpm/spec.erb
|
122
|
-
})
|
94
|
+
expect(structure).to include("omnibus-name/resources/name/rpm/rpmmacros.erb", "omnibus-name/resources/name/rpm/signing.erb", "omnibus-name/resources/name/rpm/spec.erb")
|
123
95
|
end
|
124
96
|
end
|
125
97
|
end
|
@@ -3,11 +3,11 @@ require "spec_helper"
|
|
3
3
|
module Omnibus
|
4
4
|
describe ManifestDiff do
|
5
5
|
def manifest_entry_for(name, dv, lv)
|
6
|
-
Omnibus::ManifestEntry.new(name, { :
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
6
|
+
Omnibus::ManifestEntry.new(name, { described_version: dv,
|
7
|
+
locked_version: lv,
|
8
|
+
locked_source: {
|
9
|
+
git: "git://#{name}@example.com" },
|
10
|
+
source_type: :git,
|
11
11
|
})
|
12
12
|
end
|
13
13
|
|
@@ -31,30 +31,30 @@ module Omnibus
|
|
31
31
|
|
32
32
|
describe "#updated" do
|
33
33
|
it "returns items that existed in the first manifest but have been changed" do
|
34
|
-
expect(subject.updated).to eq([{ :
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
34
|
+
expect(subject.updated).to eq([{ name: "foo",
|
35
|
+
old_version: "deadbeef",
|
36
|
+
new_version: "deadbea0",
|
37
|
+
source_type: :git,
|
38
|
+
source: { git: "git://foo@example.com" },
|
39
39
|
}])
|
40
40
|
end
|
41
41
|
|
42
42
|
describe "#removed" do
|
43
43
|
it "returns items that existed in the first manfiest but don't exist in the second" do
|
44
|
-
expect(subject.removed).to eq([{ :
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
44
|
+
expect(subject.removed).to eq([{ name: "bar",
|
45
|
+
old_version: "deadbeef",
|
46
|
+
source_type: :git,
|
47
|
+
source: { git: "git://bar@example.com" },
|
48
48
|
}])
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
describe "#added" do
|
53
53
|
it "returns items that did not exist in the first manifest but do exist in the second" do
|
54
|
-
expect(subject.added).to eq([{ :
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
54
|
+
expect(subject.added).to eq([{ name: "quux",
|
55
|
+
new_version: "deadbeef",
|
56
|
+
source_type: :git,
|
57
|
+
source: { git: "git://quux@example.com" },
|
58
58
|
}])
|
59
59
|
end
|
60
60
|
end
|
data/spec/unit/metadata_spec.rb
CHANGED
@@ -42,20 +42,20 @@ module Omnibus
|
|
42
42
|
|
43
43
|
let(:data) { { foo: "bar" } }
|
44
44
|
let(:license_file_content) do
|
45
|
-
|
46
|
-
some_project 1.2.3 license: "Apache-2.0"
|
45
|
+
<<~EOH
|
46
|
+
some_project 1.2.3 license: "Apache-2.0"
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
48
|
+
Apache License
|
49
|
+
Version 2.0, January 2004
|
50
|
+
http://www.apache.org/licenses/
|
51
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
52
52
|
|
53
|
-
1. Definitions.
|
53
|
+
1. Definitions.
|
54
54
|
|
55
|
-
|
56
|
-
|
55
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
56
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
57
57
|
|
58
|
-
...
|
58
|
+
...
|
59
59
|
EOH
|
60
60
|
end
|
61
61
|
|
@@ -219,9 +219,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
219
219
|
it_behaves_like "a version manipulator", "fedora", "11.5", "11"
|
220
220
|
it_behaves_like "a version manipulator", "freebsd", "10.0", "10"
|
221
221
|
it_behaves_like "a version manipulator", "gentoo", "4.9.95-gentoo", "rolling"
|
222
|
-
it_behaves_like "a version manipulator", "ios_xr", "6.0.0.14I", "6"
|
223
222
|
it_behaves_like "a version manipulator", "mac_os_x", "10.9.1", "10.9"
|
224
|
-
it_behaves_like "a version manipulator", "nexus", "5.0", "5"
|
225
223
|
it_behaves_like "a version manipulator", "omnios", "r151010", "r151010"
|
226
224
|
it_behaves_like "a version manipulator", "openbsd", "5.4.4", "5.4"
|
227
225
|
it_behaves_like "a version manipulator", "opensuseleap", "42.3", "42.3"
|
@@ -295,13 +293,6 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
295
293
|
expect(instance[:platform]).to eq("ubuntu")
|
296
294
|
end
|
297
295
|
|
298
|
-
it "ensures platform version is properly truncated" do
|
299
|
-
allow(File).to receive(:read).and_return('{ "platform": "el", "platform_version": "5.10" }')
|
300
|
-
instance = described_class.for_package(package)
|
301
|
-
|
302
|
-
expect(instance[:platform_version]).to eq("5")
|
303
|
-
end
|
304
|
-
|
305
296
|
it "correctly truncates sles platform versions" do
|
306
297
|
allow(File).to receive(:read).and_return('{ "platform": "sles", "platform_version": "11.2" }')
|
307
298
|
instance = described_class.for_package(package)
|