diff --git a/lib/gemstash/compact_index_builder.rb b/lib/gemstash/compact_index_builder.rb index 6ca290e3..bec54407 100644 --- a/lib/gemstash/compact_index_builder.rb +++ b/lib/gemstash/compact_index_builder.rb @@ -115,8 +115,6 @@ def compact_index_versions(date) ORDER BY date, number, platform, name SQL - # not ordered correctly in sqlite for some reason - all_versions.sort_by! {|v| [v[:date], v[:number], v[:platform], v[:name]] } map_gem_versions(all_versions.map {|v| [v[:name], [v]] }) end diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 4d7cbbf8..59875ba5 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -236,7 +236,7 @@ shared_examples "a bundleable project" do it "successfully bundles" do env = { "HOME" => dir } - expect(execute("bundle", dir: dir, env: env)).to exit_success + expect(execute("bundle", %w[install --verbose], dir: dir, env: env)).to exit_success expect(execute("bundle", %w[exec speaker hi], dir: dir, env: env)). to exit_success.and_output("Hello world, #{platform_message}\n") end diff --git a/spec/support/exec_helpers.rb b/spec/support/exec_helpers.rb index 1838a688..cf526fb7 100644 --- a/spec/support/exec_helpers.rb +++ b/spec/support/exec_helpers.rb @@ -16,7 +16,7 @@ def execute(command, args = [], dir: nil, env: {}) # Executes and stores the results for an external command. class Result - attr_reader :command, :args, :dir, :output + attr_reader :command, :args, :dir, :output, :err def initialize(env, command, args, dir) @command = command @@ -29,7 +29,7 @@ def initialize(env, command, args, dir) end def exec - @output, @status = Open3.capture2(patched_env, command, *args, chdir: dir) + @output, @err, @status = Open3.capture3(patched_env, command, *args, chdir: dir) end def successful? @@ -148,7 +148,10 @@ def exec_in_process(binstub) else "expected '#{actual.display_command}' in '#{actual.dir}' to exit with a success code, but it didn't. the command output was: -#{actual.output}" +#{actual.output} + +and the error was: +#{actual.err}" end end end