poise-languages 2.0.5 → 2.1.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 +4 -0
- data/lib/poise_languages/system/mixin.rb +4 -2
- data/lib/poise_languages/version.rb +1 -1
- data/poise-languages.gemspec +1 -1
- data/test/gemfiles/master.gemfile +1 -0
- data/test/spec/system/mixin_spec.rb +44 -0
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4448e524a99d73c852fc7b6dd532f442cdd6a03
|
4
|
+
data.tar.gz: 7f6850bcefea620ff988ccaca523dcce7aa9d150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c7f8efa6b84aea37d4490aa221750c7a6f1801dd531c01bfc60bb0a1cfccf90e23fec2dc8db71b7b38fd0c7dda71fe1faf84e945cfbaa10af33dc874197593a
|
7
|
+
data.tar.gz: 907ccd6c1363d5e61934be7c8cf5308986c78b4e3b8bcca067223ef9a862053b3ec0c4278265a43d5ce9522c4c8fd93219861c43f98b4245a4854a07d3464fe3
|
data/CHANGELOG.md
CHANGED
@@ -27,7 +27,7 @@ module PoiseLanguages
|
|
27
27
|
#
|
28
28
|
# @api public
|
29
29
|
# @return [PoiseLanguages::System::Resource]
|
30
|
-
def install_system_packages
|
30
|
+
def install_system_packages(&block)
|
31
31
|
dev_package_overrides = system_dev_package_overrides
|
32
32
|
poise_languages_system system_package_name do
|
33
33
|
# Otherwise use the default install action.
|
@@ -38,6 +38,7 @@ module PoiseLanguages
|
|
38
38
|
dev_package_overrides dev_package_overrides
|
39
39
|
package_version options['package_version'] if options['package_version']
|
40
40
|
version options['version']
|
41
|
+
instance_exec(&block) if block
|
41
42
|
end
|
42
43
|
end
|
43
44
|
|
@@ -45,9 +46,10 @@ module PoiseLanguages
|
|
45
46
|
#
|
46
47
|
# @api public
|
47
48
|
# @return [PoiseLanguages::System::Resource]
|
48
|
-
def uninstall_system_packages
|
49
|
+
def uninstall_system_packages(&block)
|
49
50
|
install_system_packages.tap do |r|
|
50
51
|
r.action(:uninstall)
|
52
|
+
r.instance_exec(&block) if block
|
51
53
|
end
|
52
54
|
end
|
53
55
|
|
data/poise-languages.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
34
34
|
spec.require_paths = %w{lib}
|
35
35
|
|
36
|
-
spec.add_dependency 'chef', '
|
36
|
+
spec.add_dependency 'chef', '>= 12.1', '< 14'
|
37
37
|
spec.add_dependency 'halite', '~> 1.0'
|
38
38
|
spec.add_dependency 'poise', '~> 2.5'
|
39
39
|
spec.add_dependency 'poise-archive', '~> 1.0'
|
@@ -18,6 +18,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
19
19
|
gem 'chef', github: 'chef/chef'
|
20
20
|
gem 'halite', github: 'poise/halite'
|
21
|
+
gem 'ohai', github: 'chef/ohai'
|
21
22
|
gem 'poise', github: 'poise/poise'
|
22
23
|
gem 'poise-archive', github: 'poise/poise-archive'
|
23
24
|
gem 'poise-boiler', github: 'poise/poise-boiler'
|
@@ -46,6 +46,30 @@ describe PoiseLanguages::System::Mixin do
|
|
46
46
|
dev_package_overrides: {},
|
47
47
|
package_version: nil,
|
48
48
|
version: '') }
|
49
|
+
|
50
|
+
context 'with a block override' do
|
51
|
+
provider(:poise_test) do
|
52
|
+
include Poise
|
53
|
+
include described_class
|
54
|
+
def system_package_name
|
55
|
+
'mylang'
|
56
|
+
end
|
57
|
+
def options
|
58
|
+
{}
|
59
|
+
end
|
60
|
+
def action_run
|
61
|
+
install_system_packages do
|
62
|
+
dev_package false
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
it { is_expected.to install_poise_languages_system('mylang').with(parent: chef_run.poise_test('test'),
|
68
|
+
dev_package: false,
|
69
|
+
dev_package_overrides: {},
|
70
|
+
package_version: nil,
|
71
|
+
version: '') }
|
72
|
+
end # /context with a block override
|
49
73
|
end # /describe #install_system_packages
|
50
74
|
|
51
75
|
describe '#uninstall_system_packages' do
|
@@ -67,6 +91,26 @@ describe PoiseLanguages::System::Mixin do
|
|
67
91
|
end
|
68
92
|
|
69
93
|
it { is_expected.to uninstall_poise_languages_system('mylang') }
|
94
|
+
|
95
|
+
context 'with a block override' do
|
96
|
+
provider(:poise_test) do
|
97
|
+
include Poise
|
98
|
+
include described_class
|
99
|
+
def system_package_name
|
100
|
+
'mylang'
|
101
|
+
end
|
102
|
+
def options
|
103
|
+
{}
|
104
|
+
end
|
105
|
+
def action_run
|
106
|
+
uninstall_system_packages do
|
107
|
+
dev_package false
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
it { is_expected.to uninstall_poise_languages_system('mylang').with(dev_package: false) }
|
113
|
+
end # /context with a block override
|
70
114
|
end # /describe #uninstall_system_packages
|
71
115
|
|
72
116
|
describe '#system_package_candidates' do
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-languages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '12.1'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '14'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '12.1'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '14'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: halite
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|