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: 37677f101577b3c801076ce0f20ea825e5e8d81d
4
- data.tar.gz: 7829d757e5dc5c59cb304ed301c91c58c36cddd6
3
+ metadata.gz: d92f4e247a88942c324c7517c7c2aeaaa2512d87
4
+ data.tar.gz: 3a1d2d9965654b26c1cf05bbeb93b7ea23ba2f8e
5
5
  SHA512:
6
- metadata.gz: ce81c9d02b0e1d80eeb3c3beed90aed95f05c8ce494bddebbf9c79a9a3de6610cd4358bc63f5fe613963e590a738a053e6886d366e5dc43e97ecde171c36b86e
7
- data.tar.gz: 41f131e359368c7573d8ba4bff445d6c8b82c5b59d62cbd3e913566dff4dbef6d13900c7978b41b9683c180ae2bcf7fcde6add32393d9cfd9274e4fbb1dca9bc
6
+ metadata.gz: 27d253004e27f04762c4da77ac27dc022e1757d19492de2e3db5814a51ee0d1c8949b15f9abc6021e3ac3135684e0d6622332272b2ce5bad7a282a7ba64d474d
7
+ data.tar.gz: c3be8ba6054aa2eb936a58df11fcffbda41430bca46cca8e6064057599793ea51ce8118f3e7e78bb9cbf88d281739e7895bd14a13170e9940641003905149aaf
@@ -1,5 +1,9 @@
1
1
  # Poise-Service Changelog
2
2
 
3
+ ## v1.5.1
4
+
5
+ * Fix the `sysvinit` provider on Amazon Linux under Chef 13.
6
+
3
7
  ## v1.5.0
4
8
 
5
9
  * Added `never_start` and `never_stop` provider options to prevent Chef from starting
@@ -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.
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module PoiseService
19
- VERSION = '1.5.0'
19
+ VERSION = '1.5.1'
20
20
  end
@@ -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.0
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-04-30 00:00:00.000000000 Z
11
+ date: 2017-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef