Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Created February 24, 2009 07:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Yasushi/69455 to your computer and use it in GitHub Desktop.
Save Yasushi/69455 to your computer and use it in GitHub Desktop.
Redmine Gist embed plugin
#
# 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