Skip to content

Commit

Permalink
Add local development commands to project template README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
İsmail Akbudak committed Jan 10, 2018
1 parent 74b9143 commit abc7bc1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
2 changes: 2 additions & 0 deletions spec/features/new_default_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
readme_file = content('README.md')
expect(gemfile_file).to match(/^gem 'rails', '#{Cybele::RAILS_VERSION}'/)
expect(readme_file).to match(/^# #{app_name.capitalize}/)
expect(readme_file).to match(/^# Docker development/)
expect(readme_file).to match(/^➜ ✗ redis-server/)
end

it 'uses postgresql database template' do
Expand Down
4 changes: 4 additions & 0 deletions spec/features/new_not_default_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@

it 'uses sqlite3 instead of default pg in Gemfile' do
gemfile_file = content('Gemfile')
readme_file = content('README.md')
expect(gemfile_file).not_to match(/^gem 'pg'/)
expect(gemfile_file).to match(/^gem 'sqlite3'/)
expect(readme_file).to match(/^# #{app_name.capitalize}/)
expect(readme_file).not_to match(/^# Docker development/)
expect(readme_file).not_to match(/^➜ ✗ redis-server/)
end

it 'uses sqlite3 database template' do
Expand Down
24 changes: 17 additions & 7 deletions templates/README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
# TODOs
- Change email sender domain address and basic_auth info in `config/settings.yml`
- Change email sender domain address in `config/initializers/devise.rb`
- Add your secret keys to `.env.local` file
- Add your secret keys to `.environments/` directory. In this directory there mus be .env.local file created from .env.sample

<% unless @options[:skip_docker] %>
# Docker development
- run following commands on terminal
➜ ✗ docker-compose build
➜ ✗ docker-compose run app bundle
➜ ✗ docker-compose run app bundle exec rails db:create
➜ ✗ docker-compose run app bundle exec rails db:migrate
➜ ✗ docker-compose run app bundle exec rails db:seed
➜ ✗ docker-compose run app bundle install
➜ ✗ docker-compose run app bundle exec rails db:create db:migrate db:seed
➜ ✗ docker-compose up
Look: localhost:3000 or lvh.me:3000
<% end %>
- open in your browser localhost:3000 or lvh.me:3000
<% end %>
# Local development
- run following commands on terminal
➜ ✗ bundle exec rails server
- open in your browser localhost:3000 or lvh.me:3000
<% unless @options[:skip_sidekiq] %>
➜ ✗ redis-server
➜ ✗ bundle exec rake sidekiq:start
<% end %>
# Development
➜ ✗ pronto run
➜ ✗ pronto run -r haml

0 comments on commit abc7bc1

Please sign in to comment.