Skip to content

Commit

Permalink
Merge branch 'rspec:main' into view-spec-with-model-name
Browse files Browse the repository at this point in the history
  • Loading branch information
taketo1113 committed Oct 23, 2023
2 parents d91b572 + 9681266 commit d30b399
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 17 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Rubocop
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
Expand All @@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
include:
# Edge Rails (7.1) builds >= 2.7
# Edge Rails (?) builds >= 2.7
- ruby: 3.2
env:
RAILS_VERSION: 'main'
Expand All @@ -50,6 +50,20 @@ jobs:
env:
RAILS_VERSION: 'main'

# Rails 7.1 builds >= 2.7
- ruby: 3.2
env:
RAILS_VERSION: '~> 7.1.0'
- ruby: 3.1
env:
RAILS_VERSION: '~> 7.1.0'
- ruby: '3.0'
env:
RAILS_VERSION: '~> 7.1.0'
- ruby: 2.7
env:
RAILS_VERSION: '~> 7.1.0'

# Rails 7.0 builds >= 2.7
- ruby: 3.2
env:
Expand Down Expand Up @@ -83,7 +97,7 @@ jobs:

env: ${{ matrix.env }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/depsreview.yaml
Expand Up @@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
9 changes: 9 additions & 0 deletions Rakefile
Expand Up @@ -96,6 +96,15 @@ namespace :smoke do
desc "create a new example app with generated specs and run them"
task app: ["clobber:app", "generate:app", "generate:stuff", :smoke]

desc "run in the example app"
task :run, [:cmd] do |_t, args|
unless ENV['SKIP_GENERATE']
["clobber:app", "generate:app", "generate:stuff"].map { |task| Rake::Task[task].invoke }
end

in_example_app args.cmd.to_s
end

desc "run RSPEC_OPTS environment variable in the example app for local dev"
task :rspec do
in_example_app "LOCATION='../../example_app_generator/run_specs.rb' bin/rspec #{ENV.fetch("RSPEC_OPTS")}"
Expand Down
3 changes: 2 additions & 1 deletion example_app_generator/generate_app.rb
Expand Up @@ -31,7 +31,8 @@
# sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4`
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.4'"

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

if RUBY_ENGINE == "jruby"
gsub_file "Gemfile", /.*jdbc.*/, ''
Expand Down
1 change: 1 addition & 0 deletions example_app_generator/generate_stuff.rb
Expand Up @@ -32,6 +32,7 @@ def source_paths
end

def setup_tasks
copy_file 'config/initializers/zeitwerk.rb'
copy_file 'app/models/in_memory/model.rb'
copy_file 'lib/rails/generators/in_memory/model/model_generator.rb'
copy_file 'lib/rails/generators/in_memory/model/templates/model.rb.erb'
Expand Down
@@ -0,0 +1,3 @@
if Rails.autoloaders.respond_to?(:main)
Rails.autoloaders.main.ignore('lib/rails/generators/in_memory/model/model_generator.rb')
end
4 changes: 4 additions & 0 deletions example_app_generator/spec/verify_mailer_preview_path_spec.rb
Expand Up @@ -34,6 +34,10 @@ def have_no_preview
have_attributes(io: be_blank, exit_status: 0)
end

before do
skip("Currently broken for unknown reasons")
end

let(:exec_script) {
File.expand_path(File.join(__FILE__, '../support/default_preview_path'))
}
Expand Down
12 changes: 0 additions & 12 deletions script/install_chrome_driver

This file was deleted.

0 comments on commit d30b399

Please sign in to comment.