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

      class_option :auto_run_migrations, :type => :boolean, :default => false

      def add_javascripts
        append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_ipay88\n"
        append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_ipay88\n"
      end

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

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

      def run_migrations
        run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask 'Would you like to run the migrations now? [Y/n]')
        if run_migrations
          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>Fix generators for spree 2.3.0<commit_after>module SpreeIpay88
  module Generators
    class InstallGenerator < Rails::Generators::Base

      class_option :auto_run_migrations, :type => :boolean, :default => false

      def add_javascripts
        append_file 'vendor/assets/javascripts/frontend/all.js', "//= require store/spree_ipay88\n"
        append_file 'vendor/assets/javascripts/backend/all.js', "//= require admin/spree_ipay88\n"
      end

      def add_stylesheets
        inject_into_file 'vendor/assets/stylesheets/frontend/all.css', " *= require store/spree_ipay88\n", :before => /\*\//, :verbose => true
        inject_into_file 'vendor/assets/stylesheets/backend/all.css', " *= require admin/spree_ipay88\n", :before => /\*\//, :verbose => true
      end

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

      def run_migrations
        run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask 'Would you like to run the migrations now? [Y/n]')
        if run_migrations
          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.11972119721197212, 'fraction_numerical': 0.01107011070110701, 'mean_word_length': 2.866877971473851, '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': '5625477', 'n_tokens_mistral': 802, 'n_tokens_neox': 797, 'n_words': 177}