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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +20 -0
  3. data/Gemfile +5 -1
  4. data/Rakefile +12 -10
  5. data/VERSION +1 -1
  6. data/app/controllers/paid_up/paid_up_controller.rb +8 -3
  7. data/app/controllers/paid_up/plans_controller.rb +2 -1
  8. data/app/controllers/paid_up/subscriptions_controller.rb +19 -6
  9. data/app/helpers/paid_up/features_helper.rb +19 -6
  10. data/app/helpers/paid_up/paid_up_helper.rb +6 -3
  11. data/app/helpers/paid_up/plans_helper.rb +12 -5
  12. data/app/helpers/paid_up/subscriptions_helper.rb +10 -3
  13. data/app/models/paid_up/ability.rb +43 -44
  14. data/app/models/paid_up/plan.rb +81 -69
  15. data/app/models/paid_up/plan_feature_setting.rb +17 -9
  16. data/app/models/paid_up/unlimited.rb +15 -13
  17. data/app/views/devise/confirmations/new.html.haml +1 -1
  18. data/app/views/devise/passwords/edit.html.haml +1 -1
  19. data/app/views/devise/passwords/new.html.haml +1 -1
  20. data/app/views/devise/registrations/_new_form.html.haml +1 -1
  21. data/app/views/devise/registrations/new.html.haml +1 -1
  22. data/app/views/devise/sessions/new.html.haml +1 -1
  23. data/app/views/devise/unlocks/new.html.haml +1 -1
  24. data/app/views/layouts/mailer.html.haml +1 -1
  25. data/app/views/layouts/mailer.text.haml +1 -1
  26. data/app/views/paid_up/features/_abilities_table.html.haml +1 -1
  27. data/app/views/paid_up/plans/index.html.haml +1 -1
  28. data/app/views/paid_up/subscriptions/new.html.haml +1 -1
  29. data/config/initializers/stripe.rb +3 -3
  30. data/coverage/.last_run.json +1 -1
  31. data/coverage/.resultset.json +414 -253
  32. data/db/migrate/20150407110101_create_paid_up_plans_table.rb +3 -3
  33. data/lib/generators/paid_up/install/install_generator.rb +42 -33
  34. data/lib/generators/paid_up/install/templates/ability.rb +1 -0
  35. data/lib/generators/paid_up/install/templates/initializer.rb +16 -14
  36. data/lib/generators/paid_up/utils.rb +11 -4
  37. data/lib/paid_up/configuration.rb +13 -8
  38. data/lib/paid_up/engine.rb +4 -3
  39. data/lib/paid_up/extensions/integer.rb +8 -5
  40. data/lib/paid_up/extensions/stripe.rb +10 -9
  41. data/lib/paid_up/feature.rb +27 -17
  42. data/lib/paid_up/localization.rb +17 -18
  43. data/lib/paid_up/mixins/paid_for.rb +66 -54
  44. data/lib/paid_up/mixins/subscriber.rb +154 -161
  45. data/lib/paid_up/railtie.rb +1 -1
  46. data/lib/paid_up/validators/rolify_rows.rb +14 -6
  47. data/lib/paid_up/validators/table_rows.rb +14 -6
  48. data/lib/paid_up/version.rb +1 -1
  49. data/lib/paid_up.rb +7 -8
  50. data/paid_up.gemspec +21 -8
  51. data/spec/controllers/paid_up/plans_spec.rb +6 -6
  52. data/spec/controllers/paid_up/subscriptions_spec.rb +68 -68
  53. data/spec/dummy/Rakefile +2 -1
  54. data/spec/dummy/app/assets/stylesheets/application.css.scss +3 -16
  55. data/spec/dummy/app/controllers/application_controller.rb +1 -1
  56. data/spec/dummy/app/models/doodad.rb +1 -1
  57. data/spec/dummy/app/models/group.rb +1 -1
  58. data/spec/dummy/app/models/role.rb +4 -4
  59. data/spec/dummy/app/models/user.rb +1 -1
  60. data/spec/dummy/app/views/layouts/application.html.haml +2 -2
  61. data/spec/dummy/app/views/pages/index.html.haml +1 -1
  62. data/spec/dummy/config/application.rb +16 -12
  63. data/spec/dummy/config/environments/development.rb +4 -3
  64. data/spec/dummy/config/environments/production.rb +10 -6
  65. data/spec/dummy/config/environments/test.rb +3 -2
  66. data/spec/dummy/config/initializers/assets.rb +2 -1
  67. data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -2
  68. data/spec/dummy/config/initializers/devise.rb +58 -42
  69. data/spec/dummy/config/initializers/high_voltage.rb +1 -1
  70. data/spec/dummy/config/initializers/mime_types.rb +1 -1
  71. data/spec/dummy/config/initializers/paid_up.rb +16 -14
  72. data/spec/dummy/config/initializers/rolify.rb +3 -2
  73. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -1
  74. data/spec/dummy/config/routes.rb +2 -2
  75. data/spec/dummy/db/migrate/20150523010827_add_devise_to_users.rb +2 -2
  76. data/spec/dummy/db/migrate/20150523010837_rolify_create_roles.rb +2 -2
  77. data/spec/dummy/db/migrate/20160207184112_create_paid_up_plans_table.paid_up.rb +3 -3
  78. data/spec/dummy/db/schema.rb +53 -53
  79. data/spec/dummy/db/seeds.rb +41 -56
  80. data/spec/dummy/db/test.sqlite3 +0 -0
  81. data/spec/dummy/lib/tasks/system.rake +2 -2
  82. data/spec/factories/group.rb +1 -1
  83. data/spec/factories/plan.rb +1 -1
  84. data/spec/factories/plan_feature_setting.rb +1 -1
  85. data/spec/factories/user.rb +13 -11
  86. data/spec/models/group_spec.rb +8 -7
  87. data/spec/models/paid_up/feature_spec.rb +18 -4
  88. data/spec/models/paid_up/plan_feature_setting_spec.rb +2 -2
  89. data/spec/models/paid_up/plan_spec.rb +12 -8
  90. data/spec/models/user_spec.rb +88 -78
  91. data/spec/paid_up_spec.rb +1 -1
  92. data/spec/rails_helper.rb +5 -5
  93. data/spec/routing/paid_up/plans_spec.rb +3 -3
  94. data/spec/routing/paid_up/subscription_spec.rb +30 -7
  95. data/spec/spec_helper.rb +7 -52
  96. data/spec/support/controller_macros.rb +2 -2
  97. data/spec/support/factory_girl.rb +1 -1
  98. data/spec/support/{features.rb → loaded_site/features.rb} +2 -2
  99. data/spec/support/{groups.rb → loaded_site/groups.rb} +1 -1
  100. data/spec/support/{loaded_site.rb → loaded_site/loaded_site.rb} +1 -1
  101. data/spec/support/{plans.rb → loaded_site/plans.rb} +8 -4
  102. data/spec/support/{users.rb → loaded_site/users.rb} +1 -1
  103. data/spec/support/stripe.rb +10 -13
  104. data/spec/views/paid_up/plans_spec.rb +17 -17
  105. data/spec/views/paid_up/subscriptions_spec.rb +24 -14
  106. metadata +64 -7
@@ -1,54 +1,53 @@
1
1
  require 'rails_helper'
2
2
 
3
-
4
3
  RSpec.describe PaidUp::SubscriptionsController do
5
4
  include_context 'loaded site'
6
5
  routes { PaidUp::Engine.routes }
7
6
 
8
7
  describe 'GET #index' do
9
- context 'when the user is anonymous' do
8
+ describe 'when the user is anonymous' do
10
9
  before do
11
10
  access_anonymous
12
11
  get :index
13
12
  end
14
- context 'redirects to the user sign up page' do
13
+ describe 'redirects to the user sign up page' do
15
14
  subject { response }
16
15
  it { should redirect_to '/users/sign_in' }
17
16
  it { should have_http_status(302) }
18
17
  end
19
18
  end
20
- context 'when the user is signed in as a subscriber' do
19
+ describe 'when the user is signed in as a subscriber' do
21
20
  before do
22
21
  sign_in free_subscriber
23
22
  get :index
24
23
  end
25
- context "responds successfully with an HTTP 200 status code" do
24
+ describe 'responds successfully with an HTTP 200 status code' do
26
25
  subject { response }
27
26
  it { should be_success }
28
27
  it { should have_http_status(200) }
29
28
  end
30
- context "renders the index template" do
29
+ describe 'renders the index template' do
31
30
  subject { response }
32
- it { should render_template("index") }
31
+ it { should render_template('index') }
33
32
  end
34
33
  end
35
34
  end
36
35
 
37
- describe "GET #new" do
38
- context "when the user is anonymous" do
36
+ describe 'GET #new' do
37
+ describe 'when the user is anonymous' do
39
38
  before do
40
39
  access_anonymous
41
40
  get :new, plan_id: professional_plan.id
42
41
  end
43
- context 'redirects to the user sign up page' do
42
+ describe 'redirects to the user sign up page' do
44
43
  subject { response }
45
44
  it { should redirect_to '/users/sign_in' }
46
45
  it { should have_http_status(302) }
47
46
  end
48
47
  end
49
- context "when the user is signed in" do
50
- context 'when upgrading' do
51
- context 'with a paid plan' do
48
+ describe 'when the user is signed in' do
49
+ describe 'when upgrading' do
50
+ describe 'with a paid plan' do
52
51
  before do
53
52
  sign_in free_subscriber
54
53
  get :new, plan_id: professional_plan.id
@@ -56,21 +55,21 @@ RSpec.describe PaidUp::SubscriptionsController do
56
55
  after do
57
56
  free_subscriber.subscribe_to_plan free_plan
58
57
  end
59
- context "responds successfully with an HTTP 200 status code" do
58
+ describe 'responds successfully with an HTTP 200 status code' do
60
59
  subject { response }
61
60
  it { should be_success }
62
61
  it { should have_http_status(200) }
63
62
  end
64
- context "renders the new template" do
63
+ describe 'renders the new template' do
65
64
  subject { response }
66
- it { should render_template("new") }
65
+ it { should render_template('new') }
67
66
  end
68
- context "loads the requested plan into @plan" do
67
+ describe 'loads the requested plan into @plan' do
69
68
  subject { assigns(:plan) }
70
69
  it { should eq(professional_plan) }
71
70
  end
72
71
  end
73
- context 'with the free plan' do
72
+ describe 'with the free plan' do
74
73
  before do
75
74
  login_subscriber no_ads_subscriber
76
75
  get :new, plan_id: free_plan.id
@@ -78,17 +77,21 @@ RSpec.describe PaidUp::SubscriptionsController do
78
77
  after do
79
78
  no_ads_subscriber.subscribe_to_plan no_ads_plan
80
79
  end
81
- context "redirects to the subscriptions index page" do
80
+ describe 'redirects to the subscriptions index page' do
82
81
  subject { response }
83
82
  it { should redirect_to subscriptions_path }
84
83
  it { should have_http_status(302) }
85
84
  end
86
- context "sets a flash message" do
85
+ describe 'sets a flash message' do
87
86
  subject { flash[:notice] }
88
- it { should match /You are now subscribed to the #{free_plan.title} Plan/ }
87
+ it do
88
+ should(
89
+ include('You are now subscribed to the Free Plan')
90
+ )
91
+ end
89
92
  end
90
93
  end
91
- context 'when downgrading' do
94
+ describe 'when downgrading' do
92
95
  before do
93
96
  sign_in professional_subscriber
94
97
  get :new, plan_id: no_ads_plan.id
@@ -96,35 +99,39 @@ RSpec.describe PaidUp::SubscriptionsController do
96
99
  after do
97
100
  professional_subscriber.subscribe_to_plan professional_plan
98
101
  end
99
- context "redirects to the subscriptions index page" do
102
+ describe 'redirects to the subscriptions index page' do
100
103
  subject { response }
101
104
  it { should redirect_to subscriptions_path }
102
105
  it { should have_http_status(302) }
103
106
  end
104
- context "sets a flash message" do
107
+ describe 'sets a flash message' do
105
108
  subject { flash[:notice] }
106
- it { should match /You are now subscribed to the #{no_ads_plan.title} Plan/ }
109
+ it do
110
+ should(
111
+ include('You are now subscribed to the No Ads Plan')
112
+ )
113
+ end
107
114
  end
108
115
  end
109
116
  end
110
117
  end
111
118
  end
112
119
 
113
- describe "POST #create" do
114
- context "when the user is anonymous" do
120
+ describe 'POST #create' do
121
+ describe 'when the user is anonymous' do
115
122
  before do
116
123
  access_anonymous
117
124
  get :index
118
125
  end
119
- context 'redirects to the user sign up page' do
126
+ describe 'redirects to the user sign up page' do
120
127
  subject { response }
121
128
  it { should redirect_to '/users/sign_in' }
122
129
  it { should have_http_status(302) }
123
130
  end
124
131
  end
125
- context "when the user is signed in" do
126
- context "upgrading from the free plan" do
127
- context 'without a coupon code' do
132
+ describe 'when the user is signed in' do
133
+ describe 'upgrading from the free plan' do
134
+ describe 'without a coupon code' do
128
135
  before do
129
136
  sign_in free_subscriber
130
137
  token = working_stripe_token free_subscriber
@@ -133,39 +140,51 @@ RSpec.describe PaidUp::SubscriptionsController do
133
140
  after do
134
141
  free_subscriber.subscribe_to_plan free_plan
135
142
  end
136
- context "redirects to the subscriptions index page" do
143
+ describe 'redirects to the subscriptions index page' do
137
144
  subject { response }
138
145
  it { should redirect_to subscriptions_path }
139
146
  it { should have_http_status(302) }
140
147
  end
141
- context "sets a flash message" do
148
+ describe 'sets a flash message' do
142
149
  subject { flash[:notice] }
143
- it { should match /You are now subscribed to the #{professional_plan.title} Plan/ }
150
+ it do
151
+ should(
152
+ include('You are now subscribed to the Professional Plan')
153
+ )
154
+ end
144
155
  end
145
156
  end
146
- context 'with a coupon code' do
157
+ describe 'with a coupon code' do
147
158
  before do
148
159
  sign_in free_subscriber
149
160
  token = working_stripe_token free_subscriber
150
- post :create, plan_id: professional_plan.id, stripeToken: token, coupon_code: '25OFF'
161
+ post(
162
+ :create,
163
+ plan_id: professional_plan.id,
164
+ stripeToken: token,
165
+ coupon_code: '25OFF'
166
+ )
151
167
  end
152
168
  after do
153
169
  free_subscriber.subscribe_to_plan free_plan
154
170
  end
155
- context "redirects to the subscriptions index page" do
171
+ describe 'redirects to the subscriptions index page' do
156
172
  subject { response }
157
173
  it { should redirect_to subscriptions_path }
158
174
  it { should have_http_status(302) }
159
175
  end
160
- context "sets a flash message" do
176
+ describe 'sets a flash message' do
161
177
  subject { flash[:notice] }
162
- it { should match /You are now subscribed to the #{professional_plan.title} Plan/ }
178
+ it do
179
+ should(
180
+ include('You are now subscribed to the Professional Plan')
181
+ )
182
+ end
163
183
  end
164
184
  end
165
185
  end
166
-
167
- context "upgrading from the no ads plan" do
168
- context 'without a coupon code' do
186
+ describe 'upgrading from the no ads plan' do
187
+ describe 'without a coupon code' do
169
188
  before do
170
189
  sign_in no_ads_subscriber
171
190
  post :create, plan_id: professional_plan.id
@@ -173,35 +192,16 @@ RSpec.describe PaidUp::SubscriptionsController do
173
192
  after do
174
193
  no_ads_subscriber.subscribe_to_plan no_ads_plan
175
194
  end
176
- context "redirects to the subscriptions index page" do
177
- subject { response }
178
- it { should redirect_to subscriptions_path }
179
- it { should have_http_status(302) }
180
- end
181
- context "sets a flash message" do
182
- subject { flash[:notice] }
183
- it { should match /You are now subscribed to the #{professional_plan.title} Plan/ }
184
- end
185
- end
186
- context 'with a coupon code' do
187
- before do
188
- sign_in no_ads_subscriber
189
- post :create, plan_id: professional_plan.id, coupon_code: 'MINUS25'
190
- end
191
- after do
192
- no_ads_subscriber.subscribe_to_plan no_ads_plan
193
- end
194
- context "redirects to the subscriptions index page" do
195
- subject { response }
196
- it { should redirect_to subscriptions_path }
197
- it { should have_http_status(302) }
198
- end
199
- context "sets a flash message" do
195
+ describe 'sets a flash message' do
200
196
  subject { flash[:notice] }
201
- it { should match /You are now subscribed to the Professional Plan/ }
197
+ it do
198
+ should(
199
+ include('You are now subscribed to the Professional Plan')
200
+ )
201
+ end
202
202
  end
203
203
  end
204
204
  end
205
205
  end
206
206
  end
207
- end
207
+ end
data/spec/dummy/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be
3
+ # available to Rake.
3
4
 
4
5
  require File.expand_path('../config/application', __FILE__)
5
6
 
@@ -1,16 +1,3 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- */
13
-
14
- // "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
15
- @import "bootstrap-sprockets";
16
- @import "bootstrap";
1
+ // 'bootstrap-sprockets' must be imported before 'bootstrap' and 'bootstrap/variables'
2
+ @import 'bootstrap-sprockets';
3
+ @import 'bootstrap';
@@ -1,3 +1,3 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
- end
3
+ end
@@ -1,3 +1,3 @@
1
1
  class Doodad < ActiveRecord::Base
2
2
  paid_for
3
- end
3
+ end
@@ -1,3 +1,3 @@
1
1
  class Group < ActiveRecord::Base
2
2
  paid_for
3
- end
3
+ end
@@ -1,10 +1,10 @@
1
1
  class Role < ActiveRecord::Base
2
- has_and_belongs_to_many :users, :join_table => :users_roles
3
- belongs_to :resource, :polymorphic => true
2
+ has_and_belongs_to_many :users, join_table: :users_roles
3
+ belongs_to :resource, polymorphic: true
4
4
 
5
5
  validates :resource_type,
6
- :inclusion => { :in => Rolify.resource_types },
7
- :allow_nil => true
6
+ inclusion: { in: Rolify.resource_types },
7
+ allow_nil: true
8
8
 
9
9
  scopify
10
10
  end
@@ -5,4 +5,4 @@ class User < ActiveRecord::Base
5
5
  devise :database_authenticatable, :registerable,
6
6
  :recoverable, :rememberable, :trackable, :validatable
7
7
  subscriber
8
- end
8
+ end
@@ -19,7 +19,7 @@
19
19
  %footer
20
20
  - add_widget do
21
21
  .clearfix
22
- = nav_list :class => 'nav-pills nav-stacked' do
22
+ = nav_list class: 'nav-pills nav-stacked' do
23
23
  = nav_item :plans.l, paid_up.plans_path
24
24
  - if signed_in?
25
25
  = nav_item :my_subscription.l, paid_up.subscriptions_path
@@ -28,4 +28,4 @@
28
28
  = nav_item :sign_in.l, main_app.new_user_session_path
29
29
  = nav_item :sign_up.l, main_app.new_user_registration_path
30
30
  = render_widgets 'md', 3
31
- = render_footer_javascript
31
+ = render_footer_javascript
@@ -1 +1 @@
1
- = Forgery('lorem_ipsum').paragraphs(5)
1
+ = Forgery('lorem_ipsum').paragraphs(5)
@@ -1,27 +1,32 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- # require "action_mailer/railtie"
7
- require "action_view/railtie"
8
- require "sprockets/railtie"
4
+ require 'active_record/railtie'
5
+ require 'action_controller/railtie'
6
+ # require 'action_mailer/railtie'
7
+ require 'action_view/railtie'
8
+ require 'sprockets/railtie'
9
9
 
10
10
  Bundler.require(*Rails.groups)
11
- require "paid_up"
11
+ require 'paid_up'
12
12
 
13
13
  module Dummy
14
14
  class Application < Rails::Application
15
- # Settings in config/environments/* take precedence over those specified here.
15
+ # Settings in config/environments/* take precedence over those specified
16
+ # here.
16
17
  # Application configuration should go into files in config/initializers
17
18
  # -- all .rb files in that directory are automatically loaded.
18
19
 
19
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
20
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
20
+ # Set Time.zone default to the specified zone and make Active Record
21
+ # auto-convert to this zone. Run 'rake -D time' for a list of tasks for
22
+ # finding time zone names. Default is UTC.
21
23
  # config.time_zone = 'Central Time (US & Canada)'
22
24
 
23
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
24
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
25
+ # The default locale is :en and all translations from
26
+ # config/locales/*.rb,yml are auto loaded.
27
+ # config.i18n.load_path += Dir[
28
+ # Rails.root.join('my', 'locales', '*.{rb,yml}').to_s
29
+ # ]
25
30
  # config.i18n.default_locale = :de
26
31
 
27
32
  # Do not swallow errors in after_commit/after_rollback callbacks.
@@ -40,4 +45,3 @@ module Dummy
40
45
  end
41
46
  end
42
47
  end
43
-
@@ -1,5 +1,6 @@
1
1
  Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
2
+ # Settings specified here will take precedence over those in
3
+ # config/application.rb.
3
4
 
4
5
  # In the development environment your application's code is reloaded on
5
6
  # every request. This slows down response time but is perfect for development
@@ -27,8 +28,8 @@ Rails.application.configure do
27
28
  # number of complex assets.
28
29
  config.assets.debug = true
29
30
 
30
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
- # yet still be able to expire them through the digest params.
31
+ # Asset digests allow you to set far-future HTTP expiration dates on all
32
+ # assets, yet still be able to expire them through the digest params.
32
33
  config.assets.digest = true
33
34
 
34
35
  # Adds additional error checking when serving assets at runtime.
@@ -1,5 +1,6 @@
1
1
  Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
2
+ # Settings specified here will take precedence over those in
3
+ # config/application.rb.
3
4
 
4
5
  # Code is not reloaded between requests.
5
6
  config.cache_classes = true
@@ -31,17 +32,19 @@ Rails.application.configure do
31
32
  # Do not fallback to assets pipeline if a precompiled asset is missed.
32
33
  config.assets.compile = false
33
34
 
34
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
- # yet still be able to expire them through the digest params.
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.
36
37
  config.assets.digest = true
37
38
 
38
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
+ # `config.assets.precompile` and `config.assets.version` have moved to
40
+ # config/initializers/assets.rb
39
41
 
40
42
  # Specifies the header that your server uses for sending files.
41
43
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
44
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
45
 
44
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
46
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use
47
+ # secure cookies.
45
48
  # config.force_ssl = true
46
49
 
47
50
  # Use the lowest log level to ensure availability of diagnostic information
@@ -61,7 +64,8 @@ Rails.application.configure do
61
64
  # config.action_controller.asset_host = 'http://assets.example.com'
62
65
 
63
66
  # Ignore bad email addresses and do not raise email delivery errors.
64
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
67
+ # Set this to true and configure the email server for immediate delivery to
68
+ # raise delivery errors.
65
69
  # config.action_mailer.raise_delivery_errors = false
66
70
 
67
71
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
@@ -1,9 +1,10 @@
1
1
  Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
2
+ # Settings specified here will take precedence over those in
3
+ # config/application.rb.
3
4
 
4
5
  # The test environment is used exclusively to run your application's
5
6
  # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
+ # your test database is 'scratch space' for the test suite and is wiped
7
8
  # and recreated between test runs. Don't rely on the data there!
8
9
  config.cache_classes = true
9
10
 
@@ -7,5 +7,6 @@ Rails.application.config.assets.version = '1.0'
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
8
 
9
9
  # Precompile additional assets.
10
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are
11
+ # already added.
11
12
  # Rails.application.config.assets.precompile += %w( search.js )
@@ -1,7 +1,9 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
3
+ # You can add backtrace silencers for libraries that you're using but don't wish
4
+ # to see in your backtraces.
4
5
  # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
6
 
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # You can also remove all the silencers if you're trying to debug a problem that
8
+ # might stem from framework code.
7
9
  # Rails.backtrace_cleaner.remove_silencers!