diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc4a710..7280fce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,8 @@ $ bin/test $ bin/test_system ``` +You can optionally pass the path to a specific test. + ## Running the dummy app ```bash diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 0000000..e0126c7 --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,2 @@ +web: bin/rails server -b '0.0.0.0' -p 3033 +js: yarn build --watch diff --git a/bin/dev b/bin/dev index 49b6fa9..490c0d9 100755 --- a/bin/dev +++ b/bin/dev @@ -1,2 +1,7 @@ #!/usr/bin/env bash -bin/rails s +if ! gem list foreman -i --silent; then + echo "Installing foreman..." + gem install foreman +fi + +exec foreman start -f Procfile.dev "$@" diff --git a/bin/test b/bin/test index 8f111f9..dcf6f8a 100755 --- a/bin/test +++ b/bin/test @@ -1,2 +1,8 @@ #!/usr/bin/env bash -bundle exec rake app:test +yarn build + +if [ $# -eq 0 ]; then + bundle exec rake app:test +else + bundle exec rails test "$@" +fi diff --git a/bin/test_system b/bin/test_system index f42c610..4e600c3 100755 --- a/bin/test_system +++ b/bin/test_system @@ -1,2 +1,8 @@ #!/usr/bin/env bash -bundle exec rake app:test:system +yarn build + +if [ $# -eq 0 ]; then + bundle exec rake app:test:system +else + bundle exec rails test "$@" +fi