ish_models 0.0.33.173 → 0.0.33.175

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: 20bd871ec7315d71ec6071376bc4dcffedb1910a21998a08e734ba426dbc8326
4
- data.tar.gz: 245cec4e7835f4929fad40aa513036aed8f825890c01941a708dd05353b0897f
3
+ metadata.gz: 5349fd582ae245c9fc34c05cb1e72cca9868c2a3ae2012b19043e152ed5db0c7
4
+ data.tar.gz: 9ef7b974e6c2995e69a94ed68d6d16044c55b923630a02fb72ddac125f0d17c9
5
5
  SHA512:
6
- metadata.gz: 77a2e7a7ec0a3025fb3e6ff0a08653dd28d4b7eff00000231a96d717eb88b875610796b82eb7438b8513c6bd3ce4e39f04a3c2171ccfaee165f1b28725b426af
7
- data.tar.gz: 2bd5285789c8cdc07e398834a83cc586c45c0eb8a7c79c5320e2d21d835eabc7620fa5e48b1c8a7dc3d424c83507c4d23c93b82765cabb3de7bf3b3b8b49d303
6
+ metadata.gz: 383dcf0cdce386bc597cdbd64baad28d00d6647482fd23775032acf040dfb22e448f3602a1cb64132f3a18ba889a48e0799e2198356287e709b5712f1069aabc
7
+ data.tar.gz: ad082ecd825e7264a147a0dec3b7f74dac3702110e41ca77783491a67d50ed4c55d139f0d7727e48c905a74bad40d88c66f8723cdbb3897d10e2720fbf52db86
data/lib/gameui/marker.rb CHANGED
@@ -8,13 +8,6 @@ class ::Gameui::Marker
8
8
  validates_uniqueness_of :name, scope: :map_id
9
9
  validates_presence_of :name
10
10
 
11
- ## This is not a map, I don't need a slug.
12
- ## @TODO: remove it. _vp_ 2022-06-17
13
- field :slug
14
- def slug
15
- return self[:slug] || id.to_s
16
- end
17
-
18
11
  field :ordering, type: String, default: 'jjj'
19
12
 
20
13
  ITEM_TYPE_LOCATION = '::Gameui::Map' # @TODO: this used to be gameui-location . How is this different from gameui-map ?
@@ -104,7 +97,6 @@ class ::Gameui::Marker
104
97
  map_id
105
98
  name
106
99
  ordering
107
- slug
108
100
  url
109
101
  version
110
102
  w
@@ -114,8 +106,6 @@ class ::Gameui::Marker
114
106
  end
115
107
 
116
108
  def collect export_object
117
- puts! export_object, "collecting in marker: |#{slug}|."
118
-
119
109
  if image
120
110
  export_object[:image_assets][image.id.to_s] = image.id.to_s
121
111
  end
@@ -1,15 +1,26 @@
1
1
 
2
- ##
3
- ## This shouldn't really be in Ish namespace... but oh well
4
- ##
2
+ #
3
+ # This looks like it sends a single email?
4
+ #
5
5
 
6
6
  class Ish::EmailContext
7
7
  include Mongoid::Document
8
8
  include Mongoid::Timestamps
9
9
 
10
10
  field :to_email
11
+ validates_presence_of :to_email
12
+
11
13
  field :subject
12
- field :template_name
14
+ validates_presence_of :subject
15
+
16
+ field :body
17
+ validates_presence_of :body
18
+
19
+ belongs_to :email_template
20
+
21
+ field :rendered_str
22
+
23
+ field :sent_at, type: DateTime
13
24
 
14
25
  end
15
26
  EmailContext = Ish::EmailContext
@@ -0,0 +1,13 @@
1
+
2
+ class ::Ish::EmailTemplate
3
+ include Mongoid::Document
4
+ include Mongoid::Timestamps
5
+
6
+ field :slug
7
+ validates_uniqueness_of :slug, scope: [ :version ]
8
+ validates_presence_of :slug
9
+
10
+ field :version, default: '0.0.0'
11
+
12
+ end
13
+ EmailTemplate = ::Ish::EmailTemplate
data/lib/ish_models.rb CHANGED
@@ -44,6 +44,7 @@ require 'ish/cache_key'
44
44
  require 'ish/campaign'
45
45
  require 'ish/crawler'
46
46
  require 'ish/email_context'
47
+ require 'ish/email_template'
47
48
  require 'ish/gallery_name'
48
49
  require 'ish/image_asset'
49
50
  require 'ish/input_error'
@@ -56,6 +57,7 @@ require 'ish/premium_item'
56
57
  require 'ish/unsubscribe'
57
58
  require 'ish/user_profile'
58
59
 
60
+
59
61
  require 'city'
60
62
  require 'cities_user'
61
63
  require 'country'
data/lib/newsitem.rb CHANGED
@@ -29,6 +29,7 @@ class Newsitem
29
29
  def description
30
30
  descr
31
31
  end
32
+ field :subhead
32
33
 
33
34
  field :image_path
34
35
  field :link_path
data/lib/photo.rb CHANGED
@@ -27,6 +27,7 @@ class Photo
27
27
 
28
28
  field :name, :type => String
29
29
  field :descr, :type => String
30
+ field :subhead
30
31
  field :weight, :type => Integer, :default => 10
31
32
 
32
33
  field :is_public, :type => Boolean, :default => true
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.173
4
+ version: 0.0.33.175
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -132,6 +132,7 @@ files:
132
132
  - lib/ish/configuration.rb
133
133
  - lib/ish/crawler.rb
134
134
  - lib/ish/email_context.rb
135
+ - lib/ish/email_template.rb
135
136
  - lib/ish/gallery_name.rb
136
137
  - lib/ish/image_asset.rb
137
138
  - lib/ish/input_error.rb