Flask and python-saml on Amazon Elastic Beanstalk

In the past weeks I have worked on something different than usual, a python project. This project was started a couple a years ago with Flask and I need to make some improvements.

Back in the days I used to work with Django, so it wasn’t difficult getting familiar with Flask. The major problem was to get python-saml work on Amazon Elastic Benstalk correctly and after a lot of googling I managed to get all the pieces work togheter, but I couldn’t find a solution with all the information in one place, so I decided to write this post.

Continue reading “Flask and python-saml on Amazon Elastic Beanstalk”

Atom: How to create an Autocomplete Provider

This post will continue on Atom: How to complete an Autocomplete Provider

Hi all, today I’d like to see with you how to create a basic provider for Atom using the Autocomplete Provider API

In this specific case I‘d like to create a Provider for autocompletion of FactoryGirl.

Continue reading “Atom: How to create an Autocomplete Provider”

How to handle a major Rails update

These days I am working on a frightening task, a major update of a Rails project (3.2 to 4.2).

I wanted to write a post with the little tricks I am adopting to keep this task as simple as possible; but I found a very good article that explains most of them: How to make your next Rails upgrade easier

The only addition I can make to this post is the suggestion to use Docker, with docker-compose, to have a completely new environment where you can fearlessly play around with changes and updates.

Last but not least, in my case the target project doesn’t have a real test suite that can be reliable. So now, before doing the real upgrade, I am adding some functional tests that cover the main parts of the site. This way I can be more confident that all works well.

I hope you found the article helpful as I did.

See you soon!

PostgreSQL Transaction and Rails callbacks

Hi all, in theese days I am working on a new little feature on a Rails project. I have to generate a random and unique token for every new record of a model.

Unfortunately I have encountered a strange error ActiveRecord::StatetementInvalid. Let’s see some code and understand why this happens.

Continue reading “PostgreSQL Transaction and Rails callbacks”