Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A nice feature to add (plus it gave us some exposure to a couple of new cool tools) was to allow users of the demo app to change the port used by Sinatra. It defaults to 4567, and it's unlikely someone would already be running something on that already.
But just in case we've added the ability to specify a custom port in the app. We've done this by adding Thor as a dependency. Thor is a toolkit for building powerful command-line interfaces. In our case it allowed us to
--port
)-p
)This meant some refactoring in the project, mainly dropping the
Run
class in favour of aCLI
class that inherits from Thor.The second cool tool we added was Aruba. Aruba allows you to test command-line applications with Cucumber-Ruby, RSpec or Minitest. It essentially runs your app in a separate process but still allows you to make assertions against the behaviour of it.
The one issue we faced was that because it runs things in a separate process, Simplecov was not seeing that certain lines did have test coverage. So a final change was to resolve this based a stackoverflow post we found (https://stackoverflow.com/a/20505441).
So TL;DR