<commit_before>class GemifierController < ApplicationController
  after_action :remove_temp, :only => [:create_iframe]

  def index
    @file = File.new("app/views/layouts/application.html.erb")
    @session = session[:token] ? true : false
  end

  def create_iframe

    @iframe_file = Concerns::IframeContentCreator.new(params)
    @iframe_file.create_iframe_file

    respond_to do |f|
      f.html {render :page}
      f.js
    end
  end

  def create_side_column
    respond_to do |f|
      f.js
    end
  end

  def create
    @client = Octokit::Client.new(:access_token => session[:token])
    raise "error" if @client.repository?(params[:repo_name])
    @gemifier = Gemifier.new(@client, params)
    @gemifier.scaffold

    reset_session

    respond_to do |f|
      @gem_name = params[:gem_name] #for modal
      f.html {render :success_modal}
      f.js
    end
  end

  def omniauth
    session[:token] = env["omniauth.auth"]["credentials"]["token"]
    redirect_to "/"
  end

<<<<<<< HEAD
  private



  def create_hash(labels, node_paths)
    labels.collect.with_index do |label, i|
      if !label.empty? && !node_paths[i].empty?
        {label => node_paths[i]}
      end  
    end 
  end
    
=======
>>>>>>> 3129c70d0d2eea2f855df12c1f4ca05eb4375078
end<commit_msg>removed a conflict error that was missed<commit_after>class GemifierController < ApplicationController
  after_action :remove_temp, :only => [:create_iframe]

  def index
    @file = File.new("app/views/layouts/application.html.erb")
    @session = session[:token] ? true : false
  end

  def create_iframe

    @iframe_file = Concerns::IframeContentCreator.new(params)
    @iframe_file.create_iframe_file

    respond_to do |f|
      f.html {render :page}
      f.js
    end
  end

  def create_side_column
    respond_to do |f|
      f.js
    end
  end

  def create
    @client = Octokit::Client.new(:access_token => session[:token])
    raise "error" if @client.repository?(params[:repo_name])
    @gemifier = Gemifier.new(@client, params)
    @gemifier.scaffold

    reset_session

    respond_to do |f|
      @gem_name = params[:gem_name] #for modal
      f.html {render :success_modal}
      f.js
    end
  end

  def omniauth
    session[:token] = env["omniauth.auth"]["credentials"]["token"]
    redirect_to "/"
  end

end
{'fraction_non_alphanumeric': 0.11889321227842628, 'fraction_numerical': 0.010808473843493299, 'mean_word_length': 3.154398563734291, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 15, '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': '3853916', 'n_tokens_mistral': 829, 'n_tokens_neox': 789, 'n_words': 167}