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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6da0c443f4fa1d09ab99af29832021711aaa151abd165a0b5e70ef5c60361b77
4
- data.tar.gz: d5acaf403668bc945aee9fc93ecbfaca3a46621dbe596035f7cd5afb1bed8e06
3
+ metadata.gz: 18d1d504900c0b683dc0d876ac2c7a00552a0baed0e364f8ca53d40a20607a9d
4
+ data.tar.gz: 0dc8f5df4aba00affe8c276647c76155ab07495ad8fb25ac2524af1b4096aa13
5
5
  SHA512:
6
- metadata.gz: e101f25e3b4c00530cbd1dfaad7510fa0204b6e226e01075107d0a6bf41d07fbde8c6889368657345db175b03e82c0a0167a7f448ac464fcbbf7a24d32241d0d
7
- data.tar.gz: e16cc3d97165e974b24649a9759c87ec3c6a7e49a8ad158bfeda23a7d6e7bb57decf6571363d5cc12848aa0f7e4ef4e2a9616d558b09c900472484b53119f0d5
6
+ metadata.gz: 0feae87ac0aeb2d409ac578e604d8b574a86b72668001bda1b7f3fa4e5f821c283e2d1a97ecdd387b4dc0099c6599c63bda6c0c5771b4dbf6a57aa4140fdb4d5
7
+ data.tar.gz: b0eca2407e7950188a0b5525261f4fda5d37e3e42413781d71e4001079d996c2f89809dba4a9f3e60defdfac51ae15e92a4b4e46c8e874b6cc97e5fbb6877114
@@ -0,0 +1,8 @@
1
+
2
+ require 'active_record'
3
+
4
+ class ::Iro::OptionPriceItem < ActiveRecord::Base
5
+
6
+ self.table_name = 'iro_option_price_items'
7
+
8
+ end
@@ -35,13 +35,13 @@ class Ish::EmailCampaign
35
35
  field :sent_at, type: DateTime
36
36
  field :send_at, type: DateTime
37
37
 
38
- # def campaign_leads
39
- # return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
40
- # end
38
+ def campaign_leads
39
+ return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
40
+ end
41
41
 
42
- # def leads
43
- # campaign_leads&.map { |p| p.lead }
44
- # end
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
  #
@@ -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, if: -> { type == TYPE_SINGLE }
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'
@@ -23,7 +23,7 @@ class Office::EmailMessage
23
23
 
24
24
  field :to, type: Array, default: []
25
25
  field :cc, type: Array, default: []
26
- field :bss, type: Array, default: []
26
+ field :bcc, type: Array, default: []
27
27
  field :date, type: DateTime
28
28
  def received_at
29
29
  date
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.192
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
@@ -1,3 +0,0 @@
1
-
2
- class Ish::InputError < RuntimeError
3
- end