redmine_nonproject_modules 0.3.1 → 0.3.6

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: cac35d44b2746a8c17b91fb736e51ba687efe35999cb897fceb6535e99071a75
4
- data.tar.gz: edd9ab896f725f414666429f33615b644151d6d52826d943a4f45afc8921327b
3
+ metadata.gz: 7b827cd77e67fee9c0bf6636c9fbdd45d445b0200577e13f0fe3a57c498609d2
4
+ data.tar.gz: ee8042246c66438b15ecd9ad60e2379770fb1372dd14d48fae560ee1dc4d0dec
5
5
  SHA512:
6
- metadata.gz: 25c6571aebc3f0aecbfa7ab0ce366f2918e3b92723298d83301f0e2fb596613c0b2a516a8d8449361e8ecc77777cc6b78350f2c1fa2c68261eea03c716205229
7
- data.tar.gz: 524ace81f94bbdae93279e192f4bde5b8e4d35e6f1dc87ffb3f6b37cd9d88d408c575aa9b86bf0182bac00f4eb62ee83576044084839dc1e3c23d850d08985f3
6
+ metadata.gz: 7c3c520e754c8bcd03c920688754b595a21dbc8734c1842caaf0126af43acb9c448786c195e3c318a720ac4361901c9db376aa5df188a61ab6c8e5e6186b1148
7
+ data.tar.gz: 2d5ba81effd14ffb7c55c0cb1f9b69dd5cf3bc25b95a392b9cdc7191f03115806e273f5017facd821d78c12e1e3f87b11bb5b8b9b76cb3342445cbabc21728ac
@@ -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,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.config.assets.precompile += %w[active_scaffold.css]
4
+ 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.1'
7
+ VERSION = '0.3.6'
8
8
  end
@@ -1,13 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- namespace :redmine_nonproject_modules do
4
- Rake::TestTask.new(test: 'db:test:prepare') do |t|
5
- plugin_root = ::File.dirname(::File.dirname(__dir__))
6
-
7
- t.description = 'Run plugin redmine_nonproject_modules\'s tests.'
8
- t.libs << 'test'
9
- t.test_files = FileList["#{plugin_root}/test/**/*_test.rb"]
10
- t.verbose = false
11
- t.warning = false
12
- end
13
- end
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.1
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
- - 0.3.1
7
+ - 0.3.6
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-29 00:00:00.000000000 Z
11
+ date: 2021-05-05 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
@@ -134,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
163
  - !ruby/object:Gem::Version
135
164
  version: '0'
136
165
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.7.7
166
+ rubygems_version: 3.0.9
139
167
  signing_key:
140
168
  specification_version: 4
141
169
  summary: Support to non-project modules.