News and Blog

jQuery Lightbox for Ruby on Rails

January 26th, 2010 » No Comments »

If you need a quick and dirty lightbox using jQuery for Ruby on Rails, give Facebox by FamSpam a try. Facebox is a jQuery-based, Facebook-style lightbox which can display images, divs, or entire remote pages. It’s simple to use and easy on the eyes.

Application Configuration or Settings in Rails Applications

January 19th, 2010 » No Comments »

It is pretty common that you need to store settings in a rails applications.  You might do this via global variables/constants or other more complex mean.  Two recent rubygems have set out to solve this problem.  The first is rails-settings an ActiveRecord like storage of settings in the database.  It allows you to keep track of any global setting that you dont want to hard code into your rails app. You can store any kind of object. Strings, numbers, arrays, or any object.

Configatron is another alternative.  It is a super cool, simple, and feature rich configuration system for Ruby apps.  You can set defaults, use hashes, use yaml and even namespace configurations.  You can even do temp, delayed or dynamic configurations.  If you are currently using global variables/constants do yourself a favor and check one of these gems out.

Rails Bridge Removing Excuses To Participate

January 18th, 2010 » No Comments »

This last weekend Rails Bridge put together a Do One Thing For Rails 3 Bug Mash.  It was the first I had heard of Rails Bridge.  It was great to see all that they are trying to do for the community.  Need Rails CoursewareNon-profit looking for help? Maybe you are new and just need a MentorKids need to learn Rails too right?  Need content to put together a workshop?  Maybe you just want a good Ruby Challenge?  Well, it’s a good thing Rails Bridge exists because it tackles all of this!

Ruby on Rails Authorization Using CanCan

January 15th, 2010 » No Comments »

It almost seems inevitable that you have a project that has authentication (such as Authlogic) and have bolted some role based implementation on to it.  Then the product owner starts request various authorization schemes for those roles.  Normally, this is where you start to pull your hair out, but with CanCan many of these problems go away.  It implements a simple authorizations solution to restrict what a give user is allowed to access.

Want to get started?  Watch the Screencast.

Use Cucumber Table Transformations To Build Objects

January 7th, 2010 » No Comments »

Our cucumber expert, Clayton LZ is talking about his new favorite feature of Cucumber, Table Transformations. He frequently use tables to build up complex objects and has found that the regular old tables can be a little ugly, especially when your attribute names don’t make much sense on their own. He also noticed that building up associations can be a little wonky, usually requiring more steps than seem necessary.  Clayton wrote up how to use cucumber’s table transformations to easily build complex objects in a way that is easy to read and understand for both clients and developers.

ScrumCast #3: Agile Estimations

January 3rd, 2010 » No Comments »

Clayton Lengel-Zigich and Derek Neighbors discuss agile estimation.

 
icon for podpress  ScrumCast #3 : Agile Estimations: Play Now | Play in Popup | Download

Netrecoder to Help with API Testing

January 2nd, 2010 » No Comments »

Chris Young, our resident Scrum Master, in quest for excellence created a gem (NetRecorder) to help ease the pain of API testing.  This is his first gem and so he would love your feedback.  He also wrote a tutorial based on his experience building a gem.

The netrecorder gem works with fakeweb to record your requests and responses automatically. This way you can build your test suite against a live api and just flip a switch to use the local recorded data instead, saving time and unnecessary network calls. Visit the github page to see the source code and learn how to use netrecorder.

How to Build a Ruby Gem

January 2nd, 2010 » No Comments »

How to build a ruby Gem” tutorial by our Scrum Master Chris Young.

This weekend I built my first ruby gem. The stuff out there on the internet is pretty confusing so hopefully this post will make it exceedingly clear. The most complete source I found was the Railscast, “Making a gem”

Here are the steps I took:

1. Create the library
2. Use the echoe gem to create a rake file that will generate your gem spec
3. Use rake to create the manifest and gemspec
4. Install your gem locally
5. Create a self-signed certificate
6. Update the gemspec with the certificate information
7. Use ‘gem build’ to create the gem
8. Add your project to github
9. Use the gemcutter gem to host your gem on gemcutter

Create the library

Our library will have one method HelloWorld.say_hello that will write out ‘hello world’ when called. We’ll store the method in a module called “HelloWorld”, as suggested in the screencast.

1. > mkdir -p hello_world/lib
2. > touch hello_world/lib/hello_world.rb
2. Add this code to hello_world/lib/hello_world.rb:

  module HelloWorld
    def self.say_hello
      puts 'hello world'
    end
  end

Create a rake file using echoe

There are a lot of gems out there that are made to make gem building easy. I went with what was recommended in the screencast and tried out the “echoe” gem.

1. > gem install echoe
2. > touch hello_world/Rakefile
3. Add this code to hello_world/Rakefile

require 'rubygems'
require 'rake'
require 'echoe'

Echoe.new('helloworld', '0.0.1') do |p|
  p.description    = "A gem that illustrates how to build a gem"
  p.url            = "http://github.com/tombombadil/hello_world"
  p.author         = "Chris Young"
  p.email          = "beesucker @nospam@ gmail.com"
  p.ignore_pattern = ["tmp/*", "script/*"]
  p.development_dependencies = []
end

Now you can type rake -T and get a bunch of tasks to help you manage your gem.

Create a manifest and gemspec

A manifest just lists which files should be included in your gem and the gemspec has everything gem needs to manage versioning. Echoe is partial to rubyforge, but this didn’t keep me from being able to use it with github.

1. > cd hello_world
2. > rake manifest
3. > rake build_gemspec

Install your gem locally

Let’s make sure the gem works. Running this command will install your gem on your computer so you can test it.
1. > rake install helloworld.gemspec
2. start irb and test

  >> irb
  > require 'rubygems'
  > require 'hello_world'
  > HelloWorld.say_hello
  hello world

It works!

Create a certificate

We’ll sign the gem with a self-signed certificate.

For some reason, the install moved the gemspec to the pkg directory. Let’s create it again.
1. > rake build_gemspec
2. > gem cert –build youremail@example.com
3. Important! Move the gem-private_key.pem file to a secure location

Update the gemspec with the certificate information

Add this code to hello_world.gemspec (use your own paths, of course):

  s.signing_key = '/Volumes/Secure/Certificates/gem-private_key.pem'
  s.cert_chain  = ['gem-public_cert.pem']

Create the gem

Now we’re getting close. This command will build the gem with your certificate.

> gem build hello_world.gemspec

Add the project to git

1. create the repository on github
2. > git init
3. > git add .
4. > git commit -m “initial commit”
5. > git remote add origin git@github.com:tombombadil/hello_world_gem.git
6. > git push origin master

Host your gem on gemcutter

1. Create a gemcutter account
2. > gem install gemcutter
3. > gem push hello_world-0.0.1.gem

Permalinks, Slugs and Friendly URLs with Ruby on Rails

December 30th, 2009 » No Comments »

One thing almost every customer hates to see is http://domain/resource/id.  They will complain that they look bad.  They will cite that they can’t remember the URL because of some number that doesn’t mean anything.  They get nervous that investors or others will know they only have a certain number of records.  They will get nervous that people will just try random numbers and get data that doesn’t make sense.  Savvy clients even will complain that it will hurt their ability to rank well on search engines for their content.

There are lots of ways to work around this, but there are a lot of little gotchas.  Data can change and your URL’s can break and disrupt your SEO.  If there is lots of similar content there is difficulty in making sure URLs stay unique.  As an application grows it can become a pain to maintain friendly URLs.  Don’t forget possible name spacing issues.

A plugin by Norman on Github called FriendlyId solves all the problems at once.  If you need to do Friendly URLs, permalinks or want slugs check out this plug-in.

Some nice  features

  • Slugged/Non-Slugged Models
  • Slug Versioning
  • Unique Slug Names
  • Reserved Names
  • Slug Caching
  • Scoped Slugging
  • Text Normalization
  • Diacritic-sensitive Normalization
  • Unicode URLs
  • Custom Slug Generation

Plot Points on Google Maps Painlessly With Ruby on Rails

December 28th, 2009 » No Comments »

We have had several projects over the years that have needed to plot points on a google map.  Rails pre-1.0 didn’t have a ton of options and we always just dealt with the javascript directly as it wasn’t all that bad.  It was verbose, but not too painful.  We had talked about putting together a plug-in to abstract out the grunt work, but never got around to it.  It always seemed that enough time would pass between projects that the pain was never high enough.

Working a project this weekend I decided to check what options where out there and stumbled upon google_maps plugin by bhedana on GitHub.  In a few minutes I had it installed and rendering maps without any of the pain in setting up maps manually.  This plug-in gives you moderate control of the map.  You can customize controls, center, zoom, add custom markers and plot polyline routes.

If you are doing anything with plotting points on a Google Map in Ruby on Rails you should look at this plugin-in.  If you have a better plug-in for maps please let us know.

What People are Saying

"We love working with Integrum — they always get excited about new projects and changes we want to make to the site, and their enthusiasm for web design and development really shows. They’re also great at explaining things in “layman’s terms” for those of us who aren’t so tech-savvy."

— Jackie, www.rattlebox.com

Announcements

So…you’d like to work for Integrum?

With a stable of long term clients and growth on the mobile development side as well, Integrum is looking to bring more talented developers to our team.  We’re currently looking for Rails developers from n00b to the cliched ‘rockstar’ level.

We do real Agile (capital A because we don’t fake it) and SCRUM development, so you’ll have to be comfortable talking with clients on a regular basis.  If you’ve got an interest in iPhone or Android development to go along with the Rails stuff, that’s a nice bonus too.

These are full time positions, on-site at our office in Chandler, Arizona. Benefits, perks, Pac-Man, we’ve got all those. Salary is dependent on experience.

Ready to apply? Here’s our job application — a little test.

Below is what you will find in the README for the job application on github.

Please note that these tests all require some basic Ruby knowledge. If you don’t know ruby, take a few minutes to learn the basics. You will need to have Ruby, rubygems, RSpec installed, and Factory Girl installed.
In order to be considered for a position at Integrum, you must follow these steps.

1.    Fork this repository (if you don’t know how to do that, google is your friend)
2.    In the refactor-this directory you will find some Ruby code that needs to be refactored.

  • A test suite is included with failing specs.
  • Please refactor this code, this is real code we found in a real project that could be much more readable and intuitive.
  • Run spec helper_spec.rb to execute your specs and see if they are passing.
  • Please note: feel free to change the specs, but they should all be passing when you turn in your code.

3.    In the github-challenge directory, please create a Ruby script that accomplishes the following:

  • Connect to the github API
  • Find the rails/rails repository
  • Find the most recent commits
  • Print out HTML that groups the recent commits by author.

4.    Add your resume to the resume directory
5.    Commit and Push your code to your new repository
6.    Send us a pull request, we will review your code and get back to you

For more information, contact Chris Conrey at conrey@integrumtech.com or hr@integrumtech.com.

MountainWest RubyConf 2009

We’re sponsoring this years MountainWest RubyConf, March 13-14. Are you going? You should be there – we will be! For more information visit http://mtnwestrubyconf.org/2009/.

Gangplank Hacknight

What is Hacknight? The best way to find out is show up. It is whatever we make it.

Gangplank Academy

Come to Gangplank, same address as Integrum, each Wednesday at 11:45 a.m. for brown bag lunch and a presentation.

Calling all Rails Nerds!

We want you (to work for us)! Drop us a line at hr@integrumtech.com.


Press Room

Integrum wins Small Business of the Year award

How do you know a company deserves an award? When the staff is so focused on going above and beyond for clients, they miss the call from the city notifying them they’ve won.

Fortunately, the City of Chandler was able to track the staff at Integrum down and award them the 2010 Small Business of the Year award at a banquet held last Wednesday.

The 23rd Annual Awards Dinner took place at the Crowne Plaza San Marcos Resort in downtown Chandler. The event celebrates individual and business excellent in the community. Integrum was chosen based on the company’s contributions to the growth of the local economy, high quality service and innovations in the field of software development. Additionally, Integrum was recognized for the company’s community involvement through its nonprofit, Gangplank.

Jade Meskill and Derek Neighbors were on hand to accept the award.

Where We’re At:

  1. Hacknight Every Wed.
  2. Gangplank Academy Brownbag Every Wed.
  3. Boulder Startup Week May 4th-7th

Updates