Install dependencies with Bundler:
$ bundle install
My solution for the BuildBook coding challenge.
I wrote a Ruby module with the core functionality of this test.
The CLI itself is actually implemented in the examples/spotify
dir.
This is the actual CLI, located in the examples/spotify
dir. To see it in action, do the following
$ cd examples/spotify
See the example in action with sample data:
$ ruby ./spotify.rb ./deezer.json ./changes.jsonl
By default, it prints the resulting JSON to STDOUT. It allow pipelining the results with tools like jq:
$ ruby ./spotify.rb ./deezer.json ./changes.jsonl | jq .
You can also write the resulting JSON to a destination file:
$ ruby ./spotify.rb ./deezer.json ./changes.jsonl output.json
To eliminate the ruby
part of this command, adjust its file permissions:
# set Unix permissions
$ chmod u+x spotify.rb
# now you can execute it without the `ruby` prefix
$ ./spotify.rb ./deezer.json ./changes.jsonl output.json
Everyone interacting in the Changify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.