Skip to content

Commit

Permalink
KBP-172 #time 15m - remove settings.local.yml file after generating c…
Browse files Browse the repository at this point in the history
…onfig
fadimezhan authored and esref.viduslu committed Dec 5, 2017
1 parent d4c076e commit 10224c6
Showing 5 changed files with 2 additions and 17 deletions.
5 changes: 1 addition & 4 deletions lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ def generate_config
generate 'config:install'
run 'cp config/settings/development.yml config/settings/staging.yml'
append_file('config/settings.yml', template_content('settings.yml.erb'))
remove_file 'config/settings.local.yml', force: true
end

def generate_rollbar
@@ -95,10 +96,6 @@ def setup_gitignore_files
copy_file 'cybele_gitignore', '.gitignore'
end

def remove_setting_local_yml_file
remove_file 'config/settings.local.yml', force: true
end

def setup_gitignore_folders
%w[
app/assets/images
5 changes: 0 additions & 5 deletions lib/cybele/generators/app_generator.rb
Original file line number Diff line number Diff line change
@@ -175,11 +175,6 @@ def configure_locale_language
build :configure_locale_language
end

def remove_settings_local_yml_files
say 'Remove config/settings.local.yml file', :green
build :remove_setting_local_yml_file
end

def setup_show_for
return if @options[:skip_show_for]
say 'Generate show_for', :green
4 changes: 0 additions & 4 deletions spec/features/new_default_project_spec.rb
Original file line number Diff line number Diff line change
@@ -368,8 +368,4 @@
it 'uses pronto' do
pronto_test
end

it 'remove settings.local.yml file' do
expect(File).not_to exist(file_project_path('config/settings.local.yml'))
end
end
4 changes: 0 additions & 4 deletions spec/features/new_not_default_project_spec.rb
Original file line number Diff line number Diff line change
@@ -305,8 +305,4 @@
it 'uses pronto' do
pronto_test
end

it 'remove settings.local.yml file' do
expect(File).not_to exist(file_project_path('config/settings.local.yml'))
end
end
1 change: 1 addition & 0 deletions spec/support/config_test_helper.rb
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ module ConfigTestHelper
def config_test
gemfile_file = content('Gemfile')
expect(gemfile_file).to match(/^gem 'config'/)
expect(File).not_to exist(file_project_path('config/settings.local.yml'))

config_development_file_test
config_staging_file_test

0 comments on commit 10224c6

Please sign in to comment.