wco_models 3.1.0.149 → 3.1.0.151
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: 1e824b16145363e5d17b5d92ec49ad8eed54b66493576073881120a6b45da2c3
|
|
4
|
+
data.tar.gz: b317c3d100065b7bb886493af60a8ca0588150b896243a6228ad721a0a820c0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: babbbaad0b95c6aa87a58c0e15dadd69e532d258190292c5a532af6ecc7aaeb469e49f672eb62c4e339186a51faa9675d930e6d871e9ac814b282d8f1cdf1fe3
|
|
7
|
+
data.tar.gz: 57c2329932c5d2e763732b19f543228f521871443b7b1cbec198f3adea9d10d9df7edb532e919a01cd04d44d16b66cea6097f7f60deb3229b4377c31aea030fb
|
|
@@ -17,6 +17,9 @@ class WcoEmail::EmailFilter
|
|
|
17
17
|
field :body_regex
|
|
18
18
|
field :body_exact
|
|
19
19
|
|
|
20
|
+
field :skip_from_regex
|
|
21
|
+
field :skip_to_exact
|
|
22
|
+
|
|
20
23
|
belongs_to :tag, class_name: 'Wco::Tag', inverse_of: :email_filters, optional: true
|
|
21
24
|
|
|
22
25
|
KIND_AUTORESPOND_TMPL = 'autorespond-template'
|
|
@@ -194,7 +194,22 @@ class WcoEmail::MessageStub
|
|
|
194
194
|
|
|
195
195
|
if reason
|
|
196
196
|
puts! "Applying filter #{filter} to conv #{@message.conversation} for matching #{reason}" if DEBUG
|
|
197
|
-
|
|
197
|
+
|
|
198
|
+
## skip
|
|
199
|
+
skip_reason = nil
|
|
200
|
+
if filter.skip_to_exact.present? && @message.to&.downcase.include?( filter.skip_to_exact.downcase )
|
|
201
|
+
skip_reason = 'skip_to_exact'
|
|
202
|
+
end
|
|
203
|
+
if filter.skip_from_regex.present? && @message.from.downcase.match( filter.skip_from_regex )
|
|
204
|
+
skip_reason = 'skip_from_regex'
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if skip_reason
|
|
208
|
+
puts! "NOT Applying filter #{filter} to conv #{@message.conversation} for matching #{skip_reason}" if DEBUG
|
|
209
|
+
else
|
|
210
|
+
@message.apply_filter( filter )
|
|
211
|
+
end
|
|
212
|
+
|
|
198
213
|
end
|
|
199
214
|
end
|
|
200
215
|
|
|
@@ -6,6 +6,9 @@ class WcoHosting::Appliance
|
|
|
6
6
|
store_in collection: 'wco_appliances'
|
|
7
7
|
|
|
8
8
|
has_many :logs, as: :obj, class_name: 'Wco::Log'
|
|
9
|
+
field :stdout, type: :string, default: ''
|
|
10
|
+
field :stderr, type: :string, default: ''
|
|
11
|
+
|
|
9
12
|
|
|
10
13
|
belongs_to :leadset, class_name: 'Wco::Leadset', inverse_of: :appliances
|
|
11
14
|
belongs_to :subscription, class_name: 'Wco::Subscription' # , inverse_of: :appliance
|
|
@@ -24,12 +24,13 @@ class WcoHosting::ApplianceTmpl
|
|
|
24
24
|
# ac.instance_variable_set( :@tmpl, self )
|
|
25
25
|
# rendered_str = ac.render_to_string("wco_hosting/scripts/nginx_site.conf")
|
|
26
26
|
# Wco::Log.puts! rendered_str, 'add_nginx_site rendered_str', obj: @obj
|
|
27
|
-
|
|
28
27
|
# file = Tempfile.new('prefix')
|
|
29
28
|
# file.write rendered_str
|
|
30
29
|
# file.close
|
|
31
30
|
# end
|
|
32
31
|
|
|
32
|
+
field :stdout, type: :string, default: ''
|
|
33
|
+
field :stderr, type: :string, default: ''
|
|
33
34
|
|
|
34
35
|
field :image
|
|
35
36
|
# validates :image, presence: true
|
|
@@ -90,7 +91,9 @@ class WcoHosting::ApplianceTmpl
|
|
|
90
91
|
self.product_id = stripe_product.id
|
|
91
92
|
end
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
def self.list
|
|
95
|
+
[[nil,nil]] + all.map { |a| [ a.kind, a.id ] }
|
|
96
|
+
end
|
|
94
97
|
def to_s
|
|
95
98
|
"#{kind}-#{version}"
|
|
96
99
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wco_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.0.
|
|
4
|
+
version: 3.1.0.151
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Victor Pudeyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-s3
|