redmine_crm 0.0.49 → 0.0.50

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
  SHA1:
3
- metadata.gz: 1d521ac72c4e9d6ba00dd20c9b6bd6d682a294df
4
- data.tar.gz: c307e86b5223bcf0580812bf7c57366c0175ba60
3
+ metadata.gz: 0db9ce68acb0514cc0652eb603284800851c5a2a
4
+ data.tar.gz: ba29da7491709f471cd6be83674fb70d73b7d710
5
5
  SHA512:
6
- metadata.gz: 659cc759af4c3dc2c5219c74c33db83f0e7d9051884a684cb0e86ca2ba91338c5bd7ef989d4ec1b34f91af4eea8d50292c77e87650607a7bf1223a98dd655db6
7
- data.tar.gz: 38a779b4da037c6bfc16dfc63f27698572fece725422659a92db835ead93e0796a0b525ea364a57558abbef0181e0edd089adbea6d4b5b354390df7dba4d27cf
6
+ metadata.gz: f6b1ff459d4b63a648703af6306ccc87c81278d83fc057ea911a849690565adf41b5e31096f966ab7b67195c55967721337fb6b72508ecb739c7c71bcaab7b06
7
+ data.tar.gz: 81b37a16be40aa4af841f63fe659a3b74c70977a36547fd73d375d523b1c8c9b6110500be48c5fb9a85055ba75c3ce46bf2aab5795a00edcea8b37270552ddcb
@@ -4,6 +4,10 @@ Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
4
4
  Copyright (C) 2011-2019 RedmineUP
5
5
  https://www.redmineup.com/
6
6
 
7
+ == 2019-11-18 v0.0.50
8
+
9
+ * Fixed bug with settings initialization
10
+
7
11
  == 2019-11-12 v0.0.49
8
12
 
9
13
  * Fixed settings compatibility bug
@@ -5,11 +5,8 @@ module RedmineCrm
5
5
  }.freeze
6
6
 
7
7
  class << self
8
- # Initialize settings before using with this method
9
- # @example
10
- # RedmineCrm::Settings.initialize_gem_settings
11
8
  def initialize_gem_settings
12
- return if Setting.respond_to?(:plugin_redmine_crm)
9
+ return if !Object.const_defined?('Setting') || Setting.respond_to?(:plugin_redmine_crm)
13
10
 
14
11
  if Setting.respond_to?(:define_setting)
15
12
  Setting.send(:define_setting, 'plugin_redmine_crm', 'default' => default_settings, 'serialized' => true)
@@ -24,6 +21,7 @@ module RedmineCrm
24
21
  setting.value
25
22
  end)
26
23
  end
24
+ @settings_initialized
27
25
  end
28
26
 
29
27
  # Use apply instead attrs assign because it can rewrite other attributes
@@ -32,10 +30,12 @@ module RedmineCrm
32
30
  end
33
31
 
34
32
  def values
33
+ initialize_gem_settings unless @settings_initialized
35
34
  Object.const_defined?('Setting') ? Setting.plugin_redmine_crm : {}
36
35
  end
37
36
 
38
37
  def [](value)
38
+ initialize_gem_settings unless @settings_initialized
39
39
  return Setting.plugin_redmine_crm[value] if Object.const_defined?('Setting')
40
40
 
41
41
  nil
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = '0.0.49'
2
+ VERSION = '0.0.50'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.49
4
+ version: 0.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedmineUP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-12 00:00:00.000000000 Z
11
+ date: 2019-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails