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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a7f311c220910c26ded28d35577a469f17940542
4
- data.tar.gz: ef041b28f7b56ddfe19ce483e276cb7a3a88e7c4
2
+ SHA256:
3
+ metadata.gz: 9d635234a7161b1b47ba35bf07f4a3c58209482d57ead1d2e7d42e59ead4090f
4
+ data.tar.gz: 15c95843c18e2b098236b68fa4249fad32387dfae68b92ae734087379179d337
5
5
  SHA512:
6
- metadata.gz: 40be51fb1f5a8fe25e69443ec138a227ce8f015aed97e93b38265d9601d3f5547710475d09a674ac8541b8433c707ac674cbce047ecd0e6d6ea540389251c311
7
- data.tar.gz: d1e9d2422cb4bc45f5d72ef90e8df360165bdf3183f1c88b6046ff51963959f5eccfc15b3fb73980c88e215a98bfe0f7f5b5e7231cf32759efd72218dc702a34
6
+ metadata.gz: b9c9ef894547aa17415134b1de01ba2cf4b594429f4d7a93fe24166bf0a1eed82961d1cdf155f16edb96907f4a9f36bc3517bae12e384c60fbd126daad953753
7
+ data.tar.gz: 79b01c1bb917e0ae2ab6e90c64a521d930d8e3d80512345b6df98ca82ce1ece074229eaff0044c39a8a451c79954b2b84966a9d440b827bbd978f771ae548c70
@@ -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: actions/setup-ruby@v1
16
+ uses: ruby/setup-ruby@v1
17
17
  with:
18
- ruby-version: ${{ matrix.ruby }}.x
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
- [![Build Status](https://travis-ci.org/bernd/fpm-cookery.svg)](https://travis-ci.org/bernd/fpm-cookery)
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
- RUN \
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
@@ -1,4 +1,4 @@
1
- .. fpm-cookery documentation master file, created by
1
+ .. fpm-cookery documentation main file, created by
2
2
  sphinx-quickstart on Sat Jul 25 11:02:45 2015.
3
3
  You can adapt this file completely to your liking, but it should at least
4
4
  contain the root `toctree` directive.
@@ -281,5 +281,5 @@ Examples
281
281
  --------
282
282
 
283
283
  See the `Redis recipe
284
- <https://github.com/bernd/fpm-cookery/tree/master/recipes/redis>`_ for an
284
+ <https://github.com/bernd/fpm-cookery/tree/main/recipes/redis>`_ for an
285
285
  example of fpm-cookery and Hiera in action.
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", "< 6.0"
28
- s.add_runtime_dependency "addressable", "~> 2.3.8"
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", ">= 1.7.7", "< 2.0"
31
- s.add_runtime_dependency "json_pure", ">= 1.7.7", "< 2.0"
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
@@ -68,7 +68,7 @@ module FPM
68
68
  ].compact.flatten.join(' ')
69
69
 
70
70
 
71
- Log.info "Running: #{cmd}"
71
+ Log.debug "Running: #{cmd}"
72
72
  begin
73
73
  sh cmd
74
74
  rescue => e
@@ -24,11 +24,11 @@ module FPM
24
24
  end
25
25
  end
26
26
 
27
- def merge(other)
27
+ def merge(other = {})
28
28
  super(self.class[other])
29
29
  end
30
30
 
31
- def merge!(other)
31
+ def merge!(other = {})
32
32
  super(self.class[other])
33
33
  end
34
34
 
@@ -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
- Proc.new.call(result)
247
+ block.call(result)
248
248
  end
249
249
  end
250
250
 
@@ -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
- @url = Addressable::URI.parse(url.to_s)
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
@@ -1,5 +1,5 @@
1
1
  module FPM
2
2
  module Cookery
3
- VERSION = '0.35.1'
3
+ VERSION = '0.36.0'
4
4
  end
5
5
  end
@@ -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.dummy-url.com/archive/%{hiera("name")}-%{hiera("version")}.tar.gz
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} :dummy_attr
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(:dummy_attr)
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 = :dummy_attr|
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 = :dummy_attr|
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
@@ -52,6 +52,8 @@ describe "Source" do
52
52
 
53
53
  expect(source.url).to eq('git@github.com:foo/bar.git')
54
54
  expect(source.path).to eq('foo/bar.git')
55
+ expect(source.local?).to eq(false)
56
+ expect(source.fetchable?).to eq(true)
55
57
  end
56
58
  end
57
59
  end
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.35.1
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: 2019-12-18 00:00:00.000000000 Z
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: '6.0'
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: '6.0'
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.3.8
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.3.8
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.0'
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.0'
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.0'
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.0'
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
- rubyforge_project: fpm-cookery
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.
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- sudo: false
2
- cache: bundler
3
- script: bundle exec rake spec
4
- rvm:
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.10
8
- - 2.2.5
9
- - 2.3.1
10
- - 2.4.1
11
- - ruby-head
12
-
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head