ish_models 0.0.33.144 → 0.0.33.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2807ebb262080febaab78c66087d7ef4836ee6f765ce6a41aa828f9a042ccc28
4
- data.tar.gz: 5674a4862d01ce30240aaefc7654e98a9343d69f0711fa095ccf009800416299
3
+ metadata.gz: 59d512837bf94f2172832f0c5ae57d157b5dd0d9af9657f384f0cfee91efc430
4
+ data.tar.gz: 704019952ecc2c73b41b82de6ca8b43bb77a12220620a13b11070a65fe7d8f31
5
5
  SHA512:
6
- metadata.gz: b70f70184a0ac44ee02268fed7a99f0a02113f6a2f81287d5bb18d461bf13d58f495140700cd60b2271e11b8098ca9570280ae3bc5860b0426ead9044ca90abb
7
- data.tar.gz: 6523e5eace38f3781478866a99de46d6ea01842162e07d91d5e4aebaf935872440cda597f3bae37c7e62900084679bac6eae6bda300a6d9d6093aa656f8afd3b
6
+ metadata.gz: e48cacf28a8f441b30a9ef7f27f2c00184fa6891e1658cddb04d6614bbe23d1ea7f8c227581719f4f3b3b08eb6914ba41039b5c7d3c4a9bdfc406f9cc61515f3
7
+ data.tar.gz: ff6b2778ef8d29d4e6184ac44100de00d64647874b3d02a5829eacb330aab2f574f185c8525bc8307c70ce16b94842ba475bf85940e9da8a2b3aea6a88268eaf
data/lib/gameui/map.rb CHANGED
@@ -24,6 +24,8 @@ class ::Gameui::Map
24
24
  # shareable, nonpublic
25
25
  field :is_public, type: Boolean, default: true
26
26
  has_and_belongs_to_many :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_locations
27
+ default_scope ->{ where({ is_public: true, deleted_at: nil }).order_by({ slug: :desc }) }
28
+ ## @TODO: index default scope, maybe instead of HABTM, use :thru for shared profiles. Make is poly anyway?
27
29
 
28
30
 
29
31
  field :map_slug
data/lib/gameui/marker.rb CHANGED
@@ -60,8 +60,7 @@ class ::Gameui::Marker
60
60
 
61
61
  ITEM_TYPE_LOCATION = 'gameui-location'
62
62
  ITEM_TYPE_MAP = 'gameui-map'
63
- ITEM_TYPE_OBJ = 'gameui-obj'
64
- ITEM_TYPES = [ ITEM_TYPE_LOCATION, ITEM_TYPE_MAP, ITEM_TYPE_OBJ ]
63
+ ITEM_TYPES = [ ITEM_TYPE_LOCATION, ITEM_TYPE_MAP ]
65
64
  field :item_type, type: String
66
65
  validates :item_type, presence: true
67
66
 
@@ -0,0 +1,13 @@
1
+
2
+ ## THIS IS TRASH. I copy-paste repetitively instead!
3
+
4
+ ## aka: Ish::Shareable
5
+ ## adds is_public (default true) and #shared_profiles, inverse :shared_items ???
6
+ module Ish::Nonpublic
7
+
8
+ def self.included base
9
+ base.send :field, :is_public, type: Boolean, default: true
10
+ base.send :has_and_belongs_to_many, :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_markers
11
+ end
12
+
13
+ end
@@ -6,7 +6,6 @@ class Ish::UserProfile
6
6
  validates_presence_of :name
7
7
 
8
8
  field :username
9
- field :scratchpad
10
9
 
11
10
  field :email
12
11
  # validates_format_of :email, :with => ::Devise::email_regexp
data/lib/ish_models.rb CHANGED
@@ -40,6 +40,7 @@ require 'ish/input_error'
40
40
  require 'ish/invoice'
41
41
  require 'ish/issue'
42
42
  require 'ish/lead'
43
+ require 'ish/nonpublic'
43
44
  require 'ish/payment'
44
45
  require 'ish/premium_item'
45
46
  require 'ish/utils'
@@ -2,7 +2,6 @@
2
2
  class Warbler::StockWatch
3
3
  include Mongoid::Document
4
4
  include Mongoid::Timestamps
5
- store_in collection: 'ish_stock_watches'
6
5
 
7
6
  field :ticker
8
7
 
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.144
4
+ version: 0.0.33.145
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -128,6 +128,7 @@ files:
128
128
  - lib/ish/invoice.rb
129
129
  - lib/ish/issue.rb
130
130
  - lib/ish/lead.rb
131
+ - lib/ish/nonpublic.rb
131
132
  - lib/ish/payment.rb
132
133
  - lib/ish/premium_item.rb
133
134
  - lib/ish/railtie.rb
@@ -170,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
171
  - !ruby/object:Gem::Version
171
172
  version: '0'
172
173
  requirements: []
173
- rubygems_version: 3.2.25
174
+ rubygems_version: 3.0.3.1
174
175
  signing_key:
175
176
  specification_version: 4
176
177
  summary: models of ish