wco_email 0.1.1.14 → 0.1.1.16
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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 1253b7ed85554d1a4a58ea6a7a080dac2b18abb7ea82cf03ae5c1150d7a0b8d3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 23e8fbdb9b10428c8d2b5e4e82d5bff4ef26db882f24402b79a8d7dbd4debff8
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 885ccc782291190ca038aa9bea5a77a54d823a5bc7266da3248f0453e7b1345a437877e5cc6fd230587082d2e5e4fc23cf200887597021966fb81fe2cda41d33
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c198d369614b352734192d323badaa58fd58be4177954d2ab5473104db533763bfe48fe89bc66cb750b27268a9723bf0ac284a46bfe9d14bab0fd644bb888c5e
         
     | 
| 
         @@ -11,7 +11,7 @@ 
     | 
|
| 
       11 
11 
     | 
    
         
             
                  %th= check_box_tag 'hmm'
         
     | 
| 
       12 
12 
     | 
    
         
             
                  %th  
         
     | 
| 
       13 
13 
     | 
    
         
             
                  %th Slug
         
     | 
| 
       14 
     | 
    
         
            -
                  %th From
         
     | 
| 
      
 14 
     | 
    
         
            +
                  -# %th From
         
     | 
| 
       15 
15 
     | 
    
         
             
                  %th Tmpl
         
     | 
| 
       16 
16 
     | 
    
         
             
                  %th next actions
         
     | 
| 
       17 
17 
     | 
    
         
             
                - @tmpls.each_with_index do |tmpl, idx|
         
     | 
| 
         @@ -26,8 +26,7 @@ 
     | 
|
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
                    %td
         
     | 
| 
       28 
28 
     | 
    
         
             
                      = tmpl.slug
         
     | 
| 
       29 
     | 
    
         
            -
                    %td
         
     | 
| 
       30 
     | 
    
         
            -
                      = tmpl.from_email
         
     | 
| 
      
 29 
     | 
    
         
            +
                    -# %td= tmpl.from_email
         
     | 
| 
       31 
30 
     | 
    
         
             
                    %td.tmpl
         
     | 
| 
       32 
31 
     | 
    
         
             
                      = render '/wco_email/email_templates/show_cell', tmpl: tmpl.email_template
         
     | 
| 
       33 
32 
     | 
    
         | 
| 
         @@ -37,6 +37,9 @@ namespace :wco_email do 
     | 
|
| 
       37 
37 
     | 
    
         
             
                  stub.save!
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
                  WcoEmail::MessageIntakeJob.perform_sync( stub.id.to_s )
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                  sleep 1 # second
         
     | 
| 
      
 42 
     | 
    
         
            +
                  print '.'
         
     | 
| 
       40 
43 
     | 
    
         
             
                end
         
     | 
| 
       41 
44 
     | 
    
         
             
              end
         
     | 
| 
       42 
45 
     | 
    
         | 
| 
         @@ -107,6 +110,20 @@ namespace :wco_email do 
     | 
|
| 
       107 
110 
     | 
    
         
             
                puts "ok"
         
     | 
| 
       108 
111 
     | 
    
         
             
              end
         
     | 
| 
       109 
112 
     | 
    
         | 
| 
      
 113 
     | 
    
         
            +
              desc 'remove message duplicates'
         
     | 
| 
      
 114 
     | 
    
         
            +
              task remove_message_duplicates: :environment do
         
     | 
| 
      
 115 
     | 
    
         
            +
                outs = WcoEmail::Message.collection.aggregate([
         
     | 
| 
      
 116 
     | 
    
         
            +
                  {"$group" => { "_id" => "$message_id", "count" => { "$sum" => 1 } } },
         
     | 
| 
      
 117 
     | 
    
         
            +
                  {"$match": {"_id" => { "$ne" => nil } , "count" => {"$gt" => 1} } },
         
     | 
| 
      
 118 
     | 
    
         
            +
                  {"$project" => {"message_id" => "$_id", "_id" => 0} }
         
     | 
| 
      
 119 
     | 
    
         
            +
                ])
         
     | 
| 
      
 120 
     | 
    
         
            +
                outs = outs.to_a
         
     | 
| 
      
 121 
     | 
    
         
            +
                outs.each do |out|
         
     | 
| 
      
 122 
     | 
    
         
            +
                  WcoEmail::Message.where( message_id: out['message_id'] )[1].destroy!
         
     | 
| 
      
 123 
     | 
    
         
            +
                  print '.'
         
     | 
| 
      
 124 
     | 
    
         
            +
                end
         
     | 
| 
      
 125 
     | 
    
         
            +
              end
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
       110 
127 
     | 
    
         
             
              desc 'remove duplicates of stubs'
         
     | 
| 
       111 
128 
     | 
    
         
             
              task remove_stub_duplicates: :environment do
         
     | 
| 
       112 
129 
     | 
    
         
             
                outs = WcoEmail::MessageStub.collection.aggregate([
         
     |