wco_email 0.1.1.4 → 0.1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/api_controller.rb +1 -1
- data/app/controllers/wco_email/application_controller.rb +3 -3
- data/app/controllers/wco_email/contexts_controller.rb +1 -1
- data/app/controllers/wco_email/conversations_controller.rb +1 -1
- data/app/controllers/wco_email/email_filters_controller.rb +3 -3
- data/app/views/wco_email/contexts/_form.haml +2 -2
- data/app/views/wco_email/contexts/new.haml +1 -1
- data/app/views/wco_email/contexts/show.haml +2 -1
- data/app/views/wco_email/conversations/show.haml +1 -1
- data/app/views/wco_email/email_filters/index.haml +10 -8
- data/lib/systemd/system/wco_email_sidekiq.service +22 -0
- data/lib/tasks/db_tasks.rake +22 -0
- data/lib/tasks/wco_email_tasks.rake +1 -1
- metadata +2 -3
- data/lib/wco_email/README_email_actions.rb +0 -7
- data/lib/wco_email/README_email_contexts.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0785f28263ba6e1e09e55e7c36cd7bb121fdd0d52e5f58773031166334c3f918'
|
4
|
+
data.tar.gz: 50fab8b519267f3ab8aedb7faaf2db717d214bfcce90316be2849b2b55fae16d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2812d3b69f9f59c43a820590942e8e376ab9af6ba85aa63d3509d57fd2913cf0254e7f42b5228a66d56644fd983decc04c89369df7b15f48f6b72a7485590ee0
|
7
|
+
data.tar.gz: fd157a0a5bae64f097b4738ac0038b19de2b924868f0f39b12b30a4bfe45f7f702e86209fafe6b03721aaf4e53d5870a16354fdb51a1d54b2d76b576d1a606c6
|
@@ -129,7 +129,7 @@ class WcoEmail::ContextsController < WcoEmail::ApplicationController
|
|
129
129
|
@ctx = WcoEmail::Context.find params[:id]
|
130
130
|
authorize! :update, @ctx
|
131
131
|
|
132
|
-
if @ctx.update_attributes params[:
|
132
|
+
if @ctx.update_attributes params[:context].permit!
|
133
133
|
flash[:notice] = 'Saved.'
|
134
134
|
redirect_to action: 'edit', id: @ctx.id
|
135
135
|
return
|
@@ -119,7 +119,7 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
|
|
119
119
|
private
|
120
120
|
|
121
121
|
def set_lists
|
122
|
-
|
122
|
+
@tags = Wco::Tag.all
|
123
123
|
@email_templates_list = [ [nil, nil] ] + WcoEmail::EmailTemplate.all.map { |tmpl| [ tmpl.slug, tmpl.id ] }
|
124
124
|
@leads_list = Wco::Lead.list
|
125
125
|
@tags_list = Wco::Tag.list
|
@@ -33,8 +33,8 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
|
|
33
33
|
|
34
34
|
def index
|
35
35
|
authorize! :index, WcoEmail::EmailFilter.new
|
36
|
-
@email_filter
|
37
|
-
@email_filters = WcoEmail::EmailFilter.
|
36
|
+
@email_filter = WcoEmail::EmailFilter.new
|
37
|
+
@email_filters = WcoEmail::EmailFilter.all
|
38
38
|
end
|
39
39
|
|
40
40
|
def new
|
@@ -60,7 +60,7 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
|
|
60
60
|
private
|
61
61
|
|
62
62
|
def set_lists
|
63
|
-
super
|
63
|
+
# super
|
64
64
|
@email_templates_list = WcoEmail::EmailTemplate.list
|
65
65
|
@email_actions_list = WcoEmail::EmailAction.list
|
66
66
|
@email_action_templates_list = WcoEmail::EmailActionTemplate.list
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
.email-contexts--form
|
5
5
|
-# - url = ctx.new_record? ? contexts_path : context_path(ctx)
|
6
|
-
= form_for ctx, as: :
|
6
|
+
= form_for ctx, as: :context do |f|
|
7
7
|
|
8
8
|
.flex-row
|
9
9
|
= f.label "Template"
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
.flex-row
|
36
36
|
= f.label :reply_to_message
|
37
|
-
= f.select :reply_to_message_id, options_for_select([[ ctx.reply_to_message
|
37
|
+
= f.select :reply_to_message_id, options_for_select([[ ctx.reply_to_message, ctx.reply_to_message_id ]], selected: ctx.reply_to_message_id), {}, class: 'w-100'
|
38
38
|
|
39
39
|
.tab-labels.flex-row
|
40
40
|
%a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
|
@@ -13,7 +13,8 @@
|
|
13
13
|
<b>Template:</b> #{link_to @ctx.email_template.slug, email_template_path(@ctx.email_template), target: :_blank }
|
14
14
|
%li <b>From:</b> #{@ctx.from_email}
|
15
15
|
%li <b>To Lead:</b> #{link_to @ctx.lead.email, wco.lead_path(@ctx.lead)}
|
16
|
-
|
16
|
+
- if @ctx.reply_to_message
|
17
|
+
%li <b>reply_to_message:</b> #{ link_to @ctx.reply_to_message, message_path(@ctx.reply_to_message), target: :_blank }
|
17
18
|
|
18
19
|
|
19
20
|
.col-md-4
|
@@ -24,4 +24,4 @@
|
|
24
24
|
= render '/wco_email/messages/meta', message: msg
|
25
25
|
%iframe.message-iframe{ src: message_iframe_path(msg) }
|
26
26
|
|
27
|
-
= render '/wco_email/contexts/form_reply', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to
|
27
|
+
= render '/wco_email/contexts/form_reply', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject })
|
@@ -23,13 +23,15 @@
|
|
23
23
|
%th Subject Exact
|
24
24
|
%th Body Exact
|
25
25
|
%th Kind
|
26
|
-
%th Email Action
|
27
|
-
%th Email Template
|
28
|
-
%th Email Tag
|
29
|
-
- @email_filters.
|
26
|
+
-# %th Email Action
|
27
|
+
%th Email Action Template
|
28
|
+
-# %th Email Tag
|
29
|
+
- @email_filters.each_with_index do |ef, idx|
|
30
30
|
|
31
31
|
%tr
|
32
|
-
%td
|
32
|
+
%td
|
33
|
+
.gray= idx+1
|
34
|
+
= check_box_tag 'checked'
|
33
35
|
%td
|
34
36
|
= link_to '[~]', edit_email_filter_path(ef)
|
35
37
|
.inline-block= button_to '[x]', email_filter_path(ef), method: :delete, data: { confirm: 'Are you sure?' }
|
@@ -41,8 +43,8 @@
|
|
41
43
|
%td= ef.subject_exact
|
42
44
|
%td= ef.body_exact
|
43
45
|
%td= ef.kind
|
44
|
-
%td= ef.email_action&.
|
45
|
-
%td= ef.
|
46
|
-
%td= ef.category&.name
|
46
|
+
-# %td= ef.email_action&.id
|
47
|
+
%td= ef.email_action_template&.slug
|
48
|
+
-# %td= ef.category&.name
|
47
49
|
|
48
50
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[Unit]
|
2
|
+
Description=wco_email_rb_sidekiq
|
3
|
+
|
4
|
+
[Service]
|
5
|
+
Type=simple
|
6
|
+
User=root
|
7
|
+
WorkingDirectory=/opt/projects/micros_email/current
|
8
|
+
ExecStart=/root/.rbenv/shims/bundle exec sidekiq -q wco_email_rb -q wco_email_rb_mailers
|
9
|
+
ExecStop=/bin/echo nothing
|
10
|
+
Restart=on-failure
|
11
|
+
Environment=RAILS_ENV=production
|
12
|
+
Environment=RAILS_LOG_TO_STDOUT=true
|
13
|
+
|
14
|
+
StandardOutput=syslog
|
15
|
+
StandardError=syslog
|
16
|
+
SyslogIdentifier=wco_email_rb_sidekiq
|
17
|
+
|
18
|
+
# StandardOutput=append:/var/log/sidekiq/production.log
|
19
|
+
# StandardError=append:/var/log/sidekiq/production.log
|
20
|
+
|
21
|
+
[Install]
|
22
|
+
WantedBy=multi-user.target
|
data/lib/tasks/db_tasks.rake
CHANGED
@@ -1,4 +1,26 @@
|
|
1
1
|
|
2
|
+
=begin
|
3
|
+
|
4
|
+
|
5
|
+
## clean
|
6
|
+
WcoEmail::EmailAction.each do |act|
|
7
|
+
if !act.lead
|
8
|
+
act.delete
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## clean
|
15
|
+
WcoEmail::Context.each do |ttt|
|
16
|
+
if !ttt.lead
|
17
|
+
ttt.delete
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
2
24
|
namespace :db do
|
3
25
|
|
4
26
|
desc "seed"
|
@@ -31,7 +31,7 @@ namespace :wco_email do
|
|
31
31
|
stub.config = JSON.parse( stub.config ).merge({ process_images: process_images, skip_notification: true }).to_json
|
32
32
|
stub.save!
|
33
33
|
|
34
|
-
WcoEmail::MessageIntakeJob.
|
34
|
+
WcoEmail::MessageIntakeJob.perform_async( stub.id.to_s )
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
@@ -450,6 +450,7 @@ files:
|
|
450
450
|
- app/views/wco_email/unsubscribes/_table.haml
|
451
451
|
- config/initializers/assets.rb
|
452
452
|
- config/routes.rb
|
453
|
+
- lib/systemd/system/wco_email_sidekiq.service
|
453
454
|
- lib/tasks/bjjcollective/sitemap.rb
|
454
455
|
- lib/tasks/db_tasks.rake
|
455
456
|
- lib/tasks/direct_mail_tasks.rake
|
@@ -462,8 +463,6 @@ files:
|
|
462
463
|
- lib/tasks/wasya_co/sitemap.rb
|
463
464
|
- lib/tasks/wco_email_tasks.rake
|
464
465
|
- lib/wco_email.rb
|
465
|
-
- lib/wco_email/README_email_actions.rb
|
466
|
-
- lib/wco_email/README_email_contexts.rb
|
467
466
|
- lib/wco_email/engine.rb
|
468
467
|
homepage: https://wasya.co
|
469
468
|
licenses:
|