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.
- checksums.yaml +4 -4
- data/.rubocop.yml +17 -13
- data/.rubocop_todo.yml +7 -0
- data/.travis.yml +4 -3
- data/Gemfile +29 -24
- data/README.md +22 -1
- data/Rakefile +6 -5
- data/VERSION +1 -1
- data/app/controllers/paid_up/paid_up_controller.rb +16 -9
- data/app/controllers/paid_up/plans_controller.rb +2 -0
- data/app/controllers/paid_up/subscriptions_controller.rb +58 -49
- data/app/helpers/paid_up/features_helper.rb +35 -34
- data/app/helpers/paid_up/paid_up_helper.rb +10 -8
- data/app/helpers/paid_up/plans_helper.rb +75 -55
- data/app/helpers/paid_up/subscriptions_helper.rb +17 -13
- data/app/models/paid_up/ability.rb +53 -46
- data/app/models/paid_up/plan.rb +36 -34
- data/app/models/paid_up/plan_feature_setting.rb +2 -0
- data/app/models/paid_up/unlimited.rb +2 -0
- data/app/views/paid_up/features/_abilities_table.html.haml +1 -45
- data/app/views/paid_up/features/_boolean_state.html.haml +6 -0
- data/app/views/paid_up/features/_setting_state.html.haml +13 -0
- data/app/views/paid_up/subscriptions/index.html.haml +2 -2
- data/config/initializers/stripe.rb +2 -0
- data/config/locales/en.yml +4 -1
- data/config/routes.rb +3 -1
- data/lib/generators/paid_up/install/install_generator.rb +4 -1
- data/lib/generators/paid_up/install/templates/ability.rb +2 -0
- data/lib/generators/paid_up/install/templates/initializer.rb +2 -0
- data/lib/generators/paid_up/utils.rb +2 -0
- data/lib/paid_up/configuration.rb +4 -2
- data/lib/paid_up/engine.rb +2 -0
- data/lib/paid_up/extensions/integer.rb +2 -0
- data/lib/paid_up/extensions/stripe.rb +2 -0
- data/lib/paid_up/feature.rb +10 -7
- data/lib/paid_up/feature_setting_type.rb +45 -0
- data/lib/paid_up/feature_setting_types/rolify.rb +10 -0
- data/lib/paid_up/feature_setting_types/table.rb +7 -0
- data/lib/paid_up/localization.rb +2 -0
- data/lib/paid_up/mixins/paid_for.rb +59 -47
- data/lib/paid_up/mixins/subscriber.rb +45 -101
- data/lib/paid_up/railtie.rb +2 -0
- data/lib/paid_up/ruby_version_check.rb +15 -0
- data/lib/paid_up/subscription.rb +80 -0
- data/lib/paid_up/validators/rolify_rows.rb +11 -6
- data/lib/paid_up/validators/table_rows.rb +9 -6
- data/lib/paid_up/version.rb +2 -0
- data/lib/paid_up.rb +8 -0
- data/paid_up.gemspec +108 -115
- data/spec/controllers/paid_up/plans_spec.rb +2 -0
- data/spec/controllers/paid_up/subscriptions_spec.rb +18 -11
- data/spec/dummy/Rakefile +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +6 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/models/ability.rb +2 -0
- data/spec/dummy/app/models/doodad.rb +2 -0
- data/spec/dummy/app/models/group.rb +2 -0
- data/spec/dummy/app/models/post.rb +2 -0
- data/spec/dummy/app/models/role.rb +2 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.haml +13 -11
- data/spec/dummy/bin/bundle +2 -0
- data/spec/dummy/bin/rails +2 -0
- data/spec/dummy/bin/rake +2 -0
- data/spec/dummy/bin/setup +10 -8
- data/spec/dummy/config/application.rb +2 -3
- data/spec/dummy/config/boot.rb +2 -0
- data/spec/dummy/config/environment.rb +2 -0
- data/spec/dummy/config/environments/development.rb +2 -0
- data/spec/dummy/config/environments/test.rb +2 -4
- data/spec/dummy/config/initializers/assets.rb +2 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +1 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/spec/dummy/config/initializers/devise.rb +2 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +2 -0
- data/spec/dummy/config/initializers/inflections.rb +1 -0
- data/spec/dummy/config/initializers/mime_types.rb +1 -0
- data/spec/dummy/config/initializers/paid_up.rb +10 -16
- data/spec/dummy/config/initializers/rolify.rb +2 -0
- data/spec/dummy/config/initializers/session_store.rb +2 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/config.ru +2 -0
- data/spec/dummy/db/schema.rb +14 -23
- data/spec/dummy/db/seeds.rb +8 -6
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/tasks/system.rake +2 -0
- data/spec/factories/doodad.rb +2 -0
- data/spec/factories/group.rb +2 -0
- data/spec/factories/plan.rb +2 -0
- data/spec/factories/plan_feature_setting.rb +2 -0
- data/spec/factories/post.rb +2 -0
- data/spec/factories/user.rb +3 -1
- data/spec/models/group_spec.rb +9 -7
- data/spec/models/paid_up/feature_spec.rb +2 -0
- data/spec/models/paid_up/plan_feature_setting_spec.rb +2 -0
- data/spec/models/paid_up/plan_spec.rb +2 -0
- data/spec/models/scope_spec.rb +9 -7
- data/spec/models/user_spec.rb +60 -58
- data/spec/paid_up_spec.rb +2 -0
- data/spec/rails_helper.rb +16 -2
- data/spec/routing/paid_up/plans_spec.rb +2 -0
- data/spec/routing/paid_up/subscription_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/controller_macros.rb +2 -0
- data/spec/support/factory_girl.rb +2 -0
- data/spec/support/loaded_site/features.rb +2 -0
- data/spec/support/loaded_site/groups.rb +2 -0
- data/spec/support/loaded_site/loaded_site.rb +2 -0
- data/spec/support/loaded_site/plans.rb +2 -0
- data/spec/support/loaded_site/posts.rb +2 -0
- data/spec/support/loaded_site/users.rb +4 -2
- data/spec/support/stripe.rb +2 -0
- data/spec/views/paid_up/plans_spec.rb +9 -7
- data/spec/views/paid_up/subscriptions_spec.rb +20 -19
- metadata +124 -90
- data/app/views/devise/confirmations/new.html.haml +0 -13
- data/app/views/devise/passwords/edit.html.haml +0 -19
- data/app/views/devise/passwords/new.html.haml +0 -14
- data/app/views/devise/registrations/_new_form.html.haml +0 -23
- data/app/views/devise/registrations/edit.html.haml +0 -39
- data/app/views/devise/registrations/new.html.haml +0 -11
- data/app/views/devise/sessions/_new_form.html.haml +0 -21
- data/app/views/devise/sessions/new.html.haml +0 -11
- data/app/views/devise/shared/_links.html.haml +0 -14
- data/app/views/devise/unlocks/new.html.haml +0 -14
- data/app/views/layouts/mailer.html.haml +0 -3
- data/app/views/layouts/mailer.text.haml +0 -1
- data/app/views/paid_up/subscription_mailer/payment_failed_email.html.haml +0 -0
- data/app/views/paid_up/subscription_mailer/payment_failed_email.text.haml +0 -0
- data/coverage/.last_run.json +0 -5
- data/coverage/.resultset.json +0 -1927
- data/spec/dummy/app/views/pages/index.html.haml +0 -1
- data/spec/dummy/config/environments/production.rb +0 -83
- data/spec/dummy/config/initializers/high_voltage.rb +0 -3
@@ -1,21 +0,0 @@
|
|
1
|
-
= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal' }) do |f|
|
2
|
-
.form-group
|
3
|
-
= f.label :email, class: 'col-sm-2 control-label'
|
4
|
-
.col-sm-8
|
5
|
-
= f.email_field :email, autofocus: true, class: 'col-sm-offset-2 form-control'
|
6
|
-
.form-group
|
7
|
-
= f.label :password, class: 'col-sm-2 control-label'
|
8
|
-
.col-sm-8
|
9
|
-
= f.password_field :password, autocomplete: "off", class: 'col-sm-offset-2 form-control'
|
10
|
-
- if devise_mapping.rememberable?
|
11
|
-
.form-group
|
12
|
-
.col-sm-2
|
13
|
-
.col-sm-8
|
14
|
-
.col-sm-offset-2.checkbox
|
15
|
-
= f.check_box :remember_me
|
16
|
-
= f.label :remember_me
|
17
|
-
.form-group
|
18
|
-
.col-sm-2
|
19
|
-
.col-sm-8
|
20
|
-
.col-sm-offset-2
|
21
|
-
= f.submit :sign_in.l, class: 'form-control btn btn-primary'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
= nav_list class: 'nav-stacked nav-pills' do
|
2
|
-
- if controller_name != 'sessions'
|
3
|
-
= nav_item :sign_in.l, new_session_path(resource_name)
|
4
|
-
- if devise_mapping.registerable? && controller_name != 'registrations'
|
5
|
-
= nav_item :sign_up.l, new_registration_path(resource_name)
|
6
|
-
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
7
|
-
= nav_item :forgot_your_password.l, new_password_path(resource_name)
|
8
|
-
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
9
|
-
= nav_item :didnt_receive_confirmation_instructions.l, new_confirmation_path(resource_name)
|
10
|
-
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
11
|
-
= nav_item :didnt_receive_unlock_instructions.l, new_unlock_path(resource_name)
|
12
|
-
- if devise_mapping.omniauthable?
|
13
|
-
- resource_class.omniauth_providers.each do |provider|
|
14
|
-
= nav_item :sign_in_with_provider.l(provider: provider), omniauth_authorize_path(resource_name, provider)
|
@@ -1,14 +0,0 @@
|
|
1
|
-
- add_title :resend_unlock_instructions.l
|
2
|
-
= form_for(resource, as: resource_name, url: unlock_path(resource_name), 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-2
|
11
|
-
.col-sm-offset-2
|
12
|
-
= f.submit :resend_unlock_instructions.l
|
13
|
-
- add_widget do
|
14
|
-
= render 'devise/shared/links'
|
@@ -1 +0,0 @@
|
|
1
|
-
= yield
|
File without changes
|
File without changes
|