redmineup 1.0.13 → 1.1.0
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 +44 -0
- data/app/assets/javascripts/consumer.js +66 -0
- data/doc/CHANGELOG +6 -0
- data/lib/action_cable/server/rup_configuration.rb +25 -0
- data/lib/action_cable/server/rup_server.rb +13 -0
- data/lib/redmineup/acts_as_taggable/up_acts_as_taggable.rb +1 -0
- data/lib/redmineup/hooks/views_layouts_hook.rb +2 -1
- data/lib/redmineup/liquid/drops/version_drop.rb +0 -2
- data/lib/redmineup/patches/action_cable_base_patch.rb +20 -0
- data/lib/redmineup/patches/action_cable_patch.rb +23 -0
- data/lib/redmineup/patches/compatibility/sprite_patch.rb +1 -1
- data/lib/redmineup/version.rb +1 -1
- data/lib/redmineup.rb +11 -0
- data/test/acts_as_votable/votable_test.rb +9 -9
- data/test/acts_as_votable/voter_test.rb +4 -4
- data/test/database.yml +3 -3
- data/test/liquid/filters/arrays_filter_test.rb +6 -3
- metadata +8 -3
- data/bitbucket-pipelines.yml +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d9641fde0d380147805eb9c4a091b952e944d8fe20b7b3ca50e49a0a30b3caa
|
4
|
+
data.tar.gz: 62481de6881b314734528adc59139a120b3abc2dc86298ffcd6c1ee8a0d1c69d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0790f736703855ee89e2755bd4e314f71d2c49da6a2294b5f777e0e14175d624502ac260bcf4e8f50b4c29b491b2bbf39aed0e3c64d0807b5b780e9dca394c0d'
|
7
|
+
data.tar.gz: 7e96ce727a5557d41275e0d6b16b0047d7e3d922eb3557fed5c653a54b2ea4925eff773eafa5b1cd81fedce2408afb007e8508d359285b4a9d46d11fb0d40d78
|
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
default:
|
2
|
+
services:
|
3
|
+
- mysql:5.7
|
4
|
+
- postgres:11
|
5
|
+
|
6
|
+
variables:
|
7
|
+
MYSQL_DATABASE: redmineup_test
|
8
|
+
MYSQL_ROOT_PASSWORD: password
|
9
|
+
POSTGRES_DB: redmineup_test
|
10
|
+
POSTGRES_PASSWORD: password
|
11
|
+
|
12
|
+
workflow:
|
13
|
+
rules:
|
14
|
+
- if: $CI_PIPELINE_SOURCE != "merge_request_event"
|
15
|
+
|
16
|
+
ruby-2.4.1:
|
17
|
+
stage: test
|
18
|
+
image: ruby:2.4.1
|
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
|
+
- bundle install
|
24
|
+
- bundle exec rake test DB=sqlite
|
25
|
+
- bundle exec rake test DB=postgresql
|
26
|
+
- bundle exec rake test DB=mysql
|
27
|
+
|
28
|
+
ruby-3.4.4:
|
29
|
+
stage: test
|
30
|
+
tags:
|
31
|
+
- local
|
32
|
+
image: ruby:3.4.4
|
33
|
+
script:
|
34
|
+
- sed -i "s/'sqlite3'/'sqlite3', '~> 1.4.4'/g" redmineup.gemspec
|
35
|
+
- sed -i "s/'mysql2'/'mysql2', '~> 0.5.0'/g" redmineup.gemspec
|
36
|
+
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'loofah', '~>2.19.1'/g" redmineup.gemspec
|
37
|
+
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'concurrent-ruby', '1.3.4'/g" redmineup.gemspec
|
38
|
+
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'bigdecimal', '3.1.8'/g" redmineup.gemspec
|
39
|
+
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'mutex_m'/g" redmineup.gemspec
|
40
|
+
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'drb'/g" redmineup.gemspec
|
41
|
+
- bundle install
|
42
|
+
- bundle exec rake test DB=sqlite
|
43
|
+
- bundle exec rake test DB=postgresql
|
44
|
+
- bundle exec rake test DB=mysql
|
@@ -0,0 +1,66 @@
|
|
1
|
+
class activeCableConsumer {
|
2
|
+
OPEN = 1;
|
3
|
+
|
4
|
+
constructor(consumer) {
|
5
|
+
this.consumer = consumer;
|
6
|
+
this._isConnecting = true;
|
7
|
+
|
8
|
+
this.connect();
|
9
|
+
}
|
10
|
+
|
11
|
+
connect() {
|
12
|
+
this.socket = this.intializeSocket(this, this.consumer);
|
13
|
+
this._isConnecting = false;
|
14
|
+
}
|
15
|
+
|
16
|
+
reconnect() {
|
17
|
+
if (!this._isConnecting) {
|
18
|
+
setTimeout(this.connect.bind(this), 3000);
|
19
|
+
this._isConnecting = true;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
processMessage(message) {
|
24
|
+
this.consumer.process(message);
|
25
|
+
}
|
26
|
+
|
27
|
+
isOpen() {
|
28
|
+
return this.socket.readyState === this.OPEN;
|
29
|
+
}
|
30
|
+
|
31
|
+
intializeSocket(self, consumer) {
|
32
|
+
const socket = new WebSocket(consumer.url);
|
33
|
+
|
34
|
+
socket.onopen = function () {
|
35
|
+
const message = {
|
36
|
+
command: "subscribe",
|
37
|
+
identifier: JSON.stringify({
|
38
|
+
channel: consumer.channel,
|
39
|
+
chat_id: consumer.chatId,
|
40
|
+
}),
|
41
|
+
};
|
42
|
+
socket.send(JSON.stringify(message));
|
43
|
+
};
|
44
|
+
|
45
|
+
socket.onclose = function () {
|
46
|
+
self.reconnect();
|
47
|
+
};
|
48
|
+
|
49
|
+
socket.onmessage = function (event) {
|
50
|
+
const messageData = (event.data && JSON.parse(event.data)) || {};
|
51
|
+
if (messageData.type === "ping" || !messageData.message) {
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
const message = messageData.message;
|
55
|
+
|
56
|
+
self.processMessage(message);
|
57
|
+
};
|
58
|
+
|
59
|
+
socket.onerror = function (error) {
|
60
|
+
console.log(error);
|
61
|
+
self.reconnect();
|
62
|
+
};
|
63
|
+
|
64
|
+
return socket;
|
65
|
+
}
|
66
|
+
}
|
data/doc/CHANGELOG
CHANGED
@@ -4,6 +4,12 @@ Redmine UP gem - general functions for plugins (tags, vote, viewing, currency)
|
|
4
4
|
Copyright (C) 2011-2025 Kirill Bezrukov (RedmineUP)
|
5
5
|
https://www.redmineup.com/
|
6
6
|
|
7
|
+
== 2025-07-24 v1.1.0
|
8
|
+
|
9
|
+
* Added ActionCable methods
|
10
|
+
* Fixed Tags migration method
|
11
|
+
* Fixed svg icons for context menu
|
12
|
+
|
7
13
|
== 2025-07-09 v1.0.13
|
8
14
|
|
9
15
|
* Added color to Tag
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
module ActionCable
|
3
|
+
module Server
|
4
|
+
class RupConfiguration < ActionCable::Server::Configuration
|
5
|
+
|
6
|
+
def initialize(connection_klass: 'ActionCable::Connection::Base')
|
7
|
+
super()
|
8
|
+
|
9
|
+
@connection_class = -> { connection_klass.constantize }
|
10
|
+
@logger ||= ::Rails.logger
|
11
|
+
@disable_request_forgery_protection = true
|
12
|
+
end
|
13
|
+
|
14
|
+
def cable
|
15
|
+
@cable ||= { 'adapter' => detect_adapter_type }.with_indifferent_access
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def detect_adapter_type
|
21
|
+
ActionCable.server.config.cable ? (ActionCable.server.config.cable.fetch('adapter') { 'async' }) : 'async'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module ActionCable
|
2
|
+
module Server
|
3
|
+
class RupServer < ActionCable::Server::Base
|
4
|
+
attr_reader :config
|
5
|
+
|
6
|
+
def initialize(config: self.class.config)
|
7
|
+
@config = config
|
8
|
+
@mutex = Monitor.new
|
9
|
+
@remote_connections = @event_loop = @worker_pool = @pubsub = nil
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -87,6 +87,7 @@ module Redmineup
|
|
87
87
|
|
88
88
|
raise ArgumentError, "Table `#{table_name}' not found" unless self.connection.table_exists?(table_name)
|
89
89
|
|
90
|
+
self.table_name = table_name
|
90
91
|
unless self.connection.column_exists?(table_name, tag_column[:name])
|
91
92
|
self.connection.add_column table_name, tag_column[:name], tag_column[:type], default: tag_column[:default]
|
92
93
|
self.reset_column_information
|
@@ -5,7 +5,8 @@ module Redmineup
|
|
5
5
|
class ViewsLayoutsHook < Redmine::Hook::ViewListener
|
6
6
|
def view_layouts_base_html_head(_context = {})
|
7
7
|
stylesheet_link_tag(:calendars, plugin: 'redmineup') +
|
8
|
-
stylesheet_link_tag(:money, plugin: 'redmineup')
|
8
|
+
stylesheet_link_tag(:money, plugin: 'redmineup') +
|
9
|
+
javascript_include_tag(:consumer, plugin: 'redmineup')
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
@@ -11,7 +11,6 @@ module Redmineup
|
|
11
11
|
:sharing,
|
12
12
|
:default_project_version,
|
13
13
|
:start_date,
|
14
|
-
:due_date,
|
15
14
|
:estimated_hours,
|
16
15
|
:spent_hours,
|
17
16
|
:closed?,
|
@@ -28,7 +27,6 @@ module Redmineup
|
|
28
27
|
:to_s_with_project,
|
29
28
|
:shared?,
|
30
29
|
:deletable?,
|
31
|
-
:default_project_version,
|
32
30
|
:to_s,
|
33
31
|
to: :@version
|
34
32
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Redmineup
|
2
|
+
module Patches
|
3
|
+
module ActionCableBasePatch
|
4
|
+
def self.included(base)
|
5
|
+
base.send(:extend, ClassMethods)
|
6
|
+
delegate :rup_broadcast_to, to: :class
|
7
|
+
end
|
8
|
+
|
9
|
+
module ClassMethods
|
10
|
+
def rup_broadcast_to(klass, model, message)
|
11
|
+
ActionCable.rup_server(klass).broadcast(broadcasting_for(model), message)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
unless ActionCable::Channel::Base.included_modules.include?(Redmineup::Patches::ActionCableBasePatch)
|
19
|
+
ActionCable::Channel::Base.send(:include, Redmineup::Patches::ActionCableBasePatch)
|
20
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Redmineup
|
2
|
+
module Patches
|
3
|
+
module ActionCablePatch
|
4
|
+
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
module_function def rup_server(klass = nil)
|
8
|
+
@rup_servers ||= {}
|
9
|
+
return @rup_servers[klass] if @rup_servers[klass]
|
10
|
+
|
11
|
+
config = ActionCable::Server::RupConfiguration.new(connection_klass: klass)
|
12
|
+
@rup_servers[klass] = ActionCable::Server::RupServer.new(config: config)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
unless ActionCable.included_modules.include?(Redmineup::Patches::ActionCablePatch)
|
22
|
+
ActionCable.send(:include, Redmineup::Patches::ActionCablePatch)
|
23
|
+
end
|
@@ -7,7 +7,7 @@ module Redmineup
|
|
7
7
|
end
|
8
8
|
|
9
9
|
module InstanceMethods
|
10
|
-
def sprite_icon(icon_name, label = nil, icon_only: false, size: '18', css_class: nil, sprite: "icons", plugin: nil)
|
10
|
+
def sprite_icon(icon_name, label = nil, icon_only: false, size: '18', css_class: nil, sprite: "icons", plugin: nil, rtl: false)
|
11
11
|
label
|
12
12
|
end
|
13
13
|
end
|
data/lib/redmineup/version.rb
CHANGED
data/lib/redmineup.rb
CHANGED
@@ -54,10 +54,21 @@ module Redmineup
|
|
54
54
|
def self.plugin_installed?(plugin_id)
|
55
55
|
Rails.root.join("plugins/#{plugin_id}/init.rb").exist?
|
56
56
|
end
|
57
|
+
|
58
|
+
def self.cable_available?
|
59
|
+
Rails.version > '4.0'
|
60
|
+
end
|
57
61
|
end
|
58
62
|
|
59
63
|
require 'application_record' if !defined?(ApplicationRecord) && Rails.version < '7.2.2'
|
60
64
|
|
65
|
+
if Redmineup.cable_available?
|
66
|
+
require 'action_cable/server/rup_configuration'
|
67
|
+
require 'action_cable/server/rup_server'
|
68
|
+
require 'redmineup/patches/action_cable_base_patch'
|
69
|
+
require 'redmineup/patches/action_cable_patch'
|
70
|
+
end
|
71
|
+
|
61
72
|
if defined?(ActiveRecord::Base)
|
62
73
|
ActiveRecord::Base.send :include, Redmineup::ActsAsList::List
|
63
74
|
ActiveRecord::Base.extend(Redmineup::ActsAsVotable::Voter)
|
@@ -67,7 +67,7 @@ class VotableTest < ActiveSupport::TestCase
|
|
67
67
|
assert_equal votable.find_votes_for(:vote_scope => 'rank').size, 1
|
68
68
|
end
|
69
69
|
|
70
|
-
def
|
70
|
+
def test_two_votes_for_when_voting_on_two_diff_scopes_dup
|
71
71
|
votable.vote_by(:voter => voters(:voter), :vote => 'yes', :vote_scope => 'weekly_rank')
|
72
72
|
votable.vote_by(:voter => voters(:voter), :vote => 'yes', :vote_scope => 'monthly_rank')
|
73
73
|
assert_equal votable.votes_for.size, 2
|
@@ -404,7 +404,7 @@ class VotableTest < ActiveSupport::TestCase
|
|
404
404
|
assert_equal votable_cache.cached_scoped_test_votes_total, 1
|
405
405
|
end
|
406
406
|
|
407
|
-
def
|
407
|
+
def test_update_cached_total_votes_for_when_a_vote_up_is_removed_dup
|
408
408
|
votable_cache.vote_by(:voter => voter, :vote => 'true', :vote_scope => "test")
|
409
409
|
votable_cache.unvote(:voter => voter, :vote_scope => "test")
|
410
410
|
assert_equal votable_cache.cached_scoped_test_votes_total, 0
|
@@ -440,44 +440,44 @@ class VotableTest < ActiveSupport::TestCase
|
|
440
440
|
assert_equal votable_cache.cached_scoped_test_votes_score, 0
|
441
441
|
end
|
442
442
|
|
443
|
-
def
|
443
|
+
def test_update_cached_up_votes_for_if_there_is_an_up_vote_column_dup
|
444
444
|
votable_cache.cached_scoped_test_votes_up = 50
|
445
445
|
votable_cache.vote_by(:voter => voter, :vote_scope => "test")
|
446
446
|
votable_cache.vote_by(:voter => voter, :vote_scope => "test")
|
447
447
|
assert_equal votable_cache.cached_scoped_test_votes_up, 1
|
448
448
|
end
|
449
449
|
|
450
|
-
def
|
450
|
+
def test_update_cached_down_votes_for_if_there_is_a_down_vote_column_dup
|
451
451
|
votable_cache.cached_scoped_test_votes_down = 50
|
452
452
|
votable_cache.vote_by(:voter => voter, :vote => 'false', :vote_scope => "test")
|
453
453
|
assert_equal votable_cache.cached_scoped_test_votes_down, 1
|
454
454
|
end
|
455
455
|
|
456
|
-
def
|
456
|
+
def test_update_cached_up_votes_for_when_a_vote_up_is_removed_dup
|
457
457
|
votable_cache.vote_by :voter => voter, :vote => 'true', :vote_scope => "test"
|
458
458
|
votable_cache.unvote :voter => voter, :vote_scope => "test"
|
459
459
|
assert_equal votable_cache.cached_scoped_test_votes_up, 0
|
460
460
|
end
|
461
461
|
|
462
|
-
def
|
462
|
+
def test_update_cached_down_votes_for_when_a_vote_down_is_removed_dup
|
463
463
|
votable_cache.vote_by(:voter => voter, :vote => 'false', :vote_scope => "test")
|
464
464
|
votable_cache.unvote(:voter => voter, :vote_scope => "test")
|
465
465
|
assert_equal votable_cache.cached_scoped_test_votes_down, 0
|
466
466
|
end
|
467
467
|
|
468
|
-
def
|
468
|
+
def test_select_from_cached_total_votes_for_if_there_a_total_column_dup
|
469
469
|
votable_cache.vote_by(:voter => voter, :vote_scope => "test")
|
470
470
|
votable_cache.cached_scoped_test_votes_total = 50
|
471
471
|
assert_equal votable_cache.count_votes_total(false, "test"), 50
|
472
472
|
end
|
473
473
|
|
474
|
-
def
|
474
|
+
def test_select_from_cached_up_votes_for_if_there_is_an_up_vote_column_dup
|
475
475
|
votable_cache.vote_by(:voter => voter, :vote_scope => "test")
|
476
476
|
votable_cache.cached_scoped_test_votes_up = 50
|
477
477
|
assert_equal votable_cache.count_votes_up(false, "test"), 50
|
478
478
|
end
|
479
479
|
|
480
|
-
def
|
480
|
+
def test_select_from_cached_down_votes_for_if_there_is_a_down_vote_column_dup
|
481
481
|
votable_cache.vote_by(:voter => voter, :vote => 'false', :vote_scope => "test")
|
482
482
|
votable_cache.cached_scoped_test_votes_down = 50
|
483
483
|
assert_equal votable_cache.count_votes_down(false, "test"), 50
|
@@ -188,7 +188,7 @@ class VoterTest < ActiveSupport::TestCase
|
|
188
188
|
end
|
189
189
|
|
190
190
|
# describe '#find_up_voted_items
|
191
|
-
def
|
191
|
+
def test_returns_objects_that_a_user_has_upvoted_for_dup
|
192
192
|
votable.vote_by(:voter => voter)
|
193
193
|
votables(:votable2).vote_by :voter => voters(:voter2)
|
194
194
|
assert voter.find_up_voted_items.include? votable
|
@@ -197,7 +197,7 @@ class VoterTest < ActiveSupport::TestCase
|
|
197
197
|
assert_equal voter.find_liked_items.size, 1
|
198
198
|
end
|
199
199
|
|
200
|
-
def
|
200
|
+
def test_returns_objects_that_a_user_has_upvoted_for_using_scope_dup
|
201
201
|
votable.vote_by(:voter => voter, :vote_scope => 'rank')
|
202
202
|
votables(:votable2).vote_by(:voter => voters(:voter2), :vote_scope => 'rank')
|
203
203
|
assert voter.find_up_voted_items(:vote_scope => 'rank').include? votable
|
@@ -226,7 +226,7 @@ class VoterTest < ActiveSupport::TestCase
|
|
226
226
|
assert_equal voter.find_down_voted_items(:vote_scope => 'rank').size, 0
|
227
227
|
end
|
228
228
|
|
229
|
-
def
|
229
|
+
def test_returns_objects_that_a_user_has_downvoted_for_dup
|
230
230
|
votable.vote_down voter
|
231
231
|
votables(:votable2).vote_down voters(:voter2)
|
232
232
|
assert voter.find_down_voted_items.include? votable
|
@@ -235,7 +235,7 @@ class VoterTest < ActiveSupport::TestCase
|
|
235
235
|
assert_equal voter.find_disliked_items.size, 1
|
236
236
|
end
|
237
237
|
|
238
|
-
def
|
238
|
+
def test_returns_objects_that_a_user_has_downvoted_for_using_scope_dup
|
239
239
|
votable.vote_down voter, :vote_scope => 'rank'
|
240
240
|
votables(:votable2).vote_down voters(:voter2), :vote_scope => 'rank'
|
241
241
|
assert voter.find_down_voted_items(:vote_scope => 'rank').include? votable
|
data/test/database.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
sqlite:
|
2
2
|
adapter: sqlite3
|
3
|
-
database:
|
3
|
+
database: ":memory:"
|
4
4
|
|
5
5
|
mysql:
|
6
6
|
adapter: mysql2
|
7
7
|
database: redmineup_test
|
8
8
|
username: root
|
9
9
|
password: password
|
10
|
-
host:
|
10
|
+
host: mysql
|
11
11
|
|
12
12
|
postgresql:
|
13
13
|
adapter: postgresql
|
14
14
|
database: redmineup_test
|
15
15
|
user: postgres
|
16
16
|
password: password
|
17
|
-
host:
|
17
|
+
host: postgres
|
@@ -17,9 +17,9 @@ module Redmineup
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_where_filter
|
20
|
-
assert_match '{"name"=>"two", "value"=>5}', @liquid_render.render("{{ objects_arr | where: 'name', 'two' }}")
|
21
|
-
assert_match '{"name"=>"one", "value"=>10}', @liquid_render.render("{{ objects_arr | where: 'value', 6, '>' }}")
|
22
|
-
assert_match '{"name"=>"one", "value"=>10}', @liquid_render.render("{{ objects_arr | where: 'name', 'on', 'match' }}")
|
20
|
+
assert_match ws('{"name"=>"two", "value"=>5}'), ws(@liquid_render.render("{{ objects_arr | where: 'name', 'two' }}"))
|
21
|
+
assert_match ws('{"name"=>"one", "value"=>10}'), ws(@liquid_render.render("{{ objects_arr | where: 'value', 6, '>' }}"))
|
22
|
+
assert_match ws('{"name"=>"one", "value"=>10}'), ws(@liquid_render.render("{{ objects_arr | where: 'name', 'on', 'match' }}"))
|
23
23
|
assert_match '3', @liquid_render.render("{{ objects_arr | where: 'value', '', 'any' | size }}")
|
24
24
|
assert_match '1', @liquid_render.render("{{ objects_arr | where: 'value', '', 'none' | size }}")
|
25
25
|
assert_match '2', @liquid_render.render("{{ issues.all | where: 'author.name', 'Jonathan', '==' | size }}")
|
@@ -27,5 +27,8 @@ module Redmineup
|
|
27
27
|
assert_match '0', @liquid_render.render("{{ issues.all | where: 'author.name', '', 'none' | size }}")
|
28
28
|
end
|
29
29
|
|
30
|
+
def ws(string)
|
31
|
+
string.delete(' ')
|
32
|
+
end
|
30
33
|
end
|
31
34
|
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.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RedmineUP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -109,6 +109,7 @@ extensions: []
|
|
109
109
|
extra_rdoc_files: []
|
110
110
|
files:
|
111
111
|
- ".gitignore"
|
112
|
+
- ".gitlab-ci.yml"
|
112
113
|
- Gemfile
|
113
114
|
- README.md
|
114
115
|
- Rakefile
|
@@ -117,6 +118,7 @@ files:
|
|
117
118
|
- app/assets/images/vcard.png
|
118
119
|
- app/assets/javascripts/Chart.bundle.min.js.bak
|
119
120
|
- app/assets/javascripts/chart.min.js
|
121
|
+
- app/assets/javascripts/consumer.js
|
120
122
|
- app/assets/javascripts/select2.js
|
121
123
|
- app/assets/javascripts/select2_helpers.js
|
122
124
|
- app/assets/stylesheets/calendars.css
|
@@ -125,7 +127,6 @@ files:
|
|
125
127
|
- app/controllers/redmineup_controller.rb
|
126
128
|
- app/views/redmineup/_money.html.erb
|
127
129
|
- app/views/redmineup/settings.html.erb
|
128
|
-
- bitbucket-pipelines.yml
|
129
130
|
- config/currency_iso.json
|
130
131
|
- config/locales/cs.yml
|
131
132
|
- config/locales/de.yml
|
@@ -135,6 +136,8 @@ files:
|
|
135
136
|
- config/routes.rb
|
136
137
|
- doc/CHANGELOG
|
137
138
|
- doc/LICENSE.txt
|
139
|
+
- lib/action_cable/server/rup_configuration.rb
|
140
|
+
- lib/action_cable/server/rup_server.rb
|
138
141
|
- lib/application_record.rb
|
139
142
|
- lib/redmineup.rb
|
140
143
|
- lib/redmineup/acts_as_draftable/draft.rb
|
@@ -178,6 +181,8 @@ files:
|
|
178
181
|
- lib/redmineup/liquid/filters/base.rb
|
179
182
|
- lib/redmineup/liquid/filters/colors.rb
|
180
183
|
- lib/redmineup/money_helper.rb
|
184
|
+
- lib/redmineup/patches/action_cable_base_patch.rb
|
185
|
+
- lib/redmineup/patches/action_cable_patch.rb
|
181
186
|
- lib/redmineup/patches/compatibility/application_controller_patch.rb
|
182
187
|
- lib/redmineup/patches/compatibility/routing_mapper_patch.rb
|
183
188
|
- lib/redmineup/patches/compatibility/sprite_patch.rb
|
data/bitbucket-pipelines.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# This is a sample build configuration for Ruby.
|
2
|
-
# Check our guides at https://confluence.atlassian.com/x/8r-5Mw for more examples.
|
3
|
-
# Only use spaces to indent your .yml configuration.
|
4
|
-
# -----
|
5
|
-
# You can specify a custom docker image from Docker Hub as your build environment.
|
6
|
-
|
7
|
-
pipelines:
|
8
|
-
default:
|
9
|
-
- parallel:
|
10
|
-
- step:
|
11
|
-
name: 2.4.1 ruby
|
12
|
-
image: ruby:2.4.1
|
13
|
-
script:
|
14
|
-
- sed -i "s/'sqlite3'/'sqlite3', '~> 1.3.6'/g" redmineup.gemspec
|
15
|
-
- sed -i "s/'mysql2'/'mysql2', '~> 0.4.0'/g" redmineup.gemspec
|
16
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'loofah', '~>2.19.1'/g" redmineup.gemspec
|
17
|
-
- bundle install
|
18
|
-
- bundle exec rake test DB=sqlite
|
19
|
-
- bundle exec rake test DB=postgresql
|
20
|
-
- bundle exec rake test DB=mysql
|
21
|
-
services:
|
22
|
-
- mysql
|
23
|
-
- postgres
|
24
|
-
- step:
|
25
|
-
name: 3.2.2 ruby
|
26
|
-
image: ruby:3.2.2
|
27
|
-
script:
|
28
|
-
- sed -i "s/'sqlite3'/'sqlite3', '~> 1.4.4'/g" redmineup.gemspec
|
29
|
-
- sed -i "s/'mysql2'/'mysql2', '~> 0.5.0'/g" redmineup.gemspec
|
30
|
-
- sed -i "s/'rubyzip'/'rubyzip'\n spec.add_runtime_dependency 'loofah', '~>2.19.1'/g" redmineup.gemspec
|
31
|
-
- bundle install
|
32
|
-
- bundle exec rake test DB=sqlite
|
33
|
-
- bundle exec rake test DB=postgresql
|
34
|
-
- bundle exec rake test DB=mysql
|
35
|
-
services:
|
36
|
-
- mysql
|
37
|
-
- postgres
|
38
|
-
|
39
|
-
definitions:
|
40
|
-
services:
|
41
|
-
mysql:
|
42
|
-
image: mysql:5.7
|
43
|
-
environment:
|
44
|
-
MYSQL_DATABASE: redmineup_test
|
45
|
-
MYSQL_ROOT_PASSWORD: password
|
46
|
-
postgres:
|
47
|
-
image: postgres
|
48
|
-
environment:
|
49
|
-
POSTGRES_DB: redmineup_test
|
50
|
-
POSTGRES_PASSWORD: password
|