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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 814d3dfc718b68bc5fe007744f2a692d11d4b1a9cbd2ee927a87ce50fa2567f8
4
- data.tar.gz: 5012e42e690df9bbcea7403a72b116e633e98dabcac7cadd18e3386c9511c3e1
3
+ metadata.gz: 396a22e1d265b3855dec3bed36c1b92c7020071a0fbe48f2a7fa6822059d9101
4
+ data.tar.gz: ff4d46618a70c7ef0d05b930a4a8e7dfb439345a3c6c14b1c0ff54306539b47b
5
5
  SHA512:
6
- metadata.gz: 9c20081f983fb4fcbe99dced67e283c7448294fd03a6667a867e7bf56e1aa49ec2660ad2449189c056972b069ea858960246fd7b54a6fe9b12a25ac309f6337d
7
- data.tar.gz: b896a7c1706015d050b178fa5faaa4d8c1d68cd0fa9a0bfc1bc6e7bbfa7df5867651ba58facb47389b8cae46802659b289fe969cedc5930d554e1c58a71e279b
6
+ metadata.gz: 3b4929a97f93fa27c9a05c2d1a4728ab703adc353a06120f795ac87edb1ba5a25b16e8b81c18a449aa4c42e2d1f02f8973b359d17a9c75bc961a740f1dd50d3e
7
+ data.tar.gz: 43461871444a719801d41107bd81ef1e1a9a9c9dfbed6507bcab0340e50679b9d0baab6315fd8ac6f8bd29d30267e4d52443da89810b944f783129a1cb926e72
@@ -1,12 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'virtus'
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)]
@@ -0,0 +1,2 @@
1
+ Rails.application.config.assets.precompile += %w( active_scaffold.css )
2
+ Rails.application.config.assets.precompile += %w( active_scaffold.js )
data/init.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_scaffold'
4
+ require 'jquery/rails'
4
5
 
5
6
  require 'redmine'
6
7
 
@@ -28,5 +28,5 @@ end
28
28
  unless ActionController::Base.included_modules.include?(
29
29
  RedmineNonprojectModules::Patches::ControllerPatch
30
30
  )
31
- ActionController::Base.send(:include, RedmineNonprojectModules::Patches::ControllerPatch)
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.send(:include, RedmineNonprojectModules::Patches::GroupPatch)
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 self.included(base)
8
- base.include(InstanceMethods)
9
- base.alias_method_chain :l, :active_scaffold
10
- end
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(:include, y) unless x.included_modules.include?(y)
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.send(
92
- :include, ::RedmineNonprojectModules::Patches::Redmine::MenuManagerMapperPatch
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.send(:include, RedmineNonprojectModules::Patches::UserPatch)
20
+ ::User.include RedmineNonprojectModules::Patches::UserPatch
21
21
  end
@@ -4,5 +4,5 @@ module RedmineNonprojectModules
4
4
  AUTHOR = 'Eduardo Henrique Bogoni'
5
5
  HOMEPAGE = 'https://github.com/esquilo-azul/redmine_nonproject_modules'
6
6
  SUMMARY = 'Support to non-project modules.'
7
- VERSION = '0.3.0'
7
+ VERSION = '0.3.5'
8
8
  end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'redmine_plugins_helper/plugin_rake_task'
4
+ ::RedminePluginsHelper::PluginRakeTask.register(:redmine_nonproject_modules, :test)
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.0
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
- - 0.3.0
7
+ - 0.3.5
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-27 00:00:00.000000000 Z
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: activemodel-associations
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: '0'
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: '0'
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.10'
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.10'
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: 0.10.1
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
- rubyforge_project:
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.