ish_models 0.0.33.233 → 0.0.33.235

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: 15ca1b54b0bc7435631e46a9a59f46827dfced47e491adac105d3dd67fed7663
4
- data.tar.gz: 9b41c652d834af17efd2d36ed3f582352e0cdf445271dcde32c692820c12c4fd
3
+ metadata.gz: 8002a35421fc69935dc8771ead9c2c766d4506d1d1117bd3bd9890060c3c081b
4
+ data.tar.gz: 60c9c0e509691481bc9cf385549d74434d407a278fea83944f1c4f867a488ffa
5
5
  SHA512:
6
- metadata.gz: 3f4d47b3b918592d081f7219b85df89e57823018286db1ec22f7f976216ba2207a5495a18958d6a5fa6781464ff7acd5f0c1da117c450e4c5a2d6be76309c621
7
- data.tar.gz: 343987b37ddc718162080702113a746f8a202f08136c5f228d9f3b9ae948cf8fce17b2c88be84e8731bb0146e61682210baac7c43c950aacf476b416419b49c7
6
+ metadata.gz: e3d523e5af0f2bef36d7fdaf20dc28d7698298be5f8a6f380011bbfb8ec5d5d625ffb4d447b75c7fb91384bda78f6580945fe0c4f307b0656176f6fe74bc0a6e
7
+ data.tar.gz: 02e270850e4dfa21c2e23a6d033cc80650b9cc4bd20d6cc5f6b4e2df19a7d1c748746275cc7876c9e94068845161cd576b1980d8a9e9b37aff00c6b40b048cab
@@ -35,8 +35,6 @@ class ::Ish::EmailContext
35
35
  field :subject
36
36
  # validates_presence_of :subject
37
37
 
38
-
39
-
40
38
  belongs_to :email_template
41
39
  def tmpl; email_template; end
42
40
 
@@ -83,6 +81,16 @@ class ::Ish::EmailContext
83
81
  binding()
84
82
  end
85
83
 
84
+ def self.summary
85
+ pipeline = [
86
+ { '$group' => {
87
+ '_id' => { '$dateToString' => { 'format' => "%Y-%m-%d", 'date' => "$sent_at" } }, 'total' => { '$sum' => 1 }
88
+ } }
89
+ ]
90
+ outs = Ish::EmailContext.collection.aggregate( pipeline )
91
+ outs.to_a
92
+ end
93
+
86
94
  end
87
95
  Ctx = ::Ish::EmailContext
88
96
 
@@ -91,7 +91,7 @@ class Office::EmailMessage
91
91
  def apply_filter filter
92
92
  case filter.kind
93
93
  when ::Office::EmailFilter::KIND_SKIP_INBOX
94
- self.remove_tag( WpTag::INBOX )
94
+ # self.remove_tag( WpTag::INBOX )
95
95
  self.conv.remove_tag( WpTag::INBOX )
96
96
  when ::Office::EmailFilter::KIND_AUTORESPOND
97
97
  Ish::EmailContext.create({
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.233
4
+ version: 0.0.33.235
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox