Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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