wco_models 3.1.0.144 → 3.1.0.145

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
  SHA256:
3
- metadata.gz: 3ac3f962e8a2701de1e5f29148ad7baf1198615d3eae56984c5a2f10e4827723
4
- data.tar.gz: 712d87019f0cb104fd52c07ae7c36cecc6e8f00a1f84a3cf572483668fa9ceff
3
+ metadata.gz: b33246a107d7069cc1805c1caee3a3897d4d46debcd43b8895f1f9ade01bbb69
4
+ data.tar.gz: f86ddbc8f6d908421e30549059c398e06f70cdd10a30a856659bcc60253b3516
5
5
  SHA512:
6
- metadata.gz: 194877b762a6e20543f83584f1c9d686c28e10d8b63b71497b4f0ca3b49635236da90aecfd92abe36071214ee5b7de23053d3436f514360324164c6910fcd7bc
7
- data.tar.gz: dd9bdf1543a32b8c6a853c82d97d9bdcff8126ae5ee0f4b3c44e1c687f05f383c7da601699ba81ed622de10bd35f845a29caf62e3fd9755dcc4243258851e036
6
+ metadata.gz: b0e2dd7311c02468f60364f9ac0a3e8d23a3f23a631edaab4ea27464c4535b74603a23cb21e370d2a234bbda23c2c624167a86ee7bf61cd75693223df4283bc9
7
+ data.tar.gz: d60c0cc8b3cb816a0601017ed7fd8adba87f580205223c2f0c99c96ec793e1c7223d0dc0db3008d45598babc4bf246a6f1aab508ddd1b3d2f23234b461947466
@@ -52,28 +52,8 @@ class WcoEmail::ApplicationMailer < ActionMailer::Base
52
52
  rendered_str = @renderer.render_to_string("/wco_email/email_layouts/_#{@ctx.tmpl.layout}")
53
53
 
54
54
 
55
-
56
55
  rendered_subject = ERB.new( @ctx.subject ).result( @ctx.get_binding )
57
- if @ctx.lead.leadset.mangle_subject
58
- ## From: https://www.fileformat.info/info/unicode/char/a.htm
59
- ## From: https://stackoverflow.com/questions/7019034/utf-8-encoding-in-ruby-using-a-variable
60
- ## From: https://stackoverflow.com/questions/52654509/random-generate-a-valid-unicode-character-in-ruby
61
- ## latin
62
- # n1 = 0x192
63
- # n2 = 0x687
64
- ##
65
- ## weird punctuation
66
- # n1 = 0x133
67
- # n2 = 0x255
68
-
69
- # random_utf8 = Enumerator.new do |yielder|
70
- # loop do
71
- # yielder << ( rand(n2-n1)+n1 ).chr('UTF-8')
72
- # rescue RangeError
73
- # end
74
- # end
75
- # rendered_subject = "#{rendered_subject} #{ random_utf8.next }#{ random_utf8.next }"
76
-
56
+ if @ctx.lead.leadset.mangle_subject || @ctx.email_template.mangle_subject
77
57
  ## From: https://www.ascii-code.com/
78
58
  n1 = 33
79
59
  n2 = 64
@@ -0,0 +1,18 @@
1
+ ## From: https://www.fileformat.info/info/unicode/char/a.htm
2
+ ## From: https://stackoverflow.com/questions/7019034/utf-8-encoding-in-ruby-using-a-variable
3
+ ## From: https://stackoverflow.com/questions/52654509/random-generate-a-valid-unicode-character-in-ruby
4
+ ## latin
5
+ # n1 = 0x192
6
+ # n2 = 0x687
7
+ ##
8
+ ## weird punctuation
9
+ # n1 = 0x133
10
+ # n2 = 0x255
11
+
12
+ # random_utf8 = Enumerator.new do |yielder|
13
+ # loop do
14
+ # yielder << ( rand(n2-n1)+n1 ).chr('UTF-8')
15
+ # rescue RangeError
16
+ # end
17
+ # end
18
+ # rendered_subject = "#{rendered_subject} #{ random_utf8.next }#{ random_utf8.next }"
@@ -40,6 +40,7 @@ class WcoEmail::EmailTemplate
40
40
  field :config_exe, default: "" ## unused! _vp_ 2023-09-24
41
41
  field :config_json, type: Object, default: '{}'
42
42
  field :layout, default: 'plain'
43
+ field :mangle_subject, type: :boolean, default: false
43
44
 
44
45
  DEFAULT_FROM_EMAIL = 'Victor Pudeyev <no-reply@wasya.co>'
45
46
  FROM_EMAILS = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.144
4
+ version: 3.1.0.145
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -434,6 +434,7 @@ files:
434
434
  - app/helpers/wco/application_helper.rb
435
435
  - app/jobs/wco_hosting/certbot_job.rb
436
436
  - app/mailers/wco_email/application_mailer.rb
437
+ - app/mailers/wco_email/application_mailer.rb-trash
437
438
  - app/models/ability.rb
438
439
  - app/models/wco/asset.rb
439
440
  - app/models/wco/gallery.rb