beaker-hostgenerator 1.2.10 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,16 @@ module BeakerHostGenerator
20
20
  # any given platform will have *either* :vmpooler data or :abs data
21
21
  # so we're not worried about one overriding the other when we merge
22
22
  # the hashes together.
23
- return base_generate_node(node_info, base_config, bhg_version, :vmpooler, :abs)
23
+ base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler, :abs)
24
+
25
+ case node_info['ostype']
26
+ when /^centos/
27
+ base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
28
+ when /^fedora/
29
+ base_config['template'] = base_config['platform']
30
+ end
31
+
32
+ base_config
24
33
  end
25
34
  end
26
35
  end
@@ -10,6 +10,7 @@ module BeakerHostGenerator
10
10
  def generate_node(node_info, base_config, bhg_version)
11
11
  base_config['docker_cmd'] = ['/sbin/init']
12
12
  base_config['image'] = node_info['ostype'].sub(/(\d)/, ':\1')
13
+ base_config['image'].sub!(/(\w+)/, '\1/leap') if node_info['ostype'] =~ /^opensuse/
13
14
  base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/
14
15
 
15
16
  return base_generate_node(node_info, base_config, bhg_version, :docker)
@@ -17,6 +17,13 @@ module BeakerHostGenerator
17
17
  def generate_node(node_info, base_config, bhg_version)
18
18
  base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler)
19
19
 
20
+ case node_info['ostype']
21
+ when /^centos/
22
+ base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
23
+ when /^fedora/
24
+ base_config['template'] = base_config['platform']
25
+ end
26
+
20
27
  # Some vmpooler/vsphere platforms have special requirements.
21
28
  # We munge the node host config here if that is necessary.
22
29
  fixup_node base_config
@@ -1,6 +1,6 @@
1
1
  require 'beaker-hostgenerator/data'
2
2
  require 'beaker-hostgenerator/exceptions'
3
- require 'uri'
3
+ require 'cgi'
4
4
 
5
5
  module BeakerHostGenerator
6
6
  # Functions for parsing the raw user input host layout string and turning
@@ -75,7 +75,7 @@ module BeakerHostGenerator
75
75
  # @returns [String] Input string with transformations necessary for
76
76
  # tokenization.
77
77
  def prepare(spec)
78
- URI.decode(spec)
78
+ CGI.unescape(spec)
79
79
  end
80
80
 
81
81
  # Breaks apart the host input string into chunks suitable for processing
@@ -260,7 +260,7 @@ module BeakerHostGenerator
260
260
  current_depth = current_depth.pred
261
261
  next
262
262
  end
263
-
263
+
264
264
  # When there is assignment happening, we need to create a new
265
265
  # corresponding data structure, add it to the object depth, and
266
266
  # then change the current depth
@@ -1,5 +1,5 @@
1
1
  module BeakerHostGenerator
2
2
  module Version
3
- STRING = '1.2.10'
3
+ STRING = '1.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-hostgenerator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.10
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Branan Purvine-Riley
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-20 00:00:00.000000000 Z
13
+ date: 2021-04-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -58,36 +58,36 @@ dependencies:
58
58
  name: fakefs
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0.6'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
- version: 0.14.0
66
+ version: '2.0'
67
67
  type: :development
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - "~>"
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0.6'
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
- version: 0.14.0
76
+ version: '2.0'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: rake
79
79
  requirement: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '10.1'
83
+ version: '13.0'
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '10.1'
90
+ version: '13.0'
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: simplecov
93
93
  requirement: !ruby/object:Gem::Requirement
@@ -185,10 +185,11 @@ extensions: []
185
185
  extra_rdoc_files: []
186
186
  files:
187
187
  - ".github/dependabot.yml"
188
+ - ".github/workflows/release.yml"
189
+ - ".github/workflows/test.yml"
188
190
  - ".gitignore"
189
191
  - ".rspec"
190
192
  - ".simplecov"
191
- - ".travis.yml"
192
193
  - CHANGELOG.md
193
194
  - CODEOWNERS
194
195
  - CONTRIBUTING.md
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
236
  - !ruby/object:Gem::Version
236
237
  version: '0'
237
238
  requirements: []
238
- rubygems_version: 3.0.8
239
+ rubygems_version: 3.1.6
239
240
  signing_key:
240
241
  specification_version: 4
241
242
  summary: Beaker Host Generator Utility
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- before_install:
2
- - gem update
3
- - gem --version
4
- language: ruby
5
- script: "bundle exec rake test:spec"
6
- notifications:
7
- email: false
8
- rvm:
9
- - 2.6
10
- - 2.4