From aafc954e1146129d86e1aa5fb6e429f165d60bf1 Mon Sep 17 00:00:00 2001 From: babie Date: Tue, 5 Nov 2013 18:30:01 +0900 Subject: [PATCH] fix :plugin_install in case of github name has numbers --- lib/earthquake/commands.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/earthquake/commands.rb b/lib/earthquake/commands.rb index acc4084..a6b0243 100644 --- a/lib/earthquake/commands.rb +++ b/lib/earthquake/commands.rb @@ -480,7 +480,7 @@ def self._eval_as_ruby_string(text) puts "the host must be gist.github.com".c(41) else puts "..." - gist_id = uri.path[/\d+/] + gist_id = uri.path[%r|/(\d+)/?$|,1] meta = JSON.parse(open("https://api.github.com/gists/#{gist_id}").read) filename = meta["files"].keys[0] raw = meta['files'][filename]['content']