<commit_before>require 'EngineGallery.rb'
class GallerysController < ApplicationController
  before_action :authenticate_user!
  
  def index
    @galleries = EngineGallery.list_local
  end
  
  def filter_blueprints(blueprint_type)
    
  end
  
  def install_blueprint  
    @gallery = EngineGallery.getGallery(params[:id],params[:gallery_url])
      if @gallery !=nil

          @blueprint = @gallery.get_blueprint(params[:blueprint_id])
            if @blueprint != nil
              @repository = @gallery.get_repository( params[:blueprint_id])
            else   
              @error_mesg="Failed to load blueprint " + params[:blueprint_id] + " from " + params[:gallery_url] + " via " + @gallery.blueprints_url
            end
            
      else
        @error_mesg="Failed to load Gallery params[:id] params[:gallery_url] params[:blueprint_id] " +  params[:id] + " " + params[:blueprint_id] + " " +  params[:gallery_url]           
      end
  end
  def install_from_blueprint
   engine = @enginesOS_api.buildEngine(params[:repository],params[:host],params[:domain_name],"")
    redirect_to engine_path(engine.containerName)
  end
  def show  
    if  @galleries == nil
      @galleries = EngineGallery.list_local
    end
    @galleries.each do |gallery|<commit_msg>debugging<commit_after>require 'EngineGallery.rb'
class GallerysController < ApplicationController
  before_action :authenticate_user!
  
  def index
    @galleries = EngineGallery.list_local
  end
  
  def filter_blueprints(blueprint_type)
    
  end
  
  def install_blueprint  
    @gallery = EngineGallery.getGallery(params[:id],params[:gallery_url])
      if @gallery !=nil

          @blueprint = @gallery.get_blueprint(params[:blueprint_id])
            if @blueprint != nil
              @repository = @gallery.get_repository( params[:blueprint_id])
            else   
              @error_mesg="Failed to load blueprint " + params[:blueprint_id] + " from " + params[:gallery_url] + " via " + @gallery.blueprints_url
            end
            
      else
        @error_mesg="Failed to load Gallery params[:id] params[:gallery_url] params[:blueprint_id] " +  params[:id] + " " + params[:blueprint_id] + " " +  params[:gallery_url]           
      end
  end
  def install_from_blueprint
    p "install"
   engine = @enginesOS_api.buildEngine(params[:repository],params[:host],params[:domain_name],"")
    redirect_to engine_path(engine.containerName)
  end
  def show  
    if  @galleries == nil
      @galleries = EngineGallery.list_local
    end
    @galleries.each do |gallery|
{'fraction_non_alphanumeric': 0.10505836575875487, 'fraction_numerical': 0.0, 'mean_word_length': 3.074484944532488, 'pattern_counts': {'":': 0, '<': 5, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3296773', 'n_tokens_mistral': 810, 'n_tokens_neox': 776, 'n_words': 145}