File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def initialize(options)
99
1010 def run
1111 platforms , ruby_version = Bundler . ui . silence do
12- locked_ruby_version = Bundler . locked_gems && Bundler . locked_gems . ruby_version . gsub ( /p\d +\Z / , "" )
12+ locked_ruby_version = Bundler . locked_gems && Bundler . locked_gems . ruby_version & .gsub ( /p\d +\Z / , "" )
1313 gemfile_ruby_version = Bundler . definition . ruby_version && Bundler . definition . ruby_version . single_version_string
1414 [ Bundler . definition . platforms . map { |p | "* #{ p } " } ,
1515 locked_ruby_version || gemfile_ruby_version ]
Original file line number Diff line number Diff line change 234234 expect ( out ) . to eq ( "ruby 1.0.0" )
235235 end
236236
237+ it "handles when there is a lockfile with no requirement" do
238+ gemfile <<-G
239+ source "#{ file_uri_for ( gem_repo1 ) } "
240+ G
241+
242+ lockfile <<-L
243+ GEM
244+ remote: #{ file_uri_for ( gem_repo1 ) } /
245+ specs:
246+
247+ PLATFORMS
248+ ruby
249+
250+ DEPENDENCIES
251+
252+ BUNDLED WITH
253+ #{ Bundler ::VERSION }
254+ L
255+
256+ bundle "platform --ruby"
257+ expect ( out ) . to eq ( "No ruby version specified" )
258+ end
259+
237260 it "handles when there is a requirement in the gemfile" do
238261 gemfile <<-G
239262 source "#{ file_uri_for ( gem_repo1 ) } "
You can’t perform that action at this time.
0 commit comments