Heiko Möller
von ,

c2dm-rails gem released

We released a small gem allowing easy communication with Googles notification service for Android phones.

As we are developing both web applications and mobile applications, we often need to connect both together. However, we need to do this with keeping the restraints on a mobile device in mind, especially, battery power. Luckily, both Apple and Google offer a service to issue small notifications to a device registered with them; however, in contrast to the Apple service, there wasn't a solution for Google readily available, so we rolled our own.

The c2dm-rails gem enables a rails developer to easily send push notifications to multiple registered applications from a single rails application, following the guidelines of Google to not strain their services.

The source code is available at github, the gem itself is available at rubygems. Currently only for rails 3.1, a 3.2 version will released when dependencies are fixed.

Alex Gräfenstein
von ,

Cronjobber gem released

We released a small gem that allows to define cronjob tasks inside rails applications.

Most web applications often require to perform tasks in a periodical manner. It might be some kind of a cleanup process, sending status mails or whatever the application needs to be done again and again to keep alive.

One common way is to define rake tasks inside the rails application and then use the unix crontab to tell the system when these tasks should be executed. This does not feel like an elegant solution. You often end up with a cluttered crontab and have to synchronize the crontab with the application. It's getting even worse with multiple applications running on the same machine.

Cronjobber gem allows you to define the tasks and their execution timepoints together in one place. You still need the crontab for heartbeating the application, but it cleans up the crontab and makes the application better maintainable.

Checkout the gem on github or rubygems.

Alex Gräfenstein
von ,

Displaying the version of your Rails app

We created a code snippet that displays the git repository, git url, last commit and author of a rails application.

During development it is helpful to see the version of an application that is currently on stage or in production. With the following code you get all that inside a handy method.

Put it somwhere in your lib folder where rails is able to locate and load it. The script extends the ActionController::Base and ActionView::Base classes about the methods git_info and git_info_text. The latter may be used to render the information inside a template. So using

= git_info_text.html_safe

will print the following information

  • Url of the used repository
  • Current deployed branch
  • Info about last commit including author, date and message
  • Aplication and environment names

Now you always know who pushed the latest bug, enjoy.

Themen

Letzte Artikel

G|Predictive Unternehmenswebseite

empuxa wird zwei Jahre alt!

c2dm-rails gem released

empuxa im K24

Snaptury-App

Cronjobber gem released

empuxa wünscht ein frohes Fest

ClipFlip-Android-App veröffentlicht!

HANSA-PARK: Ticket-Vorverkauf relaunched!

empuxa nun auch mobil verfügbar

Archiv