planify 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,6 +111,10 @@ module Planify
111
111
  max klass, lim
112
112
  end
113
113
 
114
+ name other_plan.name
115
+ description other_plan.description
116
+ price other_plan.price
117
+
114
118
  nil
115
119
  end
116
120
 
@@ -1,3 +1,3 @@
1
1
  module Planify
2
- VERSION = [1, 0, 3].join(".")
2
+ VERSION = [1, 0, 4].join(".")
3
3
  end
@@ -173,6 +173,10 @@ describe Planify::Plan do
173
173
 
174
174
  let(:pro_plan) do
175
175
  Planify::Plans.define :pro do
176
+ name "Pro"
177
+ description "The Most Pro-tastic Plan"
178
+ price 5000.00
179
+
176
180
  max Post, 1000
177
181
  feature :ajax_search
178
182
  end
@@ -184,6 +188,13 @@ describe Planify::Plan do
184
188
  subject.features.keys.should include :ajax_search
185
189
  subject.limit(Post).should == 1000
186
190
  end
191
+
192
+ it "merges name, description and price attributes into this plan" do
193
+ subject.merge! pro_plan
194
+ subject.name.should == "Pro"
195
+ subject.description.should == "The Most Pro-tastic Plan"
196
+ subject.price.should == 5000.00
197
+ end
187
198
  end
188
199
 
189
200
  end
@@ -4,6 +4,8 @@ describe Planify::User, focus: false do
4
4
  subject { User.new }
5
5
  before(:each) do
6
6
  Planify::Plans.define :starter do
7
+ name "Starter Plan"
8
+ price 10.00
7
9
  max Post, 100
8
10
  feature :ajax_search
9
11
  end
@@ -12,11 +14,12 @@ describe Planify::User, focus: false do
12
14
  end
13
15
 
14
16
  describe ".has_plan" do
17
+
15
18
  it "should assign the plan" do
16
19
  subject.plan.limit(Post).should == 100
17
20
  end
18
21
 
19
- it "should persist the plan name" do
22
+ it "should persist the plan" do
20
23
  subject.save!
21
24
  user = User.find(subject.id)
22
25
 
metadata CHANGED
@@ -1,41 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: planify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Kyle Dayton
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
12
+ date: 2013-08-31 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: mongoid
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 3.0.0
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 3.0.0
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: activesupport
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  description: A Mongoid plugin for managing subscription plans and features
@@ -78,26 +83,33 @@ files:
78
83
  - spec/spec_helper.rb
79
84
  homepage: http://github.com/kdayton-/planify
80
85
  licenses: []
81
- metadata: {}
82
86
  post_install_message:
83
87
  rdoc_options: []
84
88
  require_paths:
85
89
  - lib
86
90
  required_ruby_version: !ruby/object:Gem::Requirement
91
+ none: false
87
92
  requirements:
88
- - - '>='
93
+ - - ! '>='
89
94
  - !ruby/object:Gem::Version
90
95
  version: '0'
96
+ segments:
97
+ - 0
98
+ hash: -3999916511898184609
91
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
+ none: false
92
101
  requirements:
93
- - - '>='
102
+ - - ! '>='
94
103
  - !ruby/object:Gem::Version
95
104
  version: '0'
105
+ segments:
106
+ - 0
107
+ hash: -3999916511898184609
96
108
  requirements: []
97
109
  rubyforge_project:
98
- rubygems_version: 2.0.7
110
+ rubygems_version: 1.8.25
99
111
  signing_key:
100
- specification_version: 4
112
+ specification_version: 3
101
113
  summary: A Mongoid plugin for managing subscription plans and features
102
114
  test_files:
103
115
  - spec/config/mongoid.yml
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 4389fa30034164e0c90847b641c25da581fcf0eb
4
- data.tar.gz: 468792762e112d0eb4c799cdd131451c45cbd023
5
- SHA512:
6
- metadata.gz: ed0af1ca906941963299c952d037f318aa615feee34fac120a538644dca82c48e7ee4751215c4754ecadf0a781856404f6c72afa1d12c9b9b8ed8b9eb4051968
7
- data.tar.gz: f33efdb64749e8a10c1df34fc8bdca4b5f2e0f5751da31f1b758fc669abc90bce7dd4d953e39987f63cdf21ec20772f87a60b649014431b2b8c3663f1c844f3e