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!):

viaggiatreno gem source code is hosted on GitHub.

Simple usage of this gem has been included in the README.

Another interesting fact that I dealt while writing continuous 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