Skip to content

Commit

Permalink
railties: Move the definition of PluginGenerator#app_path to railties…
Browse files Browse the repository at this point in the history
….rbs

As a preparation of ruby#693, this moves the definition of
`Rails::Generator::PluginGenerator#app_path` to railties.rbs
  • Loading branch information
tk0miya committed Oct 24, 2024
1 parent f745a00 commit 7e1b663
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
39 changes: 29 additions & 10 deletions gems/railties/6.0/patch.rbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
module Rails
module Generators
class PluginGenerator < AppBase
# It is necessary to satisfy alias target.
# TODO: Define this method to correct place.
def app_path: () -> untyped
end
end
end

# rbs gem has erb library but it doesn't have ERB::Compiler definition.
class ERB
class Compiler
end
end

# Remove the fake Minitest type
# if the real type of Minitest is available
module Minitest
class SummaryReporter
end

class StatisticsReporter
end
end

# Remove the fake Rack type
# if the real type of Minitest is available
module Rack
class Server
end
end

# Remove the fake RDoc type
# if the real type of Minitest is available
module RDoc
Expand All @@ -25,3 +32,15 @@ module RDoc
class Task
end
end

# Remove the fake types for Gem::Version
# if the real types are available.
module Gem
class Version
end
end

# Remove the fake types for FileUtils
# if the real types are available.
module FileUtils
end
9 changes: 9 additions & 0 deletions gems/railties/6.0/railties.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Rails
module Generators
class PluginGenerator < AppBase
# It is necessary to satisfy alias target.
# TODO: Define this method to correct place.
def app_path: () -> untyped
end
end
end

0 comments on commit 7e1b663

Please sign in to comment.