redmine_plugin_kit 1.0.5 → 1.0.6

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: 8e0b142f30bff45473f37525cab7f17fb7eaa515b4edb0bd6d2c385c37693978
4
- data.tar.gz: da108a048156e659cf74942e187eadfcca81655e9d4285b3a346259de2898f6e
3
+ metadata.gz: e70a683a6d00229895f294f80c9e45b3418097776a8cdb1404861647d947be4a
4
+ data.tar.gz: 609059f357451defbd6c72a579de206f437fe53b5c582edbd2129999387ffe97
5
5
  SHA512:
6
- metadata.gz: b6f7a93ce509a493391e23a89564573edfec8969c69d0d7bef3172b04c52439463b9b8d486f83dca5879e5fdea38abad94322781f6a08e7b78b9295209a32608
7
- data.tar.gz: 96746fae6e4aacbc2646a6e18ebf500c22a017e7ce32cbbcf32e957ec437c20b736059449bd9d86d5a64521cde6ce8f7ab9ed23820d6a3aeef0c2682514fef91
6
+ metadata.gz: c4d80378cc8c646323a895d3e440ba2c67d78757d9e4938b84ea2276d90dbc65d548686114c5a370eeccddbae8479f31ba58d1f13bddea84d389aa0198f96c05
7
+ data.tar.gz: 1a488d91d4d3b7d12c5c1dc653bd00191d055fb4fc576ff99b86d1fe2634fcc9373b5651f5abdb621a9356bcf29edafb41608ff56bf08ecfe15525d6789e55cf
@@ -11,6 +11,7 @@ module RedminePluginKit
11
11
  init_loader existing_loader
12
12
  raise "no loader for #{plugin_id}" if loader.nil?
13
13
 
14
+ setup_required_plugins
14
15
  setup
15
16
  end
16
17
 
@@ -37,6 +38,24 @@ module RedminePluginKit
37
38
 
38
39
  private
39
40
 
41
+ # rubocop: disable Style/RaiseArgs
42
+ def setup_required_plugins
43
+ return unless defined? self::REQUIRED_ALPHANODES_PLUGINS
44
+ raise 'VERSION missing for REQUIRED_ALPHANODES_PLUGINS' unless defined? self::VERSION
45
+
46
+ self::REQUIRED_ALPHANODES_PLUGINS.each do |required_plugin|
47
+ plugin = Redmine::Plugin.find required_plugin
48
+ unless self::VERSION.include? plugin.version
49
+ raise Redmine::PluginRequirementError.new "#{plugin_id} plugin requires #{required_plugin} plugin version #{self::VERSION}"
50
+ end
51
+ rescue Redmine::PluginNotFound
52
+ raise Redmine::PluginRequirementError.new "#{plugin_id} plugin requires the #{required_plugin} plugin." \
53
+ "Please install #{required_plugin} plugin (https://alphanodes.com/#{required_plugin.tr '-',
54
+ '_'})"
55
+ end
56
+ end
57
+ # rubocop: enable Style/RaiseArgs
58
+
40
59
  def init_loader(existing_loader)
41
60
  @loader = existing_loader
42
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RedminePluginKit
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_plugin_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - AlphaNodes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-29 00:00:00.000000000 Z
11
+ date: 2024-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -56,7 +56,6 @@ files:
56
56
  - lib/redmine_plugin_kit/plugin_base.rb
57
57
  - lib/redmine_plugin_kit/version.rb
58
58
  - lib/tasks/redmine_plugin_kit.rake
59
- - redmine_plugin_kit-1.0.4.gem
60
59
  homepage: https://github.com/alphanodes/redmine_plugin_kit
61
60
  licenses:
62
61
  - GPL-2.0
Binary file