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 +4 -4
- data/CHANGELOG.md +4 -0
- data/app/models/polymorphic/email.rb +6 -9
- data/app/views/emails/_email.html.haml +2 -2
- data/lib/fat_free_crm/version.rb +1 -1
- data/spec/models/polymorphic/email_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4610b38a0c1f9e0ec425f23e3f3995bdc06e7d8
|
4
|
+
data.tar.gz: 74743c1df54cdd4b4c995e7ec25b1c91f9991c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c1a920b3272bc9295700f7045399a5aa2466e1793f109ad8fea89c6315e4f289cf8a9175794f7420072abc3ff9b99c14f5c90805d4d1bb71db3efce8f02aa38
|
7
|
+
data.tar.gz: 96fca95e2972efd06c4f5b7193e116b41da01d490376db4577875ccaee0c69f1760dde032859958357e851042342472c85b2f6b20cb3cbb27eb8a5853bc264fa
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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.
|
2
|
-
- formatted = email.
|
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]
|
data/lib/fat_free_crm/version.rb
CHANGED
@@ -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.
|
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-
|
15
|
+
date: 2018-01-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|