Sha256: d2844259497d9e316b1082b9feda169ba57b0cde43e2af5011c8ffea50548414

Contents?: true

Size: 713 Bytes

Versions: 7

Compression:

Stored size: 713 Bytes

Contents

# frozen_string_literal: true

require 'bundler'

module Boring
  module Ahoy
    class InstallGenerator < Rails::Generators::Base
      desc "Adds Ahoy to the application"
      source_root File.expand_path("templates", __dir__)

      def add_twitter_omniauth_gem
        say "Adding Ahoy gem", :green
        Bundler.with_unbundled_env do
          run "bundle add ahoy_matey"
        end
      end

      def run_ahoy_generator
        say "Running Ahoy generator", :green
        Bundler.with_unbundled_env do
          run "bundle exec rails generate ahoy:install"
          run "bundle exec rails db:migrate"
        end
      end

      def show_readme
        readme "README"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
boring_generators-0.15.0 lib/generators/boring/ahoy/install/install_generator.rb
boring_generators-0.14.0 lib/generators/boring/ahoy/install/install_generator.rb
boring_generators-0.13.0 lib/generators/boring/ahoy/install/install_generator.rb
boring_generators-0.12.0 lib/generators/boring/ahoy/install/install_generator.rb
boring_generators-0.11.0 lib/generators/boring/ahoy/install/install_generator.rb
boring_generators-0.10.0 lib/generators/boring/ahoy/install/install_generator.rb
boring_generators-0.9.0 lib/generators/boring/ahoy/install/install_generator.rb