Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joeljuca/changify
https://github.com/joeljuca/changify
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/joeljuca/changify
- Owner: joeljuca
- License: mit
- Created: 2023-10-20T22:10:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-20T22:13:18.000Z (about 1 year ago)
- Last Synced: 2023-10-21T00:23:48.555Z (about 1 year ago)
- Language: Ruby
- Homepage: https://github.com/joeljuca/changify
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Changify
[![Licensed under MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE.txt)
[![quality](https://github.com/joeljuca/changify/actions/workflows/main.yml/badge.svg)](https://github.com/joeljuca/changify/actions/workflows/main.yml)
[![Follow Joel Jucá on X (formerly Twitter)](https://img.shields.io/twitter/follow/holyshtjoe)](https://twitter.com/holyshtjoe)## Setup
Install dependencies with [Bundler](https://bundler.io):
```
$ bundle install
```## About
My solution for the [BuildBook coding challenge](https://gist.github.com/vitchell/a081703591116bab7e859cc000c98495).
I wrote a Ruby module with the core functionality of this test.
The CLI itself is actually implemented in the `examples/spotify` dir.
## `spotify.rb`
This is the actual CLI, located in the `examples/spotify` dir. To see it in action, do the following
```sh
$ cd examples/spotify
```See the example in action with sample data:
```sh
$ 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](https://jqlang.github.io/jq/):
```sh
$ ruby ./spotify.rb ./deezer.json ./changes.jsonl | jq .
```You can also write the resulting JSON to a destination file:
```sh
$ ruby ./spotify.rb ./deezer.json ./changes.jsonl output.json
```To eliminate the `ruby` part of this command, adjust its file permissions:
```sh
# 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
```## Code of Conduct
Everyone interacting in the Changify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
## License
[MIT](LICENSE.txt)