paid_up 0.11.7 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +17 -13
  3. data/.rubocop_todo.yml +7 -0
  4. data/.travis.yml +4 -3
  5. data/Gemfile +29 -24
  6. data/README.md +22 -1
  7. data/Rakefile +6 -5
  8. data/VERSION +1 -1
  9. data/app/controllers/paid_up/paid_up_controller.rb +16 -9
  10. data/app/controllers/paid_up/plans_controller.rb +2 -0
  11. data/app/controllers/paid_up/subscriptions_controller.rb +58 -49
  12. data/app/helpers/paid_up/features_helper.rb +35 -34
  13. data/app/helpers/paid_up/paid_up_helper.rb +10 -8
  14. data/app/helpers/paid_up/plans_helper.rb +75 -55
  15. data/app/helpers/paid_up/subscriptions_helper.rb +17 -13
  16. data/app/models/paid_up/ability.rb +53 -46
  17. data/app/models/paid_up/plan.rb +36 -34
  18. data/app/models/paid_up/plan_feature_setting.rb +2 -0
  19. data/app/models/paid_up/unlimited.rb +2 -0
  20. data/app/views/paid_up/features/_abilities_table.html.haml +1 -45
  21. data/app/views/paid_up/features/_boolean_state.html.haml +6 -0
  22. data/app/views/paid_up/features/_setting_state.html.haml +13 -0
  23. data/app/views/paid_up/subscriptions/index.html.haml +2 -2
  24. data/config/initializers/stripe.rb +2 -0
  25. data/config/locales/en.yml +4 -1
  26. data/config/routes.rb +3 -1
  27. data/lib/generators/paid_up/install/install_generator.rb +4 -1
  28. data/lib/generators/paid_up/install/templates/ability.rb +2 -0
  29. data/lib/generators/paid_up/install/templates/initializer.rb +2 -0
  30. data/lib/generators/paid_up/utils.rb +2 -0
  31. data/lib/paid_up/configuration.rb +4 -2
  32. data/lib/paid_up/engine.rb +2 -0
  33. data/lib/paid_up/extensions/integer.rb +2 -0
  34. data/lib/paid_up/extensions/stripe.rb +2 -0
  35. data/lib/paid_up/feature.rb +10 -7
  36. data/lib/paid_up/feature_setting_type.rb +45 -0
  37. data/lib/paid_up/feature_setting_types/rolify.rb +10 -0
  38. data/lib/paid_up/feature_setting_types/table.rb +7 -0
  39. data/lib/paid_up/localization.rb +2 -0
  40. data/lib/paid_up/mixins/paid_for.rb +59 -47
  41. data/lib/paid_up/mixins/subscriber.rb +45 -101
  42. data/lib/paid_up/railtie.rb +2 -0
  43. data/lib/paid_up/ruby_version_check.rb +15 -0
  44. data/lib/paid_up/subscription.rb +80 -0
  45. data/lib/paid_up/validators/rolify_rows.rb +11 -6
  46. data/lib/paid_up/validators/table_rows.rb +9 -6
  47. data/lib/paid_up/version.rb +2 -0
  48. data/lib/paid_up.rb +8 -0
  49. data/paid_up.gemspec +108 -115
  50. data/spec/controllers/paid_up/plans_spec.rb +2 -0
  51. data/spec/controllers/paid_up/subscriptions_spec.rb +18 -11
  52. data/spec/dummy/Rakefile +2 -0
  53. data/spec/dummy/app/assets/stylesheets/application.css.scss +6 -0
  54. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  55. data/spec/dummy/app/models/ability.rb +2 -0
  56. data/spec/dummy/app/models/doodad.rb +2 -0
  57. data/spec/dummy/app/models/group.rb +2 -0
  58. data/spec/dummy/app/models/post.rb +2 -0
  59. data/spec/dummy/app/models/role.rb +2 -0
  60. data/spec/dummy/app/models/user.rb +2 -0
  61. data/spec/dummy/app/views/layouts/application.html.haml +13 -11
  62. data/spec/dummy/bin/bundle +2 -0
  63. data/spec/dummy/bin/rails +2 -0
  64. data/spec/dummy/bin/rake +2 -0
  65. data/spec/dummy/bin/setup +10 -8
  66. data/spec/dummy/config/application.rb +2 -3
  67. data/spec/dummy/config/boot.rb +2 -0
  68. data/spec/dummy/config/environment.rb +2 -0
  69. data/spec/dummy/config/environments/development.rb +2 -0
  70. data/spec/dummy/config/environments/test.rb +2 -4
  71. data/spec/dummy/config/initializers/assets.rb +2 -0
  72. data/spec/dummy/config/initializers/backtrace_silencers.rb +1 -0
  73. data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
  74. data/spec/dummy/config/initializers/devise.rb +2 -0
  75. data/spec/dummy/config/initializers/filter_parameter_logging.rb +2 -0
  76. data/spec/dummy/config/initializers/inflections.rb +1 -0
  77. data/spec/dummy/config/initializers/mime_types.rb +1 -0
  78. data/spec/dummy/config/initializers/paid_up.rb +10 -16
  79. data/spec/dummy/config/initializers/rolify.rb +2 -0
  80. data/spec/dummy/config/initializers/session_store.rb +2 -0
  81. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
  82. data/spec/dummy/config/routes.rb +2 -0
  83. data/spec/dummy/config.ru +2 -0
  84. data/spec/dummy/db/schema.rb +14 -23
  85. data/spec/dummy/db/seeds.rb +8 -6
  86. data/spec/dummy/db/test.sqlite3 +0 -0
  87. data/spec/dummy/lib/tasks/system.rake +2 -0
  88. data/spec/factories/doodad.rb +2 -0
  89. data/spec/factories/group.rb +2 -0
  90. data/spec/factories/plan.rb +2 -0
  91. data/spec/factories/plan_feature_setting.rb +2 -0
  92. data/spec/factories/post.rb +2 -0
  93. data/spec/factories/user.rb +3 -1
  94. data/spec/models/group_spec.rb +9 -7
  95. data/spec/models/paid_up/feature_spec.rb +2 -0
  96. data/spec/models/paid_up/plan_feature_setting_spec.rb +2 -0
  97. data/spec/models/paid_up/plan_spec.rb +2 -0
  98. data/spec/models/scope_spec.rb +9 -7
  99. data/spec/models/user_spec.rb +60 -58
  100. data/spec/paid_up_spec.rb +2 -0
  101. data/spec/rails_helper.rb +16 -2
  102. data/spec/routing/paid_up/plans_spec.rb +2 -0
  103. data/spec/routing/paid_up/subscription_spec.rb +2 -0
  104. data/spec/spec_helper.rb +2 -0
  105. data/spec/support/controller_macros.rb +2 -0
  106. data/spec/support/factory_girl.rb +2 -0
  107. data/spec/support/loaded_site/features.rb +2 -0
  108. data/spec/support/loaded_site/groups.rb +2 -0
  109. data/spec/support/loaded_site/loaded_site.rb +2 -0
  110. data/spec/support/loaded_site/plans.rb +2 -0
  111. data/spec/support/loaded_site/posts.rb +2 -0
  112. data/spec/support/loaded_site/users.rb +4 -2
  113. data/spec/support/stripe.rb +2 -0
  114. data/spec/views/paid_up/plans_spec.rb +9 -7
  115. data/spec/views/paid_up/subscriptions_spec.rb +20 -19
  116. metadata +124 -90
  117. data/app/views/devise/confirmations/new.html.haml +0 -13
  118. data/app/views/devise/passwords/edit.html.haml +0 -19
  119. data/app/views/devise/passwords/new.html.haml +0 -14
  120. data/app/views/devise/registrations/_new_form.html.haml +0 -23
  121. data/app/views/devise/registrations/edit.html.haml +0 -39
  122. data/app/views/devise/registrations/new.html.haml +0 -11
  123. data/app/views/devise/sessions/_new_form.html.haml +0 -21
  124. data/app/views/devise/sessions/new.html.haml +0 -11
  125. data/app/views/devise/shared/_links.html.haml +0 -14
  126. data/app/views/devise/unlocks/new.html.haml +0 -14
  127. data/app/views/layouts/mailer.html.haml +0 -3
  128. data/app/views/layouts/mailer.text.haml +0 -1
  129. data/app/views/paid_up/subscription_mailer/payment_failed_email.html.haml +0 -0
  130. data/app/views/paid_up/subscription_mailer/payment_failed_email.text.haml +0 -0
  131. data/coverage/.last_run.json +0 -5
  132. data/coverage/.resultset.json +0 -1927
  133. data/spec/dummy/app/views/pages/index.html.haml +0 -1
  134. data/spec/dummy/config/environments/production.rb +0 -83
  135. data/spec/dummy/config/initializers/high_voltage.rb +0 -3
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.7
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-12 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: haml-rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: '0.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.2'
26
+ version: '0.9'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rails-i18n
28
+ name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
@@ -39,45 +39,63 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4'
41
41
  - !ruby/object:Gem::Dependency
42
- name: haml-rails
42
+ name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - "<"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.9'
47
+ version: '6'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '4'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - "~>"
55
+ - - "<"
53
56
  - !ruby/object:Gem::Version
54
- version: '0.9'
57
+ version: '6'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '4'
55
61
  - !ruby/object:Gem::Dependency
56
- name: jquery-rails
62
+ name: rails-i18n
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - "~>"
65
+ - - "<"
66
+ - !ruby/object:Gem::Version
67
+ version: '6'
68
+ - - ">="
60
69
  - !ruby/object:Gem::Version
61
70
  version: '4'
62
71
  type: :runtime
63
72
  prerelease: false
64
73
  version_requirements: !ruby/object:Gem::Requirement
65
74
  requirements:
66
- - - "~>"
75
+ - - "<"
76
+ - !ruby/object:Gem::Version
77
+ version: '6'
78
+ - - ">="
67
79
  - !ruby/object:Gem::Version
68
80
  version: '4'
69
81
  - !ruby/object:Gem::Dependency
70
82
  name: uglifier
71
83
  requirement: !ruby/object:Gem::Requirement
72
84
  requirements:
73
- - - "~>"
85
+ - - "<"
86
+ - !ruby/object:Gem::Version
87
+ version: '4'
88
+ - - ">="
74
89
  - !ruby/object:Gem::Version
75
90
  version: '2.7'
76
91
  type: :runtime
77
92
  prerelease: false
78
93
  version_requirements: !ruby/object:Gem::Requirement
79
94
  requirements:
80
- - - "~>"
95
+ - - "<"
96
+ - !ruby/object:Gem::Version
97
+ version: '4'
98
+ - - ">="
81
99
  - !ruby/object:Gem::Version
82
100
  version: '2.7'
83
101
  - !ruby/object:Gem::Dependency
@@ -86,14 +104,14 @@ dependencies:
86
104
  requirements:
87
105
  - - "~>"
88
106
  - !ruby/object:Gem::Version
89
- version: '0.5'
107
+ version: '0.9'
90
108
  type: :runtime
91
109
  prerelease: false
92
110
  version_requirements: !ruby/object:Gem::Requirement
93
111
  requirements:
94
112
  - - "~>"
95
113
  - !ruby/object:Gem::Version
96
- version: '0.5'
114
+ version: '0.9'
97
115
  - !ruby/object:Gem::Dependency
98
116
  name: chronic
99
117
  requirement: !ruby/object:Gem::Requirement
@@ -123,33 +141,39 @@ dependencies:
123
141
  - !ruby/object:Gem::Version
124
142
  version: '6.5'
125
143
  - !ruby/object:Gem::Dependency
126
- name: devise
144
+ name: cancancan
127
145
  requirement: !ruby/object:Gem::Requirement
128
146
  requirements:
129
147
  - - "~>"
130
148
  - !ruby/object:Gem::Version
131
- version: '3.4'
149
+ version: '1'
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
135
153
  requirements:
136
154
  - - "~>"
137
155
  - !ruby/object:Gem::Version
138
- version: '3.4'
156
+ version: '1'
139
157
  - !ruby/object:Gem::Dependency
140
- name: cancancan
158
+ name: devise
141
159
  requirement: !ruby/object:Gem::Requirement
142
160
  requirements:
143
- - - "~>"
161
+ - - "<"
144
162
  - !ruby/object:Gem::Version
145
- version: '1.10'
163
+ version: '5'
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '3.4'
146
167
  type: :runtime
147
168
  prerelease: false
148
169
  version_requirements: !ruby/object:Gem::Requirement
149
170
  requirements:
150
- - - "~>"
171
+ - - "<"
172
+ - !ruby/object:Gem::Version
173
+ version: '5'
174
+ - - ">="
151
175
  - !ruby/object:Gem::Version
152
- version: '1.10'
176
+ version: '3.4'
153
177
  - !ruby/object:Gem::Dependency
154
178
  name: rolify
155
179
  requirement: !ruby/object:Gem::Requirement
@@ -168,14 +192,20 @@ dependencies:
168
192
  name: stripe
169
193
  requirement: !ruby/object:Gem::Requirement
170
194
  requirements:
171
- - - "~>"
195
+ - - "<"
196
+ - !ruby/object:Gem::Version
197
+ version: '3'
198
+ - - ">="
172
199
  - !ruby/object:Gem::Version
173
200
  version: '1.36'
174
201
  type: :runtime
175
202
  prerelease: false
176
203
  version_requirements: !ruby/object:Gem::Requirement
177
204
  requirements:
178
- - - "~>"
205
+ - - "<"
206
+ - !ruby/object:Gem::Version
207
+ version: '3'
208
+ - - ">="
179
209
  - !ruby/object:Gem::Version
180
210
  version: '1.36'
181
211
  - !ruby/object:Gem::Dependency
@@ -193,201 +223,215 @@ dependencies:
193
223
  - !ruby/object:Gem::Version
194
224
  version: '2.2'
195
225
  - !ruby/object:Gem::Dependency
196
- name: jeweler
226
+ name: bundler
197
227
  requirement: !ruby/object:Gem::Requirement
198
228
  requirements:
199
229
  - - "~>"
200
230
  - !ruby/object:Gem::Version
201
- version: '2'
231
+ version: '1'
202
232
  type: :development
203
233
  prerelease: false
204
234
  version_requirements: !ruby/object:Gem::Requirement
205
235
  requirements:
206
236
  - - "~>"
207
237
  - !ruby/object:Gem::Version
208
- version: '2'
238
+ version: '1'
209
239
  - !ruby/object:Gem::Dependency
210
- name: bundler
240
+ name: coffeelint
211
241
  requirement: !ruby/object:Gem::Requirement
212
242
  requirements:
213
243
  - - "~>"
214
244
  - !ruby/object:Gem::Version
215
- version: '1'
245
+ version: '1.14'
216
246
  type: :development
217
247
  prerelease: false
218
248
  version_requirements: !ruby/object:Gem::Requirement
219
249
  requirements:
220
250
  - - "~>"
221
251
  - !ruby/object:Gem::Version
222
- version: '1'
252
+ version: '1.14'
223
253
  - !ruby/object:Gem::Dependency
224
- name: web-console
254
+ name: juwelier
225
255
  requirement: !ruby/object:Gem::Requirement
226
256
  requirements:
227
257
  - - "~>"
228
258
  - !ruby/object:Gem::Version
229
- version: '3.0'
259
+ version: '2'
230
260
  type: :development
231
261
  prerelease: false
232
262
  version_requirements: !ruby/object:Gem::Requirement
233
263
  requirements:
234
264
  - - "~>"
235
265
  - !ruby/object:Gem::Version
236
- version: '3.0'
266
+ version: '2'
267
+ - !ruby/object:Gem::Dependency
268
+ name: nokogiri
269
+ requirement: !ruby/object:Gem::Requirement
270
+ requirements:
271
+ - - ">="
272
+ - !ruby/object:Gem::Version
273
+ version: '1.7'
274
+ type: :development
275
+ prerelease: false
276
+ version_requirements: !ruby/object:Gem::Requirement
277
+ requirements:
278
+ - - ">="
279
+ - !ruby/object:Gem::Version
280
+ version: '1.7'
237
281
  - !ruby/object:Gem::Dependency
238
282
  name: pre-commit
239
283
  requirement: !ruby/object:Gem::Requirement
240
284
  requirements:
241
285
  - - "~>"
242
286
  - !ruby/object:Gem::Version
243
- version: '0.27'
287
+ version: '0.32'
244
288
  type: :development
245
289
  prerelease: false
246
290
  version_requirements: !ruby/object:Gem::Requirement
247
291
  requirements:
248
292
  - - "~>"
249
293
  - !ruby/object:Gem::Version
250
- version: '0.27'
294
+ version: '0.32'
251
295
  - !ruby/object:Gem::Dependency
252
296
  name: rubocop
253
297
  requirement: !ruby/object:Gem::Requirement
254
298
  requirements:
255
- - - "~>"
299
+ - - ">="
256
300
  - !ruby/object:Gem::Version
257
- version: '0.37'
301
+ version: '0'
258
302
  type: :development
259
303
  prerelease: false
260
304
  version_requirements: !ruby/object:Gem::Requirement
261
305
  requirements:
262
- - - "~>"
306
+ - - ">="
263
307
  - !ruby/object:Gem::Version
264
- version: '0.37'
308
+ version: '0'
265
309
  - !ruby/object:Gem::Dependency
266
- name: coffeelint
310
+ name: scss_lint
267
311
  requirement: !ruby/object:Gem::Requirement
268
312
  requirements:
269
313
  - - "~>"
270
314
  - !ruby/object:Gem::Version
271
- version: '1.14'
315
+ version: 0.52.0
272
316
  type: :development
273
317
  prerelease: false
274
318
  version_requirements: !ruby/object:Gem::Requirement
275
319
  requirements:
276
320
  - - "~>"
277
321
  - !ruby/object:Gem::Version
278
- version: '1.14'
322
+ version: 0.52.0
279
323
  - !ruby/object:Gem::Dependency
280
- name: scss_lint
324
+ name: web-console
281
325
  requirement: !ruby/object:Gem::Requirement
282
326
  requirements:
283
327
  - - "~>"
284
328
  - !ruby/object:Gem::Version
285
- version: 0.47.0
329
+ version: '3'
286
330
  type: :development
287
331
  prerelease: false
288
332
  version_requirements: !ruby/object:Gem::Requirement
289
333
  requirements:
290
334
  - - "~>"
291
335
  - !ruby/object:Gem::Version
292
- version: 0.47.0
336
+ version: '3'
293
337
  - !ruby/object:Gem::Dependency
294
- name: sqlite3
338
+ name: bootstrap-sass
295
339
  requirement: !ruby/object:Gem::Requirement
296
340
  requirements:
297
341
  - - "~>"
298
342
  - !ruby/object:Gem::Version
299
- version: '1.3'
343
+ version: '3'
300
344
  type: :development
301
345
  prerelease: false
302
346
  version_requirements: !ruby/object:Gem::Requirement
303
347
  requirements:
304
348
  - - "~>"
305
349
  - !ruby/object:Gem::Version
306
- version: '1.3'
350
+ version: '3'
307
351
  - !ruby/object:Gem::Dependency
308
- name: forgery
352
+ name: factory_girl_rails
309
353
  requirement: !ruby/object:Gem::Requirement
310
354
  requirements:
311
355
  - - "~>"
312
356
  - !ruby/object:Gem::Version
313
- version: '0.6'
357
+ version: '4.5'
314
358
  type: :development
315
359
  prerelease: false
316
360
  version_requirements: !ruby/object:Gem::Requirement
317
361
  requirements:
318
362
  - - "~>"
319
363
  - !ruby/object:Gem::Version
320
- version: '0.6'
364
+ version: '4.5'
321
365
  - !ruby/object:Gem::Dependency
322
- name: bootstrap-sass
366
+ name: forgery
323
367
  requirement: !ruby/object:Gem::Requirement
324
368
  requirements:
325
369
  - - "~>"
326
370
  - !ruby/object:Gem::Version
327
- version: '3.3'
371
+ version: '0.6'
328
372
  type: :development
329
373
  prerelease: false
330
374
  version_requirements: !ruby/object:Gem::Requirement
331
375
  requirements:
332
376
  - - "~>"
333
377
  - !ruby/object:Gem::Version
334
- version: '3.3'
378
+ version: '0.6'
335
379
  - !ruby/object:Gem::Dependency
336
- name: sass-rails
380
+ name: rails-controller-testing
337
381
  requirement: !ruby/object:Gem::Requirement
338
382
  requirements:
339
383
  - - "~>"
340
384
  - !ruby/object:Gem::Version
341
- version: '5.0'
385
+ version: '1'
342
386
  type: :development
343
387
  prerelease: false
344
388
  version_requirements: !ruby/object:Gem::Requirement
345
389
  requirements:
346
390
  - - "~>"
347
391
  - !ruby/object:Gem::Version
348
- version: '5.0'
392
+ version: '1'
349
393
  - !ruby/object:Gem::Dependency
350
- name: high_voltage
394
+ name: rspec-rails
351
395
  requirement: !ruby/object:Gem::Requirement
352
396
  requirements:
353
397
  - - "~>"
354
398
  - !ruby/object:Gem::Version
355
- version: '2.3'
399
+ version: '3'
356
400
  type: :development
357
401
  prerelease: false
358
402
  version_requirements: !ruby/object:Gem::Requirement
359
403
  requirements:
360
404
  - - "~>"
361
405
  - !ruby/object:Gem::Version
362
- version: '2.3'
406
+ version: '3'
363
407
  - !ruby/object:Gem::Dependency
364
- name: rspec-rails
408
+ name: sass-rails
365
409
  requirement: !ruby/object:Gem::Requirement
366
410
  requirements:
367
411
  - - "~>"
368
412
  - !ruby/object:Gem::Version
369
- version: '3.2'
413
+ version: '5'
370
414
  type: :development
371
415
  prerelease: false
372
416
  version_requirements: !ruby/object:Gem::Requirement
373
417
  requirements:
374
418
  - - "~>"
375
419
  - !ruby/object:Gem::Version
376
- version: '3.2'
420
+ version: '5'
377
421
  - !ruby/object:Gem::Dependency
378
- name: factory_girl_rails
422
+ name: sqlite3
379
423
  requirement: !ruby/object:Gem::Requirement
380
424
  requirements:
381
425
  - - "~>"
382
426
  - !ruby/object:Gem::Version
383
- version: '4.5'
427
+ version: '1.3'
384
428
  type: :development
385
429
  prerelease: false
386
430
  version_requirements: !ruby/object:Gem::Requirement
387
431
  requirements:
388
432
  - - "~>"
389
433
  - !ruby/object:Gem::Version
390
- version: '4.5'
434
+ version: '1.3'
391
435
  description: Allows a model of your choosing (such as users) to subscribe to a plan,
392
436
  which enables features.
393
437
  email: karen.e.lundgren@gmail.com
@@ -399,6 +443,7 @@ extra_rdoc_files:
399
443
  files:
400
444
  - ".rspec"
401
445
  - ".rubocop.yml"
446
+ - ".rubocop_todo.yml"
402
447
  - ".travis.yml"
403
448
  - Gemfile
404
449
  - LICENSE.txt
@@ -417,31 +462,17 @@ files:
417
462
  - app/models/paid_up/plan.rb
418
463
  - app/models/paid_up/plan_feature_setting.rb
419
464
  - app/models/paid_up/unlimited.rb
420
- - app/views/devise/confirmations/new.html.haml
421
- - app/views/devise/passwords/edit.html.haml
422
- - app/views/devise/passwords/new.html.haml
423
- - app/views/devise/registrations/_new_form.html.haml
424
- - app/views/devise/registrations/edit.html.haml
425
- - app/views/devise/registrations/new.html.haml
426
- - app/views/devise/sessions/_new_form.html.haml
427
- - app/views/devise/sessions/new.html.haml
428
- - app/views/devise/shared/_links.html.haml
429
- - app/views/devise/unlocks/new.html.haml
430
- - app/views/layouts/mailer.html.haml
431
- - app/views/layouts/mailer.text.haml
432
465
  - app/views/paid_up/features/_abilities_table.html.haml
466
+ - app/views/paid_up/features/_boolean_state.html.haml
467
+ - app/views/paid_up/features/_setting_state.html.haml
433
468
  - app/views/paid_up/features/_table.html.haml
434
469
  - app/views/paid_up/layouts/_google_analytics_data_layer.html.haml
435
470
  - app/views/paid_up/plans/index.html.haml
436
- - app/views/paid_up/subscription_mailer/payment_failed_email.html.haml
437
- - app/views/paid_up/subscription_mailer/payment_failed_email.text.haml
438
471
  - app/views/paid_up/subscriptions/index.html.haml
439
472
  - app/views/paid_up/subscriptions/new.html.haml
440
473
  - config/initializers/stripe.rb
441
474
  - config/locales/en.yml
442
475
  - config/routes.rb
443
- - coverage/.last_run.json
444
- - coverage/.resultset.json
445
476
  - coverage/.resultset.json.lock
446
477
  - db/migrate/20150407110101_create_paid_up_plans_table.rb
447
478
  - db/migrate/20150519164237_add_stripe_id_column_to_users.rb
@@ -457,10 +488,15 @@ files:
457
488
  - lib/paid_up/extensions/integer.rb
458
489
  - lib/paid_up/extensions/stripe.rb
459
490
  - lib/paid_up/feature.rb
491
+ - lib/paid_up/feature_setting_type.rb
492
+ - lib/paid_up/feature_setting_types/rolify.rb
493
+ - lib/paid_up/feature_setting_types/table.rb
460
494
  - lib/paid_up/localization.rb
461
495
  - lib/paid_up/mixins/paid_for.rb
462
496
  - lib/paid_up/mixins/subscriber.rb
463
497
  - lib/paid_up/railtie.rb
498
+ - lib/paid_up/ruby_version_check.rb
499
+ - lib/paid_up/subscription.rb
464
500
  - lib/paid_up/validators/rolify_rows.rb
465
501
  - lib/paid_up/validators/table_rows.rb
466
502
  - lib/paid_up/version.rb
@@ -478,7 +514,6 @@ files:
478
514
  - spec/dummy/app/models/role.rb
479
515
  - spec/dummy/app/models/user.rb
480
516
  - spec/dummy/app/views/layouts/application.html.haml
481
- - spec/dummy/app/views/pages/index.html.haml
482
517
  - spec/dummy/bin/bundle
483
518
  - spec/dummy/bin/rails
484
519
  - spec/dummy/bin/rake
@@ -489,14 +524,12 @@ files:
489
524
  - spec/dummy/config/database.yml
490
525
  - spec/dummy/config/environment.rb
491
526
  - spec/dummy/config/environments/development.rb
492
- - spec/dummy/config/environments/production.rb
493
527
  - spec/dummy/config/environments/test.rb
494
528
  - spec/dummy/config/initializers/assets.rb
495
529
  - spec/dummy/config/initializers/backtrace_silencers.rb
496
530
  - spec/dummy/config/initializers/cookies_serializer.rb
497
531
  - spec/dummy/config/initializers/devise.rb
498
532
  - spec/dummy/config/initializers/filter_parameter_logging.rb
499
- - spec/dummy/config/initializers/high_voltage.rb
500
533
  - spec/dummy/config/initializers/inflections.rb
501
534
  - spec/dummy/config/initializers/mime_types.rb
502
535
  - spec/dummy/config/initializers/paid_up.rb
@@ -523,6 +556,7 @@ files:
523
556
  - spec/dummy/db/migrate/20170220001913_add_active_column_to_groups.rb
524
557
  - spec/dummy/db/schema.rb
525
558
  - spec/dummy/db/seeds.rb
559
+ - spec/dummy/db/test.sqlite3
526
560
  - spec/dummy/lib/assets/.keep
527
561
  - spec/dummy/lib/tasks/system.rake
528
562
  - spec/dummy/log/.keep
@@ -586,7 +620,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
586
620
  version: '0'
587
621
  requirements: []
588
622
  rubyforge_project:
589
- rubygems_version: 2.4.5.1
623
+ rubygems_version: 2.6.11
590
624
  signing_key:
591
625
  specification_version: 4
592
626
  summary: Allows a model of your choosing to subscribe to a plan, which enables features.
@@ -1,13 +0,0 @@
1
- - add_title :resend_confirmation_instructions.l
2
- = form_for(resource, as: resource_name, url: confirmation_path(resource_name), class: 'form-horizontal', html: { method: :post }) do |f|
3
- = devise_error_messages!
4
- .form-group
5
- = f.label :email, class: 'col-sm-2 control-label'
6
- .col-sm-2
7
- = f.email_field :email, autofocus: true, class: 'col-sm-offset-2 form-control'
8
- .form-group
9
- .col-sm-2
10
- .col-sm-offset-2
11
- = f.submit :resend_confirmation_instructions.l
12
- - add_widget do
13
- = render 'devise/shared/links'
@@ -1,19 +0,0 @@
1
- - add_title :change_your_password.l
2
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'form-horizontal' }) do |f|
3
- = devise_error_messages!
4
- = f.hidden_field :reset_password_token
5
- .form-group
6
- = f.label :password, "New password", class: 'col-sm-2 control-label'
7
- .col-sm-2
8
- = f.password_field :password, autofocus: true, autocomplete: "off", class: 'col-sm-offset-2 form-control'
9
- .form-group
10
- = f.label :password_confirmation, "Confirm new password", class: 'col-sm-2 control-label'
11
- .col-sm-2
12
- = f.password_field :password_confirmation, autocomplete: "off", class: 'col-sm-offset-2 form-control'
13
- .form-group
14
- .col-sm-2
15
- .col-sm-2
16
- .col-sm-offset-2
17
- = f.submit :change_your_password.l, class: 'btn btn-primary'
18
- - add_widget do
19
- = render 'devise/shared/links'
@@ -1,14 +0,0 @@
1
- - add_title :forgot_your_password.l
2
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'form-horizontal' }) do |f|
3
- = devise_error_messages!
4
- .form-group
5
- = f.label :email, class: 'col-sm-2 control-label'
6
- .col-sm-2
7
- = f.email_field :email, autofocus: true, class: 'col-sm-offset-2 form-control'
8
- .form-group
9
- .col-sm-2
10
- .col-sm-2
11
- .col-sm-offset-2
12
- = f.submit :send_me_reset_password_instructions.l, class: 'btn btn-primary'
13
- - add_widget do
14
- = render 'devise/shared/links'
@@ -1,23 +0,0 @@
1
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: 'form-horizontal' }) do |f|
2
- = devise_error_messages!
3
- .form-group
4
- = f.label :email, class: 'col-sm-2 control-label'
5
- .col-sm-8
6
- = f.email_field :email, autofocus: true, class: 'col-sm-offset-2 form-control'
7
- .form-group
8
- = f.label :password, class: 'col-sm-2 control-label'
9
- .col-sm-8
10
- = f.password_field :password, autocomplete: "off", autofocus: true, class: 'col-sm-offset-2 form-control'
11
- - if @validatable
12
- .col-sm-8
13
- .col-sm-offset-2
14
- %em= :length_characters_minimum.l length: @minimum_password_length
15
- .form-group
16
- = f.label :password_confirmation, class: 'col-sm-2 control-label'
17
- .col-sm-8
18
- = f.password_field :password_confirmation, autocomplete: "off", class: 'col-sm-offset-2 form-control'
19
- .form-group
20
- .col-sm-2
21
- .col-sm-8
22
- .col-sm-offset-2
23
- = f.submit :sign_up.l, class: 'form-control btn btn-primary'
@@ -1,39 +0,0 @@
1
- - add_title :edit_resource.l resource: resource_name.to_s.humanize
2
-
3
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'form-horizontal' } ) do |f|
4
- = devise_error_messages!
5
- .form-group
6
- = f.label :email, class: 'control-label col-sm-2'
7
- .col-sm-2
8
- = f.email_field :email, autofocus: true, class: 'form-control col-sm-offset-2'
9
- - if devise_mapping.confirmable? && resource.pending_reconfirmation?
10
- .alert-warning= :currently_awaiting_confirmation_for_resource.l resource: resource.unconfirmed_email
11
- .form-group
12
- = f.label :password, class: 'control-label col-sm-2'
13
- .col-sm-2
14
- = f.password_field :password, autocomplete: "off", class: 'form-control col-sm-offset-2'
15
- .col-sm-2
16
- .col-sm-offset-2
17
- %i= :leave_blank_if_you_dont_want_to_change_it.l
18
- .form-group
19
- = f.label :password_confirmation, class: 'control-label col-sm-2'
20
- .col-sm-2
21
- = f.password_field :password_confirmation, autocomplete: "off", class: 'form-control col-sm-offset-2'
22
- .form-group
23
- = f.label :current_password, class: 'control-label col-sm-2'
24
- .col-sm-2
25
- = f.password_field :current_password, autocomplete: "off", class: 'form-control col-sm-offset-2'
26
- .col-sm-2
27
- .col-sm-offset-2
28
- %i= :we_need_your_current_password_to_confirm_your_changes.l
29
- .form-group
30
- .col-sm-2
31
- .col-sm-2
32
- .col-sm-offset-2
33
- = f.submit :update_account.l, class: 'form-control btn btn-primary'
34
-
35
- %hr
36
- %h2= :cancel_my_account.l
37
- %p
38
- = :unhappy.l
39
- = button_to :cancel_my_account.l, registration_path(resource_name), data: { confirm: :are_you_sure.l }, method: :delete, class: 'btn btn-danger'
@@ -1,11 +0,0 @@
1
- - add_title :sign_up.l
2
- .row
3
- .col-sm-6
4
- .well
5
- = render 'devise/registrations/new_form'
6
- .col-sm-6
7
- .alert.alert-info
8
- %h2= :or_sign_in.l
9
- = render 'devise/sessions/new_form'
10
- - add_widget do
11
- = render 'devise/shared/links'