<commit_before>require "net/http"
require "net/https"
require "uri"
require 'rbconfig'

say "Building Application with Prologue..."

def get_remote_https_file(source, destination)
  uri = URI.parse(source)
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Get.new(uri.request_uri)
  response = http.request(request)
  path = File.join(destination_root, destination)
  File.open(path, "w") { |file| file.write(response.body) }
end

append_file '.gitignore' do
  '.DS_Store'
  'log/*.log'
  'tmp/**/*'
  'config/database.yml'
  'db/*.sqlite3'
  'public/system/**/**/**/*'
  '.idea/*'
end

git :init

# Apply Gemfile
apply File.expand_path("../gemfile.rb", __FILE__)

# Apply Jammit<commit_msg>add .swp and sass cache to .gitignore<commit_after>require "net/http"
require "net/https"
require "uri"
require 'rbconfig'

say "Building Application with Prologue..."

def get_remote_https_file(source, destination)
  uri = URI.parse(source)
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Get.new(uri.request_uri)
  response = http.request(request)
  path = File.join(destination_root, destination)
  File.open(path, "w") { |file| file.write(response.body) }
end

append_file '.gitignore' do
  '.DS_Store'
  'log/*.log'
  'tmp/**/*'
  'config/database.yml'
  'db/*.sqlite3'
  'public/system/**/**/**/*'
  '.idea/*'
  '.sass-cache/**/*'
  '*.swp'
end

git :init

# Apply Gemfile
apply File.expand_path("../gemfile.rb", __FILE__)

# Apply Jammit
{'fraction_non_alphanumeric': 0.1748599875544493, 'fraction_numerical': 0.0012445550715619166, 'mean_word_length': 4.254901960784314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3706231', 'n_tokens_mistral': 601, 'n_tokens_neox': 596, 'n_words': 121}