Skip to content

Commit

Permalink
Merged in feature/version_changelog (pull request #11)
Browse files Browse the repository at this point in the history
KBP-142 KBP-143 Feature/version changelog

Approved-by: İsmail Akbudak <[email protected]>
  • Loading branch information
FatihAvsan authored and İsmail Akbudak committed Oct 31, 2017
2 parents c6dd629 + 3980e65 commit 8c6675e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def add_ruby_version
copy_file 'ruby-version', '.ruby-version'
end

def add_cybele_version
copy_file 'VERSION.txt', 'VERSION.txt'
run 'ln -s ../VERSION.txt public/VERSION.txt'
end

def use_postgres_config_template
template 'postgresql_database.yml.erb',
'config/database.yml',
Expand Down
5 changes: 5 additions & 0 deletions lib/cybele/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ def setup_ruby_version
build :add_ruby_version
end

def setup_cybele_version
say 'Add .VERSION.txt file', :green
build :add_cybele_version
end

def remove_files_we_dont_need
say 'Remove files we don\'t need', :green
build :remove_readme_rdoc
Expand Down
5 changes: 5 additions & 0 deletions spec/features/new_default_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
expect(locale_file).to match('destroy:')
end

it 'uses cybele_version' do
expect(File).to exist(file_project_path('VERSION.txt'))
expect(File).to exist(file_project_path('public/VERSION.txt'))
end

it 'uses rollbar' do
gemfile_file = content('Gemfile')
expect(gemfile_file).to match(/^gem 'rollbar'/)
Expand Down
6 changes: 5 additions & 1 deletion spec/features/new_not_default_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@
expect(locale_file).to match('view:')
end


it 'uses recipient_interceptor' do
gemfile_file = content('Gemfile')
expect(gemfile_file).to match(/^gem 'recipient_interceptor'/)
Expand All @@ -178,6 +177,11 @@
expect(config_staging_file).to match('RecipientInterceptor.new')
end

it 'uses cybele_version' do
expect(File).to exist(file_project_path('VERSION.txt'))
expect(File).to exist(file_project_path('public/VERSION.txt'))
end

it 'do not use simple_form' do
gemfile_file = content('Gemfile')
expect(gemfile_file).not_to match(/^gem 'simple_form'/)
Expand Down
2 changes: 1 addition & 1 deletion templates/Gemfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ gem 'roo', '~> 2.7', '>= 2.7.1'
group :development, :test do
gem 'colorize', '~> 0.8.1'
gem 'better_errors', '~> 2.4'
end
end
1 change: 1 addition & 0 deletions templates/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.0

0 comments on commit 8c6675e

Please sign in to comment.