redmineup 1.1.9 → 1.1.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c86106049672f932ee145ad768dbf9ccce8f561ffced214357d20f1c2e577ee4
4
- data.tar.gz: d699012b4145e17a61d2109011659a534370b591df1094be6c5327d53a8015e5
3
+ metadata.gz: ecb516fc8ae25a65558bec625b9603e7aacd7188d473e80b23eb27223050d2ac
4
+ data.tar.gz: 66e4cecc1aa21ab23211e51774fbd262840f5df3efdbb9bb355d20870d142909
5
5
  SHA512:
6
- metadata.gz: 1406f1686d0dc714580c3b107551a3e42d7270c2544c3bc207b1cc3aebee4eb70d55e861128d4006ded7ab02aff936d0ce9c6af469ec553a76047c5a5aeccb21
7
- data.tar.gz: 0e83683a821243bc8fcdbbb3470604459c4d064d6d71c41fc7292e7b6ce23b509bc1bbc3fe88053d7a26652d36b28a8679d163b257f86d8105947b1b348474eb
6
+ metadata.gz: 43bddd0b96c58e00fc4645476801b1792022bce7c13588dc99f00486f77f47031e0fce58a4b5fe41d11b3dfca899527d003f294e1030957662141042e96e6a71
7
+ data.tar.gz: 4164a606ad2a264bb4501d3ec773215b5396b7da7dcdbc58bb09adadae630875d14dc9bdf4d669749b391ce19ff620df38c204d6474f2785f465d1e7b461a0b7
@@ -1,76 +1,53 @@
1
1
  class activeCableConsumer {
2
- OPEN = 1;
3
-
4
2
  constructor(consumer) {
5
3
  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
- }
4
+ this.uuid = crypto.randomUUID();
5
+ this._connected = false;
6
+
7
+ const worker = new SharedWorker(
8
+ consumer.workerUrl || window.redmineupWorkerUrl,
9
+ );
10
+ this._port = worker.port;
11
+
12
+ this._port.onmessage = (e) => {
13
+ const { type, data } = e.data;
14
+ if (type === "connected") {
15
+ this._connected = true;
16
+ } else if (type === "disconnected") {
17
+ this._connected = false;
18
+ } else if (type === "message") {
19
+ this.processMessage(data);
20
+ }
21
+ this._port.postMessage({ type: "ack" });
22
+ };
15
23
 
16
- reconnect() {
17
- if (!this._isConnecting) {
18
- setTimeout(this.connect.bind(this), 3000);
19
- this._isConnecting = true;
20
- }
24
+ this._port.start();
25
+
26
+ this._port.postMessage({
27
+ type: "connect",
28
+ uuid: this.uuid,
29
+ data: {
30
+ url: consumer.url,
31
+ channel: consumer.channel,
32
+ chatId: consumer.chatId,
33
+ },
34
+ });
21
35
  }
22
36
 
23
37
  processMessage(message) {
24
38
  this.consumer.process(message);
25
39
  }
26
40
 
27
- send(data) {
28
- if (this.isOpen()) {
29
- this.socket.send(JSON.stringify(data));
30
- return true;
31
- } else {
32
- console.warn("WebSocket is not open");
33
- return false;
34
- }
35
- }
36
-
37
41
  isOpen() {
38
- return this.socket.readyState === this.OPEN;
42
+ return this._connected;
39
43
  }
40
44
 
41
- intializeSocket(self, consumer) {
42
- const socket = new WebSocket(consumer.url);
43
-
44
- socket.onopen = function () {
45
- const message = {
46
- command: "subscribe",
47
- identifier: JSON.stringify({
48
- channel: consumer.channel,
49
- chat_id: consumer.chatId,
50
- }),
51
- };
52
- socket.send(JSON.stringify(message));
53
- };
54
-
55
- socket.onclose = function () {
56
- self.reconnect();
57
- };
58
-
59
- socket.onmessage = function (event) {
60
- const messageData = (event.data && JSON.parse(event.data)) || {};
61
- if (messageData.type === "ping" || !messageData.message) {
62
- return;
63
- }
64
- const message = messageData.message;
65
-
66
- self.processMessage(message);
67
- };
68
-
69
- socket.onerror = function (error) {
70
- console.log(error);
71
- self.reconnect();
72
- };
45
+ send(data) {
46
+ this._port.postMessage({ type: "send", data });
47
+ return true;
48
+ }
73
49
 
74
- return socket;
50
+ disconnect() {
51
+ this._port.postMessage({ type: "disconnect" });
75
52
  }
76
53
  }
@@ -0,0 +1,199 @@
1
+ const connections = new Map();
2
+ const MAX_PENDING_ACK = 3;
3
+
4
+ self.onconnect = function (event) {
5
+ const clientPort = event.ports[0];
6
+ let clientUrl = null;
7
+ let clientUuid = null;
8
+ let channelIdentifier = null;
9
+
10
+ clientPort.onmessage = function (e) {
11
+ const { type, uuid, data } = e.data;
12
+
13
+ switch (type) {
14
+ case "connect": {
15
+ clientUuid = uuid;
16
+ clientUrl = data.url;
17
+ channelIdentifier = JSON.stringify({
18
+ channel: data.channel,
19
+ ...(data.chatId !== undefined && { chat_id: data.chatId }),
20
+ });
21
+
22
+ if (!connections.has(clientUrl)) {
23
+ connections.set(clientUrl, initSocketStruct());
24
+ }
25
+
26
+ const conn = connections.get(clientUrl);
27
+ const alreadySubscribed = hasChannelSubscribers(
28
+ conn,
29
+ channelIdentifier,
30
+ );
31
+
32
+ conn.clients.set(clientUuid, {
33
+ port: clientPort,
34
+ channelIdentifier,
35
+ pendingAck: 0,
36
+ });
37
+
38
+ if (!conn.socket || conn.socket.readyState > WebSocket.OPEN) {
39
+ initWebSocket(clientUrl);
40
+ } else if (
41
+ conn.socket.readyState === WebSocket.OPEN &&
42
+ !alreadySubscribed
43
+ ) {
44
+ sendSubscribe(conn.socket, channelIdentifier);
45
+ }
46
+ break;
47
+ }
48
+
49
+ case "send": {
50
+ if (clientUrl) {
51
+ const conn = connections.get(clientUrl);
52
+ if (
53
+ conn &&
54
+ conn.socket &&
55
+ conn.socket.readyState === WebSocket.OPEN
56
+ ) {
57
+ conn.socket.send(JSON.stringify(data));
58
+ }
59
+ }
60
+ break;
61
+ }
62
+
63
+ case "ack": {
64
+ if (clientUuid && clientUrl) {
65
+ const conn = connections.get(clientUrl);
66
+ if (conn) {
67
+ const client = conn.clients.get(clientUuid);
68
+ if (client) client.pendingAck = 0;
69
+ }
70
+ }
71
+ break;
72
+ }
73
+
74
+ case "disconnect": {
75
+ if (clientUuid && clientUrl) {
76
+ const conn = connections.get(clientUrl);
77
+ if (conn) {
78
+ conn.clients.delete(clientUuid);
79
+ const stillSubscribed = hasChannelSubscribers(
80
+ conn,
81
+ channelIdentifier,
82
+ );
83
+ if (
84
+ !stillSubscribed &&
85
+ conn.socket &&
86
+ conn.socket.readyState === WebSocket.OPEN
87
+ ) {
88
+ conn.socket.send(
89
+ JSON.stringify({
90
+ command: "unsubscribe",
91
+ identifier: channelIdentifier,
92
+ }),
93
+ );
94
+ }
95
+ if (conn.clients.size === 0) {
96
+ if (conn.socket) conn.socket.close();
97
+ connections.delete(clientUrl);
98
+ }
99
+ }
100
+ clientUuid = null;
101
+ clientUrl = null;
102
+ channelIdentifier = null;
103
+ }
104
+ break;
105
+ }
106
+ }
107
+ };
108
+
109
+ clientPort.start();
110
+ };
111
+
112
+ function sendSubscribe(socket, identifier) {
113
+ socket.send(JSON.stringify({ command: "subscribe", identifier }));
114
+ }
115
+
116
+ function initSocketStruct() {
117
+ return { socket: null, clients: new Map() };
118
+ }
119
+
120
+ function initWebSocket(url) {
121
+ const conn = connections.get(url);
122
+ if (!conn) return;
123
+
124
+ conn.socket = new WebSocket(url);
125
+
126
+ conn.socket.onopen = function () {
127
+ const seen = new Set();
128
+ for (const { channelIdentifier } of conn.clients.values()) {
129
+ if (!seen.has(channelIdentifier)) {
130
+ seen.add(channelIdentifier);
131
+ sendSubscribe(conn.socket, channelIdentifier);
132
+ }
133
+ }
134
+ };
135
+
136
+ conn.socket.onmessage = function (event) {
137
+ const messageData = (event.data && JSON.parse(event.data)) || {};
138
+
139
+ if (messageData.type === "confirm_subscription") {
140
+ routeToIdentifier(conn, messageData.identifier, { type: "connected" });
141
+ return;
142
+ }
143
+
144
+ if (messageData.type === "reject_subscription") {
145
+ routeToIdentifier(conn, messageData.identifier, { type: "rejected" });
146
+ return;
147
+ }
148
+
149
+ if (messageData.type === "ping" || !messageData.message) return;
150
+
151
+ routeToIdentifier(conn, messageData.identifier, {
152
+ type: "message",
153
+ data: messageData.message,
154
+ });
155
+ };
156
+
157
+ conn.socket.onclose = function () {
158
+ broadcastTo(conn, { type: "disconnected" });
159
+ setTimeout(function () {
160
+ if (connections.has(url)) initWebSocket(url);
161
+ }, 5000);
162
+ };
163
+
164
+ conn.socket.onerror = function (error) {
165
+ conn.socket.close();
166
+ };
167
+ }
168
+
169
+ function hasChannelSubscribers(conn, channelIdentifier) {
170
+ for (const client of conn.clients.values()) {
171
+ if (client.channelIdentifier === channelIdentifier) return true;
172
+ }
173
+ return false;
174
+ }
175
+
176
+ function routeToIdentifier(conn, identifier, message) {
177
+ console.log("routeToIdentifier:", identifier, message);
178
+ for (const [key, client] of conn.clients) {
179
+ if (client.channelIdentifier === identifier) {
180
+ if (client.pendingAck >= MAX_PENDING_ACK) {
181
+ conn.clients.delete(key);
182
+ continue;
183
+ }
184
+ client.pendingAck++;
185
+ client.port.postMessage(message);
186
+ }
187
+ }
188
+ }
189
+
190
+ function broadcastTo(conn, message) {
191
+ for (const [key, client] of conn.clients) {
192
+ if (client.pendingAck >= MAX_PENDING_ACK) {
193
+ conn.clients.delete(key);
194
+ continue;
195
+ }
196
+ client.pendingAck++;
197
+ client.port.postMessage(message);
198
+ }
199
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Really Simple Color Picker in jQuery
3
+ *
4
+ * Licensed under the MIT (MIT-LICENSE.txt) licenses.
5
+ *
6
+ * Copyright (c) 2008-2012
7
+ * Lakshan Perera (www.laktek.com) & Daniel Lacy (daniellacy.com)
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to
11
+ * deal in the Software without restriction, including without limitation the
12
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
13
+ * sell copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in
17
+ * all copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25
+ * IN THE SOFTWARE.
26
+ */(function(a){var b,c,d=0,e={control:a('<div class="colorPicker-picker">&nbsp;</div>'),palette:a('<div id="colorPicker_palette" class="colorPicker-palette" />'),swatch:a('<div class="colorPicker-swatch">&nbsp;</div>'),hexLabel:a('<label for="colorPicker_hex">Hex</label>'),hexField:a('<input type="text" id="colorPicker_hex" />')},f="transparent",g;a.fn.colorPicker=function(b){return this.each(function(){var c=a(this),g=a.extend({},a.fn.colorPicker.defaults,b),h=a.fn.colorPicker.toHex(c.val().length>0?c.val():g.pickerDefault),i=e.control.clone(),j=e.palette.clone().attr("id","colorPicker_palette-"+d),k=e.hexLabel.clone(),l=e.hexField.clone(),m=j[0].id,n,o;a.each(g.colors,function(b){n=e.swatch.clone(),g.colors[b]===f?(n.addClass(f).text("X"),a.fn.colorPicker.bindPalette(l,n,f)):(n.css("background-color","#"+this),a.fn.colorPicker.bindPalette(l,n)),n.appendTo(j)}),k.attr("for","colorPicker_hex-"+d),l.attr({id:"colorPicker_hex-"+d,value:h}),l.bind("keydown",function(b){if(b.keyCode===13){var d=a.fn.colorPicker.toHex(a(this).val());a.fn.colorPicker.changeColor(d?d:c.val())}b.keyCode===27&&a.fn.colorPicker.hidePalette()}),l.bind("keyup",function(b){var d=a.fn.colorPicker.toHex(a(b.target).val());a.fn.colorPicker.previewColor(d?d:c.val())}),a('<div class="colorPicker_hexWrap" />').append(k).appendTo(j),j.find(".colorPicker_hexWrap").append(l),g.showHexField===!1&&(l.hide(),k.hide()),a("body").append(j),j.hide(),i.css("background-color",h),i.bind("click",function(){c.is(":not(:disabled)")&&a.fn.colorPicker.togglePalette(a("#"+m),a(this))}),b&&b.onColorChange?i.data("onColorChange",b.onColorChange):i.data("onColorChange",function(){}),(o=c.data("text"))&&i.html(o),c.after(i),c.bind("change",function(){c.next(".colorPicker-picker").css("background-color",a.fn.colorPicker.toHex(a(this).val()))}),c.val(h);if(c[0].tagName.toLowerCase()==="input")try{c.attr("type","hidden")}catch(p){c.css("visibility","hidden").css("position","absolute")}else c.hide();d++})},a.extend(!0,a.fn.colorPicker,{toHex:function(a){if(a.match(/[0-9A-F]{6}|[0-9A-F]{3}$/i))return a.charAt(0)==="#"?a:"#"+a;if(!a.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/))return!1;var b=[parseInt(RegExp.$1,10),parseInt(RegExp.$2,10),parseInt(RegExp.$3,10)],c=function(a){if(a.length<2)for(var b=0,c=2-a.length;b<c;b++)a="0"+a;return a};if(b.length===3){var d=c(b[0].toString(16)),e=c(b[1].toString(16)),f=c(b[2].toString(16));return"#"+d+e+f}},checkMouse:function(d,e){var f=c,g=a(d.target).parents("#"+f.attr("id")).length;if(d.target===a(f)[0]||d.target===b[0]||g>0)return;a.fn.colorPicker.hidePalette()},hidePalette:function(){a(document).unbind("mousedown",a.fn.colorPicker.checkMouse),a(".colorPicker-palette").hide()},showPalette:function(c){var d=b.prev("input").val();c.css({top:b.offset().top+b.outerHeight(),left:b.offset().left}),a("#color_value").val(d),c.show(),a(document).bind("mousedown",a.fn.colorPicker.checkMouse)},togglePalette:function(d,e){e&&(b=e),c=d,c.is(":visible")?a.fn.colorPicker.hidePalette():a.fn.colorPicker.showPalette(d)},changeColor:function(c){b.css("background-color",c),b.prev("input").val(c).change(),a.fn.colorPicker.hidePalette(),b.data("onColorChange").call(b,a(b).prev("input").attr("id"),c)},previewColor:function(a){b.css("background-color",a)},bindPalette:function(c,d,e){e=e?e:a.fn.colorPicker.toHex(d.css("background-color")),d.bind({click:function(b){g=e,a.fn.colorPicker.changeColor(e)},mouseover:function(b){g=c.val(),a(this).css("border-color","#598FEF"),c.val(e),a.fn.colorPicker.previewColor(e)},mouseout:function(d){a(this).css("border-color","#000"),c.val(b.css("background-color")),c.val(g),a.fn.colorPicker.previewColor(g)}})}}),a.fn.colorPicker.defaults={pickerDefault:"FFFFFF",colors:["000000","993300","333300","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","999999","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFFF","99CCFF","FFFFFF"],addColors:[],showHexField:!0}})(jQuery);
@@ -474,3 +474,36 @@ ul.cal {
474
474
  .cal .week-number .label-week { display: inline; }
475
475
  .cal .calbody p.day-num { font-size: 1.1em; text-align: left; }
476
476
  }
477
+
478
+ /* Color picker */
479
+
480
+ div.colorPicker-picker {
481
+ height: 16px;
482
+ width: 16px;
483
+ padding: 0 !important;
484
+ border: 1px solid #ccc;
485
+ cursor: pointer;
486
+ line-height: 16px;
487
+ }
488
+
489
+ div.colorPicker-palette {
490
+ width: 200px;
491
+ position: absolute;
492
+ background-color: #fff;
493
+ border: 1px solid #ccc;
494
+ padding: 5px;
495
+ z-index: 9999;
496
+ }
497
+ div.colorPicker_hexWrap {width: 100%; float:left; padding: 5px;}
498
+ div.colorPicker_hexWrap label {font-size: 95%; color: #2F2F2F; margin: 5px 2px; width: 25%}
499
+ div.colorPicker_hexWrap input {font-size: 95%; width: 65%; }
500
+
501
+ div.colorPicker-swatch {
502
+ height: 16px;
503
+ width: 16px;
504
+ border: 1px solid #000;
505
+ margin: 2px;
506
+ float: left;
507
+ cursor: pointer;
508
+ line-height: 12px;
509
+ }
data/config/routes.rb CHANGED
@@ -4,4 +4,6 @@ Rails.application.routes.draw do
4
4
  match 'redmineup/settings/:id', to: 'redmineup#settings', as: 'redmineup_settings', via: [:get, :post]
5
5
  match 'auto_completes/taggable_tags' => 'auto_completes#taggable_tags',
6
6
  via: :get, as: 'auto_complete_taggable_tags'
7
+
8
+ mount ActionCable.rup_server => '/rup_cable', as: 'rup_cable' if Redmineup.cable_available?
7
9
  end
data/doc/CHANGELOG CHANGED
@@ -4,6 +4,15 @@ 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-06-26 v1.1.11
8
+
9
+ * Added shared workers for websocket connection
10
+
11
+ == 2026-06-04 v1.1.10
12
+
13
+ * Added colorpicker JS component to shared gem assets, loaded globally via `redmineup_assets`
14
+ * Fixed viewings table ip column limit to 45 characters for IPv6 address support
15
+
7
16
  == 2026-05-30 v1.1.9
8
17
 
9
18
  * Added `prices_formatted_collection` to `MoneyHelper` — returns plain text price strings from currency hash, used by query totals
@@ -0,0 +1,17 @@
1
+ module ActionCable
2
+ module Connection
3
+ class RupConnection < ActionCable::Connection::Base
4
+ identified_by :current_user
5
+
6
+ def connect
7
+ self.current_user = find_verified_user
8
+ end
9
+
10
+ private
11
+
12
+ def find_verified_user
13
+ User.find_by(id: @request.session[:user_id]) || User.anonymous
14
+ end
15
+ end
16
+ end
17
+ end
@@ -8,6 +8,10 @@ module ActionCable
8
8
  @mutex = Monitor.new
9
9
  @remote_connections = @event_loop = @worker_pool = @pubsub = nil
10
10
  end
11
+
12
+ def setup_heartbeat_timer
13
+ Rails.logger.info('Heartbeat timer disabled for RupServer')
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -235,7 +235,7 @@ module Redmineup
235
235
  t.column :viewer_id, :integer
236
236
  t.column :viewed_id, :integer
237
237
  t.column :viewed_type, :string
238
- t.column :ip, :string, :limit => '24'
238
+ t.column :ip, :string, :limit => '45'
239
239
  t.column :created_at, :datetime
240
240
  end
241
241
 
@@ -4,12 +4,14 @@ module Redmineup
4
4
 
5
5
  def redmineup_assets
6
6
  return if @redmineup_assets_included
7
-
7
+
8
8
  @redmineup_assets_included = true
9
9
  javascript_include_tag('consumer', plugin: GEM_NAME) +
10
10
  javascript_include_tag('select2', plugin: GEM_NAME) +
11
11
  javascript_include_tag('select2_helpers', plugin: GEM_NAME) +
12
- stylesheet_link_tag('redmineup', plugin: GEM_NAME)
12
+ javascript_include_tag('jquery.colorPicker.min', plugin: GEM_NAME) +
13
+ stylesheet_link_tag('redmineup', plugin: GEM_NAME) +
14
+ javascript_tag("window.redmineupWorkerUrl = #{asset_path('consumer_worker.js', plugin: GEM_NAME).to_json};")
13
15
  end
14
16
 
15
17
  def select2_assets
@@ -18,9 +20,9 @@ module Redmineup
18
20
 
19
21
  def chartjs_assets
20
22
  return if @chartjs_tag_included
23
+
21
24
  @chartjs_tag_included = true
22
25
  javascript_include_tag('chart.min', plugin: GEM_NAME)
23
26
  end
24
-
25
27
  end
26
28
  end
@@ -7,8 +7,15 @@ module Redmineup
7
7
  end
8
8
 
9
9
  module ClassMethods
10
- def rup_broadcast_to(klass, model, message)
11
- ActionCable.rup_server(klass).broadcast(broadcasting_for(model), message)
10
+ def rup_broadcast_to(*args)
11
+ # TODO: Remove to 2 args after plugins update
12
+ if args.length == 3
13
+ klass, model, message = args
14
+ ActionCable.rup_server(klass).broadcast(broadcasting_for(model), message)
15
+ else
16
+ model, message = args
17
+ ActionCable.rup_server.broadcast(broadcasting_for(model), message)
18
+ end
12
19
  end
13
20
  end
14
21
  end
@@ -1,10 +1,9 @@
1
1
  module Redmineup
2
2
  module Patches
3
3
  module ActionCablePatch
4
-
5
4
  def self.included(base)
6
5
  base.class_eval do
7
- module_function def rup_server(klass = nil)
6
+ module_function def rup_server(klass = 'ActionCable::Connection::RupConnection')
8
7
  @rup_servers ||= {}
9
8
  return @rup_servers[klass] if @rup_servers[klass]
10
9
 
@@ -14,10 +13,9 @@ module Redmineup
14
13
  end
15
14
  end
16
15
  end
17
-
18
16
  end
19
17
  end
20
18
 
21
19
  unless ActionCable.included_modules.include?(Redmineup::Patches::ActionCablePatch)
22
- ActionCable.send(:include, Redmineup::Patches::ActionCablePatch)
20
+ ActionCable.include Redmineup::Patches::ActionCablePatch
23
21
  end
@@ -1,3 +1,3 @@
1
1
  module Redmineup
2
- VERSION = '1.1.9'
2
+ VERSION = '1.1.11'
3
3
  end
data/lib/redmineup.rb CHANGED
@@ -66,6 +66,7 @@ require 'application_record' if !defined?(ApplicationRecord) && Rails.version <
66
66
  if Redmineup.cable_available?
67
67
  require 'action_cable/server/rup_configuration'
68
68
  require 'action_cable/server/rup_server'
69
+ require 'action_cable/connection/rup_connection'
69
70
  require 'redmineup/patches/action_cable_base_patch'
70
71
  require 'redmineup/patches/action_cable_patch'
71
72
  end
data/test/schema.rb CHANGED
@@ -150,7 +150,7 @@ ActiveRecord::Schema.define version: 0 do
150
150
  t.column :viewer_id, :integer
151
151
  t.column :viewed_id, :integer
152
152
  t.column :viewed_type, :string
153
- t.column :ip, :string, limit: '24'
153
+ t.column :ip, :string, limit: '45'
154
154
  t.column :created_at, :datetime
155
155
  end
156
156
  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.9
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedmineUP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-30 00:00:00.000000000 Z
11
+ date: 2026-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -119,6 +119,8 @@ files:
119
119
  - app/assets/javascripts/Chart.bundle.min.js.bak
120
120
  - app/assets/javascripts/chart.min.js
121
121
  - app/assets/javascripts/consumer.js
122
+ - app/assets/javascripts/consumer_worker.js
123
+ - app/assets/javascripts/jquery.colorPicker.min.js
122
124
  - app/assets/javascripts/select2.js
123
125
  - app/assets/javascripts/select2_helpers.js
124
126
  - app/assets/stylesheets/calendars.css
@@ -141,6 +143,7 @@ files:
141
143
  - doc/active-record-mixins.md
142
144
  - doc/assets-money-and-utilities.md
143
145
  - doc/tagging-and-select2.md
146
+ - lib/action_cable/connection/rup_connection.rb
144
147
  - lib/action_cable/server/rup_configuration.rb
145
148
  - lib/action_cable/server/rup_server.rb
146
149
  - lib/application_record.rb