redmine_crm 0.0.48 → 0.0.49

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: a1c034965196dbd50cc840b5655eadcbf75dab04
4
- data.tar.gz: fa59b69096a8810670a3aa90b5c6e76d3aa24b2d
3
+ metadata.gz: 1d521ac72c4e9d6ba00dd20c9b6bd6d682a294df
4
+ data.tar.gz: c307e86b5223bcf0580812bf7c57366c0175ba60
5
5
  SHA512:
6
- metadata.gz: 00fafa577fe756a6d0a4dfc6795816fe745bcf56a2ec0bb20fe15a6e76688d54439772b73ed425ebf4e8fadee90f5b9f92a76a6a3e5f42ef3be20a8ebd90ab73
7
- data.tar.gz: 1b087c66d055885d2d1720608526768c37a6cf9bfa62ac5b98c127c139f7ca6290859bc2a8abba0e06fc88a21d3e47da2b7cef8232724d3ccc214b383bfe695b
6
+ metadata.gz: 659cc759af4c3dc2c5219c74c33db83f0e7d9051884a684cb0e86ca2ba91338c5bd7ef989d4ec1b34f91af4eea8d50292c77e87650607a7bf1223a98dd655db6
7
+ data.tar.gz: 38a779b4da037c6bfc16dfc63f27698572fece725422659a92db835ead93e0796a0b525ea364a57558abbef0181e0edd089adbea6d4b5b354390df7dba4d27cf
@@ -2,14 +2,19 @@ class RedmineCrmController < ApplicationController
2
2
  layout 'admin'
3
3
 
4
4
  before_action :require_admin
5
- require_sudo_mode :settings
5
+ require_sudo_mode :settings if respond_to?(:require_sudo_mode)
6
6
 
7
7
  def settings
8
8
  @section = RedmineCrm::Settings::SECTIONS[params[:id]]
9
9
  return render_404 unless @section
10
10
 
11
11
  if request.post?
12
- setting = params[:settings] ? params[:settings].permit!.to_h : {}
12
+ setting =
13
+ if params[:settings].present?
14
+ params[:settings].respond_to?(:to_unsafe_hash) ? params[:settings].to_unsafe_hash : params[:settings]
15
+ else
16
+ {}
17
+ end
13
18
  RedmineCrm::Settings.apply = setting
14
19
  flash[:notice] = l(:notice_successful_update)
15
20
  redirect_to redmine_crm_settings_path(@section[:id])
data/doc/CHANGELOG CHANGED
@@ -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-12 v0.0.49
8
+
9
+ * Fixed settings compatibility bug
10
+
7
11
  == 2019-11-07 v0.0.48
8
12
 
9
13
  * Added global money setting
@@ -11,7 +11,19 @@ module RedmineCrm
11
11
  def initialize_gem_settings
12
12
  return if Setting.respond_to?(:plugin_redmine_crm)
13
13
 
14
- Setting.send(:define_setting, 'plugin_redmine_crm', { 'default' => default_settings, 'serialized' => true })
14
+ if Setting.respond_to?(:define_setting)
15
+ Setting.send(:define_setting, 'plugin_redmine_crm', 'default' => default_settings, 'serialized' => true)
16
+ elsif Setting.respond_to?(:available_settings)
17
+ Setting.available_settings['plugin_redmine_crm'] = { 'default' => default_settings, 'serialized' => true }
18
+ Setting.class.send(:define_method, 'plugin_redmine_crm', -> { Setting['plugin_redmine_crm'] })
19
+ Setting.class.send(:define_method, 'plugin_redmine_crm=', lambda do |val|
20
+ setting = find_or_default('plugin_redmine_crm')
21
+ setting.value = val || ''
22
+ @cached_settings['plugin_redmine_crm'] = nil
23
+ setting.save(validate: false)
24
+ setting.value
25
+ end)
26
+ end
15
27
  end
16
28
 
17
29
  # Use apply instead attrs assign because it can rewrite other attributes
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = '0.0.48'
2
+ VERSION = '0.0.49'
3
3
  end
data/redmine_crm.gemspec CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["support@redminecrm.com"]
11
11
  spec.summary = %q{Common libraries for RedmineUP plugins for Redmine}
12
12
  spec.description = %q{Common libraries for RedmineUP plugins (www.redmineup.com) for Redmine. Requered Redmine from http://redmine.org}
13
- spec.homepage = ""
14
- spec.license = "GPL2"
13
+ spec.homepage = "https://www.redmineup.com"
14
+ spec.license = "GPL-2.0"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
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.48
4
+ version: 0.0.49
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-07 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -189,9 +189,9 @@ files:
189
189
  - vendor/assets/javascripts/select2_helpers.js
190
190
  - vendor/assets/stylesheets/money.css
191
191
  - vendor/assets/stylesheets/select2.css
192
- homepage: ''
192
+ homepage: https://www.redmineup.com
193
193
  licenses:
194
- - GPL2
194
+ - GPL-2.0
195
195
  metadata: {}
196
196
  post_install_message:
197
197
  rdoc_options: []