wco_models 3.1.0.51 → 3.1.0.52

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: d2aedb50a30f432370f7a3d8dce814677b95ec4373a64594aae4b142fa7d31fa
4
- data.tar.gz: 6b56ff81d8003170a2d7f2035de0b5708ece56d3bf2576c5f4f2575b8d4e5a84
3
+ metadata.gz: 9ae41306d1c2d1a86acdc705f296feae8ba6cb9d31dcef4c1794cabaa69d8b2c
4
+ data.tar.gz: 1d34eb80dc069bb504a62a08ee25da17c92cebb5805399ff570954c8bd163c3e
5
5
  SHA512:
6
- metadata.gz: a1887e0d49d5d016b0e672118428bc71809375a1989ee89fa1976eafb8edf4976c27f5733550fd8b82921b49e819c14d3f158a7c56d469660de33fe6c36c3b01
7
- data.tar.gz: d2330182a059ad9699441c11e40fd81b7867ec7650cad664a4f8848b56f7f8c2bbf8f712a4104f72b9950ed1c7f0483524921de999def7410a3935a319e0a727
6
+ metadata.gz: 46d410929c0405cffbd123b8b376a3629fc748e75df699b56bd94d70b9576c22c09358e64c32f3bfea59fc6b1bd7ed471cb70af2c9c4cd60170b75599df4a0d6
7
+ data.tar.gz: 5b7280694b1ba7790c33e70e1f0c8555733f6d2912e7af2bdaba73516adfe6417e1594384ca84896cf1d7b6ea3f9cdd1dcf419188f38dd19f0fc69ce1f20a37c
@@ -11,8 +11,9 @@
11
11
  border-left-width: 0;
12
12
  }
13
13
 
14
- .pagination {
14
+ ul.pagination {
15
15
  border-left: 1px solid #ddd;
16
+ margin: 1em 0;
16
17
 
17
18
  li.active {
18
19
  padding: 0 14px;
@@ -26,6 +26,13 @@ textarea {
26
26
  border-right: 1px solid red !important;
27
27
  }
28
28
 
29
+ .bordered {
30
+ border: 1px solid gray;
31
+ border-radius: 5px;
32
+
33
+ padding: 0.5em;
34
+ }
35
+
29
36
  table.bordered {
30
37
  table-layout:fixed;
31
38
  width: 100%;
@@ -94,6 +101,7 @@ textarea.monospace {
94
101
  .gray,
95
102
  .grey {
96
103
  color: grey;
104
+ display: inline-block;
97
105
  }
98
106
 
99
107
  .green {
@@ -20,7 +20,14 @@ class Wco::Tag
20
20
  has_and_belongs_to_many :logs
21
21
 
22
22
  INBOX = 'inbox'
23
+ def self.inbox
24
+ find_or_create_by({ slug: INBOX })
25
+ end
26
+
23
27
  TRASH = 'trash'
28
+ def self.trash
29
+ find_or_create_by({ slug: TRASH })
30
+ end
24
31
 
25
32
  def self.list
26
33
  [[nil,nil]] + all.map { |p| [ p.slug, p.id ] }
@@ -17,7 +17,9 @@ class WcoEmail::Message
17
17
 
18
18
  field :in_reply_to_id, type: :string
19
19
 
20
- field :object_key, type: :string ## aka 'filename', use with bucket name + prefix. I need this!
20
+ field :bucket, default: 'ish-ses'
21
+
22
+ field :object_key ## aka 'filename', use with bucket name + prefix. I need this!
21
23
  validates :object_key, presence: true, uniqueness: true
22
24
  index({ object_key: 1 }, { unique: true, name: "object_key_idx" })
23
25
 
@@ -17,6 +17,8 @@ class WcoEmail::MessageStub
17
17
  field :status, default: STATUS_PENDING
18
18
  scope :pending, ->{ where( status: 'status_pending' ) }
19
19
 
20
+ field :bucket # 'ish-ses', 'ish-ses-2024'
21
+
20
22
  field :object_key
21
23
  validates :object_key, presence: true, uniqueness: true
22
24
  index({ object_key: 1 }, { unique: true, name: "object_key_idx" })
@@ -35,14 +37,16 @@ class WcoEmail::MessageStub
35
37
  key = the_mail.message_id || "no-key-#{Time.now.to_i}.#{rand(1000)}"
36
38
 
37
39
  @stub = WcoEmail::MessageStub.create({
40
+ bucket: ::S3_CREDENTIALS[:bucket_ses],
38
41
  object_key: key,
39
42
  status: WcoEmail::MessageStub::STATUS_PENDING,
40
43
  tags: [ @tag ],
41
44
  })
42
45
  if @stub.persisted?
43
- @client.put_object({ bucket: ::S3_CREDENTIALS[:bucket_ses],
44
- key: key,
46
+ @client.put_object({
45
47
  body: message,
48
+ bucket: ::S3_CREDENTIALS[:bucket_ses],
49
+ key: key,
46
50
  })
47
51
  else
48
52
  msg = @stub.errors.full_messages.join(", ")
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.51
4
+ version: 3.1.0.52
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-01-09 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3