paid_up 0.11.2 → 0.11.3

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
  SHA1:
3
- metadata.gz: abd557c70b1d7b9f8fee5a7cc7d7cbdf94bd0fae
4
- data.tar.gz: e6866e40fc101aab977c48b02e3223d8d27a0094
3
+ metadata.gz: ebe199b88e1f68ea12a10f571976b02a7e8b5ee4
4
+ data.tar.gz: 6d7ebdf8f69bf016e795f506165a1d3f15c76e74
5
5
  SHA512:
6
- metadata.gz: a66dd679a1eae721bb55cf217385c500f1d5369d4d83ae10d0816b5c6993a7533c49fafe99f966bc68375b4b8b821eeb69c6f380d72b74867f7320643dd56f9a
7
- data.tar.gz: cf876b3ffa897bcd7fc20e3d5848460fd77cbd6652442a12905fa518094949fad967038a2dc7fdb7b9b48f4a7326f58d77e959e3917e06b1ce780481408e6be0
6
+ metadata.gz: dd6301912a1cd144ad8d96232c18026ec96f9a51ebc03025ae32efaf0b1b125b4ab74c6dc1a076dff338887252f899f1d27e9f9bb076ee4a2065e475aab3078c
7
+ data.tar.gz: ef70897d1978d14494a0200a83c8325ee397aa57808d68fdf7d8077a258be90652828389d573dbfa5b6e913a2cf6fee449f916813f21b881c3715f387a4c7bcc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.2
1
+ 0.11.3
@@ -560,10 +560,10 @@
560
560
  null,
561
561
  1,
562
562
  1,
563
- 1,
564
563
  null,
565
564
  1,
566
565
  1,
566
+ 1,
567
567
  51,
568
568
  null,
569
569
  null,
@@ -1685,7 +1685,7 @@
1685
1685
  1090,
1686
1686
  null,
1687
1687
  null,
1688
- 625,
1688
+ 636,
1689
1689
  null,
1690
1690
  null,
1691
1691
  null,
@@ -2567,6 +2567,6 @@
2567
2567
  null
2568
2568
  ]
2569
2569
  },
2570
- "timestamp": 1487606390
2570
+ "timestamp": 1487608317
2571
2571
  }
2572
2572
  }
@@ -3,19 +3,20 @@ module PaidUp
3
3
  # PaidFor Mixin
4
4
  module PaidFor
5
5
  extend ActiveSupport::Concern
6
- @@scope = {}
7
6
 
8
7
  class_methods do
8
+ attr_accessor :paid_for_scope_symbol # Creates class-level instance var
9
+
9
10
  def feature
10
11
  PaidUp::Feature.find_by_slug(table_name)
11
12
  end
12
13
 
13
14
  def paid_for_scope
14
- send(@@scope[table_name.to_sym])
15
+ send(self.paid_for_scope_symbol)
15
16
  end
16
17
 
17
18
  def paid_for(options = {})
18
- @@scope[table_name.to_sym] = options[:scope] || :all
19
+ self.paid_for_scope_symbol = options.fetch(:scope, :all)
19
20
  feature.nil? && raise(
20
21
  :feature_not_found_feature.l(feature: table_name)
21
22
  )
@@ -70,12 +71,12 @@ module PaidUp
70
71
  when 'table_rows'
71
72
  ids += subscriber.send(self.class.table_name)
72
73
  .paid_for_scope
73
- .pluck(:id)
74
+ .ids
74
75
  when 'rolify_rows'
75
76
  ids += self.class
76
77
  .with_role(:owner, subscriber)
77
78
  .paid_for_scope
78
- .pluck(:id)
79
+ .ids
79
80
  else
80
81
  raise(
81
82
  :no_features_associated_with_table.l(
data/paid_up.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: paid_up 0.11.2 ruby lib
5
+ # stub: paid_up 0.11.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "paid_up"
9
- s.version = "0.11.2"
9
+ s.version = "0.11.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren