vanagon 0.15.14 → 0.15.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 037a5f792537eae08958a3ccb82ed908104f52a770d16b81ce75264d594be195
4
- data.tar.gz: 8ba2df606dc65a7d0967174d1f5831cba8cc329cfa812bdc322971c995cc233c
2
+ SHA1:
3
+ metadata.gz: a479ccb554a2a480e5a1f7f7cd9f7e89a5ae5635
4
+ data.tar.gz: 64f0995acc0459921a607f17d3ebb0b825f0989f
5
5
  SHA512:
6
- metadata.gz: 6b69a1cf141753c3eabff25f4ab4b58695b3143bfa405c50fa8eb1aa5aceba1013943a461ab99104ceb8538133f41328dcd6a934a80a24b50a1e2bac5978091a
7
- data.tar.gz: 2c0f44dee33c41bd21d51485f9ecebced93e43e6baa2fe5205269cf39f4ced5ab86c0a09d5baf31a8771c480ec00633a45cf19c5e43e144f4a9d09da4bb52020
6
+ metadata.gz: d7eb69451fccf9045fbe6f6cafe82a7339b24eed72c71bf517858c87db94eff2441f0addec52ba30149addf2fe7affc9ff300ccfb17f20b8362b724f813112ef
7
+ data.tar.gz: 9adf6c7d19853763c218fa9a88f11a177394742821ec148e38c02ceed7bac84f27f52846b4fd70045beb81831a2811beacb4edcaff4c93bf58396cc16b01ebc1
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+ require 'json'
3
+ require 'vanagon/extensions/ostruct/json'
4
+ require 'vanagon/extensions/set/json'
5
+ require 'vanagon/extensions/hashable'
6
+
7
+ load File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "vanagon.rb"))
8
+
9
+ optparse = Vanagon::OptParse.new("#{File.basename(__FILE__)} <project-name> <platform-name> [options]", %i[workdir configdir engine])
10
+ options = optparse.parse! ARGV
11
+
12
+ project = ARGV[0]
13
+ platform = ARGV[1]
14
+
15
+ unless project and platform
16
+ warn "project and platform are both required arguments."
17
+ warn optparse
18
+ exit 1
19
+ end
20
+
21
+ driver = Vanagon::Driver.new(platform, project)
22
+ components = driver.project.components
23
+ component_names = components.map(&:name)
24
+ build_requirements = []
25
+ components.each do |component|
26
+ build_requirements << component.build_requires.reject do |req|
27
+ # only include external requirements: i.e. those that do not match
28
+ # other components in the project
29
+ component_names.include?(req)
30
+ end
31
+ end
32
+ $stdout.puts
33
+ $stdout.puts "**** External packages required to build #{project} on #{platform}: ***"
34
+ $stdout.puts JSON.pretty_generate(build_requirements.flatten.uniq.sort)
35
+
@@ -13,7 +13,8 @@ class Vanagon
13
13
  # - Ryan McKern, 2017-01-27
14
14
 
15
15
  # The name, version, primary source, supplementary sources,
16
- # associated patches, upstream URL, and license of a given component
16
+ # associated patches, upstream URL (for fetching the source),
17
+ # homepage, and license of a given component
17
18
  attr_accessor :name
18
19
  attr_accessor :version
19
20
  attr_accessor :source
@@ -22,6 +23,7 @@ class Vanagon
22
23
  attr_accessor :url
23
24
  attr_accessor :mirrors
24
25
  attr_accessor :license
26
+ attr_accessor :homepage
25
27
 
26
28
  # holds an OpenStruct describing all of the particular details about
27
29
  # how any services associated with a given component should be defined.
@@ -521,6 +521,13 @@ class Vanagon
521
521
  def install_only(install_only)
522
522
  @component.install_only = install_only
523
523
  end
524
+
525
+ # Set the homepage for the component
526
+ #
527
+ # @param homepage
528
+ def homepage(homepage)
529
+ @component.homepage = homepage
530
+ end
524
531
  end
525
532
  end
526
533
  end
@@ -49,7 +49,7 @@ class Vanagon
49
49
  # @param ref [String] ref to checkout from git repo
50
50
  # @param workdir [String] working directory to clone into
51
51
  def initialize(url, workdir:, **options)
52
- opts = default_options.merge(options)
52
+ opts = default_options.merge(options.reject { |k, v| v.nil? })
53
53
 
54
54
  # Ensure that #url returns a URI object
55
55
  @url = URI.parse(url.to_s)
@@ -816,6 +816,14 @@ end" }
816
816
  end
817
817
  end
818
818
 
819
+ describe '#homepage' do
820
+ it 'adds the homepage to the component' do
821
+ comp = Vanagon::Component::DSL.new('homepage-test', {}, platform)
822
+ comp.homepage('https://puppet.com')
823
+ expect(comp._component.homepage).to eq('https://puppet.com')
824
+ end
825
+ end
826
+
819
827
  describe '#directory' do
820
828
  it 'adds a directory with the desired path to the directory collection for the component' do
821
829
  comp = Vanagon::Component::DSL.new('directory-test', {}, platform)
@@ -60,5 +60,11 @@ describe "Vanagon::Component::Source::Git" do
60
60
  expect(git_source.ref)
61
61
  .to eq('HEAD')
62
62
  end
63
+
64
+ it "returns a default value of HEAD when Git reference is nil" do
65
+ git_source = @klass.new(@url, ref: nil, workdir: @workdir)
66
+ expect(git_source.ref)
67
+ .to eq('HEAD')
68
+ end
63
69
  end
64
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.14
4
+ version: 0.15.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-14 00:00:00.000000000 Z
11
+ date: 2018-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -77,6 +77,7 @@ executables:
77
77
  - repo
78
78
  - sign
79
79
  - build_host_info
80
+ - build_requirements
80
81
  extensions: []
81
82
  extra_rdoc_files: []
82
83
  files:
@@ -84,6 +85,7 @@ files:
84
85
  - README.md
85
86
  - bin/build
86
87
  - bin/build_host_info
88
+ - bin/build_requirements
87
89
  - bin/inspect
88
90
  - bin/render
89
91
  - bin/repo
@@ -259,46 +261,46 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
261
  version: '0'
260
262
  requirements: []
261
263
  rubyforge_project:
262
- rubygems_version: 2.7.6
264
+ rubygems_version: 2.6.9
263
265
  signing_key:
264
266
  specification_version: 3
265
267
  summary: All of your packages will fit into this van with this one simple trick.
266
268
  test_files:
269
+ - spec/lib/git/rev_list_spec.rb
267
270
  - spec/lib/makefile_spec.rb
268
- - spec/lib/vanagon/utilities_spec.rb
269
- - spec/lib/vanagon/platform_spec.rb
270
- - spec/lib/vanagon/component/source/local_spec.rb
271
+ - spec/lib/vanagon/common/pathname_spec.rb
272
+ - spec/lib/vanagon/common/user_spec.rb
273
+ - spec/lib/vanagon/component/dsl_spec.rb
274
+ - spec/lib/vanagon/component/rules_spec.rb
271
275
  - spec/lib/vanagon/component/source/git_spec.rb
272
276
  - spec/lib/vanagon/component/source/http_spec.rb
277
+ - spec/lib/vanagon/component/source/local_spec.rb
273
278
  - spec/lib/vanagon/component/source/rewrite_spec.rb
274
- - spec/lib/vanagon/component/dsl_spec.rb
275
279
  - spec/lib/vanagon/component/source_spec.rb
276
- - spec/lib/vanagon/component/rules_spec.rb
277
- - spec/lib/vanagon/utilities/shell_utilities_spec.rb
278
- - spec/lib/vanagon/platform/solaris_11_spec.rb
279
- - spec/lib/vanagon/platform/deb_spec.rb
280
- - spec/lib/vanagon/platform/osx_spec.rb
281
- - spec/lib/vanagon/platform/solaris_10_spec.rb
282
- - spec/lib/vanagon/platform/dsl_spec.rb
283
- - spec/lib/vanagon/platform/rpm/aix_spec.rb
284
- - spec/lib/vanagon/platform/windows_spec.rb
285
- - spec/lib/vanagon/platform/rpm_spec.rb
286
280
  - spec/lib/vanagon/component_spec.rb
287
- - spec/lib/vanagon/common/user_spec.rb
288
- - spec/lib/vanagon/common/pathname_spec.rb
289
- - spec/lib/vanagon/engine/pooler_spec.rb
290
- - spec/lib/vanagon/engine/local_spec.rb
281
+ - spec/lib/vanagon/driver_spec.rb
291
282
  - spec/lib/vanagon/engine/always_be_scheduling_spec.rb
292
- - spec/lib/vanagon/engine/hardware_spec.rb
293
- - spec/lib/vanagon/engine/ec2_spec.rb
294
283
  - spec/lib/vanagon/engine/base_spec.rb
295
284
  - spec/lib/vanagon/engine/docker_spec.rb
285
+ - spec/lib/vanagon/engine/ec2_spec.rb
286
+ - spec/lib/vanagon/engine/hardware_spec.rb
287
+ - spec/lib/vanagon/engine/local_spec.rb
288
+ - spec/lib/vanagon/engine/pooler_spec.rb
296
289
  - spec/lib/vanagon/environment_spec.rb
297
290
  - spec/lib/vanagon/extensions/ostruct/json_spec.rb
298
- - spec/lib/vanagon/extensions/string_spec.rb
299
291
  - spec/lib/vanagon/extensions/set/json_spec.rb
292
+ - spec/lib/vanagon/extensions/string_spec.rb
300
293
  - spec/lib/vanagon/optparse_spec.rb
301
- - spec/lib/vanagon/project_spec.rb
302
- - spec/lib/vanagon/driver_spec.rb
294
+ - spec/lib/vanagon/platform/deb_spec.rb
295
+ - spec/lib/vanagon/platform/dsl_spec.rb
296
+ - spec/lib/vanagon/platform/osx_spec.rb
297
+ - spec/lib/vanagon/platform/rpm/aix_spec.rb
298
+ - spec/lib/vanagon/platform/rpm_spec.rb
299
+ - spec/lib/vanagon/platform/solaris_10_spec.rb
300
+ - spec/lib/vanagon/platform/solaris_11_spec.rb
301
+ - spec/lib/vanagon/platform/windows_spec.rb
302
+ - spec/lib/vanagon/platform_spec.rb
303
303
  - spec/lib/vanagon/project/dsl_spec.rb
304
- - spec/lib/git/rev_list_spec.rb
304
+ - spec/lib/vanagon/project_spec.rb
305
+ - spec/lib/vanagon/utilities/shell_utilities_spec.rb
306
+ - spec/lib/vanagon/utilities_spec.rb