wco_models 3.1.0.70 → 3.1.0.71

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: ea84f3f0608bb71c99678e1ffd5f37dd626462958602c5acc908f13ebe4e2fed
4
- data.tar.gz: 2f6cf3351e15a32df468b665ac0430f6b7d47d92380e9b3b95ca4c404f9f391e
3
+ metadata.gz: ed7fdcee13ed63a005f411a0667304c20e4b9304a31ddce91ef0ccb2c7eb40c0
4
+ data.tar.gz: a0496d639675de1bd566b68dcaff1f1f790b9e52d578511c05ca93438a71b9c9
5
5
  SHA512:
6
- metadata.gz: 2eef8aff06c8aea4b00686a2a24255f05b8b31b1f5e0d2014577a65da48e82757e7452a41a811c06f51699141ceff2156f3015bd2fa5d54a2ae811f4c79fd4fd
7
- data.tar.gz: b4eaf23331ed7186071185c4b80cd425b9e2e1d0dca2459c55bdc41327cd2de658004e2e15376f55e17db5f7e747be8b17c03eb6d0d6170326731afebcdb7e5a
6
+ metadata.gz: 197e54b9da6b3e53f2bb1ab3041ccfed04163b56ae609be3b664c64c7e462b84622cf8b9f2dd6a486e4669b0bd13806ae77771f99ef5ec901676c31f0593add8
7
+ data.tar.gz: bab77602004ffada4035abee34b573653ec61b57ad80953e9195c13b09ac82a5ebaf4cb809c111767493f986fb3e358eb846ac1ee19dad333d15e7121a4bca8c
@@ -14,18 +14,18 @@ module Wco::ApplicationHelper
14
14
  end
15
15
 
16
16
  def pretty_date date
17
- # date.to_s[0, 10]
18
- date&.strftime('%Y-%m-%d')
17
+ return nil if !date
18
+ date.in_time_zone( Rails.application.config.time_zone ).strftime('%Y-%m-%d')
19
19
  end
20
20
  def pp_date a; pretty_date a; end
21
21
 
22
22
  def pp_datetime date
23
- date&.strftime('%Y-%m-%d %l:%M%P %z')
23
+ return nil if !date
24
+ return date.in_time_zone( Rails.application.config.time_zone ).strftime('%Y-%m-%d %l:%M%P %Z')
24
25
  end
25
26
 
26
27
  def pp_time date
27
28
  return nil if !date
28
- # return date.strftime('%l:%M%P %z')
29
29
  return date.in_time_zone( Rails.application.config.time_zone ).strftime('%l:%M%P %Z')
30
30
  end
31
31
 
@@ -31,6 +31,11 @@ class Wco::Tag
31
31
  find_or_create_by({ slug: TRASH })
32
32
  end
33
33
 
34
+ SPAM = 'spam'
35
+ def self.spam
36
+ find_or_create_by({ slug: SPAM })
37
+ end
38
+
34
39
  def to_s
35
40
  slug
36
41
  end
@@ -71,7 +71,7 @@ class WcoEmail::Context
71
71
  end
72
72
 
73
73
  def self.scheduled
74
- where( :send_at.gte => Time.now )
74
+ where( :send_at.lte => Time.now )
75
75
  end
76
76
 
77
77
 
@@ -89,7 +89,7 @@ class WcoEmail::Message
89
89
 
90
90
  when WcoEmail::EmailFilter::KIND_ADD_TAG
91
91
  conv.tags.push filter.tag
92
- if filter.tag == Wco::Tag.trash
92
+ if filter.tag == Wco::Tag.trash || filter.tag == Wco::Tag.spam
93
93
  conv.tags -= [ Wco::Tag.inbox ]
94
94
  end
95
95
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.70
4
+ version: 3.1.0.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev