mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-13 21:31:28 +00:00
Update docs + comment out debug
This commit is contained in:
parent
3d3c3ae450
commit
3a890b8803
2 changed files with 13 additions and 1 deletions
|
@ -13,7 +13,9 @@ Just run and open http://localhost:4000/
|
|||
1. Everything should be running on containers.
|
||||
1. If you need to run stuff on your host (eg. ruby, rubocop, bundle install etc) run all commands from the: `Dockerfile.dev`. It should setup identical setup for your machine.
|
||||
1. Add docker container names to /etc/hosts. This makes it possible to run test from local machine without using the container since editor/IDE don't integrate with Docker so well.
|
||||
|
||||
sudo echo `docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ensl_dev_db` db >> /etc/hosts
|
||||
|
||||
1. VS Code and RubyMine are great IDE's/editors.
|
||||
1. To run VS Code plugin Ruby Test Explorer in docker container you need to create path to custom
|
||||
1. Do not commit too much without testing. Also keep commits small for documentation and reversability issues.
|
||||
|
@ -27,15 +29,25 @@ Just run and open http://localhost:4000/
|
|||
1. https://github.com/rubocop-hq/rspec-style-guide
|
||||
1. Run rubocop
|
||||
|
||||
## TODO issues for dev
|
||||
|
||||
1. Puma should be running (eg. spring), and if debugger is used it should be able to connect via docker-compose up
|
||||
1.
|
||||
|
||||
## Handy commands
|
||||
|
||||
To get inside docker web+test containers:
|
||||
|
||||
docker-compose -f docker-compose.dev.yml exec -u root web /bin/bash`
|
||||
docker-compose -f docker-compose.dev.yml exec -u web web /bin/bash`
|
||||
docker-compose -f docker-compose.dev.yml exec -u root test /bin/bash`
|
||||
docker-compose -f docker-compose.dev.yml exec -u web test /bin/bash`
|
||||
|
||||
Restart the web container
|
||||
|
||||
docker-compose -f docker-compose.dev.yml restart web`
|
||||
|
||||
Run some tests:
|
||||
|
||||
docker-compose -f docker-compose.dev.yml exec -u web test bundle exec rspec`
|
||||
docker-compose -f docker-compose.dev.yml exec -u web test bundle exec rspec spec/controllers/shoutmsgs_controller_spec.rb`
|
|
@ -1,6 +1,6 @@
|
|||
class Api::V1::Collection
|
||||
def execute_query
|
||||
print arel_query.to_sql
|
||||
# print arel_query.to_sql
|
||||
ActiveRecord::Base.connection.execute(arel_query.to_sql)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue