Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bin/rails executable #238

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

seanpdoyle
Copy link
Contributor

@seanpdoyle seanpdoyle commented Sep 17, 2021

Make bin/rails executable:

This commit contains the results of:

chmod a+x bin/rails

Use bin/test in CI

Use bin/test with a pattern for finding files instead of
bundle exec rake. We're passing a pattern to bin/test because
without it, tests in test/system are skipped:

For example:

~/Work/hotwired/turbo-rails bin-rails-execution-permissions*                                                              [7/2071]
❯ bin/test 
Installing Ruby dependencies
Warning: the running version of Bundler (2.2.12) is older than the version that created the lockfile (2.2.16). We suggest you to u
pgrade to the version that created the lockfile by running `gem install bundler:2.2.16`.
Installing JavasScript

app/javascript/turbo/index.js → app/assets/javascripts/turbo.js...
created app/assets/javascripts/turbo.js in 692ms
Migrating test database
Run options: --seed 2063

# Running:

.............................................................

Finished in 0.612377s, 99.6118 runs/s, 174.7290 assertions/s.
61 runs, 107 assertions, 0 failures, 0 errors, 0 skips

~/Work/hotwired/turbo-rails bin-rails-execution-permissions* 7s
❯ gs
## bin-rails-execution-permissions
 M test/system/broadcasts_test.rb

~/Work/hotwired/turbo-rails bin-rails-execution-permissions*
❯ gd
diff --git a/test/system/broadcasts_test.rb b/test/system/broadcasts_test.rb
index 38a349e..9aa6e54 100644
--- a/test/system/broadcasts_test.rb
+++ b/test/system/broadcasts_test.rb
@@ -2,6 +2,7 @@ require "application_system_test_case"
  
 class BroadcastsTest < ApplicationSystemTestCase
   test "Message broadcasts Turbo Streams" do
+    fail
     visit messages_path

Since bin/test has the potential to generate changes to the embedded
assets, we'll fail CI if there are new and uncommitted changes after the
suite completes.

@dhh
Copy link
Member

dhh commented Sep 17, 2021

Shouldn’t we use bin/test here?

This commit contains the results of:

```sh
chmod a+x bin/rails
```
@seanpdoyle seanpdoyle force-pushed the bin-rails-execution-permissions branch 2 times, most recently from 7639ed1 to 20ac169 Compare September 17, 2021 12:06
Use `bin/test` with a pattern for finding files instead of `bundle exec
rake`. We're passing a pattern to `bin/test` because without it, tests
in `test/system` are skipped:

For example:

```
~/Work/hotwired/turbo-rails bin-rails-execution-permissions*                                                              [7/2071]
❯ bin/test
Installing Ruby dependencies
Warning: the running version of Bundler (2.2.12) is older than the version that created the lockfile (2.2.16). We suggest you to u
pgrade to the version that created the lockfile by running `gem install bundler:2.2.16`.
Installing JavasScript

app/javascript/turbo/index.js → app/assets/javascripts/turbo.js...
created app/assets/javascripts/turbo.js in 692ms
Migrating test database
Run options: --seed 2063

Running:

.............................................................

Finished in 0.612377s, 99.6118 runs/s, 174.7290 assertions/s.
61 runs, 107 assertions, 0 failures, 0 errors, 0 skips

~/Work/hotwired/turbo-rails bin-rails-execution-permissions* 7s
❯ gs
 ## bin-rails-execution-permissions
 M test/system/broadcasts_test.rb

~/Work/hotwired/turbo-rails bin-rails-execution-permissions*
❯ gd
diff --git a/test/system/broadcasts_test.rb b/test/system/broadcasts_test.rb
index 38a349e..9aa6e54 100644
--- a/test/system/broadcasts_test.rb
+++ b/test/system/broadcasts_test.rb
@@ -2,6 +2,7 @@ require "application_system_test_case"

 class BroadcastsTest < ApplicationSystemTestCase
   test "Message broadcasts Turbo Streams" do
+    fail
     visit messages_path
```
@seanpdoyle seanpdoyle force-pushed the bin-rails-execution-permissions branch from 20ac169 to c417e3b Compare September 17, 2021 12:10
@dhh dhh merged commit 65a4e19 into hotwired:main Sep 17, 2021
@seanpdoyle seanpdoyle deleted the bin-rails-execution-permissions branch September 17, 2021 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants