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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35e62d57ac3d5544a65e363919f27e7d67b7d53c
4
- data.tar.gz: 7feb9c307cd5ce4e5b58ee71094eec330182806e
3
+ metadata.gz: b2b06e3abd24200d6330ff0537af57e73905d38c
4
+ data.tar.gz: fde1e8e6e5277bb8e2b8442938e8b43d89d7bffa
5
5
  SHA512:
6
- metadata.gz: a8fd43c94d94d2d4022a95e395aa24d5721c4297dc080e94c60198c09249548c43a044c082c4756ea2564020db0180f31867c68aaee187eb40ac97483615169b
7
- data.tar.gz: 841f27343dbd53f8e49547133f81de0cd55142277af6da236b92c7ce5620847ef33a8a1754f63448525ed5e99a83e10c45e31b58bcc4d1613811ed581b1594cc
6
+ metadata.gz: 39ba3f42ec2d68d6c54ab841d68a98881ab8fc8acbc2f13e3605ebb3d76c9ed2fc55bfaf56e686fb4107aeb6183d85cf7b68d11c753e26647a38bb82315f8461
7
+ data.tar.gz: 37d5f15b51653120b295749ea80d97df0440f84ae0f95ef0d389c9fbcb875e7ccace6c608e9d91cc91acde794890f43aa9f1923b20068505fac1a0c9ad1fa79a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
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
- if self.slug.present?
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.values
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.3 ruby lib
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.3"
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(setting_type: 'rolify_rows') }
31
+ subject { PaidUp::Feature.find(slug: 'groups') }
37
32
  it { should be_a PaidUp::Feature }
38
33
  end
39
34
  end
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.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren