-
-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename libexec_dir to apache_libexec_dir (#678)
* Rename libexec_dir to apache_libexec_dir This works around an issue when using this cookbook with the docker cookbook at the same time. They both have a function called ``libexec_dir`` and docker seems to override this cookbook. To work around this, renaming our function to ``apache_libexec_dir`` seems to work. This resolves #677. * Disable MD024 because we follow Keep A Changelog syntax which conflicts
- Loading branch information
Showing
7 changed files
with
104 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
rules "~MD013" | ||
rules "~MD013", "~MD024" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe Apache2::Cookbook::Helpers do | ||
class DummyClass < Chef::Node | ||
include Apache2::Cookbook::Helpers | ||
end | ||
|
||
subject { DummyClass.new } | ||
|
||
describe '#apache_libexec_dir' do | ||
before do | ||
allow(subject).to receive(:[]).with('platform_family').and_return(platform_family) | ||
allow(subject).to receive(:[]).with(:platform_family).and_return(platform_family) | ||
allow(subject).to receive(:[]).with('kernel').and_return('machine' => machine) | ||
end | ||
context 'x86_64' do | ||
let(:machine) { 'x86_64' } | ||
|
||
context 'redhat' do | ||
let(:platform_family) { 'rhel' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib64/httpd/modules' } | ||
end | ||
|
||
context 'fedora' do | ||
let(:platform_family) { 'fedora' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib64/httpd/modules' } | ||
end | ||
|
||
context 'amazon' do | ||
let(:platform_family) { 'amazon' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib64/httpd/modules' } | ||
end | ||
|
||
context 'suse' do | ||
let(:platform_family) { 'suse' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib64/apache2' } | ||
end | ||
|
||
context 'debian' do | ||
let(:platform_family) { 'debian' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/apache2/modules' } | ||
end | ||
|
||
context 'arch' do | ||
let(:platform_family) { 'arch' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/httpd/modules' } | ||
end | ||
|
||
context 'freebsd' do | ||
let(:platform_family) { 'freebsd' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/local/libexec/apache24' } | ||
end | ||
end | ||
|
||
context 'x86' do | ||
let(:machine) { 'i686' } | ||
|
||
context 'redhat' do | ||
let(:platform_family) { 'rhel' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/httpd/modules' } | ||
end | ||
|
||
context 'fedora' do | ||
let(:platform_family) { 'fedora' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/httpd/modules' } | ||
end | ||
|
||
context 'amazon' do | ||
let(:platform_family) { 'amazon' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/httpd/modules' } | ||
end | ||
|
||
context 'suse' do | ||
let(:platform_family) { 'suse' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/apache2' } | ||
end | ||
|
||
context 'debian' do | ||
let(:platform_family) { 'debian' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/apache2/modules' } | ||
end | ||
|
||
context 'arch' do | ||
let(:platform_family) { 'arch' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/lib/httpd/modules' } | ||
end | ||
|
||
context 'freebsd' do | ||
let(:platform_family) { 'freebsd' } | ||
it { expect(subject.apache_libexec_dir).to eq '/usr/local/libexec/apache24' } | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.