ish_models 0.0.33.193 → 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: 3fc895b3cb92cc734e59ab08fba5811a59ca160946065f741548a9d6cad80be6
4
- data.tar.gz: 10d141e79f4b95490f217751152f117801b5ffb3543457f890ba89d3fe29b059
3
+ metadata.gz: 18d1d504900c0b683dc0d876ac2c7a00552a0baed0e364f8ca53d40a20607a9d
4
+ data.tar.gz: 0dc8f5df4aba00affe8c276647c76155ab07495ad8fb25ac2524af1b4096aa13
5
5
  SHA512:
6
- metadata.gz: 3e867c1540b0759257d40f318f0636dff5f537b1a4c3d727c83b0d8f905c12966c485885c60e48b23ebce496309a9c500b05800eb322712d10a59095fe09a168
7
- data.tar.gz: cdca53cb93a7925c869a690347313040023ca6c0b840d934f8a3e6f40d344f2f15cd7df3477844b3751d3e062d87366e8fd712156f0f1b7889be1977a0a80e54
6
+ metadata.gz: 0feae87ac0aeb2d409ac578e604d8b574a86b72668001bda1b7f3fa4e5f821c283e2d1a97ecdd387b4dc0099c6599c63bda6c0c5771b4dbf6a57aa4140fdb4d5
7
+ data.tar.gz: b0eca2407e7950188a0b5525261f4fda5d37e3e42413781d71e4001079d996c2f89809dba4a9f3e60defdfac51ae15e92a4b4e46c8e874b6cc97e5fbb6877114
@@ -1,4 +1,6 @@
1
1
 
2
+ require 'active_record'
3
+
2
4
  class ::Iro::OptionPriceItem < ActiveRecord::Base
3
5
 
4
6
  self.table_name = 'iro_option_price_items'
@@ -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,7 +8,7 @@ require 'kaminari/mongoid'
8
8
 
9
9
  class Gameui; end
10
10
 
11
- module Iro; end
11
+ # module Iro; end
12
12
  class Ish::InputError < RuntimeError; end
13
13
  module Ish; end
14
14
 
@@ -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'
@@ -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.193
4
+ version: 0.0.33.194
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -108,34 +108,6 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: mysql2
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 0.5.4
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 0.5.4
125
- - !ruby/object:Gem::Dependency
126
- name: rails
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 6.1.0
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 6.1.0
139
111
  description: models of ish
140
112
  email: victor@wasya.co
141
113
  executables: []
@@ -150,7 +122,7 @@ files:
150
122
  - lib/gameui/map_bookmark.rb
151
123
  - lib/gameui/marker.rb
152
124
  - lib/gameui/premium_purchase.rb
153
- - lib/iro/option_price_item.rb
125
+ - lib/iro/option_price_item.rb-trash
154
126
  - lib/ish/cache_key.rb
155
127
  - lib/ish/configuration.rb
156
128
  - lib/ish/crawler.rb