This is a Ruby command line interface (CLI) application that generates my resume. I made it in order to teach myself a bit about the Ruby PDF generation library Prawn. Railscast #153 is also a good resource for learning about it.
Text is deliberately obfuscated in the JSON files that contain the resume content with Base64 to ensure people generate the PDF in order to be able to read anything.
I wrote a companion blog post for this project:
It outlines some reasons for making it, as well as some of the technical challenges and quirks.
I also did a lightning talk about this project at the Ruby on Rails Oceania Meetup on 10 May 2016 (slide deck). No video of the talk exists, unfortunately. Perhaps I will re-record it again some time...
git clone https://github.com/paulfioravanti/resume.git
cd resume
bundle install
- Ruby 3.2.2
- i18n, Prawn and Prawn-Table (if you don't have the specific versions of the gems, you will be prompted to install them)
- RSpec, if you want to run the tests
Generate the resume in the following languages:
🇬🇧 bin/resume
🇮🇹 bin/resume -l it
🇯🇵 bin/resume -l ja
Help: bin/resume -h
Run the tests:
bin/rspec
View the Simplecov test coverage report:
open coverage/index.html
Generate the YARD documentation:
bin/yardoc
Generate the "one sheet" version of the resume (the whole app and specs in a
single file called resume.rb
).
If I sent my resume to you directly, it would have been generated from
this rake
task:
bin/rake resume
The resume PDF can be generated from the one sheet in a similar way as the CLI app:
🇬🇧 ruby resume.rb
🇮🇹 ruby resume.rb -l it
🇯🇵 ruby resume.rb -l ja
The specs can also be run directly on the one sheet resume:
rspec resume.rb
If there are ever any errors or issues related to the downloading of remote
assets that cause the resume to not be able to be generated, you can run the
following rake
task to delete all resume-related assets from the local tmpdir:
bin/rake resume:delete_assets
- It doesn't seem possible yet in Prawn to make an embedded image a clickable link. Until support is possible (if ever), I've simply pulled in images from Dropbox and overlaid a transparent text link on top to simulate clicking an image. More discussion on this issue is at this StackOverflow thread.