librarian-puppet 3.0.1 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -2
- data/lib/librarian/puppet/cli.rb +9 -2
- data/lib/librarian/puppet/dsl.rb +4 -4
- data/lib/librarian/puppet/source/forge/repo.rb +2 -2
- data/lib/librarian/puppet/source/forge.rb +1 -1
- data/lib/librarian/puppet/source/local.rb +3 -3
- data/lib/librarian/puppet/util.rb +1 -1
- data/lib/librarian/puppet/version.rb +1 -1
- metadata +47 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4630e52bab2424fcbee097ec636d39c51787fceafbddaac759dbe4967265136e
|
4
|
+
data.tar.gz: c458a8baba3811240266cb9fa677adb6d907a2658984d0b135ae020f08f4eb7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 238b72c61f10bd169aaa4526ee7b4bd1ae805a758e3d1e6c224bd721a421cb6b988f379c9187d54e197b5d0e52aaec6905ed8caae187bca0cd232d3226208313
|
7
|
+
data.tar.gz: 5ecb308dd61c40b861d3cbe71ff67173546f9e3ea59fcb8d89d48aaf311a4c0a1ef5a0794eed256bd305158763e237a38b58f56b388abb5f88b608a1f2befb73
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Librarian-puppet
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![License](https://img.shields.io/github/license/voxpupuli/librarian-puppet.svg)](https://github.com/voxpupuli/librarian-puppet/blob/master/LICENSE)
|
4
|
+
[![Test](https://github.com/voxpupuli/librarian-puppet/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/librarian-puppet/actions/workflows/test.yml)
|
5
|
+
[![Release](https://github.com/voxpupuli/librarian-puppet/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/librarian-puppet/actions/workflows/release.yml)
|
6
|
+
[![RubyGem Version](https://img.shields.io/gem/v/librarian-puppet.svg)](https://rubygems.org/gems/librarian-puppet)
|
7
|
+
[![RubyGem Downloads](https://img.shields.io/gem/dt/librarian-puppet.svg)](https://rubygems.org/gems/librarian-puppet)
|
8
|
+
[![Donated by Tim Sharpe](https://img.shields.io/badge/donated%20by-Tim%20Sharpe-fb7047.svg)](#transfer-notice)
|
4
9
|
|
5
10
|
## Introduction
|
6
11
|
|
@@ -31,11 +36,13 @@ and isolate a project's dependencies.
|
|
31
36
|
|
32
37
|
## Versions
|
33
38
|
|
39
|
+
Librarian-Puppet 4.0.0 and newer requires Ruby >= 2.5 and Puppet >= 5. Use version 3.0.1 is you need support for Puppet 3 or Puppet 4, or Ruby 2.4 or earlier.
|
40
|
+
|
34
41
|
Librarian-Puppet 3.0.0 and newer requires Ruby >= 2.0. Use version 2.2.4 if you need support for Puppet 3.7 or earlier, or Ruby 1.9 or earlier. Note that [Puppet 4.10 and newer require Ruby 2.1](https://puppet.com/docs/puppet/4.10/system_requirements.html#prerequisites) or newer.
|
35
42
|
|
36
43
|
Librarian-Puppet 2.0.0 and newer requires Ruby >= 1.9 and uses Puppet Forge API v3. For Ruby 1.8 use 1.5.0.
|
37
44
|
|
38
|
-
See the [Changelog](
|
45
|
+
See the [Changelog](CHANGELOG.md) for more details.
|
39
46
|
|
40
47
|
## The Puppetfile
|
41
48
|
|
@@ -326,6 +333,12 @@ Please include:
|
|
326
333
|
`--verbose` flag, and include the verbose output in the bug report as well.
|
327
334
|
|
328
335
|
|
336
|
+
## Transfer Notice
|
337
|
+
|
338
|
+
This plugin was originally authored by [Tim Sharpe](https://github.com/rodjek).
|
339
|
+
The maintainer preferred that [Vox Pupuli](https://voxpupuli.org/) take ownership of the module for future improvement and maintenance.
|
340
|
+
Existing pull requests and issues were transferred, please fork and continue to contribute [here](https://github.com/voxpupuli/librarian-puppet).
|
341
|
+
|
329
342
|
## License
|
330
343
|
Please see the [LICENSE](https://github.com/voxpupuli/librarian-puppet/blob/master/LICENSE)
|
331
344
|
file.
|
data/lib/librarian/puppet/cli.rb
CHANGED
@@ -23,7 +23,7 @@ module Librarian
|
|
23
23
|
def init
|
24
24
|
copy_file environment.specfile_name
|
25
25
|
|
26
|
-
if File.
|
26
|
+
if File.exist? ".gitignore"
|
27
27
|
gitignore = File.read('.gitignore').split("\n")
|
28
28
|
else
|
29
29
|
gitignore = []
|
@@ -70,9 +70,16 @@ module Librarian
|
|
70
70
|
install!
|
71
71
|
end
|
72
72
|
|
73
|
-
|
73
|
+
desc "update", "Updates and installs the dependencies you specify."
|
74
|
+
option "verbose", :type => :boolean, :default => false
|
75
|
+
option "line-numbers", :type => :boolean, :default => false
|
76
|
+
option "use-v1-api", :type => :boolean, :default => true
|
74
77
|
def update(*names)
|
78
|
+
|
79
|
+
environment.config_db.local['use-v1-api'] = options['use-v1-api'] ? '1' : nil
|
80
|
+
|
75
81
|
warn("Usage of module/name is deprecated, use module-name") if names.any? {|n| n.include?("/")}
|
82
|
+
# replace / to - in the module names
|
76
83
|
super(*names.map{|n| normalize_name(n)})
|
77
84
|
end
|
78
85
|
|
data/lib/librarian/puppet/dsl.rb
CHANGED
@@ -46,7 +46,7 @@ module Librarian
|
|
46
46
|
|
47
47
|
specfile ||= Proc.new if block_given?
|
48
48
|
|
49
|
-
if specfile.kind_of?(Pathname) and !File.
|
49
|
+
if specfile.kind_of?(Pathname) and !File.exist?(specfile)
|
50
50
|
debug { "Specfile #{specfile} not found, using defaults" } unless specfile.nil?
|
51
51
|
receiver(target).run(specfile, &default_specfile)
|
52
52
|
else
|
@@ -81,7 +81,7 @@ module Librarian
|
|
81
81
|
# implement the 'modulefile' syntax for Puppetfile
|
82
82
|
def modulefile
|
83
83
|
f = modulefile_path
|
84
|
-
raise Error, "Modulefile file does not exist: #{f}" unless File.
|
84
|
+
raise Error, "Modulefile file does not exist: #{f}" unless File.exist?(f)
|
85
85
|
File.read(f).lines.each do |line|
|
86
86
|
regexp = /\s*dependency\s+('|")([^'"]+)\1\s*(?:,\s*('|")([^'"]+)\3)?/
|
87
87
|
regexp =~ line && mod($2, $4)
|
@@ -91,10 +91,10 @@ module Librarian
|
|
91
91
|
# implement the 'metadata' syntax for Puppetfile
|
92
92
|
def metadata
|
93
93
|
f = working_path.join('metadata.json')
|
94
|
-
unless File.
|
94
|
+
unless File.exist?(f)
|
95
95
|
msg = "Metadata file does not exist: #{f}"
|
96
96
|
# try modulefile, in case we don't have a Puppetfile and we are using the default template
|
97
|
-
if File.
|
97
|
+
if File.exist?(modulefile_path)
|
98
98
|
modulefile
|
99
99
|
return
|
100
100
|
else
|
@@ -89,7 +89,7 @@ module Librarian
|
|
89
89
|
# can't pass the default v3 forge url (http://forgeapi.puppetlabs.com)
|
90
90
|
# to clients that use the v1 API (https://forge.puppet.com)
|
91
91
|
# nor the other way around
|
92
|
-
module_repository = source.to_s
|
92
|
+
module_repository = source.uri.to_s
|
93
93
|
|
94
94
|
if Forge.client_api_version() > 1 and module_repository =~ %r{^http(s)?://forge\.puppetlabs\.com}
|
95
95
|
module_repository = "https://forgeapi.puppetlabs.com"
|
@@ -109,7 +109,7 @@ module Librarian
|
|
109
109
|
|
110
110
|
command = %W{puppet module install --version #{version} --target-dir}
|
111
111
|
command.push(*[path.to_s, "--module_repository", module_repository, "--modulepath", path.to_s, "--module_working_dir", path.to_s, "--ignore-dependencies", target])
|
112
|
-
debug { "Executing puppet module install for #{name} #{version}: #{command.join(" ")}" }
|
112
|
+
debug { "Executing puppet module install for #{name} #{version}: #{command.join(" ").gsub(module_repository, source.to_s)}" }
|
113
113
|
|
114
114
|
begin
|
115
115
|
Librarian::Posix.run!(command)
|
@@ -139,7 +139,7 @@ module Librarian
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def modulefile?
|
142
|
-
File.
|
142
|
+
File.exist?(modulefile)
|
143
143
|
end
|
144
144
|
|
145
145
|
def metadata
|
@@ -147,7 +147,7 @@ module Librarian
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def metadata?
|
150
|
-
File.
|
150
|
+
File.exist?(metadata)
|
151
151
|
end
|
152
152
|
|
153
153
|
def specfile
|
@@ -155,7 +155,7 @@ module Librarian
|
|
155
155
|
end
|
156
156
|
|
157
157
|
def specfile?
|
158
|
-
File.
|
158
|
+
File.exist?(specfile)
|
159
159
|
end
|
160
160
|
|
161
161
|
def install_perform_step_copy!(found_path, install_path)
|
@@ -36,7 +36,7 @@ module Librarian
|
|
36
36
|
debug { "Copying #{src_clean}/ to #{dest_clean}/ with rsync -avz --delete" }
|
37
37
|
result = Rsync.run(File.join(src_clean, "/"), File.join(dest_clean, "/"), ['-avz', '--delete'])
|
38
38
|
if result.success?
|
39
|
-
debug { "Rsync from #{src_clean}/ to #{dest_clean}/
|
39
|
+
debug { "Rsync from #{src_clean}/ to #{dest_clean}/ successful" }
|
40
40
|
else
|
41
41
|
msg = "Failed to rsync from #{src_clean}/ to #{dest_clean}/: " + result.error
|
42
42
|
raise Error, msg
|
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: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sharpe
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: librarianp
|
@@ -43,16 +43,22 @@ dependencies:
|
|
43
43
|
name: puppet_forge
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '2.1'
|
49
|
+
- - "<"
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '4'
|
49
52
|
type: :runtime
|
50
53
|
prerelease: false
|
51
54
|
version_requirements: !ruby/object:Gem::Requirement
|
52
55
|
requirements:
|
53
|
-
- - "
|
56
|
+
- - ">="
|
54
57
|
- !ruby/object:Gem::Version
|
55
58
|
version: '2.1'
|
59
|
+
- - "<"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4'
|
56
62
|
- !ruby/object:Gem::Dependency
|
57
63
|
name: rake
|
58
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,42 +93,48 @@ dependencies:
|
|
87
93
|
requirements:
|
88
94
|
- - "<"
|
89
95
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
96
|
+
version: 9.0.0
|
91
97
|
type: :development
|
92
98
|
prerelease: false
|
93
99
|
version_requirements: !ruby/object:Gem::Requirement
|
94
100
|
requirements:
|
95
101
|
- - "<"
|
96
102
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
103
|
+
version: 9.0.0
|
98
104
|
- !ruby/object:Gem::Dependency
|
99
105
|
name: aruba
|
100
106
|
requirement: !ruby/object:Gem::Requirement
|
101
107
|
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
102
111
|
- - "<"
|
103
112
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
113
|
+
version: '3'
|
105
114
|
type: :development
|
106
115
|
prerelease: false
|
107
116
|
version_requirements: !ruby/object:Gem::Requirement
|
108
117
|
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '1.0'
|
109
121
|
- - "<"
|
110
122
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
123
|
+
version: '3'
|
112
124
|
- !ruby/object:Gem::Dependency
|
113
125
|
name: puppet
|
114
126
|
requirement: !ruby/object:Gem::Requirement
|
115
127
|
requirements:
|
116
|
-
- - "
|
128
|
+
- - ">="
|
117
129
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
130
|
+
version: '0'
|
119
131
|
type: :development
|
120
132
|
prerelease: false
|
121
133
|
version_requirements: !ruby/object:Gem::Requirement
|
122
134
|
requirements:
|
123
|
-
- - "
|
135
|
+
- - ">="
|
124
136
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
137
|
+
version: '0'
|
126
138
|
- !ruby/object:Gem::Dependency
|
127
139
|
name: minitest
|
128
140
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,16 +153,16 @@ dependencies:
|
|
141
153
|
name: mocha
|
142
154
|
requirement: !ruby/object:Gem::Requirement
|
143
155
|
requirements:
|
144
|
-
- - "
|
156
|
+
- - "<"
|
145
157
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
158
|
+
version: 2.0.0
|
147
159
|
type: :development
|
148
160
|
prerelease: false
|
149
161
|
version_requirements: !ruby/object:Gem::Requirement
|
150
162
|
requirements:
|
151
|
-
- - "
|
163
|
+
- - "<"
|
152
164
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
165
|
+
version: 2.0.0
|
154
166
|
- !ruby/object:Gem::Dependency
|
155
167
|
name: simplecov
|
156
168
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,6 +177,20 @@ dependencies:
|
|
165
177
|
- - ">="
|
166
178
|
- !ruby/object:Gem::Version
|
167
179
|
version: 0.9.0
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: concurrent-ruby
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - "<"
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '1.2'
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "<"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '1.2'
|
168
194
|
description: |-
|
169
195
|
Simplify deployment of your Puppet infrastructure by
|
170
196
|
automatically pulling in modules from the forge and git repositories with
|
@@ -218,14 +244,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
244
|
requirements:
|
219
245
|
- - ">="
|
220
246
|
- !ruby/object:Gem::Version
|
221
|
-
version: 2.
|
247
|
+
version: 2.5.0
|
248
|
+
- - "<"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '4'
|
222
251
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
252
|
requirements:
|
224
253
|
- - ">="
|
225
254
|
- !ruby/object:Gem::Version
|
226
255
|
version: '0'
|
227
256
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
257
|
+
rubygems_version: 3.2.33
|
229
258
|
signing_key:
|
230
259
|
specification_version: 4
|
231
260
|
summary: Bundler for your Puppet modules
|