redmine-support_direct_textile_classes_and_ids 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ecf2cc38c55fe2d11798929962e20a250860f49d
4
+ data.tar.gz: e90deb4db77abe219a9cfe37de4f6a9f38858179
5
+ SHA512:
6
+ metadata.gz: 2dd99e943a74496f95059ee1d73a45613f956464b5e71390c03b7c74438a0b1920e08ae5c683a0b63d6aef1c078b616614f9a9914c3ab130f7d6fb12e41797f5
7
+ data.tar.gz: b13c7be76006a5986dde4aa105701156eb05a31aa0c19e6ba6d641d5370003b1a657f1f5c5a605208929281dd5d4afc4a19994c67a564cdb147fec3e793c1a84
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ pkg
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in candy_check.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2017 Jonas Thiel
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,49 @@
1
+ [github]: https://github.com/neopoly/redmine-support_direct_textile_classes_and_ids
2
+ [doc]: http://rubydoc.info/github/neopoly/redmine-support_direct_textile_classes_and_ids/master/file/README.md
3
+ [gem]: https://rubygems.org/gems/redmine-support_direct_textile_classes_and_ids
4
+ [gem-badge]: https://img.shields.io/gem/v/redmine-support_direct_textile_classes_and_ids.svg
5
+ [inchpages]: https://inch-ci.org/github/neopoly/redmine-support_direct_textile_classes_and_ids
6
+ [inchpages-badge]: https://inch-ci.org/github/neopoly/redmine-support_direct_textile_classes_and_ids.svg?branch=master&style=flat
7
+
8
+ # redmine-support_direct_textile_classes_and_ids
9
+
10
+ [![Gem Version][gem-badge]][gem]
11
+ [![Inline docs][inchpages-badge]][inchpages]
12
+
13
+ [Gem][gem] |
14
+ [Source][github] |
15
+ [Documentation][doc]
16
+
17
+ Restores the old textile-based Wiki formatting allowing directly using HTML classes and ids.
18
+
19
+ This behaviour was changed in Redmine 3.4, with prefixing all classes and ids with `wiki-class-` / `wiki-id-` in [4f2c5a9](https://github.com/redmine/redmine/commit/4f2c5a9945d0a1d83620f5cfb7eb8d19056edc34)
20
+
21
+ Using this plugin reverts Redmine to the old HTML classes and ids by removing the prefix.
22
+
23
+ ## Installation
24
+
25
+ Ensure you have a `Gemfile.local` file in your Redmine installation. Add to your `Gemfile.local`:
26
+
27
+ ```ruby
28
+ gem "redmine-support_direct_textile_classes_and_ids"
29
+ ```
30
+
31
+ And then execute:
32
+
33
+ ```
34
+ $ bundle
35
+ ```
36
+
37
+ Restart the Redmine application
38
+
39
+ ## Usage
40
+
41
+ No further steps needed
42
+
43
+ ## Contributing
44
+
45
+ 1. Fork it ( https://github.com/neopoly/redmine-support_direct_textile_classes_and_ids/fork )
46
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
47
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
48
+ 4. Push to the branch (`git push origin my-new-feature`)
49
+ 5. Create a new Pull Request
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env rake
2
+
3
+ require "bundler/gem_tasks"
@@ -0,0 +1,8 @@
1
+ require "support_direct_textile_classes_and_ids/version"
2
+ require "support_direct_textile_classes_and_ids/infos"
3
+ require "support_direct_textile_classes_and_ids/engine"
4
+
5
+ # Restores the old textile-based Wiki formatting allowing directly
6
+ # using HTML classes and ids
7
+ module SupportDirectTextileClassesAndIds
8
+ end
@@ -0,0 +1,12 @@
1
+ require "support_direct_textile_classes_and_ids/textile_helper"
2
+
3
+ module SupportDirectTextileClassesAndIds
4
+ # Registers the TextileHelper as helper module
5
+ module ApplicationControllerPatch
6
+ extend ActiveSupport::Concern
7
+
8
+ included do
9
+ helper TextileHelper
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ require "support_direct_textile_classes_and_ids/redmine_plugin"
2
+
3
+ module SupportDirectTextileClassesAndIds
4
+ # Simple engine to support the Redmine plugin
5
+ class Engine < ::Rails::Engine
6
+ config.to_prepare do
7
+ RedminePlugin.new
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ module SupportDirectTextileClassesAndIds
2
+ module Infos
3
+ NAME = "redmine-support_direct_textile_classes_and_ids"
4
+ DESCRIPTION = "Restores the old textile-based Wiki formatting allowing directly using HTML classes and ids"
5
+ LICENSE = "MIT"
6
+ URL = "https://github.com/neopoly/redmine-support_direct_textile_classes_and_ids"
7
+ AUTHORS = {
8
+ "Jonas Thiel" => "jt@neopoly.de"
9
+ }.freeze
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ require "support_direct_textile_classes_and_ids/application_controller_patch"
2
+
3
+ module SupportDirectTextileClassesAndIds
4
+ # Registers this gem as a Redmine plugin and applies the needed patches
5
+ class RedminePlugin
6
+ include SupportDirectTextileClassesAndIds::Infos
7
+
8
+ def initialize
9
+ register!
10
+ boot!
11
+ end
12
+
13
+ private
14
+
15
+ def register!
16
+ Redmine::Plugin.register :support_direct_textile_classes_and_ids do
17
+ name NAME
18
+ author AUTHORS.keys.join(", ")
19
+ description DESCRIPTION
20
+ version VERSION
21
+ url URL
22
+ author_url URL
23
+ directory Engine.root
24
+ end
25
+ end
26
+
27
+ def boot!
28
+ ApplicationController.send(:include, ApplicationControllerPatch)
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,13 @@
1
+ module SupportDirectTextileClassesAndIds
2
+ # Remove the `wiki-class-` and `wiki-id-` prefixes
3
+ module TextileHelper
4
+ def textilizable(*args)
5
+ if html = super
6
+ html
7
+ .gsub(/\wiki-class-(\w+)/, '\1')
8
+ .gsub(/\wiki-id-(\w+)/, '\1')
9
+ .html_safe
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ module SupportDirectTextileClassesAndIds
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "support_direct_textile_classes_and_ids/version"
4
+ require "support_direct_textile_classes_and_ids/infos"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "redmine-support_direct_textile_classes_and_ids"
8
+ spec.version = SupportDirectTextileClassesAndIds::VERSION
9
+ spec.authors = SupportDirectTextileClassesAndIds::Infos::AUTHORS.keys
10
+ spec.email = SupportDirectTextileClassesAndIds::Infos::AUTHORS.values
11
+ spec.summary = SupportDirectTextileClassesAndIds::Infos::DESCRIPTION
12
+ spec.description = SupportDirectTextileClassesAndIds::Infos::DESCRIPTION
13
+ spec.homepage = SupportDirectTextileClassesAndIds::Infos::URL
14
+ spec.license = SupportDirectTextileClassesAndIds::Infos::LICENSE
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(/^(test|spec|features)\//)
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "rails", "~> 4.2.0"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.7"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: redmine-support_direct_textile_classes_and_ids
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jonas Thiel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: Restores the old textile-based Wiki formatting allowing directly using
56
+ HTML classes and ids
57
+ email:
58
+ - jt@neopoly.de
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - lib/redmine-support_direct_textile_classes_and_ids.rb
69
+ - lib/support_direct_textile_classes_and_ids/application_controller_patch.rb
70
+ - lib/support_direct_textile_classes_and_ids/engine.rb
71
+ - lib/support_direct_textile_classes_and_ids/infos.rb
72
+ - lib/support_direct_textile_classes_and_ids/redmine_plugin.rb
73
+ - lib/support_direct_textile_classes_and_ids/textile_helper.rb
74
+ - lib/support_direct_textile_classes_and_ids/version.rb
75
+ - redmine-support_direct_textile_classes_and_ids.gemspec
76
+ homepage: https://github.com/neopoly/redmine-support_direct_textile_classes_and_ids
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.6.10
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Restores the old textile-based Wiki formatting allowing directly using HTML
100
+ classes and ids
101
+ test_files: []