vanagon 0.38.0 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vanagon/platform/dsl.rb +9 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb2d7d400aa4b316d10e77574eef5bbd53f778347adf33873ea9f6a7610dafda
4
- data.tar.gz: 426c75017aafe20dccfc9c49f158a3b43709a1196ee113ac91b6e4263f4e0876
3
+ metadata.gz: 4ac97aec522601e6c06e6b246356b9fd2eef1a94d1548b501424224d4d51522c
4
+ data.tar.gz: 557d3080596d55cc84819bd59b5d30d566c66d3620cc3687ea8bb889c8f50118
5
5
  SHA512:
6
- metadata.gz: 33e272d98f5e9bd3a0f442663cf8194b65ee8ef5c8cde64cb5e6952ba3768b62c36975037ca1026adfd459796a78c1bbd981872df03fe603b1cd00b3fcf132b3
7
- data.tar.gz: cf1073299d0ed161c6e6ae9c7b6c89155fa6df288dc27df2aa0727e0ba2ab77442f2f7028e11de58349672f8b5f97edf852f7cf29f3f43629748e1f2d2ca064c
6
+ metadata.gz: 007b36851f55746bd042d54f1b4aa6ab2557b18f81f0d759730554080153b7cdbda44d8a16476f36f63556f906631eaca1bfa8de066c9c7b0bf4cc8da543e4e4
7
+ data.tar.gz: fe4fa81aeb5246f3892cee17cea50b9545fce5f8dda33f491f7b92ad6f58c624e09540d3476353b2eeef58518fd730e310288140bdf03181b8d7c3137e8d6f3b
@@ -18,7 +18,7 @@ class Vanagon
18
18
  class DSL
19
19
  # Constructor for the DSL object
20
20
  #
21
- # @param name [String] name of the platform
21
+ # @param platform_name [String] name of the platform
22
22
  # @return [Vanagon::Platform::DSL] A DSL object to describe the {Vanagon::Platform}
23
23
  def initialize(platform_name)
24
24
  @name = platform_name
@@ -26,9 +26,15 @@ class Vanagon
26
26
 
27
27
  # Primary way of interacting with the DSL. Also a simple factory to get the right platform object.
28
28
  #
29
- # @param name [String] name of the platform
29
+ # @param platform_name [String] name of the platform
30
+ # @param override_name [Boolean] whether the specified `platform_name` should override the basename
30
31
  # @param block [Proc] DSL definition of the platform to call
31
- def platform(platform_name, &block)
32
+ def platform(platform_name, override_name: false, &block)
33
+ # By default, the Vanagon::Platform's name/version/arch will be based on
34
+ # the filename of the platform definition. But if override_name is true,
35
+ # then use the `platform_name` passed into this method instead.
36
+ @name = platform_name if override_name
37
+
32
38
  @platform = case platform_name
33
39
  when /^aix-/
34
40
  Vanagon::Platform::RPM::AIX.new(@name)
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.38.0
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet By Perforce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-05 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt