fat_free_crm 0.16.0 → 0.16.1

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.

Potentially problematic release.


This version of fat_free_crm might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9ca7af735f0354a0fea14c54f2c91d86a3aacd3
4
- data.tar.gz: c06e91603c18ee7f5d38e6ce525382d83e9ad68b
3
+ metadata.gz: a4610b38a0c1f9e0ec425f23e3f3995bdc06e7d8
4
+ data.tar.gz: 74743c1df54cdd4b4c995e7ec25b1c91f9991c44
5
5
  SHA512:
6
- metadata.gz: c9eba700182f9b5044621e1acf9e75730c0dcfd7b3354f301580ae4038087b0ead46623eecafbff75dbf9d17ef1ba7e8f1f744545c45e9dbbb726c508131f233
7
- data.tar.gz: 0ef94a125840208ae7df9fc88d8bf485b259dd7a897b8ac84e714c32181bc7a8a6273422a9caa6353cbcabab2f365a85d39a0ff58ae676b3da4b79ad7848e3fa
6
+ metadata.gz: 9c1a920b3272bc9295700f7045399a5aa2466e1793f109ad8fea89c6315e4f289cf8a9175794f7420072abc3ff9b99c14f5c90805d4d1bb71db3efce8f02aa38
7
+ data.tar.gz: 96fca95e2972efd06c4f5b7193e116b41da01d490376db4577875ccaee0c69f1760dde032859958357e851042342472c85b2f6b20cb3cbb27eb8a5853bc264fa
@@ -4,6 +4,10 @@ It does not matter how slowly you go as long as you do not stop.
4
4
  First they ignore you, then they laugh at you, then they fight you,
5
5
  then you win. –- Mahatma Gandhi
6
6
 
7
+ Sat Jan 6, 2018 (0.16.1)
8
+ ---------------------------------------------------------------------
9
+ - #653 Fix regression with emails
10
+
7
11
  Fri Jan 5, 2018 (0.16.0)
8
12
  ---------------------------------------------------------------------
9
13
  - #633 Upgrade to rails 5.1.0
@@ -42,16 +42,13 @@ class Email < ActiveRecord::Base
42
42
  state == "Collapsed"
43
43
  end
44
44
 
45
- module BodyWithTextile
46
- def body
47
- if defined?(RedCloth)
48
- RedCloth.new(super).to_html
49
- else
50
- super.to_s.gsub("\n", "<br/>")
51
- end
52
- end
45
+ def body_html
46
+ body.to_s.gsub("\n", "<br>")
47
+ end
48
+
49
+ def body_inline
50
+ body.to_s.tr("\n", " ")
53
51
  end
54
- prepend BodyWithTextile
55
52
 
56
53
  ActiveSupport.run_load_hooks(:fat_free_crm_email, self)
57
54
  end
@@ -1,5 +1,5 @@
1
- - truncated = truncate(email.body_without_textile.to_s.gsub("\n", " "), :length => 125 - email.subject.to_s.size)
2
- - formatted = email.body
1
+ - truncated = truncate(email.body_inline, :length => 125 - email.subject.to_s.size)
2
+ - formatted = email.body_html
3
3
  - mediator = email.mediator
4
4
 
5
5
  %li.mail.highlight[email]
@@ -7,7 +7,7 @@ module FatFreeCRM
7
7
  module VERSION #:nodoc:
8
8
  MAJOR = 0
9
9
  MINOR = 16
10
- TINY = 0
10
+ TINY = 1
11
11
  PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -37,4 +37,15 @@ describe Email do
37
37
  it "should be valid" do
38
38
  expect(@email).to be_valid
39
39
  end
40
+
41
+ describe "body formatting" do
42
+ before(:each) do
43
+ @email.body = "this\n\nhas\nline breaks"
44
+ end
45
+
46
+ it "should render" do
47
+ expect(@email.body_html).to eq "this<br><br>has<br>line breaks"
48
+ expect(@email.body_inline).to eq "this has line breaks"
49
+ end
50
+ end
40
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_free_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dvorkin
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2018-01-05 00:00:00.000000000 Z
15
+ date: 2018-01-06 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails