<commit_before>#
# Cookbook Name:: geminabox
# Recipe:: default
#
# Copyright 2013, Webtrends Inc.
#

gem_package "geminabox"
include_recipe "unicorn"

config_file = "#{node['geminabox']['install_dir']}/config.ru"

template config_file do
  source "config.ru.erb"
  owner "root"
  group "root"
  mode 00644
  variables ({
    :install_dir => node['geminabox']['install_dir']
  })
end

unicorn_config "/etc/unicorn/geminabox.rb" do
  listen({ node[:unicorn][:port] => node[:unicorn][:options] })
  working_directory node['geminabox']['install_dir']
end<commit_msg>Adding start command to geminabox<commit_after>#
# Cookbook Name:: geminabox
# Recipe:: default
#
# Copyright 2013, Webtrends Inc.
#

gem_package "geminabox"
include_recipe "unicorn"

config_file = "#{node['geminabox']['install_dir']}/config.ru"

template config_file do
  source "config.ru.erb"
  owner "root"
  group "root"
  mode 00644
  variables ({
    :install_dir => node['geminabox']['install_dir']
  })
end

execute "start_unicorn" do
  command "unicorn -D -p 8080"
  cwd node['geminabox']['install_dir']
end
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.020370370370370372, 'mean_word_length': 5.396449704142012, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '395770', 'n_tokens_mistral': 420, 'n_tokens_neox': 397, 'n_words': 85}