Sha256: 3cecca9a74f5494eaa7cb511ee75dea1bdca24a521b509bd12cd2ae1fa3a1d24

Contents?: true

Size: 621 Bytes

Versions: 5

Compression:

Stored size: 621 Bytes

Contents

module SpreeMobility
  module Generators
    class InstallGenerator < Rails::Generators::Base
      class_option :migrate, type: :boolean, default: true

      def add_javascripts
        append_file "vendor/assets/javascripts/spree/backend/all.js", "//= require spree/backend/spree_mobility\n"
			end

      def add_migrations
        run 'bundle exec rake spree_mobility:install:migrations'
      end

      def run_migrations
        if options[:migrate]
          run 'bundle exec rake db:migrate'
        else
          puts "Skiping rake db:migrate, don't forget to run it!"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree_mobility-1.4.0 lib/generators/spree_mobility/install/install_generator.rb
spree_mobility-1.3.0 lib/generators/spree_mobility/install/install_generator.rb
spree_mobility-1.2.0 lib/generators/spree_mobility/install/install_generator.rb
spree_mobility-1.1.0 lib/generators/spree_mobility/install/install_generator.rb
spree_mobility-1.0.0 lib/generators/spree_mobility/install/install_generator.rb