BohConf 2010: A Retrospective

June 22nd, 2010 by
BohConf 2010

BohConf 2010

After an exhilarating week of hosting the Rails community in Baltimore for RailsConf, I thought it’d be helpful to share the lessons that we learned organizing BohConf.

Community Code Drives Rock!

We had a strong showing of open source authors including Wayne Seguin, Gregory Brown, Aslak Hellesøy, Chris Eppstein, Nick Gauthier and various members of Thoughtbot crew. Wayne (rvm) and Greg (prawn) in particular raved about the contributions they were able to make to their projects. Hey, I even got a new release of Timecop out thanks to a patch from Larry Marburger. Other well known OSS authors that dropped by included Rick Olson, Patrick Peak, and Josh Nichols. If you were there and we missed you, please drop us a line in the comments!

Read the rest of this entry »

Directory Conventions for Rack Middleware RubyGems

May 13th, 2010 by

I just wanted to make a quick note about directory conventions for rack middleware gems. For all gems you should follow the convention of housing all of your code inside a single file and directory of the same name as your gem within lib, e.g.


$> ls -l ~/projects/timecop/lib
drwxr-xr-x 5 john staff 170 Jan 14 20:31 timecop
-rw-r--r-- 1 john staff 82 Jan 14 20:31 timecop.rb

The reason for this is related to how RubyGems hijacks Ruby’s require method. When a gem is activated its lib/ folder is added to the load path. This means that anything inside that directory is now accessible via the require method. In order to avoid file naming collisions across gems, you must name these exactly the same as your gem. (see slides for I Don’t Trust Your Code for a more complete discussions of this)

However, this is slightly different with rack gems. The convention for naming rack middleware is by using a dash, e.g. rack-rewrite. The convention for requiring rack middleware though is to replace that dash with a slash, e.g. require 'rack/rewrite'.

The convention I’ve adopted for structuring rack middleware within a gem is to include a file by the same name as the gem and a rack directory in lib/, and then to include the second part of the middleware name as a subdirectory under that.


~/projects/rack-rewrite (master) $> ls -l lib/
total 8
drwxr-xr-x 4 john staff 136 Apr 17 18:02 rack
-rw-r--r--@ 1 john staff 22 Apr 17 18:02 rack-rewrite.rb

~/projects/rack-rewrite (master) $> ls -l lib/rack
total 8
drwxr-xr-x 3 john staff 102 May 13 11:09 rewrite
-rw-r--r--@ 1 john staff 827 Apr 17 18:02 rewrite.rb

This allows my users to use either require 'rack-rewrite' or require 'rack/rewrite'.

Rack::Rewrite 1.0.0 Released

May 13th, 2010 by

Rack::Rewrite 1.0.0 has just been released. To install simply run: gem install rack-rewrite.

Rack::Rewrite is a web-server agnostic rack middleware for defining and applying rewrite rules. In many cases you can get away with Rack::Rewrite instead of writing Apache mod_rewrite rules.

Documentation is hosted at RubyForge. The source code is hosted at GitHub.

Updates include:

Read the rest of this entry »

Rack::Rewrite 0.2.1 Released

January 6th, 2010 by

Rack::Rewrite 0.2.1 has just been released. To install simply run: gem install rack-rewrite.

Rack::Rewrite is a web-server agnostic rack middleware for defining and applying rewrite rules. In many cases you can get away with Rack::Rewrite instead of writing Apache mod_rewrite rules.

Documentation is hosted at RubyForge. The source code is hosted at GitHub.

Updates include:

Read the rest of this entry »

Why We’re Excited about the Maryland Tech Crawl

December 10th, 2009 by

SmartLogic has teamed up with mp3Car.com and the Emerging Technology Centers (ETC) to create the Maryland Tech Crawl, an annual technology show and tell event to showcase the technologies being developed in our region. We already have commitments from 20 presenting companies and more than 140 attendee registrations. We expect to have about 200 participants in total.

Maryland Tech Crawl

Maryland Tech Crawl


The Tech Crawl is being held Wednesday, December 16 from 4:30PM to 7:30PM at ETC’s Canton location.

Read the rest of this entry »

Timecop 0.3.4 Released

December 7th, 2009 by

Timecop 0.3.4 has just been released. To install simply run: gem install timecop.

Timecop is a RubyGem providing “time travel” and “time freezing” capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.

Documentation is hosted at RubyForge. The source code is hosted at GitHub.

Updates include:

Read the rest of this entry »

Rack::Rewrite + Google Analytics Makes Site Transitions Seamless

November 24th, 2009 by

At SmartLogic we recently rebuilt our website in rails. The previous version was a MediaWiki installation with a ton of content that had garnered a decent bit of Google juice that we did not want to lose. By setting up 301 permanent redirects for the old URL’s, we can hold onto that juice.

Read the rest of this entry »

Rack::Rewrite for Site Maintenance and Downtime

November 16th, 2009 by

Rack::Rewrite is a Rack middleware for defining and applying rewrite rules. Though it’s not a full replacement for Apache’s mod_rewrite, a great deal of rules I’ve previously written in Apache config files can be replaced by Rack::Rewrite. Run gem install rack-rewrite to install the gem.

I typically leverage rewrite rules to take my sites offline for maintenance. Most capistrano users will be familiar with the following Apache rewrite ruleset.
Read the rest of this entry »

Timecop 0.3.0 Released

September 20th, 2009 by

Timecop 0.3.0 has just been released. To install simply run: gem install timecop.

Timecop is a RubyGem providing “time travel” and “time freezing” capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.

Documentation is on RubyForge. The source code is hosted at GitHub.

Updates include:

API

  • Completely remove Timecop#unset_all (deprecated by Timecop#return in 0.2.0)
  • Return Time.now from #freeze, #travel and #return — code contributed by Keith Bennett (keithrbennett)

Maintenance

  • Fix bug that left Time#mock_time set in some instances
  • Upped build dependency to jeweler ~> 1.2.1
  • Don’t pollute top-level namespace with classes/constants

Documentation

  • Clearer examples in the README, better description in the gemspec
  • Improve RDoc

Shell Script to Upgrade Ruby Enterprise Edition while Maintaining Directory Naming Sanity

June 10th, 2009 by

As you’re likely already aware, a denial of service (DoS) vulnerability in Ruby’s BigDecimal library was uncovered, fixed and reported on June 9, 2009. Patching options include:

Read the rest of this entry »


redhead found dating older woman online