paid_up 0.4.3 → 0.4.4
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/app/models/paid_up/feature.rb +3 -9
- data/paid_up.gemspec +2 -2
- data/spec/models/paid_up/feature_spec.rb +1 -6
- 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: b2b06e3abd24200d6330ff0537af57e73905d38c
|
4
|
+
data.tar.gz: fde1e8e6e5277bb8e2b8442938e8b43d89d7bffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39ba3f42ec2d68d6c54ab841d68a98881ab8fc8acbc2f13e3605ebb3d76c9ed2fc55bfaf56e686fb4107aeb6183d85cf7b68d11c753e26647a38bb82315f8461
|
7
|
+
data.tar.gz: 37d5f15b51653120b295749ea80d97df0440f84ae0f95ef0d389c9fbcb875e7ccace6c608e9d91cc91acde794890f43aa9f1923b20068505fac1a0c9ad1fa79a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
@@ -2,7 +2,7 @@ class PaidUp::Feature
|
|
2
2
|
include ActiveModel::Model
|
3
3
|
include ActiveModel::AttributeMethods
|
4
4
|
|
5
|
-
@@instance_collector =
|
5
|
+
@@instance_collector = []
|
6
6
|
|
7
7
|
attr_accessor :slug, :title, :setting_type, :description
|
8
8
|
|
@@ -13,9 +13,7 @@ class PaidUp::Feature
|
|
13
13
|
|
14
14
|
def initialize(attributes = {})
|
15
15
|
super attributes
|
16
|
-
|
17
|
-
@@instance_collector[self.slug.to_sym] = self
|
18
|
-
end
|
16
|
+
@@instance_collector << self
|
19
17
|
end
|
20
18
|
|
21
19
|
def to_s
|
@@ -35,11 +33,7 @@ class PaidUp::Feature
|
|
35
33
|
end
|
36
34
|
|
37
35
|
def self.all
|
38
|
-
@@instance_collector
|
39
|
-
end
|
40
|
-
|
41
|
-
def self.find_by_slug(slug)
|
42
|
-
@@instance_collector[slug.to_sym]
|
36
|
+
@@instance_collector
|
43
37
|
end
|
44
38
|
|
45
39
|
def self.find_all(**conditions)
|
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.4.
|
5
|
+
# stub: paid_up 0.4.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "paid_up"
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.4"
|
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"]
|
@@ -22,18 +22,13 @@ describe PaidUp::Feature do
|
|
22
22
|
it { should eq [ad_free_feature, groups_feature, doodads_feature] }
|
23
23
|
end
|
24
24
|
|
25
|
-
context '.find_by_slug' do
|
26
|
-
subject { PaidUp::Feature.find_by_slug('groups') }
|
27
|
-
it { should be_a PaidUp::Feature }
|
28
|
-
end
|
29
|
-
|
30
25
|
context '.find_all' do
|
31
26
|
subject { PaidUp::Feature.find_all( setting_type: 'rolify_rows') }
|
32
27
|
it { should be_an Array }
|
33
28
|
end
|
34
29
|
|
35
30
|
context '.find' do
|
36
|
-
subject { PaidUp::Feature.find(
|
31
|
+
subject { PaidUp::Feature.find(slug: 'groups') }
|
37
32
|
it { should be_a PaidUp::Feature }
|
38
33
|
end
|
39
34
|
end
|