ish_models 0.0.33.179 → 0.0.33.180

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: cd4856588ae1c58f116e5b7aab0c19f849ee3a259fed84f579e2446d53490b89
4
- data.tar.gz: 65cf00bc66e043d83c98c7a33177e73ef779b2348b21d7bc3a10f5dea19c7b15
3
+ metadata.gz: ab9ab58fbdd675ba653fecc53922fe73e06f1f8664f96b71b4be65eaff96f937
4
+ data.tar.gz: b41ae3d27c737d8555666e8bb8a36ba10e24d8ff9fb4f31e1ed490392ad1231b
5
5
  SHA512:
6
- metadata.gz: bd32c9f1c11ffc7dfb70adb0e61d8c2c8f2bccc4c63cfe56a35e979b922362d1c37eae5afbf16010ef399cff9067042ecf0d4f531199c0eac1777350e218a2b7
7
- data.tar.gz: '0586b6ee15066575877cd6aef440a591f4f1cb7de7e4d7df31b0a68485f9d38cdc359dbf5f079558dd9447ec1a01d94d46ec413d760a78b216124a354cc9ba09'
6
+ metadata.gz: bb011cfb98cd182ff924472416b69a578e70c7c63f48da960b70221ed7d38d32d0611ae6a447f969db087c177b14d7f135f9d276ea98ba651e5d679bcd20eaf7
7
+ data.tar.gz: 8f64e5052dbca35cfea1ebefc000f712003b92c1a48a096e743ef84b13f891b8bf03ddde64989594407e0574a5fc75a525b56983e8e18c8a82cca633e373734a
data/lib/gallery.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'kaminari/mongoid'
2
1
 
3
2
  class Gallery
4
3
  include ::Mongoid::Document
@@ -49,29 +48,6 @@ class Gallery
49
48
  has_many :newsitems # seems correct. _vp_ 2022-03-21
50
49
  has_many :photos
51
50
 
52
- set_callback(:create, :before) do |doc|
53
-
54
- #
55
- # newsitems
56
- #
57
- if doc.is_public
58
-
59
- # if doc.site
60
- # sites = Site.where( :domain => doc.site.domain )
61
- # sites.each do |site|
62
- # n = Newsitem.new {}
63
- # n.gallery = doc
64
- # n.username = doc.username
65
- # site.newsitems << n
66
- # flag = site.save
67
- # if !flag
68
- # puts! site.errors
69
- # end
70
- # end
71
- # end
72
- end
73
-
74
- end
75
51
 
76
52
  # @deprecated, use Gallery::ACTIONS
77
53
  def self.actions
@@ -1,5 +1,5 @@
1
1
 
2
- require 'aws-sdk'
2
+ # require 'aws-sdk'
3
3
  require 'mongoid_paperclip'
4
4
 
5
5
  class ::Gameui::Asset3d
data/lib/gameui/map.rb CHANGED
@@ -49,10 +49,18 @@ class ::Gameui::Map
49
49
  field :rated, default: 'pg-13' # 'r', 'nc-17'
50
50
 
51
51
  ## Possible keys: description, map, markers, newsitems,
52
- field :labels, type: Object, default: {}
52
+ field :labels, type: Object, default: <<~AOL
53
+ { "description":"Description", "map":"Map", "markers":"Markers", "newsitems":"Newsitems"
54
+ }
55
+ AOL
56
+
53
57
  ## Possible keys:
54
58
  ## config.description.collapsible
55
- field :config, type: Object, default: {}
59
+ field :config, type: Object, default: <<~AOL
60
+ { "map_panel_type": "ThreePanelV1",
61
+ "studio": { "hasFloor": true, "studioLength": 2500, "studioWidth": 2500 }
62
+ }
63
+ AOL
56
64
 
57
65
  # @deprecated, dont use!
58
66
  field :img_path
data/lib/gameui/marker.rb CHANGED
@@ -24,12 +24,18 @@ class ::Gameui::Marker
24
24
  has_one :image, class_name: '::Ish::ImageAsset', inverse_of: :marker
25
25
  has_one :title_image, class_name: '::Ish::ImageAsset', inverse_of: :marker_title
26
26
  has_one :asset3d, class_name: '::Gameui::Asset3d'
27
+ def is_3d
28
+ !!asset3d
29
+ end
27
30
 
28
31
  field :deleted_at, type: Time, default: nil # @TODO: replace with paranoia
29
32
 
30
33
  ## @TODO: abstract this into a module
31
34
  field :x, :type => Float, default: 0
32
35
  field :y, :type => Float, default: 0
36
+ field :z, :type => Float, default: 0
37
+ field :castShadow, type: Boolean, default: true
38
+ field :receiveShadow, type: Boolean, default: false
33
39
 
34
40
  field :is_public, type: Boolean, default: true
35
41
  def self.public
@@ -7,6 +7,8 @@ class Ish::EmailContext
7
7
  include Mongoid::Document
8
8
  include Mongoid::Timestamps
9
9
 
10
+ PAGE_PARAM_NAME = 'email_contexts_page'
11
+
10
12
  field :to_email
11
13
  validates_presence_of :to_email
12
14
 
@@ -1,5 +1,5 @@
1
1
 
2
- require 'aws-sdk'
2
+ # require 'aws-sdk'
3
3
  require 'mongoid_paperclip'
4
4
 
5
5
  class Ish::ImageAsset
data/lib/ish_models.rb CHANGED
@@ -1,6 +1,8 @@
1
1
 
2
2
  require 'ish/railtie' if defined?(Rails)
3
3
  require 'ish/configuration'
4
+ require 'aws-sdk-s3'
5
+ require 'kaminari/mongoid'
4
6
 
5
7
  ::S3_CREDENTIALS ||= {}
6
8
 
data/lib/newsitem.rb CHANGED
@@ -11,7 +11,6 @@ class Newsitem
11
11
  include Mongoid::Votable
12
12
  vote_point self, :up => +1, :down => -1
13
13
 
14
- belongs_to :city, optional: true
15
14
  belongs_to :gallery, optional: true # seems correct. _vp_ 2022-03-21
16
15
  def gallery
17
16
  self.gallery_id ? Gallery.unscoped.find( self.gallery_id ) : nil
@@ -20,8 +19,6 @@ class Newsitem
20
19
  belongs_to :profile, optional: true, class_name: 'Ish::UserProfile'
21
20
  belongs_to :photo, optional: true
22
21
  belongs_to :report, optional: true
23
- belongs_to :site, optional: true
24
- belongs_to :tag, optional: true
25
22
  belongs_to :video, optional: true
26
23
 
27
24
  field :name
data/lib/photo.rb CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- require 'aws-sdk'
2
+ # require 'aws-sdk'
3
3
  require 'mongoid_paperclip'
4
4
 
5
5
  class Photo
data/lib/report.rb CHANGED
@@ -77,40 +77,6 @@ class Report
77
77
  self.where( :is_public => true, :is_trash => false ).order_by( :created_at => :desc )
78
78
  end
79
79
 
80
- set_callback :update, :after do |doc|
81
- Site.update_all updated_at: Time.now
82
- end
83
-
84
- # set_callback :create, :after do |doc|
85
- # if doc.is_public
86
-
87
- # if !doc.venue_ids.blank?
88
- # ( doc.venue_ids || [] ).each do |venue_id|
89
- # v = Venue.find venue_id
90
- # u = ::IshModels::User.find doc.user_id
91
- # n = Newsitem.new
92
- # n.username = u.username unless u.blank?
93
- # n.report = doc
94
- # v.newsitems << n
95
- # v.save
96
- # end
97
- # end
98
-
99
- # unless doc.city.blank?
100
- # city = City.find doc.city.id
101
- # if defined?( doc.profile ) && doc.profile
102
- # username = doc.profile.username || 'anon'
103
- # else
104
- # username = '<username>'
105
- # end
106
- # n = Newsitem.new :report => doc, :username => username
107
- # city.newsitems << n
108
- # city.save
109
- # city.touch
110
- # end
111
- # end
112
- # end
113
-
114
80
  def self.clear
115
81
  if Rails.env.test?
116
82
  self.unscoped.each { |r| r.remove }
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.179
4
+ version: 0.0.33.180
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-05-10 00:00:00.000000000 Z
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: aws-sdk
98
+ name: aws-sdk-s3
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -160,7 +160,7 @@ homepage: https://wasya.co
160
160
  licenses:
161
161
  - Proprietary
162
162
  metadata: {}
163
- post_install_message:
163
+ post_install_message:
164
164
  rdoc_options: []
165
165
  require_paths:
166
166
  - lib
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubygems_version: 3.1.6
179
- signing_key:
179
+ signing_key:
180
180
  specification_version: 4
181
181
  summary: models of ish
182
182
  test_files: []