wco_models 3.1.0.73 → 3.1.0.74

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: b4ecbe6d4736d8ce99d18e170bf55d40f4eaa5f385adb108f19cbd2fd9b0b064
4
- data.tar.gz: 6645dd8995e8236e616a093f54f3ed0c2d84986f12bb09848dcc6f7f1cf78d60
3
+ metadata.gz: '001333244903db535c3a5a5dcdcb6ed004dade16013fbf4076fe0bf2a2906ac5'
4
+ data.tar.gz: b32bd3b75f89fac0022b3ac29ffc2ae808840d95c334de2457b44356764d2c7a
5
5
  SHA512:
6
- metadata.gz: a06728a9824a43d20d062312e0ac6619e21053d91c565669a514441c005a8f14113f9c7b36f4e0f67426bc8df8cdde39af3a0baeee1165a86691bc5eeb1a91ad
7
- data.tar.gz: 978cfb92cc3f8212cf650c8f58f2cc580b3ae1644f07f65335a77f21008bb5a4834873acc64fec1a5f272406d2e022ef43657c30d0bbc6a04e70810569383ffa
6
+ metadata.gz: 83f6a385a033a7a49e5bc45fd9f3fb5f8e9cbf3bf43167bd43e0444dc0829a656aa229d14bc0b7ac4ff6d67d9ac0f392cdf7d622b281237480786440fb428fce
7
+ data.tar.gz: e723c180e2445f15ce7e2dc963f01afa0d1033e7521c49d3c2e0f85c14e52ce38474c3fc76b5076c88823d9bdfb75fb1dcf79637fb03b59538c8fbcc0c57f8c7
@@ -35,7 +35,7 @@ class WcoEmail::EmailFilter
35
35
 
36
36
  STATUS_ACTIVE = 'active'
37
37
  STATUS_INACTIVE = 'inactive'
38
- STATUSS = [ STATUS_ACTIVE, STATUS_INACTIVE ]
38
+ STATUSES = [ STATUS_ACTIVE, STATUS_INACTIVE ]
39
39
  field :status, type: :string, default: STATUS_ACTIVE
40
40
  scope :active, ->{ where( status: STATUS_ACTIVE ) }
41
41
 
@@ -180,19 +180,19 @@ class WcoEmail::MessageStub
180
180
  email_filters = WcoEmail::EmailFilter.active
181
181
  email_filters.each do |filter|
182
182
  reson = nil
183
- if filter.from_regex && @message.from.downcase.match( filter.from_regex )
183
+ if filter.from_regex.present? && @message.from.downcase.match( filter.from_regex )
184
184
  reason = 'from_regex'
185
185
  end
186
- if filter.from_exact && @message.from.downcase.include?( filter.from_exact.downcase )
186
+ if filter.from_exact.present? && @message.from.downcase.include?( filter.from_exact.downcase )
187
187
  reason = 'from_exact'
188
188
  end
189
- if filter.body_exact && @message.part_html&.include?( filter.body_exact )
189
+ if filter.body_exact.present? && @message.part_html&.include?( filter.body_exact )
190
190
  reason = 'body_exact'
191
191
  end
192
- if filter.subject_regex && @message.subject.match( filter.subject_regex )
192
+ if filter.subject_regex.present? && @message.subject.match( filter.subject_regex )
193
193
  reason = 'subject_regex'
194
194
  end
195
- if filter.subject_exact && @message.subject.downcase.include?( filter.subject_exact.downcase )
195
+ if filter.subject_exact.present? && @message.subject.downcase.include?( filter.subject_exact.downcase )
196
196
  reason = 'subject_exact'
197
197
  end
198
198
 
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.73
4
+ version: 3.1.0.74
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev