redmine-user_wiki_macro 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +4 -0
- data/README.md +22 -3
- data/Rakefile +0 -2
- data/lib/redmine-user_wiki_macro.rb +1 -2
- data/lib/user_wiki_macro/infos.rb +5 -4
- data/lib/user_wiki_macro/macros.rb +15 -4
- data/lib/user_wiki_macro/version.rb +1 -1
- data/rakelib/rubocop.rake +18 -0
- data/redmine-user_wiki_macro.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c0bfb116094c60201ec497a051aa05735f549b
|
4
|
+
data.tar.gz: 10ed45350dfacd107d0c1f2ce17cf7507c39a022
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eef64ddb7f1fbeb8759a47c03e033e5c6d55884e664322d78cc78cf7eb42fd3e751dfc96de173c04fd82341334077e5dd6b9104bc4c46480440e017383f21104
|
7
|
+
data.tar.gz: 9d95927ca1a5a8d1a7557b9692b1a24299fcf54de5393b909c21a20bb4397b64c11fcf9a2f3deb530b02dbcae01fbe13dd8d815634e51860b3d62917b2ecf2eb
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
|
+
[github]: https://github.com/neopoly/redmine-user_wiki_macro
|
2
|
+
[doc]: http://rubydoc.info/github/neopoly/redmine-user_wiki_macro/master/file/README.md
|
3
|
+
[gem]: https://rubygems.org/gems/redmine-user_wiki_macro
|
4
|
+
[gem-badge]: https://img.shields.io/gem/v/redmine-user_wiki_macro.svg
|
5
|
+
[inchpages]: https://inch-ci.org/github/neopoly/redmine-user_wiki_macro
|
6
|
+
[inchpages-badge]: https://inch-ci.org/github/neopoly/redmine-user_wiki_macro.svg?branch=master&style=flat
|
7
|
+
|
1
8
|
# redmine-user_wiki_macro
|
2
9
|
|
3
|
-
|
10
|
+
[![Gem Version][gem-badge]][gem]
|
11
|
+
[![Inline docs][inchpages-badge]][inchpages]
|
12
|
+
|
13
|
+
[Gem][gem] |
|
14
|
+
[Source][github] |
|
15
|
+
[Documentation][doc]
|
16
|
+
|
17
|
+
Adds a `{{user(login_name)}}` macro to the Redmine's wiki engine.
|
18
|
+
|
19
|
+
![Screenshot](http://neopoly.github.io/redmine-user_wiki_macro/images/screenshot.png)
|
4
20
|
|
5
21
|
## Installation
|
6
22
|
|
@@ -20,7 +36,10 @@ Restart the Redmine application
|
|
20
36
|
|
21
37
|
## Usage
|
22
38
|
|
23
|
-
|
39
|
+
This macros works best with enabled user avatars. Enable the Gravatar images via
|
40
|
+
the administration settings:
|
41
|
+
|
42
|
+
Administration > Settings > Display -> Use Gravatar user icons
|
24
43
|
|
25
44
|
## Testing
|
26
45
|
|
@@ -32,7 +51,7 @@ No automatic tests, sir! But this Redmine plugin is used in production.
|
|
32
51
|
|
33
52
|
## Contributing
|
34
53
|
|
35
|
-
1. Fork it ( https://github.com/
|
54
|
+
1. Fork it ( https://github.com/neopoly/redmine-user_wiki_macro/fork )
|
36
55
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
56
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
57
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
@@ -2,7 +2,6 @@ require "user_wiki_macro/version"
|
|
2
2
|
require "user_wiki_macro/infos"
|
3
3
|
require "user_wiki_macro/engine"
|
4
4
|
|
5
|
-
# Redmine plugin to support
|
6
|
-
# authentication mechanism
|
5
|
+
# Redmine plugin to support a custom wiki macros
|
7
6
|
module UserWikiMacro
|
8
7
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module UserWikiMacro
|
2
2
|
module Infos
|
3
|
-
NAME = "redmine-user_wiki_macro"
|
4
|
-
DESCRIPTION = "Adds a {{user(login_name)}} macro
|
5
|
-
|
6
|
-
|
3
|
+
NAME = "redmine-user_wiki_macro".freeze
|
4
|
+
DESCRIPTION = "Adds a {{user(login_name)}} macro " \
|
5
|
+
"to Redmine's wiki engine".freeze
|
6
|
+
LICENSE = "MIT".freeze
|
7
|
+
URL = "https://github.com/neopoly/redmine-user_wiki_macro".freeze
|
7
8
|
AUTHORS = {
|
8
9
|
"Jonas Thiel" => "jt@neopoly.de"
|
9
10
|
}.freeze
|
@@ -16,10 +16,21 @@ module UserWikiMacro
|
|
16
16
|
user = User.find_by_login(username)
|
17
17
|
return nil unless user
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
image = avatar(user, size: UserWikiMacro.determine_size(options))
|
20
|
+
|
21
|
+
css = ["user-wiki-macro user-wiki-macro-user"]
|
22
|
+
label = []
|
23
|
+
|
24
|
+
if image.present?
|
25
|
+
css << "user-wiki-macro-user-with-avatar"
|
26
|
+
label << image
|
27
|
+
label << content_tag(:span, user.login)
|
28
|
+
else
|
29
|
+
label << user.login
|
30
|
+
end
|
31
|
+
|
32
|
+
content_tag :span, class: css do
|
33
|
+
link_to label.join.html_safe, user_path(user)
|
23
34
|
end
|
24
35
|
end
|
25
36
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
begin
|
2
|
+
require "rubocop/rake_task"
|
3
|
+
|
4
|
+
Rake::Task[:default].enhance [:rubocop]
|
5
|
+
|
6
|
+
RuboCop::RakeTask.new do |task|
|
7
|
+
task.options << "--display-cop-names"
|
8
|
+
end
|
9
|
+
|
10
|
+
namespace :rubocop do
|
11
|
+
desc "Generate a configuration file acting as a TODO list."
|
12
|
+
task :auto_gen_config do
|
13
|
+
exec "bundle exec rubocop --auto-gen-config"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
rescue LoadError
|
18
|
+
end
|
@@ -15,8 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.license = UserWikiMacro::Infos::LICENSE
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0")
|
18
|
-
spec.executables = spec.files.grep(
|
19
|
-
spec.test_files = spec.files.grep(
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_dependency "rails", "~> 4.2.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine-user_wiki_macro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Thiel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/user_wiki_macro/macros.rb
|
88
88
|
- lib/user_wiki_macro/redmine_plugin.rb
|
89
89
|
- lib/user_wiki_macro/version.rb
|
90
|
+
- rakelib/rubocop.rake
|
90
91
|
- redmine-user_wiki_macro.gemspec
|
91
92
|
homepage: https://github.com/neopoly/redmine-user_wiki_macro
|
92
93
|
licenses:
|
@@ -113,4 +114,3 @@ signing_key:
|
|
113
114
|
specification_version: 4
|
114
115
|
summary: Adds a {{user(login_name)}} macro to Redmine's wiki engine
|
115
116
|
test_files: []
|
116
|
-
has_rdoc:
|