trio of gems

19
Gems Brent Snook I made some http://skillsmatter.com/podcast/ajax-ria/a-trio-of-gems Friday, 16 October 2009

Upload: fuglylogic

Post on 10-May-2015

598 views

Category:

Technology


2 download

DESCRIPTION

Presentation given at October 2009 London Ruby User Group on three gems I have written: Numerouno - English natural language parser Baldrick - framework for readying RSS feeds and other sources to hack things together Bumps - remote feature management for Cucumber

TRANSCRIPT

Page 1: Trio of Gems

GemsBrent Snook

I made some

http://skillsmatter.com/podcast/ajax-ria/a-trio-of-gems

Friday, 16 October 2009

Page 2: Trio of Gems

Brent who?

• Agile weenie from Melbourne, Australia

• known to use Java when cornered

• available for dev, coaching, children’s parties

• fuglylogic.com

• brentsnook

Friday, 16 October 2009

Page 4: Trio of Gems

parse a numberrequire 'numerouno'

'five billion and forty two apples'.as_number => 5000000042

'65'.as_number => 65

require 'numerouno-parsing'

Numerouno.parse 'one hundred and ten things'

Friday, 16 October 2009

Page 5: Trio of Gems

replace numbers

require 'numerouno'

'two bit varmint'.sub_numbers => '2 bit varmint'

require 'numerouno-parsing'

Numerouno.replace '2 bit varmint'

Friday, 16 October 2009

Page 6: Trio of Gems

Cucumber steps

require 'numerouno'

Then /the meaning of life is (.+)/ do |number| 42.should == number.as_numberend

Then the meaning of life is forty twoThen the meaning of life is 42

Friday, 16 October 2009

Page 8: Trio of Gems

inspired by

Friday, 16 October 2009

Page 9: Trio of Gems

cuppa.rb

require 'rubygems'require 'baldrick_serve'

feed_url = 'http://search.twitter.com/search.atom?q=cup+of'listen_to :feed, :at => feed_url

on_hearing /cup of (.*?)[\.,]/ do |beverage, order| puts "#{order[:who]} would like a cup of #{beverage}"end

Friday, 16 October 2009

Page 10: Trio of Gems

orders

=== brent on commodore64.:43215 ===* [25-Feb-2009 10:17 PM] I’d like a cup of tea, maybe a biscuit too

Friday, 16 October 2009

Page 11: Trio of Gems

tasks

kettle.fillkettle.switch_on

Friday, 16 October 2009

Page 12: Trio of Gems

cuppa.rb

require 'rubygems'require 'baldrick_serve'

feed_url = 'http://search.twitter.com/search.atom?q=cup+of'listen_to :feed, :at => feed_url

on_hearing /cup of (.*?)[\.,]/ do |beverage, order| puts "#{order[:who]} would like a cup of #{beverage}"end

Friday, 16 October 2009

Page 13: Trio of Gems

why not use it for

Friday, 16 October 2009

Page 15: Trio of Gems

the bigger picture

?

Friday, 16 October 2009

Page 16: Trio of Gems

alternatives

• Remote Feature

http://github.com/mhennemeyer/remote_feature

• Pickler

http://github.com/tpope/pickler

• CucumberTFS

http://github.com/mscottford/cucumbertfs

Friday, 16 October 2009

Page 17: Trio of Gems

configuration (env.rb)

require 'bumps'Bumps.configure do use_server 'http://localhost:1981'end

Friday, 16 October 2009

Page 18: Trio of Gems

next

?Friday, 16 October 2009

Page 19: Trio of Gems

imagesCucumber - http://www.flickr.com/photos/vizzzual-dot-com/2738586453/

Steps - http://commons.wikimedia.org/wiki/File:Step_Ladder.jpg

Sinatra - http://www.flickr.com/photos/t/916884/

Barrel Hitch Instructions - http://commons.wikimedia.org/wiki/File:Barrel_hitch_instructions.png

Puzzle Piece - http://commons.wikimedia.org/wiki/File:Puzzle.svg

Cup of Tea - http://www.flickr.com/photos/psd/54314099

Lava Lamp - http://commons.wikimedia.org/wiki/File:Lavalampe.jpg

Nuclear power plant - http://commons.wikimedia.org/wiki/File:Nuclear_power.JPG

Arduino - http://commons.wikimedia.org/wiki/File:Arduino-0017-512x512px.png

Bumps Sign - http://commons.wikimedia.org/wiki/File:0bnsc-109_0.svg

Wave Logo - http://commons.wikimedia.org/wiki/File:Google_Wave_logo.png

Friday, 16 October 2009