paid_up 0.9.13 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +20 -0
- data/Gemfile +5 -1
- data/Rakefile +12 -10
- data/VERSION +1 -1
- data/app/controllers/paid_up/paid_up_controller.rb +8 -3
- data/app/controllers/paid_up/plans_controller.rb +2 -1
- data/app/controllers/paid_up/subscriptions_controller.rb +19 -6
- data/app/helpers/paid_up/features_helper.rb +19 -6
- data/app/helpers/paid_up/paid_up_helper.rb +6 -3
- data/app/helpers/paid_up/plans_helper.rb +12 -5
- data/app/helpers/paid_up/subscriptions_helper.rb +10 -3
- data/app/models/paid_up/ability.rb +43 -44
- data/app/models/paid_up/plan.rb +81 -69
- data/app/models/paid_up/plan_feature_setting.rb +17 -9
- data/app/models/paid_up/unlimited.rb +15 -13
- data/app/views/devise/confirmations/new.html.haml +1 -1
- data/app/views/devise/passwords/edit.html.haml +1 -1
- data/app/views/devise/passwords/new.html.haml +1 -1
- data/app/views/devise/registrations/_new_form.html.haml +1 -1
- data/app/views/devise/registrations/new.html.haml +1 -1
- data/app/views/devise/sessions/new.html.haml +1 -1
- data/app/views/devise/unlocks/new.html.haml +1 -1
- data/app/views/layouts/mailer.html.haml +1 -1
- data/app/views/layouts/mailer.text.haml +1 -1
- data/app/views/paid_up/features/_abilities_table.html.haml +1 -1
- data/app/views/paid_up/plans/index.html.haml +1 -1
- data/app/views/paid_up/subscriptions/new.html.haml +1 -1
- data/config/initializers/stripe.rb +3 -3
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +414 -253
- data/db/migrate/20150407110101_create_paid_up_plans_table.rb +3 -3
- data/lib/generators/paid_up/install/install_generator.rb +42 -33
- data/lib/generators/paid_up/install/templates/ability.rb +1 -0
- data/lib/generators/paid_up/install/templates/initializer.rb +16 -14
- data/lib/generators/paid_up/utils.rb +11 -4
- data/lib/paid_up/configuration.rb +13 -8
- data/lib/paid_up/engine.rb +4 -3
- data/lib/paid_up/extensions/integer.rb +8 -5
- data/lib/paid_up/extensions/stripe.rb +10 -9
- data/lib/paid_up/feature.rb +27 -17
- data/lib/paid_up/localization.rb +17 -18
- data/lib/paid_up/mixins/paid_for.rb +66 -54
- data/lib/paid_up/mixins/subscriber.rb +154 -161
- data/lib/paid_up/railtie.rb +1 -1
- data/lib/paid_up/validators/rolify_rows.rb +14 -6
- data/lib/paid_up/validators/table_rows.rb +14 -6
- data/lib/paid_up/version.rb +1 -1
- data/lib/paid_up.rb +7 -8
- data/paid_up.gemspec +21 -8
- data/spec/controllers/paid_up/plans_spec.rb +6 -6
- data/spec/controllers/paid_up/subscriptions_spec.rb +68 -68
- data/spec/dummy/Rakefile +2 -1
- data/spec/dummy/app/assets/stylesheets/application.css.scss +3 -16
- data/spec/dummy/app/controllers/application_controller.rb +1 -1
- data/spec/dummy/app/models/doodad.rb +1 -1
- data/spec/dummy/app/models/group.rb +1 -1
- data/spec/dummy/app/models/role.rb +4 -4
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/app/views/layouts/application.html.haml +2 -2
- data/spec/dummy/app/views/pages/index.html.haml +1 -1
- data/spec/dummy/config/application.rb +16 -12
- data/spec/dummy/config/environments/development.rb +4 -3
- data/spec/dummy/config/environments/production.rb +10 -6
- data/spec/dummy/config/environments/test.rb +3 -2
- data/spec/dummy/config/initializers/assets.rb +2 -1
- data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -2
- data/spec/dummy/config/initializers/devise.rb +58 -42
- data/spec/dummy/config/initializers/high_voltage.rb +1 -1
- data/spec/dummy/config/initializers/mime_types.rb +1 -1
- data/spec/dummy/config/initializers/paid_up.rb +16 -14
- data/spec/dummy/config/initializers/rolify.rb +3 -2
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -1
- data/spec/dummy/config/routes.rb +2 -2
- data/spec/dummy/db/migrate/20150523010827_add_devise_to_users.rb +2 -2
- data/spec/dummy/db/migrate/20150523010837_rolify_create_roles.rb +2 -2
- data/spec/dummy/db/migrate/20160207184112_create_paid_up_plans_table.paid_up.rb +3 -3
- data/spec/dummy/db/schema.rb +53 -53
- data/spec/dummy/db/seeds.rb +41 -56
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/tasks/system.rake +2 -2
- data/spec/factories/group.rb +1 -1
- data/spec/factories/plan.rb +1 -1
- data/spec/factories/plan_feature_setting.rb +1 -1
- data/spec/factories/user.rb +13 -11
- data/spec/models/group_spec.rb +8 -7
- data/spec/models/paid_up/feature_spec.rb +18 -4
- data/spec/models/paid_up/plan_feature_setting_spec.rb +2 -2
- data/spec/models/paid_up/plan_spec.rb +12 -8
- data/spec/models/user_spec.rb +88 -78
- data/spec/paid_up_spec.rb +1 -1
- data/spec/rails_helper.rb +5 -5
- data/spec/routing/paid_up/plans_spec.rb +3 -3
- data/spec/routing/paid_up/subscription_spec.rb +30 -7
- data/spec/spec_helper.rb +7 -52
- data/spec/support/controller_macros.rb +2 -2
- data/spec/support/factory_girl.rb +1 -1
- data/spec/support/{features.rb → loaded_site/features.rb} +2 -2
- data/spec/support/{groups.rb → loaded_site/groups.rb} +1 -1
- data/spec/support/{loaded_site.rb → loaded_site/loaded_site.rb} +1 -1
- data/spec/support/{plans.rb → loaded_site/plans.rb} +8 -4
- data/spec/support/{users.rb → loaded_site/users.rb} +1 -1
- data/spec/support/stripe.rb +10 -13
- data/spec/views/paid_up/plans_spec.rb +17 -17
- data/spec/views/paid_up/subscriptions_spec.rb +24 -14
- metadata +64 -7
@@ -1 +1 @@
|
|
1
|
-
= yield
|
1
|
+
= yield
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Rails.configuration.stripe = {
|
2
|
-
:
|
3
|
-
:
|
2
|
+
publishable_key: ENV['STRIPE_PUBLISHABLE_KEY'],
|
3
|
+
secret_key: ENV['STRIPE_SECRET_KEY']
|
4
4
|
}
|
5
5
|
|
6
|
-
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|
6
|
+
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|
data/coverage/.last_run.json
CHANGED