tdl-client-ruby
Submodules
Project contains submodules as mentioned in the .gitmodules
file:
- broker
- tdl/client-spec (gets cloned into features/spec)
- wiremock
Use the below command to update the submodules of the project:
git submodule update --init
Getting started
Ruby client to connect to the central kata server.
Installing
Install RBENV
brew install rbenv
# Then add this to bash_locations
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
Install ruby
rbenv install 3.2.2
rbenv local 3.2.2
ruby --version
Install bundler
gem install bundler
Install cucumber
gem install cucumber
Install all the gems in the project
bundle install
Manual
Stopping the wiremocks and broker services would be the same, using the stop
command instead of the start
command.
Automatic (via script)
Start and stop the wiremocks and broker services with the below:
./startExternalDependencies.sh
./stopExternalDependencies.sh
Testing
All test require the ActiveMQ broker to be started. The following commands are available for the broker.
java8
python3 ./broker/activemq-wrapper.py start
python3 wiremock/wiremock-wrapper.py start 41375
python3 wiremock/wiremock-wrapper.py start 8222
or
./startExternalDependencies.sh
Run tests with:
bundle exec rake features
To run a single scenario execute cucumber path/to/file.feature:line_no
Recommendation is to use the cucumber command instead of rake always outside of CI.
Cleanup
Stop external dependencies
java8
python3 ./broker/activemq-wrapper.py stop
python3 wiremock/wiremock-wrapper.py stop 41375
python3 wiremock/wiremock-wrapper.py stop 8222
or
./stopExternalDependencies.sh
To release
Check the version in:
lib/tdl/previous_version.rb
Build Gem
bundle exec rake build
Push to Rubygems
bundle exec rake release
Manually update the version in:
lib/tdl/previous_version.rb