<commit_before>directory node[:themis][:basedir] do
    owner node[:themis][:user]
    group node[:themis][:group]
    mode '0755'
    recursive true
    action :create
end

rbenv_ruby '2.2.2' do
    ruby_version '2.2.2'
    global true
end

rbenv_gem 'bundler' do
    ruby_version '2.2.2'
end

rbenv_gem 'god' do
    ruby_version '2.2.2'
end

git node[:themis][:basedir] do
    repository node[:themis][:repository]
    revision node[:themis][:revision]
    enable_checkout false
    user node[:themis][:user]
    group node[:themis][:group]
    action :sync
end

postgresql_connection_info = {
    :host => '127.0.0.1',
    :port => node['postgresql']['config']['port'],
    :username => 'postgres',
    :password => node['postgresql']['password']['<PASSWORD>']
}

postgresql_database 'themis' do
  connection postgresql_connection_info
  action :create
end

postgresql_database_user 'postgres' do
    connection postgresql_connection_info
    database_name 'themis'
    privileges [:all]
    action :grant
end

template "#{node[:themis][:basedir]}/god.d/queue.god" do
    source 'queue.god.erb'
    mode '0644'
end

template "#{node[:themis][:basedir]}/god.d/scheduler.god" do
    source 'scheduler.god.erb'
    mode '0644'
end

template "#{node[:themis][:basedir]}/god.d/backend.god" do
    source 'backend.god.erb'
    mode '0644'
end

python_pip 'twine'<commit_msg>Install wheel package<commit_after>directory node[:themis][:basedir] do
    owner node[:themis][:user]
    group node[:themis][:group]
    mode '0755'
    recursive true
    action :create
end

rbenv_ruby '2.2.2' do
    ruby_version '2.2.2'
    global true
end

rbenv_gem 'bundler' do
    ruby_version '2.2.2'
end

rbenv_gem 'god' do
    ruby_version '2.2.2'
end

git node[:themis][:basedir] do
    repository node[:themis][:repository]
    revision node[:themis][:revision]
    enable_checkout false
    user node[:themis][:user]
    group node[:themis][:group]
    action :sync
end

postgresql_connection_info = {
    :host => '127.0.0.1',
    :port => node['postgresql']['config']['port'],
    :username => 'postgres',
    :password => node['postgresql']['password']['<PASSWORD>']
}

postgresql_database 'themis' do
  connection postgresql_connection_info
  action :create
end

postgresql_database_user 'postgres' do
    connection postgresql_connection_info
    database_name 'themis'
    privileges [:all]
    action :grant
end

template "#{node[:themis][:basedir]}/god.d/queue.god" do
    source 'queue.god.erb'
    mode '0644'
end

template "#{node[:themis][:basedir]}/god.d/scheduler.god" do
    source 'scheduler.god.erb'
    mode '0644'
end

template "#{node[:themis][:basedir]}/god.d/backend.god" do
    source 'backend.god.erb'
    mode '0644'
end

python_pip 'twine'
python_pip 'wheel'
{'fraction_non_alphanumeric': 0.14662332972192127, 'fraction_numerical': 0.024557602022390754, 'mean_word_length': 4.063985374771481, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2965688', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1023, 'n_words': 213}