Tomorrow starts the famous African Ruby conference Rubyfuza in Cape Town and since I am attending I decided I will do a final 1.1 release of InvoicePrinter from South Africa just before everything begins. So here we are, this is a 1.1 “Cape Town” release. Continue reading “InvoicePrinter 1.1 “Cape Town” released”
Database migrations are the tricky part of any deployment. They make zero-time deploys problematic. They requires special attention since they can break stuff. Some might choose to run migrations automatically, some of us run them manually. But one thing is almost always true; the production code without migrations should not ever run. So how not to run your code without doing migrations first?
Continue reading “Do not run Rails with pending migrations”
PDF should be this nice universal format that many government institution now work with. But what if they require you to fill in XFA forms inside their template PDFs? The ones I need to fill for my insurance company are certainly not supported in the standard Document Viewer shipped with Fedora. This weekend I tried installing Master PDF Editor and guess what? It works like a charm for me. They even offer various RPM builds for CentOS 6/7. And they work on my Fedora out of the box. Lucky me. Thanks a lot for this!
Are you a freelancer? You don’t need to leave your command line to create invoices for your clients. InvoicePrinter is a Ruby library for producing PDF invoices without too much hassle. If you haven’t seen it before, you can read more about it in the announcement or its GitHub page. With the upcoming 1.1.0 release (currently as release candidate) a command line executable is included so you can now use command line to invoice your clients. No need to learn Ruby, just pass the data in the familiar JSON format! Here is how to create your first invoices. Continue reading “Invoicing from the command line”
Refinements is a Ruby 2.0 answer to monkey patches that can take control of your program without you realizing it. Next time you will be tempted to monkey patch something, think twice and consider using refinements. Continue reading “Ruby refinements example”
At work we use ActiveModel::Serializer to serialize ActiveRecord objects into JSON:API-like responses for our APIs. The problem is that ActiveModel::Serializer is clever enough to dasherize our hash keys (so they can be accessed as properties instead of  brackets syntax) and our hash keys are actually real keys that we have to serve untouched. Continue reading “How to keep hash keys untouched by ActiveModel::Serializer”
Not so long ago I announced first stable release of InvoicePrinter. I wanted to say that the API is stable and people to experiment with it. I am happy to see that the project got already over 3 hundred stars and 20 forks. Wow, thanks! This kind of support motivates me to work on the next version more intensively. Speaking of which… here is what’s coming in 1.1.0 release. Continue reading “InvoicePrinter 1.1.0 will bring A4 page size support, command line client and more”
After some time with
1.0.0.rc1 I am releasing a final
1.0.0 of InvoicePrinter. So what it is it, what does it mean and what’s next? Continue reading “InvoicePrinter 1.0”
If you are using Ruby on Rails together with Devise gem you might be wondering
how to handle unauthorized error responces in your JSON API. Continue reading “Sending JSON API like 401 Unauthorized error with Devise”
Deploying with Dokku and in need to run some basic setup tasks such as copying
config/database.yml in Rails? It’s possible with Dokku 0.5.0 and
Continue reading “Pre/post deploy hooks with Dokku 0.5.0”