Skip to content

Commit

Permalink
KBP-122 #time 10m - Rubocop offenses fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
esref.viduslu committed Oct 31, 2017
1 parent 46a4c8e commit f9f4909
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/cybele/helpers/dotenv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Dotenv
def configure_dotenv
# Add dotenv gem
inject_into_file 'Gemfile', template_content('dotenv/dotenv_Gemfile.erb'),
before: "# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'"
before: "# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'"
run_bundle

# Create dotenv files
Expand Down
11 changes: 7 additions & 4 deletions lib/cybele/helpers/paperclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def configure_paperclip
run_bundle

create_paperclip_files
configure_app_name
end

private
Expand All @@ -18,19 +19,21 @@ def create_paperclip_files
template 'paperclip/paperclip.rb.erb',
'config/initializers/paperclip.rb',
force: true

# Add paperclip settings to the config/settings.yml file
append_file 'config/settings.yml',
template_content('paperclip/paperclip_settings.yml.erb')

# Add paperclip env to the all env files
append_file('env.sample', template_content('paperclip/paperclip_env_sample.erb'))
gsub_file 'env.sample', /<%= app_name %>/, app_name
append_file('.env.local', template_content('paperclip/paperclip_env_local.erb'))
gsub_file '.env.local', /<%= app_name %>/, app_name
append_file('.env.staging', template_content('paperclip/paperclip_env_staging.erb'))
gsub_file '.env.staging', /<%= app_name %>/, app_name
append_file('.env.production', template_content('paperclip/paperclip_env_production.erb'))
end

def configure_app_name
gsub_file 'env.sample', /<%= app_name %>/, app_name
gsub_file '.env.local', /<%= app_name %>/, app_name
gsub_file '.env.staging', /<%= app_name %>/, app_name
gsub_file '.env.production', /<%= app_name %>/, app_name
end
end
Expand Down

0 comments on commit f9f4909

Please sign in to comment.