Skip to content

Commit

Permalink
Fix rake dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Terrasa <[email protected]>
  • Loading branch information
Morriar committed Sep 8, 2021
1 parent 62d13e9 commit ca76cba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tapioca/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

require "pathname"
require "thor"
require "rake"

module Tapioca
class Generator < ::Thor::Shell::Color
Expand Down Expand Up @@ -697,6 +696,7 @@ def report_diff_and_exit_if_out_of_date(diff, command)
sig { void }
def abort_if_pending_migrations!
return unless File.exist?("config/application.rb")
return unless defined?(::Rake)

Rails.application.load_tasks
Rake::Task["db:abort_if_pending_migrations"].invoke if Rake::Task.task_defined?("db:abort_if_pending_migrations")
Expand Down
1 change: 1 addition & 0 deletions spec/support/repo/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gem("psych")
gem("extras")
# Needed for DSL generation tests. The simplest
# gems that we have a DSL generator for.
gem("rake", "13.0.6")
gem("smart_properties", "1.15.0")
gem("sidekiq", "6.2.1")
gem("activesupport", "6.1.3.2")
Expand Down
1 change: 1 addition & 0 deletions spec/support/repo/config/application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# typed: true
# frozen_string_literal: true

require "rake"
require "sidekiq"
require "smart_properties"
require "active_support/all"
Expand Down
1 change: 1 addition & 0 deletions spec/tapioca/cli/require_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class RequireSpec < CliSpec
require "baz"
require "foo/secret"
require "foo/will_fail"
require "rake"
require "sidekiq"
require "smart_properties"
CONTENTS
Expand Down

0 comments on commit ca76cba

Please sign in to comment.