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 +4 -4
- data/VERSION +1 -1
- data/coverage/.resultset.json +3 -3
- data/lib/paid_up/mixins/paid_for.rb +6 -5
- data/paid_up.gemspec +2 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe199b88e1f68ea12a10f571976b02a7e8b5ee4
|
4
|
+
data.tar.gz: 6d7ebdf8f69bf016e795f506165a1d3f15c76e74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd6301912a1cd144ad8d96232c18026ec96f9a51ebc03025ae32efaf0b1b125b4ab74c6dc1a076dff338887252f899f1d27e9f9bb076ee4a2065e475aab3078c
|
7
|
+
data.tar.gz: ef70897d1978d14494a0200a83c8325ee397aa57808d68fdf7d8077a258be90652828389d573dbfa5b6e913a2cf6fee449f916813f21b881c3715f387a4c7bcc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.3
|
data/coverage/.resultset.json
CHANGED
@@ -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
|
-
|
1688
|
+
636,
|
1689
1689
|
null,
|
1690
1690
|
null,
|
1691
1691
|
null,
|
@@ -2567,6 +2567,6 @@
|
|
2567
2567
|
null
|
2568
2568
|
]
|
2569
2569
|
},
|
2570
|
-
"timestamp":
|
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(
|
15
|
+
send(self.paid_for_scope_symbol)
|
15
16
|
end
|
16
17
|
|
17
18
|
def paid_for(options = {})
|
18
|
-
|
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
|
-
.
|
74
|
+
.ids
|
74
75
|
when 'rolify_rows'
|
75
76
|
ids += self.class
|
76
77
|
.with_role(:owner, subscriber)
|
77
78
|
.paid_for_scope
|
78
|
-
.
|
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.
|
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.
|
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"]
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|