Sha256: e66c01753601fb5c4dbe475cb4ce3f0d27a4135e38dc1692c3430008bbadc377

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true
module Onotole
  module Goodbye
    def show_goodbye_message
      github_check
      airbrake_check
      graphviz_check
      image_optim_check
      say_color BOLDGREEN, "Congratulations! Onotole gives you: 'Intellect+= 1'"
    end

    def github_check
      return unless user_choose? :create_github_repo
      say_color BOLDGREEN, "You can 'git push -u origin master' to your new repo
       #{app_name} or check log for errors"
    end

    def graphviz_check
      return unless user_choose?(:railroady)
      return if system('dot -? > /dev/null && neato -? > /dev/null')
      say_color YELLOW, 'Install graphviz for Railroady gem'
    end

    def airbrake_check
      return unless user_choose? :airbrake
      say_color YELLOW, "Remember to run 'rails generate airbrake' with your API key."
    end

    def image_optim_check
      return unless user_choose? :image_optim
      say_color YELLOW, "You may install 'svgo' for 'image_optim' by `npm install -g svgo`"
      say_color YELLOW, "You may install 'pngout' for 'image_optim' from http://www.jonof.id.au/kenutils"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
onotole-1.1.8 lib/onotole/add_user_gems/goodbye_message.rb
onotole-1.1.7 lib/onotole/add_user_gems/goodbye_message.rb
onotole-1.1.6 lib/onotole/add_user_gems/goodbye_message.rb