ish_models 0.0.33.111 → 0.0.33.112

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/report.rb +8 -0
  3. data/lib/video.rb +9 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 267542d2335422e17931afc18354dbd0441e2903084a41ae6bd958841b467bd4
4
- data.tar.gz: 83edc53811c63c9a69f7eab17a608352af9a4995ee7140fa13afa44909f974a2
3
+ metadata.gz: 8791c1ba42049bc4324ac244a09147a5ad5bc728f1026658eebf965f8785367d
4
+ data.tar.gz: 1f5ab1cab47b1bdfc28b88634a4d487bc2cc2b4389e30986fde6d2a539d8d93a
5
5
  SHA512:
6
- metadata.gz: 47c4987d9f71b6bfde2a89c9ff437cdb173986e995a10dc3475440bf0c57f3eae89c8a840d8db8dadd17a0308fb64bbe8b86fa95ca3109a3649f8294d7a6a104
7
- data.tar.gz: 95f143a5619a598c8b63f43a9ef025c3c51f5ed5f84d4206e20ddce87ee878f60d15c8317eac829366296c9d08bcbaec251d17a9ed48f573bd54c192ef4c2c88
6
+ metadata.gz: d3040db3672aaad21fd227da6c8a750c9db5a96ef9dac0b31fd117d64348b9b82949d4df50b5c88330970da27b7c73c6a337a48634a0d94591914622a9072cbe
7
+ data.tar.gz: b7aff88f1921508842ffe3143809dc2e3f6c7140dd62e6d05446fe3377f98ac1dd0a28eb87d9c6ba4e738d2b31f362972803fd1be45dc687e3e2575079629a55
data/lib/report.rb CHANGED
@@ -146,4 +146,12 @@ class Report
146
146
  self.venues[0] || nil
147
147
  end
148
148
 
149
+ ## copy-paste
150
+ field :premium_tier, type: Integer, default: 0 # how many stars need to spend, to get access? 0 = free
151
+ def is_premium
152
+ premium_tier > 0
153
+ end
154
+ def premium?; is_premium; end
155
+ has_many :premium_purchases, class_name: '::Gameui::PremiumPurchase', as: :item
156
+
149
157
  end
data/lib/video.rb CHANGED
@@ -73,4 +73,13 @@ class Video
73
73
  Site.update_all updated_at: Time.now
74
74
  end
75
75
 
76
+ ## copy-paste
77
+ field :premium_tier, type: Integer, default: 0 # how many stars need to spend, to get access? 0 = free
78
+ def is_premium
79
+ premium_tier > 0
80
+ end
81
+ def premium?; is_premium; end
82
+ has_many :premium_purchases, class_name: '::Gameui::PremiumPurchase', as: :item
83
+
84
+
76
85
  end
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.111
4
+ version: 0.0.33.112
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox