fpm-cookery 0.35.1 → 0.36.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +4 -3
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/docker/Dockerfile.ubuntu-16.04 +3 -3
- data/docker/Dockerfile.ubuntu-18.04 +27 -0
- data/docs/index.rst +1 -1
- data/docs/pages/using-hiera.rst +1 -1
- data/fpm-cookery.gemspec +5 -4
- data/lib/fpm/cookery/docker_packager.rb +1 -1
- data/lib/fpm/cookery/environment.rb +2 -2
- data/lib/fpm/cookery/recipe.rb +2 -2
- data/lib/fpm/cookery/source.rb +7 -2
- data/lib/fpm/cookery/version.rb +1 -1
- data/spec/fixtures/hiera_config/common.yaml +1 -1
- data/spec/inheritable_attr_spec.rb +4 -4
- data/spec/source_spec.rb +2 -0
- metadata +30 -29
- data/.travis.yml +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9d635234a7161b1b47ba35bf07f4a3c58209482d57ead1d2e7d42e59ead4090f
|
4
|
+
data.tar.gz: 15c95843c18e2b098236b68fa4249fad32387dfae68b92ae734087379179d337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9c9ef894547aa17415134b1de01ba2cf4b594429f4d7a93fe24166bf0a1eed82961d1cdf155f16edb96907f4a9f36bc3517bae12e384c60fbd126daad953753
|
7
|
+
data.tar.gz: 79b01c1bb917e0ae2ab6e90c64a521d930d8e3d80512345b6df98ca82ce1ece074229eaff0044c39a8a451c79954b2b84966a9d440b827bbd978f771ae548c70
|
data/.github/workflows/ruby.yml
CHANGED
@@ -8,14 +8,15 @@ jobs:
|
|
8
8
|
runs-on: ubuntu-latest
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
|
-
ruby: [2.4, 2.5, 2.6]
|
11
|
+
ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "3.1"]
|
12
12
|
|
13
13
|
steps:
|
14
14
|
- uses: actions/checkout@v1
|
15
15
|
- name: Set up Ruby ${{ matrix.ruby }}
|
16
|
-
uses:
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
17
|
with:
|
18
|
-
ruby-version: ${{ matrix.ruby }}
|
18
|
+
ruby-version: ${{ matrix.ruby }}
|
19
|
+
bundler-cache: true
|
19
20
|
- name: Build and test with Rake
|
20
21
|
run: |
|
21
22
|
gem install bundler
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# v0.36.0 (2022-07-13)
|
2
|
+
* Add Dockerfile for Ubuntu 18.04.
|
3
|
+
* Allow newer versions of Puppet (gmathes / #211)
|
4
|
+
* Fix compatibility issues with newer Ruby and newer dependencies. (#214)
|
5
|
+
* Add Ruby versions up to 3.1 to GitHub Action workflow.
|
6
|
+
* Switch default branch to `main`.
|
7
|
+
|
1
8
|
# v0.35.1 (2019-12-18)
|
2
9
|
* Fix default Docker image name
|
3
10
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# fpm-cookery - For building software
|
2
2
|
|
3
|
-
|
3
|
+
![Build Status](https://github.com/bernd/fpm-cookery/actions/workflows/ruby.yml/badge.svg)
|
4
4
|
|
5
5
|
A tool for building software packages with
|
6
6
|
[fpm](https://github.com/jordansissel/fpm).
|
@@ -1,14 +1,14 @@
|
|
1
1
|
FROM ubuntu:16.04
|
2
2
|
|
3
|
-
RUN apt-get update
|
4
|
-
|
5
|
-
apt-get install --no-install-recommends -y \
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install --no-install-recommends -y \
|
6
5
|
curl \
|
7
6
|
wget \
|
8
7
|
git \
|
9
8
|
ruby2.3-dev \
|
10
9
|
build-essential \
|
11
10
|
man-db \
|
11
|
+
unzip \
|
12
12
|
&& gem install --no-ri --no-rdoc fpm-cookery \
|
13
13
|
&& apt-get clean \
|
14
14
|
&& rm -rf \
|
@@ -0,0 +1,27 @@
|
|
1
|
+
FROM ubuntu:18.04
|
2
|
+
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install --no-install-recommends -y \
|
5
|
+
curl \
|
6
|
+
wget \
|
7
|
+
git \
|
8
|
+
ruby2.5-dev \
|
9
|
+
build-essential \
|
10
|
+
man-db \
|
11
|
+
unzip \
|
12
|
+
&& gem install --no-ri --no-rdoc fpm-cookery \
|
13
|
+
&& apt-get clean \
|
14
|
+
&& rm -rf \
|
15
|
+
/tmp/* \
|
16
|
+
/root/.gem \
|
17
|
+
/var/cache/debconf/* \
|
18
|
+
/var/lib/gems/*/cache/* \
|
19
|
+
/var/lib/apt/lists/* \
|
20
|
+
/var/log/* \
|
21
|
+
/usr/share/X11 \
|
22
|
+
/usr/share/doc/*
|
23
|
+
|
24
|
+
COPY docker-entrypoint.sh /
|
25
|
+
|
26
|
+
ENTRYPOINT ["/docker-entrypoint.sh"]
|
27
|
+
CMD ["fpm-cook"]
|
data/docs/index.rst
CHANGED
data/docs/pages/using-hiera.rst
CHANGED
data/fpm-cookery.gemspec
CHANGED
@@ -24,10 +24,11 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.add_development_dependency "simplecov", "~> 0.11"
|
25
25
|
s.add_runtime_dependency "fpm", "~> 1.1"
|
26
26
|
s.add_runtime_dependency "facter"
|
27
|
-
s.add_runtime_dependency "puppet", ">= 3.4", "<
|
28
|
-
s.add_runtime_dependency "addressable", "~> 2.
|
27
|
+
s.add_runtime_dependency "puppet", ">= 3.4", "< 8.0"
|
28
|
+
s.add_runtime_dependency "addressable", "~> 2.8"
|
29
29
|
s.add_runtime_dependency "systemu"
|
30
|
-
s.add_runtime_dependency "json", "
|
31
|
-
s.add_runtime_dependency "json_pure", "
|
30
|
+
s.add_runtime_dependency "json", "~> 2.6"
|
31
|
+
s.add_runtime_dependency "json_pure", "~> 2.6"
|
32
32
|
s.add_runtime_dependency "safe_yaml", "~> 1.0.4"
|
33
|
+
s.add_runtime_dependency "uri-ssh_git", "~> 2.0"
|
33
34
|
end
|
data/lib/fpm/cookery/recipe.rb
CHANGED
@@ -237,14 +237,14 @@ module FPM
|
|
237
237
|
}
|
238
238
|
end
|
239
239
|
|
240
|
-
def applicator(method)
|
240
|
+
def applicator(method, &block)
|
241
241
|
if (result = lookup(method)).nil?
|
242
242
|
Log.debug("No result for `#{method}'")
|
243
243
|
return
|
244
244
|
end
|
245
245
|
|
246
246
|
Log.debug("Setting `#{method}' to `#{result}'")
|
247
|
-
|
247
|
+
block.call(result)
|
248
248
|
end
|
249
249
|
end
|
250
250
|
|
data/lib/fpm/cookery/source.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'addressable/uri'
|
2
|
+
require 'uri/ssh_git'
|
2
3
|
|
3
4
|
module FPM
|
4
5
|
module Cookery
|
@@ -7,7 +8,11 @@ module FPM
|
|
7
8
|
|
8
9
|
def initialize(url, options = nil)
|
9
10
|
options ||= {}
|
10
|
-
|
11
|
+
begin
|
12
|
+
@url = Addressable::URI.parse(url.to_s)
|
13
|
+
rescue Addressable::URI::InvalidURIError
|
14
|
+
@url = URI::SshGit.parse(url.to_s)
|
15
|
+
end
|
11
16
|
@provider = options[:with]
|
12
17
|
@options = options
|
13
18
|
end
|
@@ -22,7 +27,7 @@ module FPM
|
|
22
27
|
|
23
28
|
# If the Addressable::URI is empty, there's nothing to fetch
|
24
29
|
def fetchable?
|
25
|
-
!@url.empty?
|
30
|
+
!@url.to_s.empty?
|
26
31
|
end
|
27
32
|
|
28
33
|
def url
|
data/lib/fpm/cookery/version.rb
CHANGED
@@ -3,7 +3,7 @@ description: >
|
|
3
3
|
For testing purposes on %{scope("platform")} only - you've been warned ;)
|
4
4
|
version: 1.0.2
|
5
5
|
source:
|
6
|
-
- http://www.
|
6
|
+
- http://www.example.com/archive/%{hiera("name")}-%{hiera("version")}.tar.gz
|
7
7
|
- :with: :git
|
8
8
|
|
9
9
|
environment:
|
@@ -15,12 +15,12 @@ shared_examples 'attribute registration' do |attr_method, registry_method|
|
|
15
15
|
extend FPM::Cookery::InheritableAttr
|
16
16
|
|
17
17
|
instance_eval %Q{
|
18
|
-
#{attr_method} :
|
18
|
+
#{attr_method} :example_attr
|
19
19
|
}
|
20
20
|
end
|
21
21
|
|
22
22
|
expect(klass).to respond_to(registry_method)
|
23
|
-
expect(klass.send(registry_method)).to include(:
|
23
|
+
expect(klass.send(registry_method)).to include(:example_attr)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -30,7 +30,7 @@ shared_context 'class inheritance' do
|
|
30
30
|
let(:subklass) { Class.new(superklass) }
|
31
31
|
end
|
32
32
|
|
33
|
-
shared_examples 'attribute inheritance' do |attr_method, default_value, attr_name = :
|
33
|
+
shared_examples 'attribute inheritance' do |attr_method, default_value, attr_name = :example_attr|
|
34
34
|
# A default implementation. Useful for +.attr_rw+, but should probably be
|
35
35
|
# overridden for the other DSL methods.
|
36
36
|
let(:attr_setter) {
|
@@ -74,7 +74,7 @@ shared_examples 'attribute inheritance' do |attr_method, default_value, attr_nam
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
shared_context 'inheritable attributes' do |attr_method, default_value, attr_name = :
|
77
|
+
shared_context 'inheritable attributes' do |attr_method, default_value, attr_name = :example_attr|
|
78
78
|
include_context 'class inheritance'
|
79
79
|
include_examples 'attribute inheritance', attr_method, default_value
|
80
80
|
|
data/spec/source_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fpm-cookery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.36.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernd Ahlers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -103,7 +103,7 @@ dependencies:
|
|
103
103
|
version: '3.4'
|
104
104
|
- - "<"
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version: '
|
106
|
+
version: '8.0'
|
107
107
|
type: :runtime
|
108
108
|
prerelease: false
|
109
109
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -113,21 +113,21 @@ dependencies:
|
|
113
113
|
version: '3.4'
|
114
114
|
- - "<"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '8.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: addressable
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 2.
|
123
|
+
version: '2.8'
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 2.
|
130
|
+
version: '2.8'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: systemu
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,42 +146,30 @@ dependencies:
|
|
146
146
|
name: json
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- - "
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: 1.7.7
|
152
|
-
- - "<"
|
149
|
+
- - "~>"
|
153
150
|
- !ruby/object:Gem::Version
|
154
|
-
version: '2.
|
151
|
+
version: '2.6'
|
155
152
|
type: :runtime
|
156
153
|
prerelease: false
|
157
154
|
version_requirements: !ruby/object:Gem::Requirement
|
158
155
|
requirements:
|
159
|
-
- - "
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
version: 1.7.7
|
162
|
-
- - "<"
|
156
|
+
- - "~>"
|
163
157
|
- !ruby/object:Gem::Version
|
164
|
-
version: '2.
|
158
|
+
version: '2.6'
|
165
159
|
- !ruby/object:Gem::Dependency
|
166
160
|
name: json_pure
|
167
161
|
requirement: !ruby/object:Gem::Requirement
|
168
162
|
requirements:
|
169
|
-
- - "
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: 1.7.7
|
172
|
-
- - "<"
|
163
|
+
- - "~>"
|
173
164
|
- !ruby/object:Gem::Version
|
174
|
-
version: '2.
|
165
|
+
version: '2.6'
|
175
166
|
type: :runtime
|
176
167
|
prerelease: false
|
177
168
|
version_requirements: !ruby/object:Gem::Requirement
|
178
169
|
requirements:
|
179
|
-
- - "
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: 1.7.7
|
182
|
-
- - "<"
|
170
|
+
- - "~>"
|
183
171
|
- !ruby/object:Gem::Version
|
184
|
-
version: '2.
|
172
|
+
version: '2.6'
|
185
173
|
- !ruby/object:Gem::Dependency
|
186
174
|
name: safe_yaml
|
187
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +184,20 @@ dependencies:
|
|
196
184
|
- - "~>"
|
197
185
|
- !ruby/object:Gem::Version
|
198
186
|
version: 1.0.4
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: uri-ssh_git
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '2.0'
|
194
|
+
type: :runtime
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "~>"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '2.0'
|
199
201
|
description: A tool for building software packages with fpm.
|
200
202
|
email:
|
201
203
|
- bernd@tuneafish.de
|
@@ -206,7 +208,6 @@ extra_rdoc_files: []
|
|
206
208
|
files:
|
207
209
|
- ".github/workflows/ruby.yml"
|
208
210
|
- ".gitignore"
|
209
|
-
- ".travis.yml"
|
210
211
|
- CHANGELOG.md
|
211
212
|
- Gemfile
|
212
213
|
- LICENSE
|
@@ -214,6 +215,7 @@ files:
|
|
214
215
|
- Rakefile
|
215
216
|
- bin/fpm-cook
|
216
217
|
- docker/Dockerfile.ubuntu-16.04
|
218
|
+
- docker/Dockerfile.ubuntu-18.04
|
217
219
|
- docker/docker-entrypoint.sh
|
218
220
|
- docs/.gitignore
|
219
221
|
- docs/Makefile
|
@@ -360,8 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
360
362
|
- !ruby/object:Gem::Version
|
361
363
|
version: '0'
|
362
364
|
requirements: []
|
363
|
-
|
364
|
-
rubygems_version: 2.5.2.1
|
365
|
+
rubygems_version: 3.3.5
|
365
366
|
signing_key:
|
366
367
|
specification_version: 4
|
367
368
|
summary: A tool for building software packages with fpm.
|