| Build Status |
|
| Code Quality |
|
| Code Coverage |
|
| Other |
|
This is a Ruby 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.
git clone https://github.com/paulfioravanti/resume.git
cd resume
bundle installGenerate the resume in the following languages:
๐ฌ๐ง bin/resume
๐ฎ๐น bin/resume -l it
๐ฏ๐ต bin/resume -l ja
Help: bin/resume -h
Run the specs:
bin/rspecView the Simplecov test coverage report:
open coverage/index.htmlGenerate the YARD documentation:
bin/yardocGenerate 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 resumeThe 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.rbIf 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- Ruby 2.5.0
- 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 specs
I did a lightning talk about this project at the Ruby on Rails Oceania Meetup on 10 May 2016 (slide deck).
Just for fun, I created a GitPitch version of the presentation (or with presenter notes visible).
- 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.
Using Ruby Packer, an executable can be created for the resume. However, this is very experimental, doesn't really work properly, and is only documented here as an interesting curiosity.
Follow the instructions on the repository's README file. I'll focus on the MacOS installation instructions.
In the resume directory, perform the following:
brew install squashfs
curl -L http://enclose.io/rubyc/rubyc-darwin-x64.gz | gunzip > rubyc
chmod +x rubycBefore attempting to do anything with any executable, make sure that you've generated the resume in your target language already so that image and font assets are stored in your local tmp folder and no further connections need to be made in order to fetch them. This is because of an open issue regarding SSL with Enclose.IO's Ruby executable.
If this issue gets solved, maybe the executable can be used to go fetch assets as well.
As of this writing, Enclose.IO's Ruby executable only goes
up to version 2.4.1. Therefore, we will have to override the specified Ruby
version with an ENV variable when generating and running the resume
executable.
Generate executable (here named resume.out):
CUSTOM_RUBY_VERSION="2.4.1" ./rubyc bin/resume -o resume.outRun resume executable:
๐ฌ๐ง CUSTOM_RUBY_VERSION="2.4.1" ./resume.out
๐ฎ๐น CUSTOM_RUBY_VERSION="2.4.1" ./resume.out -l it
๐ฏ๐ต CUSTOM_RUBY_VERSION="2.4.1" ./resume.out -l ja
So, yes, more of a curiosity here than anything really useful.