redmine_crm 0.0.36 → 0.0.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/README.md +160 -33
  4. data/Rakefile +3 -12
  5. data/bitbucket-pipelines.yml +20 -6
  6. data/doc/CHANGELOG +5 -0
  7. data/lib/redmine_crm.rb +5 -0
  8. data/lib/redmine_crm/acts_as_draftable/draft.rb +40 -0
  9. data/lib/redmine_crm/acts_as_draftable/rcrm_acts_as_draftable.rb +154 -0
  10. data/lib/redmine_crm/acts_as_taggable/rcrm_acts_as_taggable.rb +1 -1
  11. data/lib/redmine_crm/acts_as_viewed/rcrm_acts_as_viewed.rb +0 -1
  12. data/lib/redmine_crm/acts_as_votable/votable.rb +6 -10
  13. data/lib/redmine_crm/helpers/form_tag_helper.rb +31 -0
  14. data/lib/redmine_crm/money_helper.rb +0 -2
  15. data/lib/redmine_crm/version.rb +1 -1
  16. data/redmine_crm.gemspec +6 -1
  17. data/test/acts_as_draftable/draft_test.rb +29 -0
  18. data/test/acts_as_draftable/rcrm_acts_as_draftable_test.rb +185 -0
  19. data/test/acts_as_taggable/rcrm_acts_as_taggable_test.rb +9 -11
  20. data/test/acts_as_taggable/tag_list_test.rb +25 -29
  21. data/test/acts_as_taggable/tag_test.rb +58 -51
  22. data/test/acts_as_votable/rcrm_acts_as_votable_test.rb +6 -4
  23. data/test/acts_as_votable/rcrm_acts_as_voter_test.rb +7 -5
  24. data/test/acts_as_votable/votable_test.rb +1 -1
  25. data/test/database.yml +14 -18
  26. data/test/models/issue.rb +14 -0
  27. data/test/{fixtures → models}/news.rb +0 -0
  28. data/test/{fixtures → models}/project.rb +0 -0
  29. data/test/{fixtures → models}/user.rb +0 -0
  30. data/test/{fixtures → models}/vote_classes.rb +0 -20
  31. data/test/schema.rb +9 -1
  32. data/test/test_helper.rb +5 -57
  33. data/vendor/assets/javascripts/select2_helpers.js +39 -0
  34. metadata +75 -14
  35. data/test/fixtures/issue.rb +0 -22
  36. data/test/liquid/drops/liquid_test.rb +0 -52
@@ -1,22 +0,0 @@
1
- class Issue < ActiveRecord::Base
2
- rcrm_acts_as_taggable
3
- rcrm_acts_as_viewed
4
-
5
- belongs_to :project
6
- belongs_to :user
7
- belongs_to :author, :class_name => 'User'
8
- validates_presence_of :description
9
-
10
- scope :visible, lambda { where('1=1') }
11
-
12
- def save_without_validation
13
- save
14
- end
15
-
16
- def self.quote_value(value)
17
- connection.quote(value)
18
- end
19
- end
20
-
21
- class SpecialIssue < Issue
22
- end
@@ -1,52 +0,0 @@
1
- # require File.dirname(__FILE__) + '/../liquid_helper'
2
-
3
- # module RedmineCrm
4
- # class LiquidTest < ActiveSupport::TestCase
5
-
6
- # def test_user_drop
7
- # user = User.first
8
- # assert_match user.name, render("{{ user.name }}")
9
- # end
10
-
11
- # def test_users_drop
12
- # users_name = User.all.map(&:name)
13
- # rendered_text = render("{% for user in users %} {{user.name }} {% endfor %}")
14
- # users_name.each do |name|
15
- # assert_match name, rendered_text
16
- # end
17
- # end
18
-
19
- # def test_issue_drop
20
- # assert_match Issue.first.description, render("{{ issue.description }}")
21
- # end
22
-
23
- # def test_default_filter
24
- # user = User.first
25
- # user.name = nil
26
- # user.save
27
- # assert_match 'user', render("{{ user.name | default: 'user' }}")
28
- # end
29
-
30
- # private
31
-
32
- # def render(content)
33
- # assigns = {}
34
- # assigns['now'] = Time.now
35
- # assigns['today'] = Date.today.strftime(date_format)
36
- # assigns['user'] = Liquid::UserDrop.new(User.first)
37
- # assigns['users'] = Liquid::UsersDrop.new(User.all)
38
- # assigns['issue'] = Liquid::IssueDrop.new(Issue.first)
39
-
40
- # registers = {}
41
- # begin
42
- # ::Liquid::Template.parse(content).render(::Liquid::Context.new({}, assigns, registers)).html_safe
43
- # rescue => e
44
- # e.message
45
- # end
46
- # end
47
-
48
- # def date_format
49
- # '%d.%m.%Y'
50
- # end
51
- # end
52
- # end