poise-service 1.5.0 → 1.5.1
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
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d92f4e247a88942c324c7517c7c2aeaaa2512d87
|
4
|
+
data.tar.gz: 3a1d2d9965654b26c1cf05bbeb93b7ea23ba2f8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d253004e27f04762c4da77ac27dc022e1757d19492de2e3db5814a51ee0d1c8949b15f9abc6021e3ac3135684e0d6622332272b2ce5bad7a282a7ba64d474d
|
7
|
+
data.tar.gz: c3be8ba6054aa2eb936a58df11fcffbda41430bca46cca8e6064057599793ea51ce8118f3e7e78bb9cbf88d281739e7895bd14a13170e9940641003905149aaf
|
data/CHANGELOG.md
CHANGED
@@ -37,7 +37,7 @@ module PoiseService
|
|
37
37
|
r.provider(case node['platform_family']
|
38
38
|
when 'debian'
|
39
39
|
Chef::Provider::Service::Debian
|
40
|
-
when 'rhel'
|
40
|
+
when 'rhel', 'amazon'
|
41
41
|
Chef::Provider::Service::Redhat
|
42
42
|
else
|
43
43
|
# Better than nothing I guess? Will fail on enable I think.
|
@@ -19,6 +19,8 @@ require 'spec_helper'
|
|
19
19
|
describe PoiseService::ServiceProviders::Sysvinit do
|
20
20
|
service_provider('sysvinit')
|
21
21
|
step_into(:poise_service)
|
22
|
+
let(:test_provider) { chef_run.poise_service('test').provider_for_action(:enable) }
|
23
|
+
let(:service_provider) { test_provider.send(:service_resource).provider_for_action(:enable) }
|
22
24
|
recipe do
|
23
25
|
poise_service 'test' do
|
24
26
|
command 'myapp --serve'
|
@@ -28,6 +30,7 @@ describe PoiseService::ServiceProviders::Sysvinit do
|
|
28
30
|
context 'on Ubuntu' do
|
29
31
|
let(:chefspec_options) { { platform: 'ubuntu', version: '14.04'} }
|
30
32
|
|
33
|
+
it { expect(service_provider).to be_a Chef::Provider::Service::Debian }
|
31
34
|
it { is_expected.to render_file('/etc/init.d/test').with_content(<<-EOH) }
|
32
35
|
start-stop-daemon --start --quiet --background \\
|
33
36
|
--pidfile "/var/run/test.pid" --make-pidfile \\
|
@@ -69,6 +72,7 @@ EOH
|
|
69
72
|
context 'on CentOS' do
|
70
73
|
let(:chefspec_options) { { platform: 'centos', version: '7.0'} }
|
71
74
|
|
75
|
+
it { expect(service_provider).to be_a Chef::Provider::Service::Redhat }
|
72
76
|
it { is_expected.to render_file('/etc/init.d/test').with_content(<<-EOH) }
|
73
77
|
Dir.chdir("/")
|
74
78
|
IO.write(pid_file, Process.pid)
|
@@ -126,6 +130,16 @@ EOH
|
|
126
130
|
end # /context with a non-default internal PID file
|
127
131
|
end # /context on CentOS
|
128
132
|
|
133
|
+
context 'on Debian' do
|
134
|
+
let(:chefspec_options) { { platform: 'debian', version: '8.7'} }
|
135
|
+
it { expect(service_provider).to be_a Chef::Provider::Service::Debian }
|
136
|
+
end # /context on Debian
|
137
|
+
|
138
|
+
context 'on Amazon Linux' do
|
139
|
+
let(:chefspec_options) { { platform: 'amazon', version: '2016.09'} }
|
140
|
+
it { expect(service_provider).to be_a Chef::Provider::Service::Redhat }
|
141
|
+
end # /context on Amazon Linux
|
142
|
+
|
129
143
|
context 'with action :disable' do
|
130
144
|
recipe do
|
131
145
|
poise_service 'test' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
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-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|