Glenn Jahnke's blog



Glenn JahnkeGlenn Jahnke
Standup 9/3/2010
edit Posted by Glenn Jahnke on Friday September 03, 2010 at 09:21AM

Help

Server-Side Image Editing

"What's the latest and greatest server-side image processing library people are using?"

Most people quickly agreed that ImageMagick was the way to go.

Data Analysis

"Are there good libraries for data analysis similar to NumPy in Python but for Ruby?"

While there may not be many Ruby libraries that directly comparable to NumPy, there are a fair number of packages to do related work. For instance, you can utilize RSRuby which is a bridge between the R statistical language and Ruby. GnuPlot is another Ruby library that allows both data processing and plotting of graph data.

RSRuby - R / Ruby binding

GnuPlot - Data processing and Plotting

Glenn JahnkeGlenn Jahnke
Standup 9/1/2010 - Rspec2 + RubyMine and Testing for Class methods
edit Posted by Glenn Jahnke on Wednesday September 01, 2010 at 09:24AM

Help

Testing for class methods in Ruby

How do you test for the existence of a class method? Test it using #respond_to?

class Foo
    def self.bar 
        puts "Hello, World!"
    end
end

Foo.respond_to?(:bar)
 => true

And to make sure we are really just talking about class methods and not instance methods:

foo = Foo.new

foo.respond_to?(:bar)
 => false

Interesting

RubyMine and Rspec2 Bug Fixed!

We use the latest and greatest RubyMine version available at Pivotal, but sometimes technology choices such as Rails 3 and Rspec 2 are still ahead of it. The formatter that analyzes test output breaks on Rspec 2's output before any tests run. The bug is further discussed http://youtrack.jetbrains.net/issue/RUBY-6485. Luckily this bug will be fixed in the next EAP release.

Excuting .rvmrc commands and cruisecontrol

We've had a difficult time getting .rvmrc files to work with cruisecontrol.rb builds. Specifically, ccrb seems to launch the rake task in the project working directory. This means that the .rvmrc file is ignored. A workaround is to have your CI script directly use RVM or to add "cd .. && cd work" before your project cruise script or rake task.