Skip to content

Instantly share code, notes, and snippets.

@edavis10
Forked from Yasushi/init.rb
Created May 18, 2009 19:19
Show Gist options
  • Save edavis10/113685 to your computer and use it in GitHub Desktop.
Save edavis10/113685 to your computer and use it in GitHub Desktop.
#
# vendor/plugins/redmine_gist/init.rb
#
require 'redmine'
require 'open-uri'
Redmine::Plugin.register :redmine_gist do
name 'Redmine Gist embed plugin'
author 'Yasushi Abe <yasushi.abe@gmail.com>'
description 'This is a plugin for Redmine'
version '0.0.1'
Redmine::WikiFormatting::Macros.register do
desc "gist embed"
macro :gist do |obj, args|
javascript_tag(nil, :src=>"http://gist.github.com/#{args[0]}.js") unless args.empty?
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment