wco_email 0.1.1.82 → 0.1.1.84

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: 25aa0ee19f524e32baf66b2d9c6a3d0d8309d4d3d152a2ce0b18ff312fc71507
4
- data.tar.gz: 7cd5659cdf4fab3c45bf4afd6ebfa62b099874fe3edaefdf66baf8227e5aac05
3
+ metadata.gz: 741b657ae1e021da4f12445c39770e107c6e4e488d27053747be5617acaec4af
4
+ data.tar.gz: c671954b1f3f866a58dc8a608a13405294d6c2d0ad4c86f8fd9253087ca7ece0
5
5
  SHA512:
6
- metadata.gz: 8e78e8dda9333d121c654eac15815c4da7d5187300a36a8753391bc2fad347fb067daa7bfa8e02d2d5adf6461e17e732f15fadb0085163143692794c8e2521c0
7
- data.tar.gz: b9891c94d3cc5ec4fae1527d9dab6191301c7b203009ac25195ec429059a876b0ac6518caec9fdbc8937badcddd1ff6688047ca8cf652f9c9ff08f876ff3f57e
6
+ metadata.gz: 17595b7a50f4adb26c20830a1a385b8c27901f91cc22d2c69754ad6c6a3df4f8b51b39a2548ce3cdfc2a53ef3c29e815e1dbaf2f6d856e33c196f759bf14cbd7
7
+ data.tar.gz: 9bc27126450a4a29314cc8255e0c3c4ecd8c825a54f367548de124ac3dc93b72cf3db022331325a2c25542f33b3b9cf65e3fcdeba7505b7af069fe336595e8f2
data/README.txt CHANGED
@@ -1,4 +1,52 @@
1
1
 
2
+ = Install =
2
3
 
3
- cd test/dummy
4
- be sidekiq -q wco_email_rb_mailers -q wco_email_rb_default -q wco_email_rb
4
+ alias dc='docker-compose '
5
+
6
+ Copy and edit the config file:
7
+
8
+ cp _env .env
9
+
10
+ Check out the repository and run:
11
+
12
+ bundle
13
+
14
+ Ask Victor to add your user (email) to the remote auth server. Or use test-1@wasya.co
15
+
16
+ Note: the mongodb port is 27041.
17
+
18
+ dc up -d mongo_development
19
+ dc up -d localstack_development
20
+
21
+ In the rails console ( cd test/dummy ; be rails c ):
22
+
23
+ profile = Wco::Profile.create email: 'test-1@wasya.co'
24
+ inbox = Wco::Tag.create slug: 'inbox'
25
+
26
+ You need a copy of wco_models.git locally ( default location is ~/projects/ruby/wco_models )
27
+
28
+ awslocal s3api create-bucket --bucket wco-email-development
29
+
30
+ == Troubleshooting ==
31
+
32
+ Issue:
33
+
34
+ checking for yaml.h... no
35
+ yaml.h not found
36
+
37
+ Solution:
38
+
39
+ brew install libyaml
40
+
41
+ = Use =
42
+ Please see below for example usage commands.
43
+
44
+ cd test/dummy
45
+ be sidekiq -q wco_email_rb_mailers -q wco_email_rb_default -q wco_email_rb
46
+
47
+ docker run \
48
+ --rm -it \
49
+ -p 127.0.0.1:4566:4566 \
50
+ -p 127.0.0.1:4510-4559:4510-4559 \
51
+ -v /var/run/docker.sock:/var/run/docker.sock \
52
+ localstack/localstack
@@ -46,23 +46,24 @@ class WcoEmail::ContextsController < WcoEmail::ApplicationController
46
46
 
47
47
  def index
48
48
  authorize! :index, WcoEmail::Context
49
- @ctxs = WcoEmail::Context.where(
50
- :send_at.ne => nil,
51
- sent_at: nil,
52
- ).order_by( sent_at: :desc, send_at: :desc
53
- ).page( params[:ctxs_page]
54
- ).per( current_profile.per_page )
55
-
49
+ @ctxs = WcoEmail::Context.all
56
50
  if params[:lead_id]
57
51
  @lead = Lead.find params[:lead_id]
58
52
  @ctxs = @ctxs.where( lead_id: @lead.id )
53
+ end
54
+
55
+ if 'true' == params[:sent]
56
+ @ctxs = @ctxs.where( :sent_at.ne => nil )
57
+ elsif 'false' == params[:sent]
58
+ @ctxs = @ctxs.where( sent_at: nil )
59
59
  else
60
- if my_truthy? params[:sent]
61
- @ctxs = @ctxs.or({ :sent_at.ne => nil }, { :unsubscribed_at.ne => nil })
62
- else
63
- @ctxs = @ctxs.where( sent_at: nil, unsubscribed_at: nil )
64
- end
60
+ ## default, show notsent.
61
+ @ctxs = @ctxs.where( :sent_at.ne => nil )
65
62
  end
63
+
64
+ @ctxs = @ctxs.order_by( sent_at: :desc, send_at: :desc
65
+ ).page( params[:ctxs_page]
66
+ ).per( current_profile.per_page )
66
67
  end
67
68
 
68
69
  def new
@@ -28,6 +28,8 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
28
28
  end
29
29
 
30
30
  def index
31
+ puts! current_profile, 'current_profile'
32
+
31
33
  authorize! :index, WcoEmail::Conversation
32
34
  @conversations, @messages, @tag = WcoEmail::Conversation.load_conversations_messages_tag_by_params_and_profile( params, current_profile )
33
35
  end
@@ -41,7 +41,7 @@
41
41
  = render "/wco/main_header"
42
42
  = render "/wco_email/main_header"
43
43
 
44
- = render '/wco/alerts_notices' if notice || alert
44
+ = render '/wco/application/alerts_notices' if notice || alert
45
45
  %hr
46
46
 
47
47
  .padded.flex-row
@@ -2,16 +2,11 @@
2
2
  - ctxs = @ctxs || WcoEmail::Context.all
3
3
 
4
4
  .a
5
- = link_to contexts_path({ sent: false }) do
6
- Email Contexts (#{ctxs.length})
7
- - if @lead
8
- For lead #{@lead.email}
9
- - if my_truthy? params[:sent]
10
- = link_to '[notsent]', contexts_path({ sent: false })
11
- <b>sent</b>
12
- - else
13
- <b>notsent</b>
14
- = link_to '[sent]', contexts_path({ sent: true })
5
+ Email Contexts (#{ctxs.length})
6
+ - if @lead
7
+ For lead #{@lead.email}
8
+ = link_to '[notsent]', contexts_path({ sent: false }), class: "#{'false' == params[:sent] ? 'active' : ''}"
9
+ = link_to '[sent]', contexts_path({ sent: true }), class: "#{'true' == params[:sent] ? 'active' : ''}"
15
10
  = form_tag contexts_path, method: :get do
16
11
  = text_field_tag :q
17
12
  = link_to '[+]', new_context_path
@@ -7,7 +7,7 @@
7
7
  .W0
8
8
  = render 'wco/paginate', resource: @ctxs, param_name: :ctxs_page, views_prefix: :wco
9
9
 
10
- %table.bordered.data-table
10
+ %table.bordered
11
11
  %thead
12
12
  %tr
13
13
  %th.actions
@@ -39,11 +39,13 @@
39
39
  = ctx.subject ? ctx.subject : "t| #{ctx.tmpl.subject}"
40
40
  %td= ctx.email_template.slug
41
41
  %td.send_at.padded
42
- .datetime
42
+ .datetime.p-1
43
43
  .date= pp_date ctx.send_at
44
44
  .time= pp_time ctx.send_at
45
45
  %td
46
- .datetime.padded= pp_date ctx.sent_at
46
+ .datetime.p-1
47
+ .date= pp_date ctx.sent_at
48
+ .time= pp_time ctx.sent_at
47
49
  %td
48
50
  .datetime.padded= pp_date ctx.unsubscribed_at
49
51
 
@@ -0,0 +1,13 @@
1
+ ::S3_CREDENTIALS ||= {
2
+ ## user:
3
+ access_key_id: "",
4
+ secret_access_key: "",
5
+ bucket: "wco-email-development",
6
+ region: 'us-east-1',
7
+
8
+ ## user:
9
+ access_key_id_ses: "",
10
+ secret_access_key_ses: "",
11
+ bucket_ses: "",
12
+ region_ses: 'us-east-1',
13
+ }
@@ -0,0 +1,13 @@
1
+ ::S3_CREDENTIALS ||= {
2
+ ## user:
3
+ access_key_id: "",
4
+ secret_access_key: "",
5
+ bucket: "",
6
+ region: 'us-east-1',
7
+
8
+ ## user:
9
+ access_key_id_ses: "",
10
+ secret_access_key_ses: "",
11
+ bucket_ses: "",
12
+ region_ses: 'us-east-1',
13
+ }
@@ -1,3 +1,3 @@
1
1
 
2
- STRIPE_PK = 'nothing'
3
-
2
+ STRIPE_PK = 'pk_test_qr1QPmSpLdBFt1F7itdWJOj3'
3
+ STRIPE_SK = 'sk_test_ARuaXffdANoXLKAwUXDcp0v0'
@@ -0,0 +1,3 @@
1
+
2
+ STRIPE_PK = ''
3
+ STRIPE_SK = ''
@@ -2,6 +2,9 @@
2
2
  Rails.application.config.assets.version = '1.0'
3
3
 
4
4
  Rails.application.config.assets.precompile += %w(
5
+ application.js
6
+ application.css
7
+
5
8
  wco_models/application.js
6
9
  wco_models/application.css
7
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.82
4
+ version: 0.1.1.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
11
+ date: 2024-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -446,7 +446,10 @@ files:
446
446
  - app/views/wco_email/messages/show.haml
447
447
  - app/views/wco_email/messages/show_iframe.haml
448
448
  - app/views/wco_email/sessions/new.html.erb
449
+ - config/initializers/00_s3.rb
450
+ - config/initializers/00_s3.rb-example
449
451
  - config/initializers/08_integrations.rb
452
+ - config/initializers/08_integrations.rb-example
450
453
  - config/initializers/assets.rb
451
454
  - config/routes.rb
452
455
  - lib/tasks/bjjcollective/sitemap.rb