librarian-puppet 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/librarian-puppet +2 -1
- data/lib/librarian/puppet/action/install.rb +2 -2
- data/lib/librarian/puppet/action/resolve.rb +8 -5
- data/lib/librarian/puppet/action.rb +4 -2
- data/lib/librarian/puppet/cli.rb +45 -48
- data/lib/librarian/puppet/dependency.rb +3 -5
- data/lib/librarian/puppet/dsl.rb +22 -17
- data/lib/librarian/puppet/environment.rb +9 -8
- data/lib/librarian/puppet/extension.rb +2 -0
- data/lib/librarian/puppet/lockfile.rb +16 -16
- data/lib/librarian/puppet/resolver.rb +3 -2
- data/lib/librarian/puppet/source/forge/repo.rb +20 -19
- data/lib/librarian/puppet/source/forge/repo_v1.rb +20 -14
- data/lib/librarian/puppet/source/forge/repo_v3.rb +10 -10
- data/lib/librarian/puppet/source/forge.rb +20 -21
- data/lib/librarian/puppet/source/git.rb +16 -9
- data/lib/librarian/puppet/source/githubtarball/repo.rb +30 -32
- data/lib/librarian/puppet/source/githubtarball.rb +15 -18
- data/lib/librarian/puppet/source/local.rb +21 -15
- data/lib/librarian/puppet/source/path.rb +2 -0
- data/lib/librarian/puppet/source/repo.rb +2 -2
- data/lib/librarian/puppet/source.rb +2 -0
- data/lib/librarian/puppet/templates/Puppetfile +4 -2
- data/lib/librarian/puppet/util.rb +19 -15
- data/lib/librarian/puppet/version.rb +3 -1
- data/lib/librarian/puppet.rb +2 -0
- metadata +77 -57
@@ -1,22 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rsync'
|
2
4
|
|
3
5
|
module Librarian
|
4
6
|
module Puppet
|
5
|
-
|
6
7
|
module Util
|
7
|
-
|
8
|
-
|
9
|
-
environment.logger.debug(*args, &block)
|
8
|
+
def debug(...)
|
9
|
+
environment.logger.debug(...)
|
10
10
|
end
|
11
|
-
|
12
|
-
|
11
|
+
|
12
|
+
def info(...)
|
13
|
+
environment.logger.info(...)
|
13
14
|
end
|
14
|
-
|
15
|
-
|
15
|
+
|
16
|
+
def warn(...)
|
17
|
+
environment.logger.warn(...)
|
16
18
|
end
|
17
19
|
|
18
20
|
def rsync?
|
19
|
-
|
21
|
+
environment.config_db.local['rsync'] == 'true'
|
20
22
|
end
|
21
23
|
|
22
24
|
# workaround Issue #173 FileUtils.cp_r will fail if there is a symlink that points to a missing file
|
@@ -27,14 +29,14 @@ module Librarian
|
|
27
29
|
def cp_r(src, dest)
|
28
30
|
if rsync?
|
29
31
|
if Gem.win_platform?
|
30
|
-
src_clean = "#{src}".gsub(/^([a-z])
|
31
|
-
dest_clean = "#{dest}".gsub(/^([a-z])
|
32
|
+
src_clean = "#{src}".gsub(/^([a-z]):/i, '/cygdrive/\1')
|
33
|
+
dest_clean = "#{dest}".gsub(/^([a-z]):/i, '/cygdrive/\1')
|
32
34
|
else
|
33
35
|
src_clean = src
|
34
36
|
dest_clean = dest
|
35
37
|
end
|
36
38
|
debug { "Copying #{src_clean}/ to #{dest_clean}/ with rsync -avz --delete" }
|
37
|
-
result = Rsync.run(File.join(src_clean,
|
39
|
+
result = Rsync.run(File.join(src_clean, '/'), File.join(dest_clean, '/'), ['-avz', '--delete'])
|
38
40
|
if result.success?
|
39
41
|
debug { "Rsync from #{src_clean}/ to #{dest_clean}/ successful" }
|
40
42
|
else
|
@@ -43,9 +45,11 @@ module Librarian
|
|
43
45
|
end
|
44
46
|
else
|
45
47
|
begin
|
46
|
-
FileUtils.cp_r(src, dest, :
|
48
|
+
FileUtils.cp_r(src, dest, preserve: true)
|
47
49
|
rescue Errno::ENOENT, Errno::EACCES
|
48
|
-
debug
|
50
|
+
debug do
|
51
|
+
"Failed to copy from #{src} to #{dest} preserving file types, trying again without preserving them"
|
52
|
+
end
|
49
53
|
FileUtils.rm_rf(dest)
|
50
54
|
FileUtils.cp_r(src, dest)
|
51
55
|
end
|
@@ -62,7 +66,7 @@ module Librarian
|
|
62
66
|
|
63
67
|
# normalize module name to use organization-module instead of organization/module
|
64
68
|
def normalize_name(name)
|
65
|
-
name.sub('/','-')
|
69
|
+
name.sub('/', '-')
|
66
70
|
end
|
67
71
|
|
68
72
|
# get the module name from organization-module
|
data/lib/librarian/puppet.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librarian-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sharpe
|
@@ -9,188 +9,208 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: librarianp
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.1'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.1'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: puppet_forge
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
17
31
|
requirements:
|
18
32
|
- - ">="
|
19
33
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
34
|
+
version: '2'
|
35
|
+
- - "<"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '7'
|
21
38
|
type: :runtime
|
22
39
|
prerelease: false
|
23
40
|
version_requirements: !ruby/object:Gem::Requirement
|
24
41
|
requirements:
|
25
42
|
- - ">="
|
26
43
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
44
|
+
version: '2'
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '7'
|
28
48
|
- !ruby/object:Gem::Dependency
|
29
49
|
name: rsync
|
30
50
|
requirement: !ruby/object:Gem::Requirement
|
31
51
|
requirements:
|
32
|
-
- - "
|
52
|
+
- - "~>"
|
33
53
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
54
|
+
version: '1.0'
|
35
55
|
type: :runtime
|
36
56
|
prerelease: false
|
37
57
|
version_requirements: !ruby/object:Gem::Requirement
|
38
58
|
requirements:
|
39
|
-
- - "
|
59
|
+
- - "~>"
|
40
60
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
61
|
+
version: '1.0'
|
42
62
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
63
|
+
name: aruba
|
44
64
|
requirement: !ruby/object:Gem::Requirement
|
45
65
|
requirements:
|
46
66
|
- - ">="
|
47
67
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
68
|
+
version: '1.0'
|
49
69
|
- - "<"
|
50
70
|
- !ruby/object:Gem::Version
|
51
|
-
version: '
|
52
|
-
type: :
|
71
|
+
version: '3'
|
72
|
+
type: :development
|
53
73
|
prerelease: false
|
54
74
|
version_requirements: !ruby/object:Gem::Requirement
|
55
75
|
requirements:
|
56
76
|
- - ">="
|
57
77
|
- !ruby/object:Gem::Version
|
58
|
-
version: '
|
78
|
+
version: '1.0'
|
59
79
|
- - "<"
|
60
80
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
81
|
+
version: '3'
|
62
82
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
83
|
+
name: concurrent-ruby
|
64
84
|
requirement: !ruby/object:Gem::Requirement
|
65
85
|
requirements:
|
66
|
-
- - "
|
86
|
+
- - "~>"
|
67
87
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
88
|
+
version: '1.3'
|
69
89
|
type: :development
|
70
90
|
prerelease: false
|
71
91
|
version_requirements: !ruby/object:Gem::Requirement
|
72
92
|
requirements:
|
73
|
-
- - "
|
93
|
+
- - "~>"
|
74
94
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
95
|
+
version: '1.3'
|
76
96
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
97
|
+
name: cucumber
|
78
98
|
requirement: !ruby/object:Gem::Requirement
|
79
99
|
requirements:
|
80
|
-
- - "
|
100
|
+
- - "~>"
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
102
|
+
version: '9.2'
|
83
103
|
type: :development
|
84
104
|
prerelease: false
|
85
105
|
version_requirements: !ruby/object:Gem::Requirement
|
86
106
|
requirements:
|
87
|
-
- - "
|
107
|
+
- - "~>"
|
88
108
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
109
|
+
version: '9.2'
|
90
110
|
- !ruby/object:Gem::Dependency
|
91
|
-
name:
|
111
|
+
name: minitest
|
92
112
|
requirement: !ruby/object:Gem::Requirement
|
93
113
|
requirements:
|
94
|
-
- - "
|
114
|
+
- - "~>"
|
95
115
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
116
|
+
version: '5'
|
97
117
|
type: :development
|
98
118
|
prerelease: false
|
99
119
|
version_requirements: !ruby/object:Gem::Requirement
|
100
120
|
requirements:
|
101
|
-
- - "
|
121
|
+
- - "~>"
|
102
122
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
123
|
+
version: '5'
|
104
124
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
125
|
+
name: mocha
|
106
126
|
requirement: !ruby/object:Gem::Requirement
|
107
127
|
requirements:
|
108
|
-
- - "
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.0'
|
111
|
-
- - "<"
|
128
|
+
- - "~>"
|
112
129
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
130
|
+
version: '2.7'
|
114
131
|
type: :development
|
115
132
|
prerelease: false
|
116
133
|
version_requirements: !ruby/object:Gem::Requirement
|
117
134
|
requirements:
|
118
|
-
- - "
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '1.0'
|
121
|
-
- - "<"
|
135
|
+
- - "~>"
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
137
|
+
version: '2.7'
|
124
138
|
- !ruby/object:Gem::Dependency
|
125
139
|
name: puppet
|
126
140
|
requirement: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
142
|
- - ">="
|
129
143
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
144
|
+
version: '7'
|
145
|
+
- - "<"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '9'
|
131
148
|
type: :development
|
132
149
|
prerelease: false
|
133
150
|
version_requirements: !ruby/object:Gem::Requirement
|
134
151
|
requirements:
|
135
152
|
- - ">="
|
136
153
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
154
|
+
version: '7'
|
155
|
+
- - "<"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '9'
|
138
158
|
- !ruby/object:Gem::Dependency
|
139
|
-
name:
|
159
|
+
name: rake
|
140
160
|
requirement: !ruby/object:Gem::Requirement
|
141
161
|
requirements:
|
142
162
|
- - "~>"
|
143
163
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
164
|
+
version: '13.2'
|
145
165
|
type: :development
|
146
166
|
prerelease: false
|
147
167
|
version_requirements: !ruby/object:Gem::Requirement
|
148
168
|
requirements:
|
149
169
|
- - "~>"
|
150
170
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
171
|
+
version: '13.2'
|
152
172
|
- !ruby/object:Gem::Dependency
|
153
|
-
name:
|
173
|
+
name: rspec
|
154
174
|
requirement: !ruby/object:Gem::Requirement
|
155
175
|
requirements:
|
156
176
|
- - "~>"
|
157
177
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
178
|
+
version: '3.13'
|
159
179
|
type: :development
|
160
180
|
prerelease: false
|
161
181
|
version_requirements: !ruby/object:Gem::Requirement
|
162
182
|
requirements:
|
163
183
|
- - "~>"
|
164
184
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
185
|
+
version: '3.13'
|
166
186
|
- !ruby/object:Gem::Dependency
|
167
187
|
name: simplecov
|
168
188
|
requirement: !ruby/object:Gem::Requirement
|
169
189
|
requirements:
|
170
|
-
- - "
|
190
|
+
- - "~>"
|
171
191
|
- !ruby/object:Gem::Version
|
172
|
-
version: 0.
|
192
|
+
version: 0.22.0
|
173
193
|
type: :development
|
174
194
|
prerelease: false
|
175
195
|
version_requirements: !ruby/object:Gem::Requirement
|
176
196
|
requirements:
|
177
|
-
- - "
|
197
|
+
- - "~>"
|
178
198
|
- !ruby/object:Gem::Version
|
179
|
-
version: 0.
|
199
|
+
version: 0.22.0
|
180
200
|
- !ruby/object:Gem::Dependency
|
181
|
-
name:
|
201
|
+
name: voxpupuli-rubocop
|
182
202
|
requirement: !ruby/object:Gem::Requirement
|
183
203
|
requirements:
|
184
|
-
- - "
|
204
|
+
- - "~>"
|
185
205
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
206
|
+
version: 3.0.0
|
187
207
|
type: :development
|
188
208
|
prerelease: false
|
189
209
|
version_requirements: !ruby/object:Gem::Requirement
|
190
210
|
requirements:
|
191
|
-
- - "
|
211
|
+
- - "~>"
|
192
212
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
213
|
+
version: 3.0.0
|
194
214
|
description: |-
|
195
215
|
Simplify deployment of your Puppet infrastructure by
|
196
216
|
automatically pulling in modules from the forge and git repositories with
|