This is a redmine plugin for supporting Markdown as a wiki format. This

plugin use Redcarpet which is GitHub's markdown wiki formatter.
Redcarpet is extreme fast and compatible GitHub's Wiki. They are
advantage from Redmine Markdown Formatter and Redmine Markdown Extra
Formatter. This code is originally Redmine Markdown Formatter and
Redmine reStructuredtext Formatter. I appreciate these guys.

WWW: https://github.com/alminium/redmine_redcarpet_formatter
This commit is contained in:
Mark Felder 2016-05-13 14:12:03 +00:00
parent cc698252b5
commit ef6f077ab4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415114
8 changed files with 119 additions and 0 deletions

View file

@ -1835,6 +1835,7 @@
SUBDIR += redmine-graphs
SUBDIR += redmine-http-auth
SUBDIR += redmine-qa_contact
SUBDIR += redmine-redcarpet_formatter
SUBDIR += redmine-sidebar_hide
SUBDIR += redmine-stuff_to_do
SUBDIR += redmine-wiki_notes

View file

@ -0,0 +1,59 @@
# Created by: Mark Felder <feld@FreeBSD.org>
# $FreeBSD$
PORTNAME= redcarpet_formatter
PORTVERSION= 2.0.1
DISTVERSIONPREFIX=v
CATEGORIES= www
PKGNAMEPREFIX= redmine-
MAINTAINER= feld@FreeBSD.org
COMMENT= Redmine plugin to support Markdown
LICENSE= GPLv2
NO_ARCH= yes
USE_GITHUB= yes
GH_ACCOUNT= alminium
GH_PROJECT= redmine_redcarpet_formatter
RUN_DEPENDS+= redmine>=2.0:www/redmine
RUN_DEPENDS+= rubygem-redcarpet>0:textproc/rubygem-redcarpet
REDMINE_PLUGIN_NAME= redmine_${PORTNAME}
USE_RUBY= yes
.if !defined(PLIST)
PLIST= ${WRKDIR}/PLIST
_GEN_PLIST= YesPlease
.endif
WWWDIR?= ${PREFIX}/www/redmine
WWWDIR_REL= ${WWWDIR:S|^${PREFIX}/||}
.if ${WWWDIR_REL} == ${WWWDIR}
IGNORE= WWWDIR is not a child of PREFIX (${PREFIX})
.endif
.if !defined(do-build)
do-build: redmine-plugin-plist
@${DO_NADA}
.endif
redmine-plugin-plist:
.if defined(_GEN_PLIST)
cd ${WRKSRC} && ${FIND} . -type f | ${GREP} -v '\.orig$$' | ${SED} -e's|^\.|${WWWDIR_REL}/plugins/${REDMINE_PLUGIN_NAME}|' >> ${PLIST}
cd ${WRKSRC} && ${FIND} -d . -empty -type d | ${SED} -e's|^\.|@dir ${WWWDIR_REL}/plugins/${REDMINE_PLUGIN_NAME}|' >> ${PLIST}
.else
@${DO_NADA}
.endif
post-patch:
(cd ${WRKSRC}/lib/redmine/wiki_formatting && ${MV} markdown redcarpet_markdown)
do-install:
${MKDIR} "${STAGEDIR}${WWWDIR}/plugins/${REDMINE_PLUGIN_NAME}"
${TAR} -C "${WRKSRC}" -cf - --exclude '*.orig' . | ${TAR} -C "${STAGEDIR}${WWWDIR}/plugins/${REDMINE_PLUGIN_NAME}" -xf -
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (alminium-redmine_redcarpet_formatter-v2.0.1_GH0.tar.gz) = 84fddbbfc2b15fc3336ca5a6f645c52cb19586706a106d1a914b354b7bc83dee
SIZE (alminium-redmine_redcarpet_formatter-v2.0.1_GH0.tar.gz) = 11116

View file

@ -0,0 +1,6 @@
--- Gemfile.orig 2016-05-13 13:43:53 UTC
+++ Gemfile
@@ -1,3 +0,0 @@
-source :rubygems
-
-gem "redcarpet"

View file

@ -0,0 +1,21 @@
--- init.rb.orig 2016-05-13 13:44:03 UTC
+++ init.rb
@@ -1,8 +1,8 @@
# Redmine Redcarpet formatter
require 'redmine'
-require 'redmine/wiki_formatting/markdown/formatter'
-require 'redmine/wiki_formatting/markdown/helper'
+require 'redmine/wiki_formatting/redcarpet_markdown/formatter'
+require 'redmine/wiki_formatting/redcarpet_markdown/helper'
Redmine::Plugin.register :redmine_redcarpet_formatter do
@@ -11,6 +11,6 @@ Redmine::Plugin.register :redmine_redcar
description 'Markdown wiki formatting by Redcarpet for Redmine'
version '2.0.1'
- wiki_format_provider 'markdown', Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::Helper
+ wiki_format_provider 'redcarpet_markdown', Redmine::WikiFormatting::RedcarpetMarkdown::Formatter, Redmine::WikiFormatting::RedcarpetMarkdown::Helper
end

View file

@ -0,0 +1,11 @@
--- lib/redmine/wiki_formatting/markdown/formatter.rb.orig 2016-05-13 13:44:58 UTC
+++ lib/redmine/wiki_formatting/markdown/formatter.rb
@@ -20,7 +20,7 @@ end
module Redmine
module WikiFormatting
- module Markdown
+ module RedcarpetMarkdown
class Formatter
# include ActionView::Helpers::TagHelper

View file

@ -0,0 +1,11 @@
--- lib/redmine/wiki_formatting/markdown/helper.rb.orig 2016-05-13 13:45:22 UTC
+++ lib/redmine/wiki_formatting/markdown/helper.rb
@@ -1,7 +1,7 @@
module Redmine
module WikiFormatting
- module Markdown
+ module RedcarpetMarkdown
module Helper
unloadable

View file

@ -0,0 +1,8 @@
This is a redmine plugin for supporting Markdown as a wiki format. This
plugin use Redcarpet which is GitHub's markdown wiki formatter.
Redcarpet is extreme fast and compatible GitHub's Wiki. They are
advantage from Redmine Markdown Formatter and Redmine Markdown Extra
Formatter. This code is originally Redmine Markdown Formatter and
Redmine reStructuredtext Formatter. I appreciate these guys.
WWW: https://github.com/alminium/redmine_redcarpet_formatter