Class: Dockman::Dockify::SetupGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/dockman/dockify/setup/setup_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_guardObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/generators/dockman/dockify/setup/setup_generator.rb', line 18

def add_guard
  if yes?("Want to install guard and rubocop?")
    gem_group :development do
      gem 'guard-rspec', '~> 4.7', require: false
      gem 'spring-commands-rspec'
      gem 'rubocop', '~> 0.60'
    end
    system 'bundle install'
    system 'bundle exec guard init rspec'
  end
end

#add_rspecObject



9
10
11
12
13
14
15
16
# File 'lib/generators/dockman/dockify/setup/setup_generator.rb', line 9

def add_rspec
  if yes?("Want to install rspec?")
    gem_group :development, :test do
      gem 'rspec-rails', '~> 3.8'
    end
    system 'bundle install'
  end
end