redmineup 1.0.12 → 1.0.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00b24f399a84ad8b507bc4bd261e4b239fd230d95df88b6144475e991774846d
|
4
|
+
data.tar.gz: 8b7e6f842158fb6940443adb06f83b5314ecef5507acc9a1f4741aaf3c40b1ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f34aff4d6d617d695e0ef78697a410b8b09a8bcbdc44d5a1e6fb3dfbdfc6577cbb99eaad438cbd25124b41b10e151af0d3cb9d78fb8f9cb7a757cd1a1aef307c
|
7
|
+
data.tar.gz: a53558cb49f37db3377b33e1bd66689561f6df8a4d9529118dc2a2d523ff1b20270808d411b81cbdbf95283b14e91c90ee3d06f923440a2f1de0b444bd131fd0
|
data/doc/CHANGELOG
CHANGED
@@ -29,6 +29,14 @@ module Redmineup
|
|
29
29
|
read_attribute(:count).to_i
|
30
30
|
end
|
31
31
|
|
32
|
+
def color
|
33
|
+
return ('#' + "%06x" % super) unless super.nil?
|
34
|
+
end
|
35
|
+
|
36
|
+
def color=(color)
|
37
|
+
write_attribute(:color, color.from(1).hex) unless color.blank?
|
38
|
+
end
|
39
|
+
|
32
40
|
class << self
|
33
41
|
# Calculate the tag counts for all tags.
|
34
42
|
# :start_at - Restrict the tags to those created after a certain time
|
@@ -82,7 +82,7 @@ module Redmineup
|
|
82
82
|
#
|
83
83
|
# E.g.: ActiveRecord::Base.add_tags_column(:tags, name: :color, type: :string, default: nil)
|
84
84
|
def add_tags_column(table_name = :tags, **options)
|
85
|
-
tag_column = options || { name: :color, type: :
|
85
|
+
tag_column = options || { name: :color, type: :int, default: nil }
|
86
86
|
tag_column.assert_valid_keys(:name, :type, :default)
|
87
87
|
|
88
88
|
raise ArgumentError, "Table `#{table_name}' not found" unless self.connection.table_exists?(table_name)
|
data/lib/redmineup/version.rb
CHANGED
@@ -34,12 +34,15 @@ class TagTest < ActiveSupport::TestCase
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def test_color
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
colors = %w(#aaaaaa #bbbbbb)
|
38
|
+
colorized = [tags(:bug), tags(:feature)]
|
39
|
+
colorized.each do |tag|
|
40
|
+
assert_equal colors.include?(tag.color), true
|
41
|
+
end
|
42
|
+
|
43
|
+
not_colorized = [tags(:error), tags(:question)]
|
44
|
+
not_colorized.each do |tag|
|
45
|
+
assert_nil tag.color
|
43
46
|
end
|
44
47
|
end
|
45
48
|
|
data/test/fixtures/tags.yml
CHANGED
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.0.13
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|