paid_up 0.1.0

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.
Files changed (149) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +2 -0
  3. data/.travis.yml +3 -0
  4. data/Gemfile +46 -0
  5. data/LICENSE.txt +20 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +64 -0
  8. data/Rakefile +48 -0
  9. data/VERSION +1 -0
  10. data/app/controllers/paid_up/paid_up_controller.rb +12 -0
  11. data/app/controllers/paid_up/plans_controller.rb +7 -0
  12. data/app/controllers/paid_up/subscriptions_controller.rb +37 -0
  13. data/app/helpers/paid_up/features_helper.rb +65 -0
  14. data/app/helpers/paid_up/paid_up_helper.rb +14 -0
  15. data/app/helpers/paid_up/plans_helper.rb +53 -0
  16. data/app/helpers/paid_up/subscriptions_helper.rb +21 -0
  17. data/app/models/ability.rb +37 -0
  18. data/app/models/paid_up/feature.rb +19 -0
  19. data/app/models/paid_up/features_plan.rb +14 -0
  20. data/app/models/paid_up/plan.rb +99 -0
  21. data/app/views/devise/confirmations/new.html.haml +13 -0
  22. data/app/views/devise/passwords/edit.html.haml +19 -0
  23. data/app/views/devise/passwords/new.html.haml +14 -0
  24. data/app/views/devise/registrations/_new_form.html.haml +23 -0
  25. data/app/views/devise/registrations/edit.html.haml +39 -0
  26. data/app/views/devise/registrations/new.html.haml +11 -0
  27. data/app/views/devise/sessions/_new_form.html.haml +21 -0
  28. data/app/views/devise/sessions/new.html.haml +11 -0
  29. data/app/views/devise/shared/_links.html.haml +14 -0
  30. data/app/views/devise/unlocks/new.html.haml +14 -0
  31. data/app/views/paid_up/features/_abilities_table.html.haml +22 -0
  32. data/app/views/paid_up/features/_table.html.haml +16 -0
  33. data/app/views/paid_up/plans/index.html.haml +18 -0
  34. data/app/views/paid_up/subscriptions/index.html.haml +16 -0
  35. data/app/views/paid_up/subscriptions/new.html.haml +101 -0
  36. data/bin/rails +12 -0
  37. data/config/initializers/stripe.rb +6 -0
  38. data/config/locales/en.yml +85 -0
  39. data/config/routes.rb +7 -0
  40. data/coverage/.last_run.json +5 -0
  41. data/coverage/.resultset.json +1488 -0
  42. data/coverage/.resultset.json.lock +0 -0
  43. data/db/migrate/20150407105900_create_paid_up_features_plans_table.rb +9 -0
  44. data/db/migrate/20150407110100_create_paid_up_features_table.rb +11 -0
  45. data/db/migrate/20150407110101_create_paid_up_plans_table.rb +14 -0
  46. data/lib/generators/paid_up/install/install_generator.rb +59 -0
  47. data/lib/generators/paid_up/install/templates/initializer.rb.erb +5 -0
  48. data/lib/generators/paid_up/utils.rb +16 -0
  49. data/lib/paid_up/configuration.rb +22 -0
  50. data/lib/paid_up/engine.rb +17 -0
  51. data/lib/paid_up/integer.rb +9 -0
  52. data/lib/paid_up/localization.rb +31 -0
  53. data/lib/paid_up/mixins.rb +139 -0
  54. data/lib/paid_up/railtie.rb +4 -0
  55. data/lib/paid_up/stripe_extensions.rb +17 -0
  56. data/lib/paid_up/table_validator.rb +9 -0
  57. data/lib/paid_up/unlimited.rb +17 -0
  58. data/lib/paid_up/version.rb +7 -0
  59. data/lib/paid_up.rb +27 -0
  60. data/paid_up.gemspec +248 -0
  61. data/spec/controllers/paid_up/plans_spec.rb +26 -0
  62. data/spec/controllers/paid_up/subscriptions_spec.rb +187 -0
  63. data/spec/dummy/README.rdoc +28 -0
  64. data/spec/dummy/Rakefile +6 -0
  65. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  66. data/spec/dummy/app/assets/stylesheets/application.css.scss +16 -0
  67. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  68. data/spec/dummy/app/models/group.rb +3 -0
  69. data/spec/dummy/app/models/user.rb +9 -0
  70. data/spec/dummy/app/views/layouts/application.html.haml +31 -0
  71. data/spec/dummy/app/views/pages/index.html.haml +1 -0
  72. data/spec/dummy/bin/bundle +3 -0
  73. data/spec/dummy/bin/rails +4 -0
  74. data/spec/dummy/bin/rake +4 -0
  75. data/spec/dummy/bin/setup +29 -0
  76. data/spec/dummy/config/application.rb +32 -0
  77. data/spec/dummy/config/boot.rb +5 -0
  78. data/spec/dummy/config/database.yml +25 -0
  79. data/spec/dummy/config/environment.rb +5 -0
  80. data/spec/dummy/config/environments/development.rb +46 -0
  81. data/spec/dummy/config/environments/production.rb +79 -0
  82. data/spec/dummy/config/environments/test.rb +45 -0
  83. data/spec/dummy/config/initializers/assets.rb +11 -0
  84. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  85. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  86. data/spec/dummy/config/initializers/devise.rb +259 -0
  87. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  88. data/spec/dummy/config/initializers/high_voltage.rb +3 -0
  89. data/spec/dummy/config/initializers/inflections.rb +16 -0
  90. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  91. data/spec/dummy/config/initializers/paid_up.rb +5 -0
  92. data/spec/dummy/config/initializers/session_store.rb +3 -0
  93. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  94. data/spec/dummy/config/locales/devise.en.yml +60 -0
  95. data/spec/dummy/config/locales/en.yml +23 -0
  96. data/spec/dummy/config/routes.rb +4 -0
  97. data/spec/dummy/config/secrets.yml +22 -0
  98. data/spec/dummy/config.ru +4 -0
  99. data/spec/dummy/db/development.sqlite3 +0 -0
  100. data/spec/dummy/db/migrate/20150406154440_create_users_table.rb +7 -0
  101. data/spec/dummy/db/migrate/20150517175135_create_groups_table.rb +11 -0
  102. data/spec/dummy/db/migrate/20150518000915_add_devise_to_users.rb +49 -0
  103. data/spec/dummy/db/migrate/20150518000917_create_paid_up_features_plans_table.paid_up.rb +10 -0
  104. data/spec/dummy/db/migrate/20150518000918_create_paid_up_features_table.paid_up.rb +12 -0
  105. data/spec/dummy/db/migrate/20150518000919_create_paid_up_plans_table.paid_up.rb +15 -0
  106. data/spec/dummy/db/migrate/20150518000920_add_stripe_id_column_to_user.rb +6 -0
  107. data/spec/dummy/db/schema.rb +75 -0
  108. data/spec/dummy/db/seeds/features.seeds.rb +19 -0
  109. data/spec/dummy/db/seeds/features_plans.seeds.rb +51 -0
  110. data/spec/dummy/db/seeds/plans.seeds.rb +91 -0
  111. data/spec/dummy/db/seeds.rb +0 -0
  112. data/spec/dummy/db/test.sqlite3 +0 -0
  113. data/spec/dummy/lib/assets/.keep +0 -0
  114. data/spec/dummy/log/.keep +0 -0
  115. data/spec/dummy/log/development.log +108393 -0
  116. data/spec/dummy/public/404.html +67 -0
  117. data/spec/dummy/public/422.html +67 -0
  118. data/spec/dummy/public/500.html +66 -0
  119. data/spec/dummy/public/assets/.sprockets-manifest-34b01376fc56586f4f4fd19e7b1c0e35.json +1 -0
  120. data/spec/dummy/public/assets/application-27f004bb902952dbbaad25f0f28c312f29ffee315c94fa51dea6b5ec6dc993e6.css +13 -0
  121. data/spec/dummy/public/assets/application-3a226fbacd7ba9a2b9f7972fafdd7b2486c34707d96a60c26f3bbe4579c29ca6.js +116 -0
  122. data/spec/dummy/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot +0 -0
  123. data/spec/dummy/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg +288 -0
  124. data/spec/dummy/public/assets/bootstrap/glyphicons-halflings-regular-a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742.woff +0 -0
  125. data/spec/dummy/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf +0 -0
  126. data/spec/dummy/public/assets/bootstrap/glyphicons-halflings-regular-fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c.woff2 +0 -0
  127. data/spec/dummy/public/favicon.ico +0 -0
  128. data/spec/dummy/test/controllers/plans_controller_controller_test.rb +7 -0
  129. data/spec/factories/feature.rb +7 -0
  130. data/spec/factories/features_plan.rb +7 -0
  131. data/spec/factories/plan.rb +7 -0
  132. data/spec/factories/user.rb +7 -0
  133. data/spec/models/paid_up/feature_spec.rb +21 -0
  134. data/spec/models/paid_up/features_plan_spec.rb +7 -0
  135. data/spec/models/paid_up/plan_spec.rb +156 -0
  136. data/spec/models/user_spec.rb +304 -0
  137. data/spec/paid_up_spec.rb +7 -0
  138. data/spec/rails_helper.rb +65 -0
  139. data/spec/routing/paid_up/plans_spec.rb +11 -0
  140. data/spec/routing/paid_up/subscription_spec.rb +23 -0
  141. data/spec/spec_helper.rb +87 -0
  142. data/spec/support/controller_macros.rb +12 -0
  143. data/spec/support/factory_girl.rb +3 -0
  144. data/spec/support/plans_and_features.rb +209 -0
  145. data/spec/support/stripe.rb +23 -0
  146. data/spec/support/subscribers.rb +44 -0
  147. data/spec/views/paid_up/plans_spec.rb +54 -0
  148. data/spec/views/paid_up/subscriptions_spec.rb +58 -0
  149. metadata +488 -0
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 442d272b04d3e5f96237406670d611178cf0ef9d18b535c32f5464e7da3f880fb33b505f96f450580bfd4ef53552c185366ae99388d7c42a6931b09741980b49
15
+
16
+ test:
17
+ secret_key_base: ff22f70b272ffa28b89d6b8b05359b0a4e0b446562b62dfb2bc7f73d83fae6642bbfd1622f1ee4e04e31a23ee3b7c52729e6d8524a3a54249c6089d30c159807
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
Binary file
@@ -0,0 +1,7 @@
1
+ class CreateUsersTable < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ class CreateGroupsTable < ActiveRecord::Migration
2
+ def change
3
+ create_table :groups do |t|
4
+ t.string :user_id, index: true
5
+ t.string :name
6
+ t.text :description
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,49 @@
1
+ class AddDeviseToUsers < ActiveRecord::Migration
2
+ def self.up
3
+ change_table(:users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, null: false, default: ""
6
+ t.string :encrypted_password, null: false, default: ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, default: 0, null: false
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+
34
+ # Uncomment below if timestamps were not included in your original model.
35
+ # t.timestamps
36
+ end
37
+
38
+ add_index :users, :email, unique: true
39
+ add_index :users, :reset_password_token, unique: true
40
+ # add_index :users, :confirmation_token, unique: true
41
+ # add_index :users, :unlock_token, unique: true
42
+ end
43
+
44
+ def self.down
45
+ # By default, we don't want to make any assumption about how to roll back a migration when your
46
+ # model already existed. Please edit below which fields you would like to remove in this migration.
47
+ raise ActiveRecord::IrreversibleMigration
48
+ end
49
+ end
@@ -0,0 +1,10 @@
1
+ # This migration comes from paid_up (originally 20150407105900)
2
+ class CreatePaidUpFeaturesPlansTable < ActiveRecord::Migration
3
+ def change
4
+ create_table :paid_up_features_plans do |t|
5
+ t.references :feature, index: true, foreign_key: true
6
+ t.references :plan, index: true, foreign_key: true
7
+ t.integer :setting
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from paid_up (originally 20150407110100)
2
+ class CreatePaidUpFeaturesTable < ActiveRecord::Migration
3
+ def change
4
+ create_table :paid_up_features do |t|
5
+ t.string :name
6
+ t.string :title
7
+ t.string :setting_type
8
+ t.text :description
9
+ end
10
+ add_index :paid_up_features, :name, :unique => true
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ # This migration comes from paid_up (originally 20150407110101)
2
+ class CreatePaidUpPlansTable < ActiveRecord::Migration
3
+ def change
4
+ create_table :paid_up_plans do |t|
5
+ t.string :stripe_id
6
+ t.string :name
7
+ t.text :description
8
+ t.integer :sort_order
9
+
10
+ t.timestamps
11
+ end
12
+ add_index :paid_up_plans, :name, :unique => true
13
+ add_index :paid_up_plans, :stripe_id, :unique => true
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ class AddStripeIdColumnToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :stripe_id, :string
4
+ add_index :users, :stripe_id
5
+ end
6
+ end
@@ -0,0 +1,75 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20150518000920) do
15
+
16
+ create_table "groups", force: :cascade do |t|
17
+ t.string "user_id"
18
+ t.string "name"
19
+ t.text "description"
20
+ t.datetime "created_at"
21
+ t.datetime "updated_at"
22
+ end
23
+
24
+ add_index "groups", ["user_id"], name: "index_groups_on_user_id"
25
+
26
+ create_table "paid_up_features", force: :cascade do |t|
27
+ t.string "name"
28
+ t.string "title"
29
+ t.string "setting_type"
30
+ t.text "description"
31
+ end
32
+
33
+ add_index "paid_up_features", ["name"], name: "index_paid_up_features_on_name", unique: true
34
+
35
+ create_table "paid_up_features_plans", force: :cascade do |t|
36
+ t.integer "feature_id"
37
+ t.integer "plan_id"
38
+ t.integer "setting"
39
+ end
40
+
41
+ add_index "paid_up_features_plans", ["feature_id"], name: "index_paid_up_features_plans_on_feature_id"
42
+ add_index "paid_up_features_plans", ["plan_id"], name: "index_paid_up_features_plans_on_plan_id"
43
+
44
+ create_table "paid_up_plans", force: :cascade do |t|
45
+ t.string "stripe_id"
46
+ t.string "name"
47
+ t.text "description"
48
+ t.integer "sort_order"
49
+ t.datetime "created_at"
50
+ t.datetime "updated_at"
51
+ end
52
+
53
+ add_index "paid_up_plans", ["name"], name: "index_paid_up_plans_on_name", unique: true
54
+ add_index "paid_up_plans", ["stripe_id"], name: "index_paid_up_plans_on_stripe_id", unique: true
55
+
56
+ create_table "users", force: :cascade do |t|
57
+ t.string "name"
58
+ t.string "email", default: "", null: false
59
+ t.string "encrypted_password", default: "", null: false
60
+ t.string "reset_password_token"
61
+ t.datetime "reset_password_sent_at"
62
+ t.datetime "remember_created_at"
63
+ t.integer "sign_in_count", default: 0, null: false
64
+ t.datetime "current_sign_in_at"
65
+ t.datetime "last_sign_in_at"
66
+ t.string "current_sign_in_ip"
67
+ t.string "last_sign_in_ip"
68
+ t.string "stripe_id"
69
+ end
70
+
71
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
72
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
73
+ add_index "users", ["stripe_id"], name: "index_users_on_stripe_id"
74
+
75
+ end
@@ -0,0 +1,19 @@
1
+ PaidUp::Feature.create(
2
+ name: 'ad_free',
3
+ title: 'Ad Free',
4
+ description: 'Are ads removed from the site with this plan?',
5
+ setting_type: 'boolean'
6
+ )
7
+ PaidUp::Feature.create(
8
+ name: 'groups',
9
+ title: 'Groups',
10
+ description: 'How many groups are allowed with this plan?',
11
+ setting_type: 'table_rows' # Enables table row counting that is enabled by a positive value
12
+ # for the PaidUp::FeaturesPlan.setting associated with this PaidUp::Feature
13
+ )
14
+ PaidUp::Feature.create(
15
+ name: 'calendar',
16
+ title: 'Calendar',
17
+ description: 'Is an event calendar included with this plan?',
18
+ setting_type: 'boolean'
19
+ )
@@ -0,0 +1,51 @@
1
+ after :features, :plans do
2
+ ad_free = PaidUp::Feature.find_by_name 'ad_free'
3
+ groups = PaidUp::Feature.find_by_name 'groups'
4
+ calendar = PaidUp::Feature.find_by_name 'calendar'
5
+
6
+ free = PaidUp::Plan.find_by_name 'Free'
7
+ no_ads = PaidUp::Plan.find_by_name 'No Ads'
8
+ group_leader = PaidUp::Plan.find_by_name 'Group Leader'
9
+ professional = PaidUp::Plan.find_by_name 'Professional'
10
+
11
+ # Ad Free
12
+ PaidUp::FeaturesPlan.create(
13
+ feature: ad_free,
14
+ plan: no_ads,
15
+ setting: 1
16
+ )
17
+
18
+ # Group Leader
19
+ PaidUp::FeaturesPlan.create(
20
+ feature: ad_free,
21
+ plan: group_leader,
22
+ setting: 1
23
+ )
24
+ PaidUp::FeaturesPlan.create(
25
+ feature: groups,
26
+ plan: group_leader,
27
+ setting: 1
28
+ )
29
+ PaidUp::FeaturesPlan.create(
30
+ feature: calendar,
31
+ plan: professional,
32
+ setting: 1
33
+ )
34
+
35
+ # Professional
36
+ PaidUp::FeaturesPlan.create(
37
+ feature: ad_free,
38
+ plan: professional,
39
+ setting: 1
40
+ )
41
+ PaidUp::FeaturesPlan.create(
42
+ feature: groups,
43
+ plan: professional,
44
+ setting: PaidUp::Unlimited.to_i(:db)
45
+ )
46
+ PaidUp::FeaturesPlan.create(
47
+ feature: calendar,
48
+ plan: professional,
49
+ setting: 1
50
+ )
51
+ end
@@ -0,0 +1,91 @@
1
+ Stripe::Plan.find_or_create_by_id(
2
+ 'anonymous-plan',
3
+ {
4
+ :amount => 0,
5
+ :interval => 'month',
6
+ :name => 'Anonymous Plan',
7
+ :currency => 'usd',
8
+ :id => 'anonymous-plan'
9
+ }
10
+ )
11
+ PaidUp::Plan.create(
12
+ name: 'Anonymous',
13
+ stripe_id: 'anonymous-plan',
14
+ description: "What you can do without logging in.",
15
+ sort_order: -1
16
+ )
17
+ Stripe::Plan.find_or_create_by_id(
18
+ 'free-plan',
19
+ {
20
+ :amount => 0,
21
+ :interval => 'month',
22
+ :name => 'Free Plan',
23
+ :currency => 'usd',
24
+ :id => 'free-plan'
25
+ }
26
+ )
27
+ PaidUp::Plan.create(
28
+ name: 'Free',
29
+ stripe_id: 'free-plan',
30
+ description: "Can't beat the price!",
31
+ sort_order: 0
32
+ )
33
+ Stripe::Plan.find_or_create_by_id(
34
+ 'no-ads-plan',
35
+ {
36
+ :amount => 100,
37
+ :interval => 'month',
38
+ :name => 'No Ads Plan',
39
+ :currency => 'usd',
40
+ :id => 'no-ads-plan'
41
+ }
42
+ )
43
+ PaidUp::Plan.create(
44
+ name: 'No Ads',
45
+ stripe_id: 'no-ads-plan',
46
+ description: "No frills, just removes the ads.",
47
+ sort_order: 1
48
+ )
49
+ Stripe::Plan.find_or_create_by_id(
50
+ 'group-leader-plan',
51
+ {
52
+ :amount => 500,
53
+ :interval => 'month',
54
+ :name => 'Group Leader Plan',
55
+ :currency => 'usd',
56
+ :id => 'group-leader-plan'
57
+ }
58
+ )
59
+ PaidUp::Plan.create(
60
+ name: 'Group Leader',
61
+ stripe_id: 'group-leader-plan',
62
+ description: "For leaders of single groups, with configuration.",
63
+ sort_order: 2
64
+ )
65
+ Stripe::Plan.find_or_create_by_id(
66
+ 'professional-plan',
67
+ {
68
+ :amount => 1000,
69
+ :interval => 'month',
70
+ :name => 'Professional Plan',
71
+ :currency => 'usd',
72
+ :id => 'professional-plan'
73
+ }
74
+ )
75
+ PaidUp::Plan.create(
76
+ name: 'Professional',
77
+ stripe_id: 'professional-plan',
78
+ description: "Designed for professionals with unlimited groups, a calendar and configuration.",
79
+ sort_order: 3
80
+ )
81
+ ######################
82
+ # Anonymous Customer #
83
+ ######################
84
+ Stripe::Customer.find_or_create_by_id(
85
+ 'anonymous-customer',
86
+ {
87
+ id: 'anonymous-customer',
88
+ description: 'Anonymous Customer',
89
+ plan: 'anonymous-plan'
90
+ }
91
+ )
File without changes
Binary file
File without changes
File without changes