<commit_before>require 'fileutils'

css_path = File.join(RAILS_ROOT, "public", "stylesheets", "calendar")
js_path  = File.join(RAILS_ROOT, "public", "javascripts", "calendar")
img_path = File.join(RAILS_ROOT, "public", "images", "calendar")

assets_path = File.join(File.dirname(__FILE__), "lib", "assets")

FileUtils.mkdir_p css_path
FileUtils.mkdir_p img_path
FileUtils.mkdir_p js_path

FileUtils.cp(File.join(assets_path, "javascripts", "facebox.js"), js_path)

%w(red.css blue.css grey.css facebox.css).each do |stylesheet|
  FileUtils.cp(File.join(assets_path, "stylesheets", stylesheet), css_path)
end

Dir[assets_path + "/images/*"].each do |image|
  FileUtils.cp(image, img_path)
end<commit_msg>Generate an Event model and migration.<commit_after>require 'fileutils'

# copy assets
css_path = File.join(RAILS_ROOT, "public", "stylesheets", "calendar")
js_path  = File.join(RAILS_ROOT, "public", "javascripts", "calendar")
img_path = File.join(RAILS_ROOT, "public", "images", "calendar")

assets_path = File.join(File.dirname(__FILE__), "lib", "assets")

FileUtils.mkdir_p css_path
FileUtils.mkdir_p img_path
FileUtils.mkdir_p js_path

FileUtils.cp(File.join(assets_path, "javascripts", "facebox.js"), js_path)

%w(red.css blue.css grey.css facebox.css).each do |stylesheet|
  FileUtils.cp(File.join(assets_path, "stylesheets", stylesheet), css_path)
end

Dir[assets_path + "/images/*"].each do |image|
  FileUtils.cp(image, img_path)
end

# create a new Event model with its migration
# TODO: This should use a generator or something
`cd #{RAILS_ROOT} && ruby script/generate model Event title:string description:text date:datetime`
{'fraction_non_alphanumeric': 0.14390243902439023, 'fraction_numerical': 0.0, 'mean_word_length': 6.740566037735849, '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': '1003341', 'n_tokens_mistral': 582, 'n_tokens_neox': 570, 'n_words': 129}