redmineup 1.1.5 → 1.1.7

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: 9c4e8d46bd4c3ebd697d05c40fc8900740776edfdc51ec30752a6494a8d98507
4
- data.tar.gz: d4415eb58846ecf74a3b810f6db81a682f56f2ee482b600ba39d89fbc977f1d1
3
+ metadata.gz: 6f8f8df6b0546cd2b666a238c013c600b54d1fca8c9b68261673bc2256079c93
4
+ data.tar.gz: 5901b81ca53254bf78eab4de85be957647219886d6814b5dbb57ff0a30455aff
5
5
  SHA512:
6
- metadata.gz: 5f5211fe4abe7bb5fd64b352a7af46dd6b4626defdb749c8e63c75d7a37e156efec7367ded620aeb26721d5ca2138eb39c9f5f95d6ddeaced3e0aa6613933858
7
- data.tar.gz: f914518e862acb09d5355c672e08f62e997f8d839f33c480b072f423c1f9070916726c5e83bf9d51250a84930e7c0108ad404453cc9b2e2d146a7e338390f01e
6
+ metadata.gz: f10631319aab3f2ed797cbdb0d9c91f6f9f079cb9f7215c769b5e8416951b2d127ae2173209e2ec098d409a211ac255551e1b5b31fa9ea7c7fdc6fe40ce6dff1
7
+ data.tar.gz: af16c6904f761b0db76bbc6b3d5ee6a4e4488ca492fbec79fe6f60fc9ea0ef651e61c25845f23ae79e64c312a319adddb3f30c41e2d60ccf74bf12f7733c9c40
data/doc/CHANGELOG CHANGED
@@ -4,6 +4,14 @@ 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-04-18 v1.1.7
8
+
9
+ * hot fix for atom/rss compatibility for redmine < 5
10
+
11
+ == 2026-04-17 v1.1.6
12
+
13
+ * Added helpers for timezone conversions
14
+
7
15
  == 2026-04-17 v1.1.5
8
16
 
9
17
  * Added tag cloud links helper with URL convention by key
@@ -142,7 +142,7 @@ module Redmineup
142
142
  scope = scope.where("#{table_name}.project_id IN (%s)", projects.map(&:id).join(','))
143
143
  end
144
144
 
145
- if options[:name_like]
145
+ if options[:name_like].present?
146
146
  scope = scope.where("LOWER(#{Tag.table_name}.name) LIKE LOWER(?)", "%#{options[:name_like]}%")
147
147
  end
148
148
 
@@ -0,0 +1,23 @@
1
+ module Redmineup
2
+ module DatetimeHelper
3
+ def convert_time_to_user_timezone(time)
4
+ if User.current.time_zone
5
+ time.in_time_zone(User.current.time_zone)
6
+ else
7
+ time.utc? ? time.localtime : time
8
+ end
9
+ end
10
+
11
+ def convert_time_to_utc(time = Time.now)
12
+ return Time.now.utc if time.blank?
13
+ return time.utc if time.respond_to?(:utc)
14
+
15
+ time_zone = User.current.time_zone
16
+ return Time.parse(time).utc unless time_zone
17
+
18
+ Time.use_zone(time_zone) do
19
+ Time.zone.parse(time).utc
20
+ end
21
+ end
22
+ end
23
+ end
@@ -2,12 +2,12 @@ module Redmineup
2
2
  module Patches
3
3
  module AutoCompletesControllerPatch
4
4
  DEFAULT_TAGS_LIMIT = 10
5
-
6
- def taggable_tags
7
5
 
6
+ def taggable_tags
8
7
  limit = params.delete(:limit) || DEFAULT_TAGS_LIMIT
9
8
  klass = Object.const_get(params[:taggable_type].camelcase) if params[:taggable_type].present?
10
- tags = klass && klass.available_tags(params.merge(limit: limit)) || Redmineup::ActsAsTaggable::Tag.limit(limit)
9
+
10
+ tags = klass && klass.available_tags(params.merge(limit: limit, name_like: params[:q])) || Redmineup::ActsAsTaggable::Tag.limit(limit)
11
11
  render json: tags.map { |tag| { id: tag.name, text: tag.name } }
12
12
  end
13
13
  end
@@ -16,4 +16,4 @@ end
16
16
 
17
17
  unless AutoCompletesController.included_modules.include?(Redmineup::Patches::AutoCompletesControllerPatch)
18
18
  AutoCompletesController.include(Redmineup::Patches::AutoCompletesControllerPatch)
19
- end
19
+ end
@@ -16,6 +16,6 @@ module Redmineup
16
16
  end
17
17
  end
18
18
 
19
- unless ActionDispatch::Routing::Mapper.included_modules.include?(Redmineup::Patches::Compatibility::UserPatch)
20
- ActionDispatch::Routing::Mapper.send(:include, Redmineup::Patches::Compatibility::UserPatch)
21
- end
19
+ unless User.included_modules.include?(Redmineup::Patches::Compatibility::UserPatch)
20
+ User.send(:include, Redmineup::Patches::Compatibility::UserPatch)
21
+ end
@@ -1,3 +1,3 @@
1
1
  module Redmineup
2
- VERSION = '1.1.5'
2
+ VERSION = '1.1.7'
3
3
  end
data/lib/redmineup.rb CHANGED
@@ -44,6 +44,7 @@ require 'redmineup/liquid/drops/custom_field_enumeration_drop'
44
44
  require 'redmineup/helpers/external_assets_helper'
45
45
  require 'redmineup/helpers/form_tag_helper'
46
46
  require 'redmineup/helpers/calendars_helper'
47
+ require 'redmineup/helpers/datetime_helper'
47
48
  require 'redmineup/assets_manager'
48
49
 
49
50
  require 'redmineup/patches/liquid_patch'
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.5
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedmineUP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-17 00:00:00.000000000 Z
11
+ date: 2026-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -167,6 +167,7 @@ files:
167
167
  - lib/redmineup/currency/loader.rb
168
168
  - lib/redmineup/engine.rb
169
169
  - lib/redmineup/helpers/calendars_helper.rb
170
+ - lib/redmineup/helpers/datetime_helper.rb
170
171
  - lib/redmineup/helpers/external_assets_helper.rb
171
172
  - lib/redmineup/helpers/form_tag_helper.rb
172
173
  - lib/redmineup/helpers/tags_helper.rb