ish_models 0.0.33.252 → 0.0.33.254

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: 92e37a2bcbeb0a4ab4bfeaedb4b433476254ee059e28e2d5e2aa5000121e0d68
4
- data.tar.gz: 99bc9aabbebcbfcebbb2ba2d51fcd1ef08075df67090fac8d0e970ce297f8ae5
3
+ metadata.gz: ce6db03a6723dff164bcee860e6fb6471a1685802392328922b644513d2cc7bf
4
+ data.tar.gz: ed5abf8b067ae618b2b71a4b56bff0c682dd8769337bf7e1e67a90e123e2fa9a
5
5
  SHA512:
6
- metadata.gz: 95b609cb864e00524968d0e53aa5df3266eef7592781329a2e3b9218ff1a1a07195e6b0125d24b7c0370a1163b4e47e10ea4d45708f514ea6137719ab0966f99
7
- data.tar.gz: 72f14dd504eea91951cbe503c23561a11d8ff12d22326c846d75fc589a152af6a51bb0c5d4949ca06b6a7b5d939951dc9d03f92fb8c3e3b34a0a9321b06888c2
6
+ metadata.gz: 43f277ed439690def320664e94b9a8c8f5951070f4b8ff6e6c2f8e5601b84c1bc1158f09d10e4d730e6f26a7649fa6a09b73c836c1ae0b1f09672f243e880dbb
7
+ data.tar.gz: 6504f9b4ff6777ab419b74fa9c7973737fef1512c7e73ae5945a67d4554d602b098036dd24cc5a941e108c70c25efbbfc70ae9e89bd28ea1b20dc8af7a73d43c
@@ -87,7 +87,7 @@ class ::Ish::EmailContext
87
87
  def self.summary
88
88
  pipeline = [
89
89
  { '$group' => {
90
- '_id' => { '$dateToString' => { 'format' => "%Y-%m-%d", 'date' => "$sent_at" } }, 'total' => { '$sum' => 1 }
90
+ '_id' => { '$dateToString' => { 'format' => "%Y-%m-%d", 'date' => "$sent_at", 'timezone' => 'America/Chicago' } }, 'total' => { '$sum' => 1 }
91
91
  } },
92
92
  { '$sort' => { '_id': -1 } },
93
93
  ]
data/lib/newsitem.rb CHANGED
@@ -23,23 +23,20 @@ class Newsitem
23
23
 
24
24
  field :name
25
25
  field :descr
26
- def description
27
- descr
28
- end
26
+ def description; descr; end
29
27
  field :subhead
30
28
 
31
- field :image_path
32
- field :link_path
33
- field :username
34
- field :partial_name
35
-
36
29
  field :weight, :type => Integer, :default => 10
37
30
  field :n_upvotes, :type => Integer, :default => 0
38
31
  field :n_downvotes, :type => Integer, :default => 0
39
32
  field :upvoting_users, :type => Array, :default => []
40
33
  field :downvoting_users, :type => Array, :default => []
41
- field :is_feature, :type => Boolean, :default => false
42
34
 
35
+ field :image_path # @deprecated ?
36
+ field :link_path # @deprecated ?
37
+ field :iframe_src
38
+
39
+ ## This is used.
43
40
  TYPE_GALLERY = :type_gallery
44
41
  TYPE_PHOTO = :type_photo
45
42
  TYPE_REPORT = :type_report
@@ -51,9 +48,6 @@ class Newsitem
51
48
  return TYPE_VIDEO if video_id
52
49
  end
53
50
 
54
-
55
- PER_PAGE = 6
56
-
57
51
  default_scope ->{ order_by({ :created_at => :desc }) }
58
52
 
59
53
  def self.from_params item
@@ -77,11 +71,13 @@ class Newsitem
77
71
  def export_fields
78
72
  %w|
79
73
  descr
80
- gallery_id
74
+ name
75
+
81
76
  image_path
82
77
  link_path
78
+
83
79
  map_id
84
- name
80
+ gallery_id
85
81
  photo_id
86
82
  report_id
87
83
  video_id
@@ -0,0 +1,11 @@
1
+
2
+
3
+
4
+ field :username
5
+ field :partial_name
6
+ field :is_feature, :type => Boolean, :default => false
7
+
8
+
9
+
10
+ PER_PAGE = 6
11
+
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.252
4
+ version: 0.0.33.254
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -158,6 +158,7 @@ files:
158
158
  - lib/mongoid/votable.rb
159
159
  - lib/mongoid/voter.rb
160
160
  - lib/newsitem.rb
161
+ - lib/newsitem.rb-trash
161
162
  - lib/office/action.rb
162
163
  - lib/office/action_tie.rb
163
164
  - lib/office/email_action.rb