<commit_before>#
# Cookbook Name:: wt_portfolio_harness
# Resources:: plugin
#
# Copyright 2013, Webtrends Inc
# Do not redistribute

actions :create

attribute :name, :kind_of 						 => String, :name_attribute => true
attribute :download_url, :kind_of 		 => String, :required => true
attribute :user, :kind_of 						 => String, :defaults => node['wt_portfolio_harness']['user']
attribute :group, :kind_of 						 => String, :defaults => node['wt_portfolio_harness']['group']
attribute :install_dir, :kind_of			 => String
attribute :conf_dir, :kind_of				   => String
attribute :configure,    :kind_of      => Proc
attribute :after_deploy, :kind_of			 => Proc
attribute :restart, :kind_of			     => Proc
attribute :force_deploy, :kind_of      => [ TrueClass, FalseClass ], :default => false

def initialize(*args)
  super
  @action 	   = :create
  @install_dir = IO::File.join(node['wt_portfolio_harness']['plugin_dir'], @name)
  @conf_dir 	 = IO::File.join(@install_dir, "conf")
  if @restart == nil
  	@restart = Proc.new {
  		service "harness" do
      	action :restart
    	end
  	}
  end
end<commit_msg>Fixing default attribs<commit_after>#
# Cookbook Name:: wt_portfolio_harness
# Resources:: plugin
#
# Copyright 2013, Webtrends Inc
# Do not redistribute

actions :create

attribute :name, :kind_of 						 => String, :name_attribute => true
attribute :download_url, :kind_of 		 => String, :required => true
attribute :user, :kind_of 						 => String
attribute :group, :kind_of 						 => String
attribute :install_dir, :kind_of			 => String
attribute :conf_dir, :kind_of				   => String
attribute :configure,    :kind_of      => Proc
attribute :after_deploy, :kind_of			 => Proc
attribute :restart, :kind_of			     => Proc
attribute :force_deploy, :kind_of      => [ TrueClass, FalseClass ], :default => false

def initialize(*args)
  super
  @action 	   = :create
  @install_dir = IO::File.join(node['wt_portfolio_harness']['plugin_dir'], @name)
  @conf_dir 	 = IO::File.join(@install_dir, "conf")
  @user        = node['wt_portfolio_harness']['user']
  @group        = node['wt_portfolio_harness']['group']
  if @restart == nil
  	@restart = Proc.new {
  		service "harness" do
      	action :restart
    	end
  	}
  end
end
{'fraction_non_alphanumeric': 0.13172043010752688, 'fraction_numerical': 0.0035842293906810036, 'mean_word_length': 3.843817787418655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4377446', 'n_tokens_mistral': 808, 'n_tokens_neox': 729, 'n_words': 181}