<commit_before>root_path = File.expand_path(File.dirname(__FILE__))
require File.join(root_path, "lib", "color")
include Color

# 
# ruby ./update.rb development # or test or production (default)
#
envs = ["production", "test", "development"]
env = if envs.include?(ARGV[0])
        ARGV[0]
      else
        "production"
      end

puts green " == Install for ENV=#{env} ..."

# bundle install
if env == "production"
`bundle install --without development test`
else
`bundle install`
end

# migrate db
`bundle exec rake db:setup RAILS_ENV=#{env}`
`bundle exec rake db:seed_fu RAILS_ENV=#{env}`

puts green %q[
Administrator account created:

login.........<EMAIL>
password......<PASSWORD>
]

puts green " == Done! Now you can start server"<commit_msg>little fixes<commit_after>root_path = File.expand_path(File.dirname(__FILE__))
require File.join(root_path, "lib", "color")
include Color

# 
# ruby ./update.rb development # or test or production (default)
#
envs = ["production", "test", "development"]
env = if envs.include?(ARGV[0])
        ARGV[0]
      else
        "production"
      end

puts green " == Install for ENV=#{env} ..."

# bundle install
if env == "production"
`bundle install --without development test`
else
`bundle install`
end
  
# migrate db
`bundle exec rake db:create RAILS_ENV=#{env}`
`bundle exec rake db:schema:load RAILS_ENV=#{env}`
`bundle exec rake db:seed_fu RAILS_ENV=#{env}`

puts green %q[
Administrator account created:

login.........<EMAIL>
password......<PASSWORD>
]

puts green " == Done! Now you can start server"
{'fraction_non_alphanumeric': 0.15285806037251123, 'fraction_numerical': 0.002569043031470777, 'mean_word_length': 3.977635782747604, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4059879', 'n_tokens_mistral': 535, 'n_tokens_neox': 523, 'n_words': 153}