redmine_nonproject_modules 0.3.0 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/group_merge.rb +2 -14
- data/config/initializers/assets.rb +2 -0
- data/init.rb +1 -0
- data/lib/redmine_nonproject_modules/patches/controller_patch.rb +1 -1
- data/lib/redmine_nonproject_modules/patches/group_patch.rb +1 -1
- data/lib/redmine_nonproject_modules/patches/redmine/i18n_patch.rb +6 -13
- data/lib/redmine_nonproject_modules/patches/redmine/menu_manager_patch.rb +2 -2
- data/lib/redmine_nonproject_modules/patches/user_patch.rb +1 -1
- data/lib/redmine_nonproject_modules/version.rb +1 -1
- data/lib/tasks/redmine_nonproject_modules.rake +4 -0
- metadata +50 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 396a22e1d265b3855dec3bed36c1b92c7020071a0fbe48f2a7fa6822059d9101
|
4
|
+
data.tar.gz: ff4d46618a70c7ef0d05b930a4a8e7dfb439345a3c6c14b1c0ff54306539b47b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b4929a97f93fa27c9a05c2d1a4728ab703adc353a06120f795ac87edb1ba5a25b16e8b81c18a449aa4c42e2d1f02f8973b359d17a9c75bc961a740f1dd50d3e
|
7
|
+
data.tar.gz: 43461871444a719801d41107bd81ef1e1a9a9c9dfbed6507bcab0340e50679b9d0baab6315fd8ac6f8bd29d30267e4d52443da89810b944f783129a1cb926e72
|
data/app/models/group_merge.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
|
5
|
-
class GroupMerge
|
6
|
-
include ActiveModel::Model
|
7
|
-
include Virtus.model
|
8
|
-
include ActiveModel::Associations
|
3
|
+
require 'eac_rails_utils/models/tableless'
|
9
4
|
|
5
|
+
class GroupMerge < ::EacRailsUtils::Models::Tableless
|
10
6
|
ONLY_ON_TARGET = :only_on_target
|
11
7
|
ONLY_ON_SOURCE = :only_on_source
|
12
8
|
ON_BOTH = :on_both
|
@@ -19,14 +15,6 @@ class GroupMerge
|
|
19
15
|
validates :source, presence: true
|
20
16
|
validates :target, presence: true
|
21
17
|
|
22
|
-
def [](attr)
|
23
|
-
send(attr)
|
24
|
-
end
|
25
|
-
|
26
|
-
def []=(attr, value)
|
27
|
-
send("#{attr}=", value)
|
28
|
-
end
|
29
|
-
|
30
18
|
def to_merge_elements
|
31
19
|
(target_elements + source_elements).uniq.map do |x|
|
32
20
|
[x[0], element_on_status(x)]
|
data/init.rb
CHANGED
@@ -28,5 +28,5 @@ end
|
|
28
28
|
unless ActionController::Base.included_modules.include?(
|
29
29
|
RedmineNonprojectModules::Patches::ControllerPatch
|
30
30
|
)
|
31
|
-
ActionController::Base.
|
31
|
+
ActionController::Base.include RedmineNonprojectModules::Patches::ControllerPatch
|
32
32
|
end
|
@@ -23,5 +23,5 @@ module RedmineNonprojectModules
|
|
23
23
|
end
|
24
24
|
|
25
25
|
unless ::Group.included_modules.include?(RedmineNonprojectModules::Patches::GroupPatch)
|
26
|
-
::Group.
|
26
|
+
::Group.include RedmineNonprojectModules::Patches::GroupPatch
|
27
27
|
end
|
@@ -4,18 +4,11 @@ module RedmineNonprojectModules
|
|
4
4
|
module Patches
|
5
5
|
module Redmine
|
6
6
|
module I18nPatch
|
7
|
-
def
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
module InstanceMethods
|
13
|
-
def l_with_active_scaffold(*args)
|
14
|
-
if (args.first.is_a?(Time) || args.first.is_a?(Date)) && args.last.is_a?(Hash)
|
15
|
-
::I18n.l(args.first, args.last)
|
16
|
-
else
|
17
|
-
l_without_active_scaffold(*args)
|
18
|
-
end
|
7
|
+
def l(*args)
|
8
|
+
if (args.first.is_a?(Time) || args.first.is_a?(Date)) && args.last.is_a?(Hash)
|
9
|
+
::I18n.l(args.first, args.last)
|
10
|
+
else
|
11
|
+
super(*args)
|
19
12
|
end
|
20
13
|
end
|
21
14
|
end
|
@@ -26,4 +19,4 @@ end
|
|
26
19
|
x = ::Redmine::I18n
|
27
20
|
y = ::RedmineNonprojectModules::Patches::Redmine::I18nPatch
|
28
21
|
|
29
|
-
x.send(:
|
22
|
+
x.send(:prepend, y) unless x.included_modules.include?(y)
|
@@ -88,7 +88,7 @@ end
|
|
88
88
|
unless ::Redmine::MenuManager::Mapper.included_modules.include?(
|
89
89
|
::RedmineNonprojectModules::Patches::Redmine::MenuManagerMapperPatch
|
90
90
|
)
|
91
|
-
::Redmine::MenuManager::Mapper.
|
92
|
-
|
91
|
+
::Redmine::MenuManager::Mapper.include(
|
92
|
+
::RedmineNonprojectModules::Patches::Redmine::MenuManagerMapperPatch
|
93
93
|
)
|
94
94
|
end
|
@@ -17,5 +17,5 @@ module RedmineNonprojectModules
|
|
17
17
|
end
|
18
18
|
|
19
19
|
unless ::User.included_modules.include?(RedmineNonprojectModules::Patches::UserPatch)
|
20
|
-
::User.
|
20
|
+
::User.include RedmineNonprojectModules::Patches::UserPatch
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_nonproject_modules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- 0.3.
|
7
|
+
- 0.3.5
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_scaffold
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.5'
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 3.5.4
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,43 +24,54 @@ dependencies:
|
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.5'
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 3.5.4
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
28
|
+
name: eac_rails_utils
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.12'
|
37
34
|
- - ">="
|
38
35
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
36
|
+
version: 0.12.2
|
40
37
|
type: :runtime
|
41
38
|
prerelease: false
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.12'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 0.12.2
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: eac_ruby_utils
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 0.10.1
|
53
|
+
version: '0.33'
|
57
54
|
type: :runtime
|
58
55
|
prerelease: false
|
59
56
|
version_requirements: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
58
|
- - "~>"
|
62
59
|
- !ruby/object:Gem::Version
|
63
|
-
version: '0.
|
64
|
-
|
60
|
+
version: '0.33'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: jquery-rails
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
65
66
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
67
|
+
version: '4.4'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '4.4'
|
67
75
|
- !ruby/object:Gem::Dependency
|
68
76
|
name: virtus
|
69
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,6 +86,26 @@ dependencies:
|
|
78
86
|
- - ">="
|
79
87
|
- !ruby/object:Gem::Version
|
80
88
|
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: eac_ruby_gem_support
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0.1'
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.1.2
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0.1'
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 0.1.2
|
81
109
|
description:
|
82
110
|
email:
|
83
111
|
executables: []
|
@@ -103,6 +131,7 @@ files:
|
|
103
131
|
- app/views/layouts/nonproject_modules.html.erb
|
104
132
|
- app/views/nonproject_modules/index.html.erb
|
105
133
|
- config/initializers/000_dependencies.rb
|
134
|
+
- config/initializers/assets.rb
|
106
135
|
- config/locales/en.yml
|
107
136
|
- config/locales/pt-BR.yml
|
108
137
|
- config/routes.rb
|
@@ -115,6 +144,7 @@ files:
|
|
115
144
|
- lib/redmine_nonproject_modules/patches/redmine/menu_manager_patch.rb
|
116
145
|
- lib/redmine_nonproject_modules/patches/user_patch.rb
|
117
146
|
- lib/redmine_nonproject_modules/version.rb
|
147
|
+
- lib/tasks/redmine_nonproject_modules.rake
|
118
148
|
homepage: https://github.com/esquilo-azul/redmine_nonproject_modules
|
119
149
|
licenses: []
|
120
150
|
metadata: {}
|
@@ -133,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
163
|
- !ruby/object:Gem::Version
|
134
164
|
version: '0'
|
135
165
|
requirements: []
|
136
|
-
|
137
|
-
rubygems_version: 2.7.7
|
166
|
+
rubygems_version: 3.0.8
|
138
167
|
signing_key:
|
139
168
|
specification_version: 4
|
140
169
|
summary: Support to non-project modules.
|