redmine_crm 0.0.56 → 0.0.58

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
- SHA1:
3
- metadata.gz: 153c60f66d4c53d47d65468f86359268be877a69
4
- data.tar.gz: c2c8ad9b9e028b429f142aca1bc84a329071a966
2
+ SHA256:
3
+ metadata.gz: 81a0216d566bed679a6f87d2ce909333215908e2cdb61fdc4e1e20e220147ee2
4
+ data.tar.gz: 97490339fb9a5330be1a8928d00afeb5521592a407b4913ecea3b86ca22d7c40
5
5
  SHA512:
6
- metadata.gz: 1c3520707b176c33109e389a25145024d5e386f98bdc18a25a26af8595abe6ae598c639a4ef53da75bf23e7f582510d7c97bc038f7b350eda90d030dd85a3b7f
7
- data.tar.gz: a3c10fc13ca1ee1d4474cc349039ef67b26d5ea47ccefc71afb71c276b15063a5b7a290a498e9e1dc412592f6f190a65504bc66a769a5818686588749d3e652e
6
+ metadata.gz: 9b17257627ce09e285db95899e99dc9a6db1b7e240f0f81d1adb9e08033ea0347e1fc0b8df313fa39ddaecb7a717bd98e3e6320c723b22032e1222d59b1dd94c
7
+ data.tar.gz: 16d05fbc85c96c0cdfd07a87da14a9864a02201767beb6cbe47d5e52f641dce7b765b16191587ac7a1fef63778a0550b8af392876991b8dde47c12c8a603de72
@@ -19,26 +19,6 @@ pipelines:
19
19
  services:
20
20
  - mysql
21
21
  - postgres
22
- - step:
23
- name: Old ruby
24
- image: ruby:1.9.3
25
- script:
26
- - sed -i "s/'rails'/'rails'\n spec.add_runtime_dependency 'rake', '~> 11.2.0'/g" redmine_crm.gemspec
27
- - sed -i "s/'rails'/'rails'\n spec.add_runtime_dependency 'i18n', '~> 0.9.5'/g" redmine_crm.gemspec
28
- - sed -i "s/'rails'/'rails'\n spec.add_runtime_dependency 'nokogiri', '~> 1.6.8'/g" redmine_crm.gemspec
29
- - sed -i "s/'rails'/'rails', '~> 4.2.11'/g" redmine_crm.gemspec
30
- - sed -i "s/'sqlite3'/'sqlite3', '~> 1.3.6'/g" redmine_crm.gemspec
31
- - sed -i "s/'mysql2'/'mysql2', '~> 0.4.0'/g" redmine_crm.gemspec
32
- - sed -i "s/'pg'/'pg', '~> 0.18.0'/g" redmine_crm.gemspec
33
- - sed -i "s/^end/ spec.add_development_dependency 'minitest', '~> 5.11.3'\nend/g" redmine_crm.gemspec
34
- - sed -i "s/^end/ spec.add_development_dependency 'sprockets', '~> 3.5.2'\nend/g" redmine_crm.gemspec
35
- - sed -i "s/^end/ spec.add_development_dependency 'thor', '~> 0.20.3'\nend/g" redmine_crm.gemspec
36
- - sed -i "s/'rubyzip'/'rubyzip', '~> 1.3.0'/g" redmine_crm.gemspec
37
- - bundle install
38
- - bundle exec rake test DB=sqlite
39
- - bundle exec rake test DB=mysql
40
- services:
41
- - mysql
42
22
 
43
23
  definitions:
44
24
  services:
data/doc/CHANGELOG CHANGED
@@ -4,6 +4,16 @@ Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
4
4
  Copyright (C) 2011-2022 RedmineUP
5
5
  https://www.redmineup.com/
6
6
 
7
+ == 2022-09-26 v0.0.58
8
+
9
+ * Added closed? method to Issue Drop
10
+ * Added blank issue for Time Entry
11
+ * Added helpdesk_ticket method for Issue Drop
12
+
13
+ == 2022-02-14 v0.0.57
14
+
15
+ * Fixed BigDecimal liquid bug for ruby > 2.6
16
+
7
17
  == 2022-02-14 v0.0.56
8
18
 
9
19
  * Added rcrm_acts_as_priceable
@@ -37,7 +37,7 @@ module RedmineCrm
37
37
  :subject,
38
38
  :description,
39
39
  :visible?,
40
- :open?,
40
+ :closed?,
41
41
  :start_date,
42
42
  :due_date,
43
43
  :overdue?,
@@ -146,6 +146,12 @@ module RedmineCrm
146
146
  end
147
147
  end
148
148
 
149
+ def helpdesk_ticket
150
+ return nil unless defined?(::HelpdeskTicketDrop)
151
+
152
+ @helpdesk_ticket ||= HelpdeskTicketDrop.new(@issue)
153
+ end
154
+
149
155
  def custom_field_values
150
156
  @issue.custom_field_values
151
157
  end
@@ -49,7 +49,7 @@ module RedmineCrm
49
49
  end
50
50
 
51
51
  def issue
52
- @issue ||= IssueDrop.new(@time_entry.issue)
52
+ @issue ||= IssueDrop.new(@time_entry.issue) unless @time_entry.issue.blank?
53
53
  end
54
54
 
55
55
  def activity
@@ -0,0 +1,33 @@
1
+ module RedmineCrm
2
+ module Patches
3
+ module LiquidPatch
4
+ module StandardFilters
5
+
6
+ def self.included(base)
7
+ base.class_eval do
8
+
9
+ private
10
+
11
+ def to_number(obj)
12
+ case obj
13
+ when Float
14
+ BigDecimal(obj.to_s)
15
+ when Numeric
16
+ obj
17
+ when String
18
+ (obj.strip =~ /^\d+\.\d+$/) ? BigDecimal(obj) : obj.to_i
19
+ else
20
+ 0
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+ unless Liquid::StandardFilters.included_modules.include?(RedmineCrm::Patches::LiquidPatch::StandardFilters)
32
+ Liquid::StandardFilters.send(:include, RedmineCrm::Patches::LiquidPatch::StandardFilters)
33
+ end
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = '0.0.56'
2
+ VERSION = '0.0.58'
3
3
  end
data/lib/redmine_crm.rb CHANGED
@@ -43,6 +43,7 @@ require 'redmine_crm/helpers/form_tag_helper'
43
43
  require 'redmine_crm/assets_manager'
44
44
 
45
45
  require 'redmine_crm/compatibility/application_controller_patch'
46
+ require 'redmine_crm/patches/liquid_patch' unless BigDecimal.respond_to?(:new)
46
47
 
47
48
  module RedmineCrm
48
49
  GEM_NAME = 'redmine_crm'.freeze
data/redmine_crm.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
+ spec.required_ruby_version = ">= 2.0.0"
20
21
 
21
22
  spec.add_runtime_dependency 'rails'
22
23
  spec.add_runtime_dependency 'liquid', '< 2.6.4'
@@ -29,6 +29,10 @@ module RedmineCrm
29
29
  def test_issue_delegated
30
30
  assert_equal [@issue.id, @issue.subject, @issue.description].join('|'),
31
31
  @liquid_render.render('{{ issue.id }}|{{ issue.subject }}|{{ issue.description }}')
32
+
33
+ assert_not_equal @issue.subject, @liquid_render.render('{% if issue.closed? %}{{issue.subject}}{% endif %}')
34
+ @issue.closed = true
35
+ assert_equal @issue.subject, @liquid_render.render('{% if issue.closed? %}{{issue.subject}}{% endif %}')
32
36
  end
33
37
  end
34
38
  end
@@ -52,6 +52,10 @@ module RedmineCrm
52
52
  assert_equal '25', @liquid_render.render("{{24.11 | ceil }}")
53
53
  end
54
54
 
55
+ def test_big_decimal_filter_patch
56
+ assert_equal '2.8571', @liquid_render.render("{{ 20 | divided_by: 7.0 | round: 4 }}")
57
+ end
58
+
55
59
  def test_floor_filter
56
60
  assert_equal '24', @liquid_render.render("{{24.99 | floor }}")
57
61
  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.56
4
+ version: 0.0.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedmineUP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -157,6 +157,7 @@ files:
157
157
  - lib/redmine_crm/liquid/filters/base.rb
158
158
  - lib/redmine_crm/liquid/filters/colors.rb
159
159
  - lib/redmine_crm/money_helper.rb
160
+ - lib/redmine_crm/patches/liquid_patch.rb
160
161
  - lib/redmine_crm/settings.rb
161
162
  - lib/redmine_crm/settings/money.rb
162
163
  - lib/redmine_crm/version.rb
@@ -222,15 +223,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
223
  requirements:
223
224
  - - ">="
224
225
  - !ruby/object:Gem::Version
225
- version: '0'
226
+ version: 2.0.0
226
227
  required_rubygems_version: !ruby/object:Gem::Requirement
227
228
  requirements:
228
229
  - - ">="
229
230
  - !ruby/object:Gem::Version
230
231
  version: '0'
231
232
  requirements: []
232
- rubyforge_project:
233
- rubygems_version: 2.6.11
233
+ rubygems_version: 3.1.2
234
234
  signing_key:
235
235
  specification_version: 4
236
236
  summary: Common libraries for RedmineUP plugins for Redmine