Permalink
Browse files

Change attributes from symbols to strings

  • Loading branch information...
1 parent 846b23c commit 0085c9e5e07048a0128934a91dbc63c854f32eba David King committed Aug 6, 2012
Showing with 16 additions and 16 deletions.
  1. +4 −4 README.md
  2. +3 −3 attributes/default.rb
  3. +1 −1 metadata.rb
  4. +5 −5 recipes/default.rb
  5. +3 −3 templates/default/web_app.conf.erb
View
@@ -6,15 +6,15 @@ for a drupal environment.
### Requirements ###
-* [Opscode's apache2 cookbook](http://community.opscode.com/cookbooks/apache2/)
+* See [metadata.rb](https://github.com/xforty/chef-drupal/blob/master/metadata.rb)
### Attributes ###
#### default ####
-* node[:drupal][:project_name] - fqdn of the site (you should override this)
-* node[:drupal][:docroot] - apache docroot for the site (not necessary to override)
-* node[:drupal][:server_name] - URL used to access the site locally (not necessary to override)
+* `node['drupal']['project_name']` - Name of the web app (default: VM's host name)
+* `node['drupal']['docroot']` - Apache docroot for the site
+* `node['drupal']['server_name']` - URL used to access the site locally (default: project_name with ".local" appended)
### USAGE ###
View
@@ -18,7 +18,7 @@
# limitations under the License.
#
-default[:drupal][:project_name] = node['vagrant']['config']['keys']['vm']['host_name']
-default[:drupal][:server_name] = "#{node[:drupal][:project_name]}.local"
-default[:drupal][:docroot] = "/srv/www"
+default['drupal']['project_name'] = node['vagrant']['config']['keys']['vm']['host_name']
+default['drupal']['server_name'] = "#{node['drupal']['project_name']}.local"
+default['drupal']['docroot'] = "/srv/www"
View
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs a drupal environment"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "0.0.1"
+version "1.0.0"
depends "apache2"
depends "drush"
View
@@ -31,16 +31,16 @@
if node['vagrant']['config']['keys']['vm']['networks'].empty?
# Using forwarded_ports always means "localhost" for server name
- node[:drupal][:server_name] = "localhost"
+ node['drupal']['server_name'] = "localhost"
# Solves the problem of HTTP request statuses failing with forwarded_ports
# https://github.com/xforty/vagrant-drupal/issues/1
include_recipe "drupal::iptables"
end
# Define virtualhost in apache for site
-web_app node[:drupal][:project_name] do
- server_name node[:drupal][:server_name]
- server_aliases [node[:drupal][:server_name], 'local.vbox']
- docroot node[:drupal][:docroot]
+web_app node['drupal']['project_name'] do
+ server_name node['drupal']['server_name']
+ server_aliases [node['drupal']['server_name']]
+ docroot node['drupal']['docroot']
end
@@ -25,11 +25,11 @@
</Location>
LogLevel info
- ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
- CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
+ ErrorLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-error.log
+ CustomLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-access.log combined
RewriteEngine On
- RewriteLog <%= node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
+ RewriteLog <%= node['apache']['log_dir'] %>/<%= @application_name %>-rewrite.log
RewriteLogLevel 0
# Canonical host, <%= @params[:server_name] %>

0 comments on commit 0085c9e

Please sign in to comment.