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 +0,0 @@
|
|
1
|
-
= Forgery('lorem_ipsum').paragraphs(5)
|
@@ -1,83 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in
|
3
|
-
# config/application.rb.
|
4
|
-
|
5
|
-
# Code is not reloaded between requests.
|
6
|
-
config.cache_classes = true
|
7
|
-
|
8
|
-
# Eager load code on boot. This eager loads most of Rails and
|
9
|
-
# your application in memory, allowing both threaded web servers
|
10
|
-
# and those relying on copy on write to perform better.
|
11
|
-
# Rake tasks automatically ignore this option for performance.
|
12
|
-
config.eager_load = true
|
13
|
-
|
14
|
-
# Full error reports are disabled and caching is turned on.
|
15
|
-
config.consider_all_requests_local = false
|
16
|
-
config.action_controller.perform_caching = true
|
17
|
-
|
18
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
19
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
20
|
-
# For large-scale production use, consider using a caching reverse proxy like
|
21
|
-
# NGINX, varnish or squid.
|
22
|
-
# config.action_dispatch.rack_cache = true
|
23
|
-
|
24
|
-
# Disable serving static files from the `/public` folder by default since
|
25
|
-
# Apache or NGINX already handles this.
|
26
|
-
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
27
|
-
|
28
|
-
# Compress JavaScripts and CSS.
|
29
|
-
config.assets.js_compressor = :uglifier
|
30
|
-
# config.assets.css_compressor = :sass
|
31
|
-
|
32
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
33
|
-
config.assets.compile = false
|
34
|
-
|
35
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all
|
36
|
-
# assets, yet still be able to expire them through the digest params.
|
37
|
-
config.assets.digest = true
|
38
|
-
|
39
|
-
# `config.assets.precompile` and `config.assets.version` have moved to
|
40
|
-
# config/initializers/assets.rb
|
41
|
-
|
42
|
-
# Specifies the header that your server uses for sending files.
|
43
|
-
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
44
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
45
|
-
|
46
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use
|
47
|
-
# secure cookies.
|
48
|
-
# config.force_ssl = true
|
49
|
-
|
50
|
-
# Use the lowest log level to ensure availability of diagnostic information
|
51
|
-
# when problems arise.
|
52
|
-
config.log_level = :debug
|
53
|
-
|
54
|
-
# Prepend all log lines with the following tags.
|
55
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
56
|
-
|
57
|
-
# Use a different logger for distributed setups.
|
58
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
59
|
-
|
60
|
-
# Use a different cache store in production.
|
61
|
-
# config.cache_store = :mem_cache_store
|
62
|
-
|
63
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
64
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
65
|
-
|
66
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
67
|
-
# Set this to true and configure the email server for immediate delivery to
|
68
|
-
# raise delivery errors.
|
69
|
-
# config.action_mailer.raise_delivery_errors = false
|
70
|
-
|
71
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
72
|
-
# the I18n.default_locale when a translation cannot be found).
|
73
|
-
config.i18n.fallbacks = true
|
74
|
-
|
75
|
-
# Send deprecation notices to registered listeners.
|
76
|
-
config.active_support.deprecation = :notify
|
77
|
-
|
78
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
-
config.log_formatter = ::Logger::Formatter.new
|
80
|
-
|
81
|
-
# Do not dump schema after migrations.
|
82
|
-
config.active_record.dump_schema_after_migration = false
|
83
|
-
end
|