fpm-cookery 0.26.1 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/fpm-cookery.gemspec +1 -1
- data/lib/fpm/cookery/dependency_inspector.rb +13 -6
- data/lib/fpm/cookery/path_helper.rb +3 -1
- data/lib/fpm/cookery/recipe.rb +2 -1
- data/lib/fpm/cookery/version.rb +1 -1
- data/spec/path_helper_spec.rb +1 -0
- data/spec/recipe_spec.rb +6 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2db5b71e180868ebd32db10eb630c9d0a24f975d
|
4
|
+
data.tar.gz: de82341b062459e515d836d76eec7fb6fe30b926
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298216d99ecf3533e188f31114c40230f90c22e5476bc57faa270467f0d4439f940b6b41624991257d8c2b99bc3b6b13454566c9314f44fcf35c39a14231caa2
|
7
|
+
data.tar.gz: e65f6b0a111d725c03c0093be43fa39c98b7dd664849189280051f0f945c47135f441ee8b60186fc4ff01405b1e41d6b2f16e2017868c6ed72441e61e4fc699f
|
data/CHANGELOG.md
CHANGED
data/fpm-cookery.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_development_dependency "rake"
|
23
23
|
s.add_runtime_dependency "fpm", "~> 1.1"
|
24
24
|
s.add_runtime_dependency "facter"
|
25
|
-
s.add_runtime_dependency "puppet", "
|
25
|
+
s.add_runtime_dependency "puppet", "~> 3.4"
|
26
26
|
s.add_runtime_dependency "addressable"
|
27
27
|
s.add_runtime_dependency "systemu"
|
28
28
|
end
|
@@ -1,17 +1,24 @@
|
|
1
|
-
require 'puppet'
|
2
|
-
require 'puppet/resource'
|
3
|
-
require 'puppet/transaction/report'
|
4
1
|
require 'fpm/cookery/facts'
|
5
2
|
require 'fpm/cookery/log'
|
6
3
|
|
7
|
-
|
8
|
-
|
4
|
+
begin
|
5
|
+
require 'puppet'
|
6
|
+
require 'puppet/resource'
|
7
|
+
require 'puppet/transaction/report'
|
8
|
+
|
9
|
+
# Init Puppet before using it
|
10
|
+
Puppet.initialize_settings
|
11
|
+
rescue Exception
|
12
|
+
end
|
9
13
|
|
10
14
|
module FPM
|
11
15
|
module Cookery
|
12
16
|
class DependencyInspector
|
13
|
-
|
14
17
|
def self.verify!(depends, build_depends)
|
18
|
+
unless defined?(Puppet::Resource)
|
19
|
+
Log.warn "Unable to load Puppet. Automatic dependency installation disabled."
|
20
|
+
return
|
21
|
+
end
|
15
22
|
|
16
23
|
Log.info "Verifying build_depends and depends with Puppet"
|
17
24
|
|
@@ -15,7 +15,7 @@ module FPM
|
|
15
15
|
|
16
16
|
# Most of the path helper stuff comes from brew2deb and homebrew.
|
17
17
|
def prefix(path = nil)
|
18
|
-
current_pathname_for('usr')/path
|
18
|
+
current_pathname_for(default_prefix || '/usr')/path
|
19
19
|
end
|
20
20
|
|
21
21
|
def etc(path = nil)
|
@@ -70,6 +70,8 @@ module FPM
|
|
70
70
|
|
71
71
|
private
|
72
72
|
def current_pathname_for(dir)
|
73
|
+
dir.gsub!(%r{^/}, '') if dir
|
74
|
+
|
73
75
|
if omnibus_installing?
|
74
76
|
Path.new("/#{dir}")
|
75
77
|
else
|
data/lib/fpm/cookery/recipe.rb
CHANGED
@@ -71,7 +71,8 @@ module FPM
|
|
71
71
|
attr_rw :arch, :description, :homepage, :maintainer, :md5, :name,
|
72
72
|
:revision, :section, :sha1, :sha256, :spec, :vendor, :version,
|
73
73
|
:pre_install, :post_install, :pre_uninstall, :post_uninstall,
|
74
|
-
:license, :omnibus_package, :omnibus_dir, :chain_package
|
74
|
+
:license, :omnibus_package, :omnibus_dir, :chain_package,
|
75
|
+
:default_prefix
|
75
76
|
|
76
77
|
attr_rw_list :build_depends, :config_files, :conflicts, :depends,
|
77
78
|
:exclude, :patches, :provides, :replaces, :omnibus_recipes,
|
data/lib/fpm/cookery/version.rb
CHANGED
data/spec/path_helper_spec.rb
CHANGED
data/spec/recipe_spec.rb
CHANGED
@@ -193,6 +193,12 @@ describe "Recipe" do
|
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
196
|
+
describe "#default_prefix" do
|
197
|
+
it "can be set" do
|
198
|
+
check_attribute(:default_prefix, '/usr/local')
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
196
202
|
def self.spec_recipe_attribute_list(name, list)
|
197
203
|
class_eval %Q{
|
198
204
|
describe "##{name}" do
|
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.27.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: 2015-02
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: puppet
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.4
|
75
|
+
version: '3.4'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.4
|
82
|
+
version: '3.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: addressable
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|