<commit_before># module: blank

class Blank < Thor
  BLANK_REPO = '<EMAIL>:giraffesoft/blank.git'
  
  desc "new_app NAME [REPO]", "Create a new blank app in directory NAME, and push it to REPO."
  def new_app(name, repo=nil)
    @name = name
    
    puts "---- Cloning blank from #{BLANK_REPO}..."
    `git clone -o blank #{BLANK_REPO} #{name}`
    rake 'blank:switch_to_app_gitignore'
    commit "Switch to gitignore that doesnt ignore site_keys.rb."
    
    
    puts "\n---- Generating site keys for restful-auth..."
    rake 'auth:gen:site_key'
    commit "Add generated site_keys.rb file."
    
    if repo
      puts "\n---- Pushing to repo @ #{repo}..."
      rake 'blank:switch_origin', :repo => repo
    end
    
    puts "\n---- Generating a session configuration."
    rake "blank:session_config NAME=#{name}"
    commit "Add generated session configuration."
    
    puts "\n---- There are TODOs in blank. Here's the output of rake notes, for your perusal:"
    puts rake(:notes)
  end<commit_msg>only commit stuff if a repo is specified<commit_after># module: blank

class Blank < Thor
  BLANK_REPO = '<EMAIL>:giraffesoft/blank.git'
  
  desc "new_app NAME [REPO]", "Create a new blank app in directory NAME, and push it to REPO."
  def new_app(name, repo=nil)
    @name = name
    
    puts "---- Cloning blank from #{BLANK_REPO}..."
    `git clone -o blank #{BLANK_REPO} #{name}`
    rake 'blank:switch_to_app_gitignore'
    commit "Switch to gitignore that doesnt ignore site_keys.rb." if repo
    
    
    puts "\n---- Generating site keys for restful-auth..."
    rake 'auth:gen:site_key'
    commit "Add generated site_keys.rb file." if repo
    
    if repo
      puts "\n---- Pushing to repo @ #{repo}..."
      rake 'blank:switch_origin', :repo => repo
    end
    
    puts "\n---- Generating a session configuration."
    rake "blank:session_config NAME=#{name}"
    commit "Add generated session configuration." if repo
    
    puts "\n---- There are TODOs in blank. Here's the output of rake notes, for your perusal:"
    puts rake(:notes)
  end
{'fraction_non_alphanumeric': 0.1242176215695715, 'fraction_numerical': 0.0, 'mean_word_length': 2.6843971631205674, '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': '1737945', 'n_tokens_mistral': 674, 'n_tokens_neox': 665, 'n_words': 234}