Class: Camunda::Generators::SpringBootGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Camunda::Generators::SpringBootGenerator
- Defined in:
- lib/generators/camunda/spring_boot/spring_boot_generator.rb
Instance Method Summary collapse
- #add_to_ignores ⇒ Object
- #copy_java_app_files ⇒ Object
- #link_resources_folder ⇒ Object
- #output_error_instructions ⇒ Object
Instance Method Details
#add_to_ignores ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/generators/camunda/spring_boot/spring_boot_generator.rb', line 20 def add_to_ignores %w[.gitignore .cfignore].each do |file| append_to_file file do "\n# BPMN Java app\n" + File.join(bpmn_app_path, 'target') + "\n" end end end |
#copy_java_app_files ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/generators/camunda/spring_boot/spring_boot_generator.rb', line 8 def copy_java_app_files copy_file 'pom.xml', File.join(bpmn_app_path, 'pom.xml') copy_file 'camunda.cfg.xml', File.join(bpmn_app_path, 'src/test/resources/camunda.cfg.xml') copy_file 'application.properties', File.join(bpmn_app_path, 'src/main/resources/application.properties') copy_file 'ProcessScenarioTest.java', File.join(bpmn_app_path, 'src/test/java/unittest/ProcessScenarioTest.java') copy_file 'Camunda.java', File.join(bpmn_app_path, 'src/main/java/camunda/Camunda.java') end |
#link_resources_folder ⇒ Object
16 17 18 |
# File 'lib/generators/camunda/spring_boot/spring_boot_generator.rb', line 16 def link_resources_folder copy_file 'sample.bpmn', File.join(diagram_path, 'sample.bpmn'), '' end |
#output_error_instructions ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/generators/camunda/spring_boot/spring_boot_generator.rb', line 30 def output_error_instructions puts " If you get an error when starting your Rails app\n\n ** ERROR: directory is already being watched! **\n\n Directory: bpmn/java_app/src/main/resources\n is already being watched through: bpmn/diagrams\n\n MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\n\n It is because ActionMailer preview causes test/mailers/previews to get added to the Rails EventedFileChecker\n by default. RSpec is supposed to override it, but it is not overridden properly for EventedFileChecker and/or\n you don't have spec/mailers/preview existing. If that directory does not exist it goes to the first common\n directory that exists which is your Rails root folder.\n\n So EventedFileChecker is listening to your entire Rails folder. Not a big problem, but it causes a problem\n for our created symlink.\n\n So add:\n\n config.action_mailer.show_previews = false\n\n to your development.rb file to solve Listen errors about a symlink. Unless you are using ActionMailer\n previews in which case you should have the directory created already.\n DOC\nend\n" |