Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 63e4e90

Browse files
authored
Fixed indentation of several configuration and initialization files (#36)
Fixes #18
1 parent a135590 commit 63e4e90

File tree

11 files changed

+36
-36
lines changed

11 files changed

+36
-36
lines changed

pathfinder.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def generate_initializers
3939
def ask_for_recipes
4040
add_recipe(Recipes::Postgres.new(self))
4141

42-
add_recipe(Recipes::CarrierWave.new(self)) if @template.yes?("Do you want to use Carrierwave?")
42+
add_recipe(Recipes::CarrierWave.new(self)) if @template.yes?('Do you want to use Carrierwave?')
4343
aux = case @template.ask('Choose Monitoring Engine:',
4444
limited_to: %w(rollbar airbrake none))
4545
when 'rollbar'
@@ -74,11 +74,11 @@ def call
7474
# Model
7575
gem 'aasm'
7676
gem 'keynote'
77-
gem 'paranoia' if yes?("Do you want to use Soft Deletes?")
77+
gem 'paranoia' if yes?('Do you want to use Soft Deletes?')
7878
# Searchs
79-
gem 'ransack' if yes?("Do you want to use Ransack?")
79+
gem 'ransack' if yes?('Do you want to use Ransack?')
8080
gem 'kaminari'
81-
gem 'searchkick' if yes?("Are you going to use ElasticSearch?")
81+
gem 'searchkick' if yes?('Are you going to use ElasticSearch?')
8282
# Jobs
8383
gem 'redis'
8484
gem 'sidekiq'
@@ -126,9 +126,9 @@ def call
126126
create_file 'application.yml'
127127
create_file 'application.yml.example'
128128
remove_file 'routes.rb'
129-
create_file 'routes.rb' do <<-RUBY
130-
Rails.application.routes.draw do
131-
end
129+
create_file 'routes.rb' do <<~RUBY
130+
Rails.application.routes.draw do
131+
end
132132
RUBY
133133
end
134134
end

recipes/airbrake.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ def gems
66
end
77

88
def init_file
9-
@template.initializer 'airbrake.rb', <<-CODE
10-
Airbrake.configure do |config|
11-
config.api_key = ENV['AIRBRAKE_API_KEY']
12-
end
9+
@template.initializer 'airbrake.rb', <<~CODE
10+
Airbrake.configure do |config|
11+
config.api_key = ENV['AIRBRAKE_API_KEY']
12+
end
1313
CODE
1414

1515
@template.inside 'config' do

recipes/assets.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Assets < Base
44
def gems
55
# Assets
66
@template.gem 'bootstrap-sass', '~> 3.3.3'
7-
@template.gem 'bootstrap-datepicker-rails', '~> 1.6.0' if @template.yes?("Do you want to use Bootstrap datepicker?")
7+
@template.gem 'bootstrap-datepicker-rails', '~> 1.6.0' if @template.yes?('Do you want to use Bootstrap datepicker?')
88
@template.gem 'font-awesome-sass', '~> 4.3.0'
99
@template.gem 'sass-rails', '~> 5.0'
1010
@template.gem 'modernizr-rails'

recipes/bower_rails.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def gems
88
def init_file
99
@template.run 'rails g bower_rails:initialize json'
1010
@template.remove_file 'bower.json'
11-
@template.create_file 'bower.json' do <<-TEXT
11+
@template.create_file 'bower.json' do <<~TEXT
1212
{
1313
"lib": {
1414
"name": "bower-rails generated lib assets",
@@ -21,11 +21,11 @@ def init_file
2121
end
2222

2323

24-
packages = resources.map { |package, version| "\"#{package}\": \"#{version}\"" }
24+
packages = resources.map { |package, version| "\t\t\t\"#{package}\": \"#{version}\"" }
2525
.join(",\n")
2626

2727
@template.append_file 'bower.json', "#{packages}\n" unless packages.empty?
28-
@template.append_file 'bower.json' do <<-TEXT
28+
@template.append_file 'bower.json' do <<~TEXT
2929
}
3030
}
3131
}

recipes/carrier_wave.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def gems
88
end
99

1010
def init_file
11-
@template.initializer 'carrierwave.rb', <<-CODE
11+
@template.initializer 'carrierwave.rb', <<~CODE
1212
require 'carrierwave/storage/fog'
1313
CarrierWave.configure do |config|
1414
config.fog_provider = 'fog/aws'

recipes/devise.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ def gems
77

88
def init_file
99
@template.generate 'devise:install'
10-
@template.insert_into_file 'config/environments/development.rb', after: "Rails.application.configure do\n" do <<-RUBY
11-
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
12-
config.action_controller.asset_host = 'http://localhost:3000'
13-
config.action_mailer.asset_host = 'http://localhost:3000'
14-
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
15-
config.action_mailer.delivery_method = :smtp
16-
config.action_mailer.smtp_settings = { address: 'localhost', port: 1025 }
10+
@template.insert_into_file 'config/environments/development.rb', after: "Rails.application.configure do\n" do <<~RUBY
11+
\tconfig.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
12+
\tconfig.action_controller.asset_host = 'http://localhost:3000'
13+
\tconfig.action_mailer.asset_host = 'http://localhost:3000'
14+
\tconfig.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
15+
\tconfig.action_mailer.delivery_method = :smtp
16+
\tconfig.action_mailer.smtp_settings = { address: 'localhost', port: 1025 }
1717
RUBY
1818
end
1919
end

recipes/postgres.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def gems
88
def init_file
99
@template.inside 'config' do
1010
@template.remove_file 'database.yml'
11-
@template.create_file 'database.yml' do <<-EOF
11+
@template.create_file 'database.yml' do <<~EOF
1212
default: &default
1313
adapter: postgresql
1414
encoding: unicode

recipes/pundit.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def gems
88
def init_file
99
@template.generate 'pundit:install'
1010
@template.insert_into_file 'app/controllers/application_controller.rb', after: "class ApplicationController < ActionController::Base\n" do <<-RUBY
11-
include Pundit
12-
RUBY
11+
include Pundit
12+
RUBY
1313
end
1414
end
1515
end

recipes/redis.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ module Recipes
22
class Redis < Base
33

44
def init_file
5-
@template.initializer 'redis.rb', <<-CODE
5+
@template.initializer 'redis.rb', <<~CODE
66
Redis.current = Redis.new(Rails.application.config_for(:redis))
77
CODE
88

99
@template.inside 'config' do
10-
@template.create_file 'redis.yml' do <<-EOF
10+
@template.create_file 'redis.yml' do <<~EOF
1111
default: &default
1212
host: localhost
1313
port: 6379

recipes/rollbar.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def gems
66
end
77

88
def init_file
9-
@template.initializer 'rollbar.rb', <<-CODE
9+
@template.initializer 'rollbar.rb', <<~CODE
1010
Rollbar.configure do |config|
1111
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
1212
config.environment = ENV['ROLLBAR_ENV'] || Rails.env

0 commit comments

Comments
 (0)