Module: Onotole::Goodbye
- Included in:
- AppBuilder
- Defined in:
- lib/onotole/add_user_gems/goodbye_message.rb
Instance Method Summary collapse
- #airbrake_check ⇒ Object
- #ckeditor_check ⇒ Object
- #github_check ⇒ Object
- #graphviz_check ⇒ Object
- #image_optim_check ⇒ Object
- #rack_cors_check ⇒ Object
- #show_goodbye_message ⇒ Object
Instance Method Details
#airbrake_check ⇒ Object
26 27 28 29 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 26 def airbrake_check return unless user_choose? :airbrake say_color YELLOW, "Remember to run 'rails generate airbrake' with your API key." end |
#ckeditor_check ⇒ Object
43 44 45 46 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 43 def ckeditor_check return unless user_choose? :ckeditor say_color YELLOW, 'Visit ckeditor homepage and install back-end for it.' end |
#github_check ⇒ Object
14 15 16 17 18 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 14 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 |
#graphviz_check ⇒ Object
20 21 22 23 24 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 20 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 |
#image_optim_check ⇒ Object
31 32 33 34 35 36 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 31 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" say_color YELLOW, 'By default this tools are switch off in image_optim.rb' end |
#rack_cors_check ⇒ Object
38 39 40 41 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 38 def rack_cors_check return unless user_choose? :rack_cors say_color YELLOW, 'Check your config/application.rb file for rack-cors settings for security.' end |
#show_goodbye_message ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/onotole/add_user_gems/goodbye_message.rb', line 4 def github_check airbrake_check graphviz_check image_optim_check rack_cors_check ckeditor_check say_color BOLDGREEN, "Congratulations! Onotole gives you: 'Intellect+= 1'" end |