ish_models 0.0.33.167 → 0.0.33.168

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: 8fc57636dd6d156f9715cadb415fbf81801fb3f2be1200eb7314e05de8921643
4
- data.tar.gz: 84702d8af0e9f36a2d5b2cd2e661d4bce3b812a6b5bd13b6d7c2989308264b7a
3
+ metadata.gz: f231fd1652da3cd2e8113a7963919aa0148becd53e53efc85d4cb8c2d45eddd0
4
+ data.tar.gz: 77ef4b9331ef224679c2c3000e0738bba4e51be462bbddf854dc4c04c9338f80
5
5
  SHA512:
6
- metadata.gz: c7f085d7f266dab23690e7d1ec73959b11a0f336ab0da53f58a99fc8b2dc7d9d561eddbe6919e410108c6a411f0e5c876e06c549951fe5d3cbdb28b342263b87
7
- data.tar.gz: 86c44f77e1c70983802830ca62d517844137d1e7a0940033fd372457138cce994901decf15d73fa64b5082e5ad44bec0a87be8a7822b5b544f9bb11698c6d34f
6
+ metadata.gz: a26b8edb378762eb22caca40ebe5ee895dc16cb563332431b964769d94c87bb0873312c153a40cc162e779daf60db0085452ce46a6459c0c81f3a9dafe24dc77
7
+ data.tar.gz: 2c6ebe91cefc06019d5090ded6f04bd95389002dc765cb359f3efdb46ab5092a72cbfd3202d6987283ae0a7aaa0590697976f0cae9d0abe1ecc87d3142970905
@@ -0,0 +1,29 @@
1
+
2
+ require 'aws-sdk'
3
+
4
+ class ::Gameui::Asset3d
5
+ include Mongoid::Document
6
+ include Mongoid::Timestamps
7
+ include Mongoid::Paperclip
8
+ include Ish::Utils
9
+
10
+ belongs_to :marker, class_name: 'Gameui::Marker', optional: true
11
+
12
+ has_mongoid_attached_file :object,
13
+ :storage => :s3,
14
+ :s3_credentials => ::S3_CREDENTIALS,
15
+ :path => "assets3d/:id/:filename",
16
+ :s3_protocol => 'https',
17
+ :validate_media_type => false,
18
+ s3_region: ::S3_CREDENTIALS[:region]
19
+
20
+ do_not_validate_attachment_file_type :object
21
+
22
+ def export_fields
23
+ %w|
24
+ marker_id
25
+ asset3d_file_name asset3d_content_type asset3d_file_size asset3d_updated_at asset3d_fingerprint
26
+ |;
27
+ end
28
+
29
+ end
data/lib/gameui/marker.rb CHANGED
@@ -30,6 +30,7 @@ class ::Gameui::Marker
30
30
 
31
31
  has_one :image, class_name: '::Ish::ImageAsset', inverse_of: :marker
32
32
  has_one :title_image, class_name: '::Ish::ImageAsset', inverse_of: :marker_title
33
+ has_one :asset3d, class_name: '::Gameui::Asset3d'
33
34
 
34
35
  field :deleted_at, type: Time, default: nil # @TODO: replace with paranoia
35
36
 
data/lib/ish_models.rb CHANGED
@@ -26,6 +26,10 @@ module IshModels
26
26
  end
27
27
  end
28
28
 
29
+ # Needs to be before gameui/asset3d
30
+ require 'ish/utils'
31
+
32
+ require 'gameui/asset3d'
29
33
  require 'gameui/map'
30
34
  require 'gameui/map_bookmark'
31
35
  require 'gameui/marker'
@@ -43,7 +47,6 @@ require 'ish/lead'
43
47
  require 'ish/payment'
44
48
  require 'ish/premium_item'
45
49
  require 'ish/unsubscribe'
46
- require 'ish/utils'
47
50
  require 'ish/user_profile'
48
51
 
49
52
  require 'city'
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.167
4
+ version: 0.0.33.168
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -121,6 +121,7 @@ files:
121
121
  - lib/event.rb
122
122
  - lib/feature.rb
123
123
  - lib/gallery.rb
124
+ - lib/gameui/asset3d.rb
124
125
  - lib/gameui/map.rb
125
126
  - lib/gameui/map_bookmark.rb
126
127
  - lib/gameui/marker.rb