<commit_before>class EnvironmentVariablesController < ApplicationController
  def create
       @software = Software.find(params[:software_id])
       @environment_variable = @software.environment_variables.create(environment_variables_params)
       redirect_to editDetails_software_path(@software)
     end
   
      def destroy
        
        @environment_variable = EnvironmentVariable.find(params[:id])
        sid = @environment_variable.software_id
        @environment_variable.destroy()     
     
        redirect_to  :controller => 'softwares', :action => 'editDetails', :id => sid
          
      end
      
      
     def edit
           @environment_variable = EnvironmentVariable.find(params[:id])
     end
        
       def update
           @environment_variable = EnvironmentVariable.find(params[:id])
       
            if @environment_variable.update(environment_variables_params)
                     sid = @environment_variable.software_id
                    redirect_to  :controller => 'softwares', :action => 'editDetails', :id => sid        
            else
                render 'edit'
            end
        end
        
      
     private
       def environment_variables_params
         params.require(:environment_variable).permit(:name ,:value, :ask_at_runtime,:ask_at_runtime, :description, :comment)
       end

end<commit_msg>additional fields for environment variables and service type environment varaibles<commit_after>class EnvironmentVariablesController < ApplicationController
  def create
       @software = Software.find(params[:software_id])
       @environment_variable = @software.environment_variables.create(environment_variables_params)
       redirect_to editDetails_software_path(@software)
     end
   
      def destroy
        
        @environment_variable = EnvironmentVariable.find(params[:id])
        sid = @environment_variable.software_id
        @environment_variable.destroy()     
     
        redirect_to  :controller => 'softwares', :action => 'editDetails', :id => sid
          
      end
      
      
     def edit
           @environment_variable = EnvironmentVariable.find(params[:id])
     end
        
       def update
           @environment_variable = EnvironmentVariable.find(params[:id])
       
            if @environment_variable.update(environment_variables_params)
                     sid = @environment_variable.software_id
                    redirect_to  :controller => 'softwares', :action => 'editDetails', :id => sid        
            else
                render 'edit'
            end
        end
        
      
     private
       def environment_variables_params
         params.require(:environment_variable).permit(:name ,:value, :ask_at_runtime,:ask_at_runtime, :mandatory, :description, :comment)
       end

end
{'fraction_non_alphanumeric': 0.07858407079646018, 'fraction_numerical': 0.0, 'mean_word_length': 2.3207990599294948, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2553901', 'n_tokens_mistral': 697, 'n_tokens_neox': 674, 'n_words': 133}