ish_models 0.0.33.192 → 0.0.33.194
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iro/option_price_item.rb-trash +8 -0
- data/lib/ish/email_campaign.rb +6 -9
- data/lib/ish/email_context.rb +1 -28
- data/lib/ish_models.rb +4 -3
- data/lib/office/email_message.rb +1 -1
- metadata +2 -2
- data/lib/ish/input_error.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18d1d504900c0b683dc0d876ac2c7a00552a0baed0e364f8ca53d40a20607a9d
|
4
|
+
data.tar.gz: 0dc8f5df4aba00affe8c276647c76155ab07495ad8fb25ac2524af1b4096aa13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0feae87ac0aeb2d409ac578e604d8b574a86b72668001bda1b7f3fa4e5f821c283e2d1a97ecdd387b4dc0099c6599c63bda6c0c5771b4dbf6a57aa4140fdb4d5
|
7
|
+
data.tar.gz: b0eca2407e7950188a0b5525261f4fda5d37e3e42413781d71e4001079d996c2f89809dba4a9f3e60defdfac51ae15e92a4b4e46c8e874b6cc97e5fbb6877114
|
data/lib/ish/email_campaign.rb
CHANGED
@@ -35,13 +35,13 @@ class Ish::EmailCampaign
|
|
35
35
|
field :sent_at, type: DateTime
|
36
36
|
field :send_at, type: DateTime
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
def campaign_leads
|
39
|
+
return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
|
40
|
+
end
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
def leads
|
43
|
+
campaign_leads&.map { |p| p.lead }
|
44
|
+
end
|
45
45
|
|
46
46
|
|
47
47
|
##
|
@@ -57,9 +57,6 @@ class Ish::EmailCampaign
|
|
57
57
|
out
|
58
58
|
end
|
59
59
|
|
60
|
-
field :to_email
|
61
|
-
validates_presence_of :to_email, if: -> { type == TYPE_SINGLE }
|
62
|
-
|
63
60
|
#
|
64
61
|
# For tracking
|
65
62
|
#
|
data/lib/ish/email_context.rb
CHANGED
@@ -25,15 +25,6 @@ class Ish::EmailContext
|
|
25
25
|
[ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
|
26
26
|
end
|
27
27
|
|
28
|
-
## @deprecated, campaigns are now separate.
|
29
|
-
TYPE_SINGLE = 'TYPE_SINGLE'
|
30
|
-
TYPE_CAMPAIGN = 'TYPE_CAMPAIGN'
|
31
|
-
field :type, default: TYPE_SINGLE
|
32
|
-
def self.types_list
|
33
|
-
[ [TYPE_SINGLE, TYPE_SINGLE], [TYPE_CAMPAIGN, TYPE_CAMPAIGN] ]
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
28
|
field :subject
|
38
29
|
validates_presence_of :subject
|
39
30
|
|
@@ -47,23 +38,6 @@ class Ish::EmailContext
|
|
47
38
|
field :sent_at, type: DateTime
|
48
39
|
field :send_at, type: DateTime
|
49
40
|
|
50
|
-
def self.all_campaigns
|
51
|
-
Ish::EmailContext.where( type: TYPE_CAMPAIGN )
|
52
|
-
end
|
53
|
-
|
54
|
-
def self.unsent_campaigns
|
55
|
-
Ish::EmailContext.where( type: TYPE_CAMPAIGN, sent_at: nil )
|
56
|
-
end
|
57
|
-
|
58
|
-
def campaign_leads
|
59
|
-
if self.type == TYPE_CAMPAIGN
|
60
|
-
return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def leads
|
65
|
-
campaign_leads&.map { |p| p.lead }
|
66
|
-
end
|
67
41
|
|
68
42
|
def self.unsent
|
69
43
|
new.unsent
|
@@ -95,7 +69,7 @@ class Ish::EmailContext
|
|
95
69
|
end
|
96
70
|
|
97
71
|
field :to_email
|
98
|
-
validates_presence_of :to_email
|
72
|
+
validates_presence_of :to_email
|
99
73
|
|
100
74
|
#
|
101
75
|
# For tracking
|
@@ -103,4 +77,3 @@ class Ish::EmailContext
|
|
103
77
|
attr_reader :tid
|
104
78
|
|
105
79
|
end
|
106
|
-
EmailCampaign = Ish::EmailContext
|
data/lib/ish_models.rb
CHANGED
@@ -8,6 +8,8 @@ require 'kaminari/mongoid'
|
|
8
8
|
|
9
9
|
class Gameui; end
|
10
10
|
|
11
|
+
# module Iro; end
|
12
|
+
class Ish::InputError < RuntimeError; end
|
11
13
|
module Ish; end
|
12
14
|
|
13
15
|
# I need this thing for permissions???
|
@@ -15,8 +17,6 @@ class Manager; end
|
|
15
17
|
|
16
18
|
module Office; end
|
17
19
|
|
18
|
-
module Warbler; end
|
19
|
-
|
20
20
|
module IshModels
|
21
21
|
|
22
22
|
class << self
|
@@ -44,6 +44,8 @@ require 'gameui/map_bookmark'
|
|
44
44
|
require 'gameui/marker'
|
45
45
|
require 'gameui/premium_purchase'
|
46
46
|
|
47
|
+
# require 'iro/option_price_item'
|
48
|
+
|
47
49
|
require 'ish/cache_key'
|
48
50
|
require 'ish/crawler'
|
49
51
|
require 'ish/email_campaign'
|
@@ -52,7 +54,6 @@ require 'ish/email_template'
|
|
52
54
|
require 'ish/email_unsubscribe'
|
53
55
|
require 'ish/gallery_name'
|
54
56
|
require 'ish/image_asset'
|
55
|
-
require 'ish/input_error'
|
56
57
|
require 'ish/invoice'
|
57
58
|
require 'ish/lorem_ipsum'
|
58
59
|
require 'ish/meeting'
|
data/lib/office/email_message.rb
CHANGED
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.
|
4
|
+
version: 0.0.33.194
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/gameui/map_bookmark.rb
|
123
123
|
- lib/gameui/marker.rb
|
124
124
|
- lib/gameui/premium_purchase.rb
|
125
|
+
- lib/iro/option_price_item.rb-trash
|
125
126
|
- lib/ish/cache_key.rb
|
126
127
|
- lib/ish/configuration.rb
|
127
128
|
- lib/ish/crawler.rb
|
@@ -131,7 +132,6 @@ files:
|
|
131
132
|
- lib/ish/email_unsubscribe.rb
|
132
133
|
- lib/ish/gallery_name.rb
|
133
134
|
- lib/ish/image_asset.rb
|
134
|
-
- lib/ish/input_error.rb
|
135
135
|
- lib/ish/invoice.rb
|
136
136
|
- lib/ish/lorem_ipsum.rb
|
137
137
|
- lib/ish/meeting.rb
|
data/lib/ish/input_error.rb
DELETED