ansible_make_role 0.7.10 → 0.8.0

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
2
  SHA256:
3
- metadata.gz: a44cb786491c3627ecfb6d10983b1bdd75267524637b6fefe75d464d520c3f2e
4
- data.tar.gz: 67510561106ad65ecc8cd476bff271fee1cfc944761bb09588edba6bdbd22efd
3
+ metadata.gz: b4bf6a49779b5b627fed22a87359414134d4db0ddb2f5f163c8bf7a753ea367e
4
+ data.tar.gz: 8afaa7ac4516b29048f03d6a091435d6575c0e10e6513998adff5a386b4c28ff
5
5
  SHA512:
6
- metadata.gz: b7131df4601d7268a08bc4533878565e3b0c2ca8482cbaea46385098a0fcad878654b11f6aa22d884f4e977dc3eb8c605a5b1fe28cb73c9f65858b073c61cc26
7
- data.tar.gz: 813f605397086790abcb97ee31158dd24b492d58734b7bc62b1477edf3ba9c937fee7ef4441620cb843d0caa0c4699bf7c4b035cb59612c56a079f5a1e415983
6
+ metadata.gz: 3d09989652d8432d72bc5c4f256b005d441b13517d20c5f3ed91919871bcc1d4efcdd2e8113d665a01f8e1e7c6d9bea1ea4b3c27fd95f8fa3892b84ed1480b04
7
+ data.tar.gz: 4106a49adc35a71113bbc860d7d5cf26df64bbc3b569d370af4e2d3014cfcd5dce650330724d6cbfb3f29cc432b10c5234745456b146e61b08c85d9349a2ee2a
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.7.1
1
+ ruby-3.1.2
@@ -38,9 +38,9 @@ Gem::Specification.new do |spec|
38
38
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
39
39
  spec.require_paths = ["lib"]
40
40
 
41
- spec.add_development_dependency "bundler", "~> 2.2.10"
42
- spec.add_development_dependency "rake", ">= 12.3.3"
43
- spec.add_development_dependency "rspec", "~> 3.0"
41
+ spec.add_development_dependency "bundler"
42
+ spec.add_development_dependency "rake"
43
+ spec.add_development_dependency "rspec"
44
44
 
45
45
  spec.add_dependency "shellopts", "0.9.3"
46
46
  spec.add_dependency "indented_io"
@@ -1,3 +1,3 @@
1
1
  module AnsibleMakeRole
2
- VERSION = "0.7.10"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -55,7 +55,7 @@ module AnsibleMakeRole
55
55
 
56
56
  private
57
57
  # Turn a SystemCallError into a AnsibleMakeRole::Error exception and remove
58
- # Ruby reference from message (eg. "@ rb_sysopen")
58
+ # Ruby reference from message (eg. the "@ rb_sysopen" part)
59
59
  def self.wrap_system_call_error(&block)
60
60
  begin
61
61
  yield
@@ -64,7 +64,8 @@ private
64
64
  end
65
65
  end
66
66
 
67
- # source is a single-file role and target is the role directory. Returns list generated files
67
+ # source is a single-file role and target is the role directory. Returns list
68
+ # of generated files
68
69
  def self.compile_role(source, target)
69
70
  meta = []
70
71
  sections = {
@@ -96,15 +97,20 @@ private
96
97
  end
97
98
 
98
99
  (sections.to_a + [["meta", meta]]).map { |section, lines|
99
- next if lines.all? { |l| l =~ /^\s*$/ }
100
100
  dir = "#{target}/#{section}"
101
101
  file = "#{dir}/main.yml"
102
- FileUtils.mkdir_p(dir)
103
- File.open(file, "w") { |f|
104
- f.puts "---" if section != "meta"
105
- unindent(lines).each { |l| f.puts l }
106
- }
107
- file
102
+ if lines.all? { |l| l =~ /^\s*$/ }
103
+ FileUtils.rm_f(file)
104
+ FileUtils.rmdir(dir) if Dir.exist?(dir)
105
+ nil
106
+ else
107
+ FileUtils.mkdir_p(dir)
108
+ File.open(file, "w") { |f|
109
+ f.puts "---" if section != "meta"
110
+ unindent(lines).each { |l| f.puts l }
111
+ }
112
+ file
113
+ end
108
114
  }.compact
109
115
  end
110
116
 
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansible_make_role
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2022-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.10
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.10
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 12.3.3
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 12.3.3
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: shellopts
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -112,7 +112,7 @@ homepage: http://github.com/clrgit/ansible_make_role
112
112
  licenses: []
113
113
  metadata:
114
114
  allowed_push_host: https://rubygems.org
115
- post_install_message:
115
+ post_install_message:
116
116
  rdoc_options: []
117
117
  require_paths:
118
118
  - lib
@@ -127,8 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  requirements: []
130
- rubygems_version: 3.1.4
131
- signing_key:
130
+ rubygems_version: 3.3.18
131
+ signing_key:
132
132
  specification_version: 4
133
133
  summary: Make Ansible role from make.yml file
134
134
  test_files: []