File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,12 +141,20 @@ class Module; include T::Sig; end
141141
142142 # Now we create a new context to import our modified gem and run tapioca
143143 say ( "Running Tapioca..." )
144+ tapioca_specs = Bundler . load . gems [ "tapioca" ]
145+ if tapioca_specs . size > 1
146+ raise <<~MSG
147+ More than one Tapioca version found in the Bundle:
148+ #{ tapioca_specs . sort_by ( &:version ) . map { |s | " - tapioca #{ s . version } " } . join ( "\n " ) }
149+ MSG
150+ end
151+
144152 tapioca_context = Spoom ::Context . mktmp!
145153 tapioca_context . write! ( "Gemfile" , <<~RB )
146154 source "https://rubygems.org"
147155
148156 gem "rbs", ">= 4.0.0.dev.4"
149- gem "tapioca"
157+ gem "tapioca", " #{ tapioca_specs . first . version } "
150158 gem "#{ spec . name } ", path: "#{ copy_context . absolute_path } "
151159 RB
152160 exec ( tapioca_context , "bundle install" )
You can’t perform that action at this time.
0 commit comments