Open Source
Vorwort: Da die Open Source Szene international ist werden wir diese Seite(n) - wie auch viele Blog Posts - auf englisch halten. Sorry
We love open source. As developers and as a company we couldn’t even exist without it. Starting from the open source roots of our operating systems over the programming languages to frameworks, applications and plugins we are relying on open source everywhere. This page is about our contributions we want to give back to the open source community.
We have moved our repositories to GitHub. To pull the sources from there go to http://github.com/langalex
totally restful authorization (rails plugin)
With this plugin you can declaratively add permissions to your (ActiveRecord) models for creating, viewing, updating and destroying them. A set of before filters automagically checks all incoming requests on your restful controllers for the permission and grants or denies access based on the permissions declared on the respective model. For details see the bog post.
Workling Mailer (rails plugin)
This plugin provides a module which - when included into an ActionMailer subclass - pushes all emails that would normally be delivered synchronously into a queue for asynchronous processing. For queuing it relies on the workling plugin which can handle for example twitter’s starling as a queue server.
The sources including a README can be found as usual on github.
social feed (rails plugin)
This plugin adds a social feed to your rails application. As a user I can decide what kinds of events I want to see on my social feed and also wether I want to be sent an email when an event occurs. I can also decide wether others will receive a notification on their social feed concerning my own actions.
The plugin includes model extensions, a controller and views for viewing the feed and editing settings as well as a generator to easily create new event types, so getting started only takes a couple of minutes. For more info check out the README or get the sources from github.
forms-fu (rails plugin)
The second rails plugin: the idea is to simplify the creation of forms in your rails app. Stuff like providing some useful FormBuilders, automatically creating forms from an object and being able to customize those step by step: you start off with a completely auto-generated form, then specify the fields, then customize the views for all or just one etc.
For now the only thing i does is this: after the installation there’s a new method label_fu available in the views. It will print out a <label> tag for the given model attribute. So far so boring. The reason it’s called fu is this: It will automatically add a star to the field name (as in "this is a required field") - and it will determine if a field is required by the validates_* calls in the model class. This in turn works because the plugin extends all ActiveRecord models with a required_field?(field_name) method (I call this validation reflection). Here is an example from the README:
You can pull the plugin from github (git clone git://github.com/langalex/forms-fu.git).
Dead simple reports (rails plugin)
This is our first open sourced rails plugin. As the name suggests it’s really just a very tiny little plugin, but we’ve been using it successfully on a couple of projects now. As you might have guessed it can be used to generate reports.
What it does: It allows you to create reports (usually about data in your database) in your database. A report can either be generated by a SQL statement or by a piece of ruby code (You store that piece of code in your database).
How to install: You install the plugin via cd RAILS_ROOT/vendor/plugins && git clone git://github.com/langalex/dead_simple_reports.git, then script/generate dead_simple_reports and rake db:migrate, done.
How to use: RTFM
Okay, here’s the shortcut: Report.create! :name => 'my user names', :kind => 'sql', :code => 'SELECT name FROM users' or Report.create! :name -=> 'a ruby code report', :kind => 'code', :code => 'User.find(:all).map(&:name)'. Now point your browser to http://localhost:3000/reports and boom….