Skip to content

Instantly share code, notes, and snippets.

@juanje
Forked from Yasushi/init.rb
Created December 4, 2010 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanje/728408 to your computer and use it in GitHub Desktop.
Save juanje/728408 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