redmine_plugins_helper 0.6.2 → 0.6.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8b778dc63258e589ea70ef4777f2b06691c86f4dc7d365c999193f0c9497be0
|
4
|
+
data.tar.gz: 6f85cb75ff21351159866d2644dc6fa2ff81cf3d4680e41367c0391bb7414519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 661005f91a2de5ca60b04392399ae4dd206ff3b278b65e1f62da838b448c9d9bc71e33655bbb97dc4179e4a43fd3f1394b366a96ba644a35c54faf00d310a5e0
|
7
|
+
data.tar.gz: bbd2d6532010992d51d39be16d0aaa63fc6ce6fd9e7a844fa8524b0fd8f1789093a45bd012ca6f335d004f16785b592b030a805d30460d51e7a7a96e79af64d7
|
data/init.rb
CHANGED
@@ -13,6 +13,7 @@ end
|
|
13
13
|
|
14
14
|
Rails.configuration.to_prepare do
|
15
15
|
require_dependency 'redmine_plugins_helper/patches/redmine/plugin_patch'
|
16
|
+
require_dependency 'redmine_plugins_helper/patches/redmine/plugin_migration_context'
|
16
17
|
::Redmine::Plugin.registered_plugins.values.each(&:add_assets_paths)
|
17
18
|
::Redmine::Plugin.registered_plugins.values.each(&:load_initializers)
|
18
19
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'redmine/plugin'
|
4
|
+
|
5
|
+
module RedminePluginsHelper
|
6
|
+
module Patches
|
7
|
+
module Redmine
|
8
|
+
module PluginMigrationContextPatch
|
9
|
+
extend ActiveSupport::Concern
|
10
|
+
|
11
|
+
def get_all_versions
|
12
|
+
plugin.present? ? plugin.migrations : super
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def plugin
|
18
|
+
@plugin ||= begin
|
19
|
+
::Redmine::Plugin.registered_plugins.values.find do |plugin|
|
20
|
+
::File.join(plugin.directory, 'db', 'migrate') == migrations_paths
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
if ::Redmine::Plugin.const_defined?('MigrationContext')
|
30
|
+
::Redmine::Plugin::MigrationContext.prepend(
|
31
|
+
::RedminePluginsHelper::Patches::Redmine::PluginMigrationContextPatch
|
32
|
+
)
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_plugins_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- 0.6.
|
7
|
+
- 0.6.3
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass-rails
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- lib/redmine_plugins_helper/hooks/add_assets.rb
|
41
41
|
- lib/redmine_plugins_helper/migrate.rb
|
42
42
|
- lib/redmine_plugins_helper/migrations.rb
|
43
|
+
- lib/redmine_plugins_helper/patches/redmine/plugin_migration_context.rb
|
43
44
|
- lib/redmine_plugins_helper/patches/redmine/plugin_patch.rb
|
44
45
|
- lib/redmine_plugins_helper/patches/test_case_patch.rb
|
45
46
|
- lib/redmine_plugins_helper/settings.rb
|