Viaggiatreno Ruby gem: version 1.0.5

On the background of all my activities I continued the developing of viaggiatreno, a Ruby gem to parse Italian railway real time system information of the status of the various trains: location, delay, expected and real arrival time. Yesterday I released the version 1.0.5 of this gem, which improves the overall code quality of this gem (0 rubocops violations!):

Build Status Code Climate Test Coverage Issue Count

viaggiatreno gem source code is, as always, hosted on GitHub.

Using this gem is pretty straightforward:

Another interesting fact that I dealt while writing continuos integration test (with Travis) in the development of this gem: as it fetches and parses information from Internet URLs, one way of writing RSpec tests is to “mock” the remote web part.

Using vcr gem, I mocked the response of the remote web server in order to write static test-cases (since the informations on train change over time, subsequent web requests did not fetch the same results).

Leave a Reply