Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

There's a gem for that! #2

Merged
merged 1 commit into from

2 participants

@sferik
me:    hubot there's a gem for sockets
hubot: https://rubygems.org/gems/eventmachine

me:    hubot there's a gem for authentication
hubot: https://rubygems.org/gems/devise

me:    hubot there's a gem for image processing
hubot: https://rubygems.org/gems/rmagick

me:    hubot there's a gem for templating
hubot: https://rubygems.org/gems/haml
@atmos atmos merged commit 471cd84 into github:master
@atmos

I'll cut a new release shortly.

@sferik

Thanks, Corey! I can't tell you how much I love that you guys open-sourced hubot. It's already a big win at Code for America!

@joeysim joeysim referenced this pull request from a commit in EverythingMe/hubot-scripts
Joey Simhon fixed #2 58e4b88
@philippbeckmann philippbeckmann referenced this pull request from a commit in philippbeckmann/hubot-scripts
@philippbeckmann philippbeckmann jenkins-notifier.coffee: Encode project urls with whitespaces #2
Signed-off-by: Philipp Beckmann <philippbeckmann@pabnet.de>
554e451
@minton minton referenced this pull request from a commit
@philippbeckmann philippbeckmann jenkins-notifier.coffee: Encode project urls with whitespaces #2
Signed-off-by: Philipp Beckmann <philippbeckmann@pabnet.de>
0365035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 25, 2011
  1. @sferik

    There's a gem for that!

    sferik authored
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/scripts/rubygems.coffee
View
14 src/scripts/rubygems.coffee
@@ -0,0 +1,14 @@
+# Find a rubygem from rubygems.org
+#
+# hubot <there's a gem for> that - Returns a link to a gem on rubygems.org
+#
+
+module.exports = (robot) ->
+ robot.respond /there's a gem for (.*)/i, (msg) ->
+ search = escape(msg.match[1])
+ msg.http('https://rubygems.org/api/v1/search.json')
+ .query(query: search)
+ .get() (err, res, body) ->
+ results = JSON.parse(body)
+ result = results[0]
+ msg.send "https://rubygems.org/gems/#{result.name}"
Something went wrong with that request. Please try again.