wco_email 0.1.1.10 → 0.1.1.11

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: d5e0454d0fd76de0c619c9ea26e84ce685f648e8441c39dacbe89b05fcc21e1a
4
- data.tar.gz: 44b968d0696f37d5375e24c96139ed6aec53ac3f3d77c75d3b9b227f52180e99
3
+ metadata.gz: 57871044dbe34a83eb21daf21efce6e5f80f58a4d05002e335a5de68708c9db2
4
+ data.tar.gz: e3813b3170e891df5f8d49168b319823f7eaa935ca4aa2f4e21606eba5cbf49c
5
5
  SHA512:
6
- metadata.gz: 868ea88e638147cbba1c6b51a298dadde124c59a31082aa7c96ac71b0dd6fa9998fe4868c5e36d138616101aa0f89b0eac7376098874f199d2ca48afacb5943f
7
- data.tar.gz: dc02b95154d45c05d52a9ef41d4fe6a1508abac22e63df18dc3b15cf1105ca0d01b248cfa29546a0a32a9f0b3b6aae44af2020bc1d1c73761179ddffb6d524bf
6
+ metadata.gz: 67012b8a6f4a425ebc669e3b31aef2ae94305e59774052e1e122a98f9f1878a48d890dca3f2f1661e0a53e818abe76bfe4565b85c7c5e9bd9517c60d46e49750
7
+ data.tar.gz: e1958e70b7e6f17f4c3507dee615fd21567385d51097b51cbdaafd4493f76a40b7c94eae06e6da3057db4c2b54bbd0717157fe94e51e9ae0225c15acb3c3db50
@@ -60,7 +60,7 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
60
60
  private
61
61
 
62
62
  def set_lists
63
- # super
63
+ @tags_list = Wco::Tag.list
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
@@ -2,6 +2,7 @@
2
2
  require 'aws-sdk-s3'
3
3
  require 'mail'
4
4
  require 'sidekiq'
5
+ require 'exception_notification'
5
6
 
6
7
  ##
7
8
  ## 2023-02-26 _vp_ Let's go
@@ -40,7 +41,7 @@ class WcoEmail::MessageIntakeJob
40
41
  stub.do_process
41
42
  rescue => err
42
43
  puts! err, "WcoEmail::MessageIntakeJob error"
43
- ExceptionNotifier.notify_exception(
44
+ ::ExceptionNotifier.notify_exception(
44
45
  err,
45
46
  data: { stub: stub }
46
47
  )
@@ -33,8 +33,8 @@
33
33
  .field
34
34
  = f.label :email_action_template
35
35
  = f.select :email_action_template, options_for_select( @email_action_templates_list, selected: email_filter.email_action_template ), {}, class: 'select2'
36
- -# .field
37
- -# = f.label :wp_term_id
38
- -# = f.select :wp_term_id, options_for_select( @email_tags_list, selected: email_filter.wp_term_id ), {}, class: 'select2'
36
+ .field
37
+ = f.label :tag
38
+ = f.select :tag, options_for_select( @tags_list, selected: email_filter.tag_id ), {}, class: 'select2'
39
39
  .actions
40
40
  = f.submit
@@ -24,9 +24,9 @@
24
24
  %th Subject Exact
25
25
  %th Body Exact
26
26
  %th Kind
27
- -# %th Email Action
28
- %th Email Action Template
29
- -# %th Email Tag
27
+ %th Respond with <br />Email Template
28
+ %th Email Action <br />(template)
29
+ %th Tag
30
30
  - @email_filters.each_with_index do |ef, idx|
31
31
 
32
32
  %tr
@@ -44,8 +44,8 @@
44
44
  %td= ef.subject_exact
45
45
  %td= ef.body_exact
46
46
  %td= ef.kind
47
- -# %td= ef.email_action&.id
47
+ %td= ef.email_template&.slug
48
48
  %td= ef.email_action_template&.slug
49
- -# %td= ef.category&.name
49
+ %td= ef.tag&.slug
50
50
 
51
51
 
@@ -93,22 +93,24 @@ namespace :wco_email do
93
93
  desc 'import objectkey list'
94
94
  task import_objectkey_list: :environment do
95
95
 
96
- bucket = 'ish-ses'
96
+ # bucket = 'ish-ses'
97
+ bucket = 'ish-test-2024'
97
98
  client ||= Aws::S3::Client.new({
98
99
  region: ::S3_CREDENTIALS[:region_ses],
99
100
  access_key_id: ::S3_CREDENTIALS[:access_key_id_ses],
100
101
  secret_access_key: ::S3_CREDENTIALS[:secret_access_key_ses],
101
102
  })
102
103
 
103
- lines = File.read( './data/20240110_ish-ses_objectkeys' )
104
+ # lines = File.read( './data/20240110_ish-ses_objectkeys' )
105
+ lines = File.read( './data/out_head' )
104
106
  lines.split("\n").each_with_index do |line, idx|
105
107
 
106
108
  object_key = line.split.last
107
109
  stub = WcoEmail::MessageStub.create( object_key: object_key, bucket: bucket )
108
110
  if stub.persisted?
109
- print "#{idx}."
111
+ print "#{idx+1}."
110
112
  else
111
- outs! stub.errors.full_messages.join(", ")
113
+ puts! stub.errors.full_messages.join(", ")
112
114
  end
113
115
 
114
116
  end
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.10
4
+ version: 0.1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev