<commit_before># encoding: UTF-8

Given (/the following users exist/) do |users_table|
  users_table.hashes.each do |user|
    User.create!(user)
  end
end

Given (/the following admins exist/) do |users_table|
  users_table.hashes.each do |user|
    user = User.create!(user)
    user.admin = true
    user.save
  end
end

Given (/^(.*) (?:has|have) logged (\d+) activities|days/) do |name, num|
  if num.casecmp("No") ; pass ; end
  u = User.create! :email => "<EMAIL>",
                   :password => "<PASSWORD>;",
                   :password_confirmation => "<PASSWORD>;"
  u.first_name = name.split[0] ; u.last_name = name.split[1] ; u.save
  m = Month.create! :user_id => u.id
  num.to_i.times do
    Day.create! :date => Time.strptime("04/01/2015", "%m/%d/%Y"),
                :approved => true,
                :denied => false,
                :total_time => 60,
                :reason => 'Reason',
                :month_id => m.id
  end
end

Given (/^(.*) (?:|pending|unapproved) (?:|activities|days) exist/) do |num|
  if num.casecmp("No") ; pass ; end
  u = User.create! :email => "<EMAIL>",
                   :password => "<PASSWORD>;",
                   :password_confirmation => "<PASSWORD>;"
  m = Month.create! :user_id => u.id
  num.to_i.times do
    Day.create! :date => Time.strptime("04/01/2015", "%m/%d/%Y"),
                :approved => false,
                :denied => false,
                :total_time => 60,
                :reason => 'Reason',
                :month_id => m.id
  end
end<commit_msg>Commented out unused stepdef that was causing ambiguity<commit_after># encoding: UTF-8

Given (/the following users exist/) do |users_table|
  users_table.hashes.each do |user|
    User.create!(user)
  end
end

Given (/the following admins exist/) do |users_table|
  users_table.hashes.each do |user|
    user = User.create!(user)
    user.admin = true
    user.save
  end
end

# Given (/^(.*) (?:has|have) logged (\d+) activities|days/) do |name, num|
#   if num.casecmp("No") ; pass ; end
#   u = User.create! :email => "<EMAIL>",
#                    :password => "<PASSWORD>;",
#                    :password_confirmation => "<PASSWORD>;"
#   u.first_name = name.split[0] ; u.last_name = name.split[1] ; u.save
#   m = Month.create! :user_id => u.id
#   num.to_i.times do
#     Day.create! :date => Time.strptime("04/01/2015", "%m/%d/%Y"),
#                 :approved => true,
#                 :denied => false,
#                 :total_time => 60,
#                 :reason => 'Reason',
#                 :month_id => m.id
#   end
# end

Given (/^(.*) (?:pending|unapproved) (?:|activities|days) exist/) do |num|
  if num.casecmp("No") ; pass ; end
  u = User.create! :email => "<EMAIL>",
                   :password => "<PASSWORD>;",
                   :password_confirmation => "<PASSWORD>;"
  m = Month.create! :user_id => u.id
  num.to_i.times do
    Day.create! :date => Time.strptime("04/01/2015", "%m/%d/%Y"),
                :approved => false,
                :denied => false,
                :total_time => 60,
                :reason => 'Reason',
                :month_id => m.id
  end
end
{'fraction_non_alphanumeric': 0.17647058823529413, 'fraction_numerical': 0.014626391096979332, 'mean_word_length': 2.072265625, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 55, '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': '1202050', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1036, 'n_words': 246}