<commit_before>module SpreeFlexiVariants
  module Generators
    class InstallGenerator < Rails::Generators::Base

      def add_javascripts
        append_file "app/assets/javascripts/store/all.js", "//= require store/exclusions\n"
        append_file "app/assets/javascripts/store/all.js", "//= require jquery.formatCurrency-1.4.0.min\n"
        append_file "app/assets/javascripts/admin/all.js", "//= require admin/orders/flexi_configuration\n"
        
      end

      def add_stylesheets
        inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/flexi-variants\n", :before => /\*\//, :verbose => true
      end

      def add_migrations
        run 'bundle exec rake railties:install:migrations FROM=spree_flexi_variants'
      end

      def run_migrations
         res = ask "Would you like to run the migrations now? [Y/n]"
         if res == "" || res.downcase == "y"
           run 'bundle exec rake db:migrate'
         else
           puts "Skipping rake db:migrate, don't forget to run it!"
         end
      end
    end
  end
end
<commit_msg>moved static js from _content_for_head to spree_flexi_variants.js attention: I removed the var cartFormValidator, I think its not needed??<commit_after>module SpreeFlexiVariants
  module Generators
    class InstallGenerator < Rails::Generators::Base

      def add_javascripts
        append_file "app/assets/javascripts/store/all.js", "//= require store/exclusions\n"
        append_file "app/assets/javascripts/store/all.js", "//= require jquery.formatCurrency-1.4.0.min\n"
        append_file "app/assets/javascripts/admin/all.js", "//= require admin/orders/flexi_configuration\n"
        append_file "app/assets/javascripts/store/all.js", "//= require store/spree_flexi_variants\n"
      end

      def add_stylesheets
        inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/flexi-variants\n", :before => /\*\//, :verbose => true
      end

      def add_migrations
        run 'bundle exec rake railties:install:migrations FROM=spree_flexi_variants'
      end

      def run_migrations
         res = ask "Would you like to run the migrations now? [Y/n]"
         if res == "" || res.downcase == "y"
           run 'bundle exec rake db:migrate'
         else
           puts "Skipping rake db:migrate, don't forget to run it!"
         end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10813076278290025, 'fraction_numerical': 0.002514668901927913, 'mean_word_length': 2.661042944785276, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2014327', 'n_tokens_mistral': 758, 'n_tokens_neox': 753, 'n_words': 177}