Sha256: e6ab4b257b5c1f3957cbe867f2c46606419aa126ffa82d363aa31690f273abb3

Contents?: true

Size: 890 Bytes

Versions: 4

Compression:

Stored size: 890 Bytes

Contents

module HappySeed
  module Generators
    class BootstrapGenerator < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      def update_application_haml
        gem 'bootstrap-sass'
        gem 'modernizr-rails'

        Bundler.with_clean_env do
          run "bundle install"
        end

        remove_file 'app/views/layouts/application.html.erb'
        remove_file 'app/assets/javascripts/application.js'
        remove_file 'app/helpers/application_helper.rb'
        remove_file 'app/assets/stylesheets/application.css'
        directory 'app'
        directory 'lib'
        directory 'docs'

        inject_into_file 'config/application.rb', before: "end\nend\n" do <<-'RUBY'
  config.generators do |g|
      g.stylesheets = false
    end
RUBY
        end
        append_to_file ".env", "GOOGLE_ANALYTICS_SITE_ID=\n"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
happy_seed-0.0.5 lib/generators/happy_seed/bootstrap/bootstrap_generator.rb
happy_seed-0.0.4 lib/generators/happy_seed/bootstrap/bootstrap_generator.rb
happy_seed-0.0.3 lib/generators/happy_seed/bootstrap/bootstrap_generator.rb
happy_seed-0.0.2 lib/generators/happy_seed/bootstrap/bootstrap_generator.rb