Skip to content

Commit d30b399

Browse files
authored
Merge branch 'rspec:main' into view-spec-with-model-name
2 parents d91b572 + 9681266 commit d30b399

File tree

8 files changed

+37
-17
lines changed

8 files changed

+37
-17
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
name: Rubocop
2121
runs-on: 'ubuntu-20.04'
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- uses: ruby/setup-ruby@v1
2525
with:
2626
ruby-version: '3.0'
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
include:
39-
# Edge Rails (7.1) builds >= 2.7
39+
# Edge Rails (?) builds >= 2.7
4040
- ruby: 3.2
4141
env:
4242
RAILS_VERSION: 'main'
@@ -50,6 +50,20 @@ jobs:
5050
env:
5151
RAILS_VERSION: 'main'
5252

53+
# Rails 7.1 builds >= 2.7
54+
- ruby: 3.2
55+
env:
56+
RAILS_VERSION: '~> 7.1.0'
57+
- ruby: 3.1
58+
env:
59+
RAILS_VERSION: '~> 7.1.0'
60+
- ruby: '3.0'
61+
env:
62+
RAILS_VERSION: '~> 7.1.0'
63+
- ruby: 2.7
64+
env:
65+
RAILS_VERSION: '~> 7.1.0'
66+
5367
# Rails 7.0 builds >= 2.7
5468
- ruby: 3.2
5569
env:
@@ -83,7 +97,7 @@ jobs:
8397

8498
env: ${{ matrix.env }}
8599
steps:
86-
- uses: actions/checkout@v3
100+
- uses: actions/checkout@v4
87101
- uses: ruby/setup-ruby@v1
88102
with:
89103
ruby-version: ${{ matrix.ruby }}

.github/workflows/depsreview.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: 'Checkout Repository'
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: 'Dependency Review'
1414
uses: actions/dependency-review-action@v3

Rakefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ namespace :smoke do
9696
desc "create a new example app with generated specs and run them"
9797
task app: ["clobber:app", "generate:app", "generate:stuff", :smoke]
9898

99+
desc "run in the example app"
100+
task :run, [:cmd] do |_t, args|
101+
unless ENV['SKIP_GENERATE']
102+
["clobber:app", "generate:app", "generate:stuff"].map { |task| Rake::Task[task].invoke }
103+
end
104+
105+
in_example_app args.cmd.to_s
106+
end
107+
99108
desc "run RSPEC_OPTS environment variable in the example app for local dev"
100109
task :rspec do
101110
in_example_app "LOCATION='../../example_app_generator/run_specs.rb' bin/rspec #{ENV.fetch("RSPEC_OPTS")}"

example_app_generator/generate_app.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
# sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4`
3232
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.4'"
3333

34-
gsub_file "Gemfile", /.*chromedriver-helper.*/, "gem 'webdrivers'"
34+
# remove webdrivers
35+
gsub_file "Gemfile", /gem ['"]webdrivers['"]/, ""
3536

3637
if RUBY_ENGINE == "jruby"
3738
gsub_file "Gemfile", /.*jdbc.*/, ''

example_app_generator/generate_stuff.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def source_paths
3232
end
3333

3434
def setup_tasks
35+
copy_file 'config/initializers/zeitwerk.rb'
3536
copy_file 'app/models/in_memory/model.rb'
3637
copy_file 'lib/rails/generators/in_memory/model/model_generator.rb'
3738
copy_file 'lib/rails/generators/in_memory/model/templates/model.rb.erb'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if Rails.autoloaders.respond_to?(:main)
2+
Rails.autoloaders.main.ignore('lib/rails/generators/in_memory/model/model_generator.rb')
3+
end

example_app_generator/spec/verify_mailer_preview_path_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ def have_no_preview
3434
have_attributes(io: be_blank, exit_status: 0)
3535
end
3636

37+
before do
38+
skip("Currently broken for unknown reasons")
39+
end
40+
3741
let(:exec_script) {
3842
File.expand_path(File.join(__FILE__, '../support/default_preview_path'))
3943
}

script/install_chrome_driver

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)