Unit 2 Chapter 6: Other Steps
What's the point?
Now that you have a warranty against the infamous "but it works on my machine" problem, it's time to turn your attention to adding other Ruby on Racetracks elements to the app.
Rails Neutrino
Once again, use the SearchMonkey tool to search the Rails Neutrino source code for instances of "WICHTIG". You've added the elements from the mod-01-01.rb and mod-01-02.rb scripts. Now it's time to add the elements from the other scripts.
Things Not To Add
- Do not add the RuboCop or Rails Best Practices gems to a legacy app that doesn't already have them. Cleaning up thousands of offenses is an industrial-sized job.
- Some of the steps (like enabling SSL or configuring Puma) may have already been completed in the Rails app. If that's the case, skip these steps.
Bash Scripts
- In this section, you will add Bash scripts to your ruby_on_racetracks branch.
- Use the SearchMonkey tool to search the Rails Neutrino source code for instances of "WICHTIG/LEGACY/bash".
- Note that you already followed the instructions in the first few chapters. You can ignore the instructions that you have already completed.
- For each highlighted chapter, do the following steps:
- Follow the instructions on adding additional Bash scripts and updating some of the existing ones.
- Make sure that the scripts work (because some may require modifications).
- When you are satisfied that the scripts work, Git add/commit/push to the ruby_on_racetracks branch.
- Continue with each highlighted chapter until you have finished this step.
Changes to the Master Branch
- In this section, you will submit changes to the master branch. An example is showing test coverage results.
- Use the SearchMonkey tool to search the Rails Neutrino source code for instances of "WICHTIG/LEGACY/master". (NOTE: In an earlier chapter, you removed all instances of the .DS_Store file and updated the .gitignore file to prevent teammates from accidentally adding this file in the future.)
- For each highlighted chapter, do the following steps:
- Make the changes listed.
- Once you see that your changes are working as expected, enter "sh git_check.sh" to make sure everything pans out.
- Git add/commit/push to the ruby_on_racetracks branch.
- Use the "git log" command to list the changes you made.
- Enter the command "git checkout master".
- Create a new branch specifically for the pull request.
- Use the "git cherry-pick" command to push those changes into the special pull request branch.
- Push your special pull request branch and submit it as a pull request.
Changes to the Production Environment
- In this section, you will submit pull requests for improvements in the production setup of the Rails app. Since they don't affect the development environment, there is no point in adding them to the ruby_on_racetracks branch.
- Use the SearchMonkey tool to search the Rails Neutrino source code for instances of "WICHTIG/LEGACY/production". The changes listed are improvements in the production setup of the Rails app.
- For each highlighted chapter, do the following steps:
- Enter the command "git checkout ruby_on_racetracks".
- Create a new branch for the change.
- Make the changes listed.
- Once you see that your changes are working as expected, enter "sh git_check.sh" to make sure everything pans out.
- Git add/commit/push to your new branch.
- Use the "git log" command to list the changes you made.
- Enter the command "git checkout master".
- Create a new branch specifically for the pull request.
- Use the "git cherry-pick" command to push those changes into the special pull request branch.
- Push your special pull request branch and submit it as a pull request.
Recommended Changes
- Use the SearchMonkey tool to search the Rails Neutrino source code for instances of "WICHTIG/LEGACY/recommended". The changes listed include tools for aiding the development process, such as showing outdated gems, vulnerable gems, and creating block diagrams of the app.
- For each highlighted chapter, follow the steps you did in the "Changes to the Master Branch" section.
All or Nothing Changes
- In this section, you will submit changes to the master branch. If the changes are NOT accepted, I don't recommend adding them to the ruby_on_racetracks branch.
- One change you will submit here is the annotate gem. Because it writes comments to numerous files, there is too much risk of merge conflicts.
- Another change in this category is pinning the gems in the Gemfile.
- For each highlighted chapter, follow the steps you did in the "Changes to the Production Environment" section.
Submitting the Ruby on Racetracks Branch
- You may submit the ruby_on_racetracks branch as a pull request. (If the collaborators want to keep the source code as minimal as possible, they won't accept it. That's OK, because you still have access to the Ruby on Racetracks elements.)
- If the collaborators want some of the Ruby on Racetracks elements but not others, then submit just these elements in a pull request but not the others.