fpm-fry 0.4.1 → 0.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d0c17ec38081829a127eb9388ed2a6fe5f10976
4
- data.tar.gz: ef89b4472306f950a3f62a48a293d844006883d4
3
+ metadata.gz: a51e880dc026263476f0d4ee2dea2c80f6a9bc3e
4
+ data.tar.gz: fb3b23872e55a1ba82ee9cdcc686d2fb34048a04
5
5
  SHA512:
6
- metadata.gz: d17bfa8b82c26885c29193d7147e132a25e2be465f88fa33b25f7b7e2a1135a8ca3ffdd461f931e7dc33517e680c82d3010508b8c81f9b90b30355ab6babefce
7
- data.tar.gz: 2d7533f0c0a145a1f52828e6201d97c2a0d201538c2fc572b12da95ea005736d48cdd63a120f5d43606e9fe5d302cada8926eeffe37632ccf5b75e4320ffc5aa
6
+ metadata.gz: 711d10fd8ba12c8b9430bf6ed148292215f1e27c375566133eaeb9033e173f68db0d9712cfed1131a7036d6602d2e1a73b3718b13779f979257f03665c0fc614
7
+ data.tar.gz: d358c715e886459f2e213c0b99b271d173c813e9e456f5226bbdff641fce08edf75279352e1d0fc37fa2a30b42f3c04c66cfb72eb6c48c15bc79332a61d71fa0
@@ -13,6 +13,9 @@ module FPM; module Fry
13
13
  option '--debug', :flag, 'Turns on debugging'
14
14
  option '--[no-]tls', :flag, 'Turns on tls ( default is false for schema unix, tcp and http and true for https )'
15
15
  option '--[no-]tlsverify', :flag, 'Turns off tls peer verification', default:true, environment_variable: 'DOCKER_TLS_VERIFY'
16
+ option ["-t", "--tmpdir"], "PATH", 'Write tmp data to PATH', default: '/tmp/fpm-fry', attribute_name: :dir do |s|
17
+ String(s)
18
+ end
16
19
 
17
20
  subcommand 'fpm', 'Works like fpm but with docker support', FPM::Command
18
21
 
@@ -22,7 +25,7 @@ module FPM; module Fry
22
25
 
23
26
  def initialize(invocation_path, ctx = {}, parent_attribute_values = {})
24
27
  super
25
- @ui = ctx.fetch(:ui){ UI.new }
28
+ @ui = ctx.fetch(:ui){ UI.new(tmpdir: dir) }
26
29
  @client = ctx[:client]
27
30
  end
28
31
 
@@ -153,10 +153,14 @@ module FPM; module Fry
153
153
  case(update)
154
154
  when 'auto'
155
155
  Inspector.for_image(client, image) do |inspector|
156
- inspector.read('/var/lib/apt/lists') do |file|
157
- next if file.header.name == 'lists/'
158
- logger.hint("/var/lib/apt/lists is not empty, you could try to speed up builds with --update=never", documentation: 'https://github.com/xing/fpm-fry/wiki/The-update-parameter')
159
- break
156
+ begin
157
+ inspector.read('/var/lib/apt/lists') do |file|
158
+ next if file.header.name == 'lists/'
159
+ logger.hint("/var/lib/apt/lists is not empty, you could try to speed up builds with --update=never", documentation: 'https://github.com/xing/fpm-fry/wiki/The-update-parameter')
160
+ break
161
+ end
162
+ rescue FPM::Fry::Client::FileNotFound
163
+ logger.hint("/var/lib/apt/lists does not exists, so we will autoupdate")
160
164
  end
161
165
  end
162
166
  return true
@@ -304,15 +308,15 @@ module FPM; module Fry
304
308
 
305
309
  def adjust_config_files( output )
306
310
  # FPM flags all files in /etc as config files but only for debian :/.
307
- # Actually this behavior makes sense to me for all packages because it's
308
- # the thing I usually want. By setting this attribute at least the
311
+ # Actually this behavior makes sense to me for all packages because it's
312
+ # the thing I usually want. By setting this attribute at least the
309
313
  # misleading warning goes away.
310
314
  output.attributes[:deb_no_default_config_files?] = true
311
315
  output.attributes[:deb_auto_config_files?] = false
312
316
 
313
317
  return if output.attributes[:fry_config_explicitly_used]
314
318
 
315
- # Now that we have disabled this for debian we have to reenable if it for
319
+ # Now that we have disabled this for debian we have to reenable if it for
316
320
  # all.
317
321
  etc = File.expand_path('etc', output.staging_path)
318
322
  if File.exists?( etc )
data/lib/fpm/fry/ui.rb CHANGED
@@ -3,7 +3,7 @@ require 'fpm/fry/channel'
3
3
  module FPM; module Fry
4
4
  class UI < Struct.new(:out, :err, :logger, :tmpdir)
5
5
 
6
- def initialize( out = STDOUT, err = STDERR, logger = nil , tmpdir = '/tmp/fpm-fry' )
6
+ def initialize( out: STDOUT, err: STDERR, logger: nil , tmpdir: '/tmp/fpm-fry' )
7
7
  logger ||= Channel.new.tap{|chan| chan.subscribe(Cabin::NiceOutput.new(out)) }
8
8
  FileUtils.mkdir_p( tmpdir )
9
9
  super( out, err, logger, tmpdir )
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm-fry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Lagresle
8
8
  - Stefan Kaes
9
+ - Sebastian Brandt
9
10
  - Hannes Georg
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2018-03-29 00:00:00.000000000 Z
14
+ date: 2018-12-11 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: excon
@@ -209,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
210
  version: '0'
210
211
  requirements: []
211
212
  rubyforge_project:
212
- rubygems_version: 2.5.1
213
+ rubygems_version: 2.5.2.3
213
214
  signing_key:
214
215
  specification_version: 4
215
216
  summary: FPM Fry