Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) update userdir template #1683

Merged
merged 2 commits into from
Aug 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/classes/apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@
it "should fail" do
expect do
catalogue
end.to raise_error(Puppet::PreformattedError, /Evaluation Error: Error while evaluating a Resource Statement, Class\[Apache\]: parameter 'sendfile' expects a match for Enum\['Off', 'On', 'off', 'on'\], got 'foo'/)
end.to raise_error(Puppet::PreformattedError, /Evaluation Error: Error while evaluating a Resource Statement, Class\[Apache\]: parameter 'sendfile' expects a match for Enum\['Off', 'On', 'off', 'on'\]/)
end
end
context "On" do
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/mod/userdir_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
}
end
it { should contain_file("userdir.conf").with_content(%r{^\s*UserDir\s+/home/\*/hi$})}
it { should contain_file("userdir.conf").with_content(%r{^\s*\<Directory\s+\"/home/\*/hi\"\>$})}
end
context "with home set to something" do
let :params do
Expand All @@ -40,6 +41,7 @@
}
end
it { should contain_file("userdir.conf").with_content(%r{^\s*UserDir\s+/u/\*/public_html$})}
it { should contain_file("userdir.conf").with_content(%r{^\s*\<Directory\s+\"/u/\*/public_html"\>$})}
end
context "with path set to something" do
let :params do
Expand All @@ -48,6 +50,7 @@
}
end
it { should contain_file("userdir.conf").with_content(%r{^\s*UserDir\s+public_html /usr/web http://www\.example\.com/$})}
it { should contain_file("userdir.conf").with_content(%r{^\s*\<Directory\s+\"public_html /usr/web http://www\.example\.com/\"\>$})}
end
end
end
2 changes: 1 addition & 1 deletion templates/mod/userdir.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<% end -%>
UserDir <%= @_path %>

<Directory "<%= @home %>/*/<%= @dir %>">
<Directory "<%= @_path %>">
AllowOverride <%= @overrides.join(' ') %>
Options <%= @options.join(' ') %>
<Limit GET POST OPTIONS>
Expand Down