wco_email 0.1.1.16 → 0.1.1.17

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1253b7ed85554d1a4a58ea6a7a080dac2b18abb7ea82cf03ae5c1150d7a0b8d3
4
- data.tar.gz: 23e8fbdb9b10428c8d2b5e4e82d5bff4ef26db882f24402b79a8d7dbd4debff8
3
+ metadata.gz: 9ee31f07f0214ecc2c291ebd5ad7b72178fa589f14ab0851d14cb95973a83a04
4
+ data.tar.gz: d9b626b34660c3ac056bb7cffb6a80a2baf756d2d26d87c5f8e523690f020fce
5
5
  SHA512:
6
- metadata.gz: 885ccc782291190ca038aa9bea5a77a54d823a5bc7266da3248f0453e7b1345a437877e5cc6fd230587082d2e5e4fc23cf200887597021966fb81fe2cda41d33
7
- data.tar.gz: c198d369614b352734192d323badaa58fd58be4177954d2ab5473104db533763bfe48fe89bc66cb750b27268a9723bf0ac284a46bfe9d14bab0fd644bb888c5e
6
+ metadata.gz: 3052c43baec0b9f77a4435d78d97803a3652ed3856a613691b427ae819bad13907787889f291a09a800159a7c5c0a2aec1f556418fb90cb838cb7c05e65d1822
7
+ data.tar.gz: ee8fd66a96b4ae2d3e5db106e13604fc5e931e5d5adde8d6cfdaf47597b0d1338b61c1dbfd84a1fb98115bb1c708b2087eadbf3521893a51ed51ae098fe50685
@@ -7,7 +7,7 @@ class WcoEmail::ApiController < ActionController::Base
7
7
  def create_email_message
8
8
  puts! params, 'params'
9
9
 
10
- stub = WcoEmail::MessageStub.create!({
10
+ stub = WcoEmail::MessageStub.find_or_create_by({
11
11
  bucket: params[:bucket],
12
12
  object_key: params[:object_key],
13
13
  })
@@ -1,20 +1,4 @@
1
1
 
2
2
  module WcoEmail::ApplicationHelper
3
3
 
4
- def pretty_date date
5
- # date.to_s[0, 10]
6
- date&.strftime('%Y-%m-%d')
7
- end
8
- def pp_date a; pretty_date a; end
9
-
10
- def pp_datetime date
11
- date&.strftime('%Y-%m-%d %l:%M%P %z')
12
- end
13
-
14
- def pp_time date
15
- return nil if !date
16
- # return date.strftime('%l:%M%P %z')
17
- return date.in_time_zone( Rails.application.config.time_zone ).strftime('%l:%M%P')
18
- end
19
-
20
4
  end
@@ -1,31 +1,30 @@
1
1
 
2
- .application--main-header.main-header.maxwidth{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
2
+ .application--main-header.main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
3
+ .maxwidth
4
+ %i.fa.fa-compress.collapse-expand#collapseHeaderEmail
5
+ Wco Email & CRM
6
+ .flex-row
7
+ %ul
8
+ %li= link_to 'Email Messages', conversations_path
9
+ %li
10
+ Stubs
11
+ (#{WcoEmail::MessageStub.pending.length})
12
+ (#{WcoEmail::MessageStub.all.length})
13
+ %li= render '/wco_email/email_templates/header'
14
+ %li= render '/wco_email/email_campaigns/header'
15
+ %li= render '/wco_email/email_filters/header'
16
+ %li= render '/wco_email/contexts/header'
17
+ %li= render '/wco_email/unsubscribes/header'
3
18
 
4
- %i.fa.fa-compress.collapse-expand#collapseHeaderEmail
5
- Wco Email & CRM
6
- .flex-row
7
- %ul
8
- %li= link_to 'Email Messages', conversations_path
9
- %li
10
- Stubs
11
- (#{WcoEmail::MessageStub.pending.length})
12
- (#{WcoEmail::MessageStub.all.length})
13
- %li= render '/wco_email/email_templates/header'
14
- %li= render '/wco_email/email_campaigns/header'
15
- %li= render '/wco_email/email_filters/header'
16
- %li= render '/wco_email/contexts/header'
17
- %li= render '/wco_email/unsubscribes/header'
18
19
 
20
+ %ul
21
+ %li= render '/wco_email/email_action_templates/header'
22
+ %li= render '/wco_email/email_actions/header'
19
23
 
20
- %ul
21
- %li= render '/wco_email/email_action_templates/header'
22
- %li= render '/wco_email/email_actions/header'
24
+ -# %li= render '/wco_email/lead_action_templates/header'
25
+ -# %li= render '/wco_email/lead_actions/header'
23
26
 
24
- -# %li= render '/wco_email/lead_action_templates/header'
25
- -# %li= render '/wco_email/lead_actions/header'
27
+ -# %li
28
+ -# = link_to "OActions (#{Wco::OfficeAction.all.length})", office_actions_path
29
+ -# = link_to '[+]', new_office_action_path
26
30
 
27
- -# %li
28
- -# = link_to "OActions (#{Wco::OfficeAction.all.length})", office_actions_path
29
- -# = link_to '[+]', new_office_action_path
30
-
31
- .c
@@ -1,8 +1,4 @@
1
1
 
2
- -#
3
- -# WARNING: this is used by contexts, not templates, so @TODO: review _vp_ 2023-03-26
4
- -#
5
-
6
2
  = raw ERB.new( @ctx.body ).result
7
3
 
8
4
  -# = @ctx.reply_to_message.inspect
@@ -1,34 +1,37 @@
1
1
 
2
- =begin
3
-
2
+ namespace :db do
4
3
 
5
- ## clean
6
- WcoEmail::EmailAction.each do |act|
7
- if !act.lead
8
- act.delete
4
+ desc "clean contexts"
5
+ task clean_contexts: :environment do
6
+ WcoEmail::Context.each do |ttt|
7
+ if !ttt.lead
8
+ ttt.delete
9
+ end
10
+ end
9
11
  end
10
- end
11
-
12
12
 
13
-
14
- ## clean
15
- WcoEmail::Context.each do |ttt|
16
- if !ttt.lead
17
- ttt.delete
13
+ desk 'clean email actions'
14
+ task clean_email_actions: :environment do
15
+ WcoEmail::EmailAction.each do |act|
16
+ if !act.lead
17
+ act.delete
18
+ end
19
+ end
18
20
  end
19
- end
20
-
21
-
22
- =end
23
-
24
- namespace :db do
25
21
 
26
22
  desc "seed"
27
23
  task seed: :environment do
24
+
28
25
  inbox = Wco::Tag.find_or_create_by({ slug: 'inbox' })
29
26
  trash = Wco::Tag.find_or_create_by({ slug: 'trash' })
27
+ spam = Wco::Tag.find_or_create_by({ slug: 'spam' })
28
+
29
+ wasyaco = Wco::Leadset.find_or_create_by!({ company_url: 'wasya.co' })
30
+
31
+ poxlovi = Wco::Lead.find_or_create_by!({ email: 'poxlovi@gmail.com' })
32
+ piousbox = Wco::Lead.find_or_create_by!({ email: 'piousbox@gmail.com' })
33
+ victor = Wco::Lead.find_or_create_by!({ email: 'victor@wasya.co' })
30
34
 
31
- poxlovi = Wco::Lead.find_or_create_by!({ email: 'poxlovi@gmail.com' })
32
35
  end
33
36
 
34
37
  end
@@ -147,7 +147,7 @@ namespace :wco_email do
147
147
  print '^'
148
148
  end
149
149
 
150
- duration = Rails.env.production? ? 120 : 15 # 2 minutes or 15 seconds
150
+ duration = Rails.env.production? ? 15 : 15 # 2 minutes or 15 seconds
151
151
  sleep duration
152
152
  print '.'
153
153
 
@@ -182,7 +182,7 @@ namespace :wco_email do
182
182
  print '^'
183
183
  end
184
184
 
185
- duration = Rails.env.production? ? 120 : 15 # 2 minutes or 15 seconds
185
+ duration = Rails.env.production? ? 15 : 15 # 2 minutes or 15 seconds
186
186
  sleep duration
187
187
  print '.'
188
188
 
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.16
4
+ version: 0.1.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev