PayPal IPN madness with Ruby on Rails
Lately I’ve been implementing Instant Payment Notification - great feature provided by PayPal. To be honest it cost me quite some time and a little bit of my dignity. I mean you can read the official guide and play with Instant Payment Notification (IPN) simulator - but in the end it’s back to trials and errors.
So here we go, here are some tips for you, I hope you will find them useful and it will save you some time.
Morris.js display:none workaround
How fast your tests are? - Working with rspec outside rails
Rails is a great framework, isn’t it? It’s ships with all those great tools witch are supposed to help you automatically test your application. So you write specs, you practice TDD, BDD or maybe DDD, but over time you may notice something - it’s getting painfully slow. You app grows, your test suite grows and suddenly testing isn’t anymore so much fun as it supposed to be. You feel like it’s slowing you down.
Project released!
Diary of Legacy Application
Diary of Legacy ApplicationDealing with Omniauth redirect_uri_mismatch (invalid port number gotcha)
Hook up aspell dictionary into your rails app
How to check spelling in your rails app in three quick steps.
Create build system for PHP under Sublime Text 2
Lately I’ve been working quite a lot with unit test using SimpleTest - so I often had to run scripts directly from command line. But wouldn’t it be cool if I just could write a test and run it directly under my code editor without even leaving it? And if you using Sublime Text 2 (and I really recommend checking it out - it’s gorgeous, it’s slim, it’s ultra fast and you can do basically everything with it) - you easily can.
Testing private methods with SimpleTest - example
2017 Update note: before proceeding think if you really want to test underlying implementation of a class in the first place ;-)
Here’s quick example how to test private class method with SimpleTest using RelectionClass (while you are reading about reflection class I will also point you directly to reflection method and what it’s all about).
Super fast deployment with mina - capistrano alternative
Mina is an interesting alternative for capistrano. It’s really tiny, easy to configure and fast as hell. Overall usage is very well documented, so to avoid repetition I’ll just describe very specific case of deploying rails apps on a shared server through use of a gateway (or whatever you may call it).
So it happens I keep my personal project on ones of those shared servers - it’s just cheaper and I don’t have to bother with upgrades, system security etc. - assuming my provider knows what he’s doing of course ;). I can normally log through ssh on my shell account and then from that machine I can ssh to yet another machine that hosts my sites.