redmineup 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +7 -17
- data/app/assets/javascripts/select2_helpers.js +10 -0
- data/doc/CHANGELOG +10 -0
- data/lib/redmineup/helpers/form_tag_helper.rb +1 -0
- data/lib/redmineup/patches/compatibility/sprite_patch.rb +1 -1
- data/lib/redmineup/patches/compatibility/user_patch.rb +3 -3
- data/lib/redmineup/version.rb +1 -1
- data/lib/redmineup.rb +13 -35
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8307975a84d27f5d5cc4e0e3b9914452f58b0a8bf643ed81ace81625269649f3
|
|
4
|
+
data.tar.gz: b75a2850b6d750245ba5f41ecd4d240a4f866b993e248a26294d9830fd9fc528
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f82be9dbdcde0ef65869643b9054ac4a88097f4f211c9451f42bc342509be0d0eb4f2962b7977fe93114b2492c5ce66688407aa6a8599ffca8f6b7949320b57e
|
|
7
|
+
data.tar.gz: 75ce82b8fcebbb10ec7af953e51974720f1ff2d4f398796c7a3dd35f48ec8f5470a1c8447ecf14ca7f24b13339fd016f4f2ad6e639e059b772a3f35c3e88425a
|
data/.gitlab-ci.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
default:
|
|
2
2
|
services:
|
|
3
|
-
- mysql:
|
|
4
|
-
- postgres:
|
|
3
|
+
- mysql:8
|
|
4
|
+
- postgres:15
|
|
5
5
|
|
|
6
6
|
variables:
|
|
7
7
|
MYSQL_DATABASE: redmineup_test
|
|
@@ -13,30 +13,20 @@ workflow:
|
|
|
13
13
|
rules:
|
|
14
14
|
- if: $CI_PIPELINE_SOURCE != "merge_request_event"
|
|
15
15
|
|
|
16
|
-
ruby-
|
|
16
|
+
ruby-3.1.7:
|
|
17
17
|
stage: test
|
|
18
|
-
image: ruby:
|
|
18
|
+
image: ruby:3.1.7-bookworm
|
|
19
19
|
script:
|
|
20
|
-
- sed -i "s/'sqlite3'/'sqlite3', '~> 1.3.6'/g" redmineup.gemspec
|
|
21
|
-
- sed -i "s/'mysql2'/'mysql2', '~> 0.4.0'/g" redmineup.gemspec
|
|
22
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'loofah', '~>2.19.1'/g" redmineup.gemspec
|
|
23
20
|
- bundle install
|
|
24
21
|
- bundle exec rake test DB=sqlite
|
|
25
22
|
- bundle exec rake test DB=postgresql
|
|
26
23
|
- bundle exec rake test DB=mysql
|
|
27
24
|
|
|
28
|
-
ruby-
|
|
25
|
+
ruby-4.0.2:
|
|
29
26
|
stage: test
|
|
30
|
-
image: ruby:
|
|
27
|
+
image: ruby:4.0.2-bookworm
|
|
31
28
|
script:
|
|
32
|
-
- sed -i "s/'
|
|
33
|
-
- sed -i "s/'mysql2'/'mysql2', '~> 0.5.0'/g" redmineup.gemspec
|
|
34
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'loofah', '~>2.19.1'/g" redmineup.gemspec
|
|
35
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'concurrent-ruby', '1.3.4'/g" redmineup.gemspec
|
|
36
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'bigdecimal', '3.1.8'/g" redmineup.gemspec
|
|
37
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'mutex_m'/g" redmineup.gemspec
|
|
38
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'drb'/g" redmineup.gemspec
|
|
39
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'minitest', '< 6'/g" redmineup.gemspec
|
|
29
|
+
- sed -i "s/spec.add_development_dependency 'pg'/spec.add_development_dependency 'pg'\n spec.add_development_dependency 'minitest-mock'/g" redmineup.gemspec
|
|
40
30
|
- bundle install
|
|
41
31
|
- bundle exec rake test DB=sqlite
|
|
42
32
|
- bundle exec rake test DB=postgresql
|
|
@@ -123,6 +123,7 @@ function select2Tag(id, options) {
|
|
|
123
123
|
$(function () {
|
|
124
124
|
var selectField = $('select#' + id);
|
|
125
125
|
selectField.select2(buildSelect2Options(options));
|
|
126
|
+
bindSelectHandler(selectField, options);
|
|
126
127
|
|
|
127
128
|
var select2Instance = selectField.data('select2');
|
|
128
129
|
select2Instance.on('results:message', function(params){
|
|
@@ -133,6 +134,15 @@ function select2Tag(id, options) {
|
|
|
133
134
|
};
|
|
134
135
|
|
|
135
136
|
|
|
137
|
+
function bindSelectHandler(selectField, options) {
|
|
138
|
+
var callbackName = options['on_select'];
|
|
139
|
+
if (!callbackName) { return; }
|
|
140
|
+
if (typeof window[callbackName] !== 'function') { return; }
|
|
141
|
+
|
|
142
|
+
selectField.on('select2:select', window[callbackName]);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
136
146
|
function buildSelect2Options(options) {
|
|
137
147
|
result = {
|
|
138
148
|
placeholder: options['placeholder'] || '',
|
data/doc/CHANGELOG
CHANGED
|
@@ -4,6 +4,16 @@ Redmine UP gem - general functions for plugins (tags, vote, viewing, currency)
|
|
|
4
4
|
Copyright (C) 2011-2026 Kirill Bezrukov (RedmineUP)
|
|
5
5
|
https://www.redmineup.com/
|
|
6
6
|
|
|
7
|
+
== 2026-05-01 v1.1.8
|
|
8
|
+
|
|
9
|
+
* Added `on_select` callback and `select_icon` options for `select2tag` helper
|
|
10
|
+
* Updated `requires_redmineup` version guard to reduce boilerplate in plugin init
|
|
11
|
+
* Fixed `link_to` display compatibility issue in Redmine 5
|
|
12
|
+
|
|
13
|
+
== 2026-04-18 v1.1.7
|
|
14
|
+
|
|
15
|
+
* hot fix for atom/rss compatibility for redmine < 5
|
|
16
|
+
|
|
7
17
|
== 2026-04-17 v1.1.6
|
|
8
18
|
|
|
9
19
|
* Added helpers for timezone conversions
|
|
@@ -18,6 +18,7 @@ module Redmineup
|
|
|
18
18
|
# * <tt>:allow_clear</tt> Provides support for clearable selections. Default value false.
|
|
19
19
|
# * <tt>:min_input_length</tt> Minimum number of characters required to start a search. Default value 0.
|
|
20
20
|
# * <tt>:format_state</tt> Defines template of search results in the drop-down.
|
|
21
|
+
# * <tt>:on_select</tt> Global JS callback name bound to `select2:select` event.
|
|
21
22
|
# * <tt>:tags</tt> Used to enable tagging feature.
|
|
22
23
|
#
|
|
23
24
|
# <b>Note:</b> The HTML specification says when +multiple+ parameter passed to select and all options got deselected
|
|
@@ -4,7 +4,7 @@ module Redmineup
|
|
|
4
4
|
module SpritePatch
|
|
5
5
|
def self.included(base)
|
|
6
6
|
base.class_eval do
|
|
7
|
-
def sprite_icon(icon_name, label =
|
|
7
|
+
def sprite_icon(icon_name, label = '', icon_only: false, size: '18', css_class: nil, sprite: "icons", plugin: nil, rtl: false)
|
|
8
8
|
label
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -16,6 +16,6 @@ module Redmineup
|
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
unless
|
|
20
|
-
|
|
21
|
-
end
|
|
19
|
+
unless User.included_modules.include?(Redmineup::Patches::Compatibility::UserPatch)
|
|
20
|
+
User.send(:include, Redmineup::Patches::Compatibility::UserPatch)
|
|
21
|
+
end
|
data/lib/redmineup/version.rb
CHANGED
data/lib/redmineup.rb
CHANGED
|
@@ -111,44 +111,22 @@ if defined?(ActionView::Base)
|
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
def requires_redmineup(arg)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
requirement = requirement.split('.').collect(&:to_i)
|
|
118
|
-
requirement <=> current.slice(0, requirement.size)
|
|
119
|
-
end
|
|
114
|
+
arg = { version_or_higher: arg } unless arg.is_a?(Hash)
|
|
115
|
+
arg.assert_valid_keys(:version_or_higher)
|
|
120
116
|
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
requirement = arg[:version_or_higher]
|
|
118
|
+
unless requirement.is_a?(String)
|
|
119
|
+
raise ArgumentError, ':version_or_higher accepts a version string only'
|
|
123
120
|
end
|
|
124
121
|
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
current = Gem::Version.new(Redmineup::VERSION)
|
|
123
|
+
required = Gem::Version.new(requirement)
|
|
127
124
|
|
|
128
|
-
|
|
129
|
-
arg.each do |k, req|
|
|
130
|
-
case k
|
|
131
|
-
when :version_or_higher
|
|
132
|
-
raise ArgumentError.new(':version_or_higher accepts a version string only') unless req.is_a?(String)
|
|
125
|
+
return true if required <= current
|
|
133
126
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
req = [req] if req.is_a?(String)
|
|
140
|
-
if req.is_a?(Array)
|
|
141
|
-
unless req.detect { |ver| compare_versions(ver, current) == 0 }
|
|
142
|
-
abort "\033[31mRedmine requires redmineup gem version #{req} (you're using #{Redmineup::VERSION}).\nPlease update with 'bundle update redmineup'.\033[0m"
|
|
143
|
-
end
|
|
144
|
-
elsif req.is_a?(Range)
|
|
145
|
-
unless compare_versions(req.first, current) <= 0 && compare_versions(req.last, current) >= 0
|
|
146
|
-
abort "\033[31mRedmine requires redmineup gem version between #{req.first} and #{req.last} (you're using #{Redmineup::VERSION}).\nPlease update with 'bundle update redmineup'.\033[0m"
|
|
147
|
-
end
|
|
148
|
-
else
|
|
149
|
-
raise ArgumentError.new(':version option accepts a version string, an array or a range of versions')
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
true
|
|
127
|
+
message = "Redmine requires redmineup gem version #{requirement} or higher " \
|
|
128
|
+
"(you're using #{Redmineup::VERSION}).\n" \
|
|
129
|
+
"Please update with 'bundle update redmineup --conservative'."
|
|
130
|
+
Rails.logger&.error("\033[31m[ERROR]\033[0m #{message}")
|
|
131
|
+
abort "\033[31m#{message}\033[0m"
|
|
154
132
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: redmineup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RedmineUP
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|