diff options
author | Colby Swandale <colby@taplaboratories.com> | 2017-05-17 08:59:19 +1000 |
---|---|---|
committer | Colby Swandale <colby@taplaboratories.com> | 2017-05-17 08:59:19 +1000 |
commit | dc39cb2cd115fd124493b8ab04a21a4ece5d1cf9 (patch) | |
tree | 48dead57045982563212ff371e584b1c3127c737 /spec | |
parent | 0be134195bcb1b79b598def4333e36d7eac9b35e (diff) | |
parent | 52e01785a50ceba97c7ea850e103a2647a0d4ff6 (diff) | |
download | bundler-dc39cb2cd115fd124493b8ab04a21a4ece5d1cf9.tar.gz |
Merge remote-tracking branch 'origin/master' into colby/stderr-feature
* origin/master:
Avoid Rack 1.6.7 in specs for now
Avoid re-building manpages each spec run
[Travis] Use RubyGems 2.6.12
Ensure that manpages are always built when running specs
[Rakefile] Generate man/index in man:build
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/manpages.rb | 13 | ||||
-rw-r--r-- | spec/support/rubygems_ext.rb | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 297d81f531..0a6b696fe7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -40,6 +40,7 @@ end $debug = false +Spec::Manpages.setup Spec::Rubygems.setup FileUtils.rm_rf(Spec::Path.gem_repo1) ENV["RUBYOPT"] = "#{ENV["RUBYOPT"]} -r#{Spec::Path.root}/spec/support/hax.rb" diff --git a/spec/support/manpages.rb b/spec/support/manpages.rb new file mode 100644 index 0000000000..f6a4a4ab51 --- /dev/null +++ b/spec/support/manpages.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +module Spec + module Manpages + def self.setup + man_path = Spec::Path.root.join("man") + return if man_path.children(false).select {|file| file.extname == ".ronn" }.all? do |man| + Dir[man_path.join("#{man.to_s[0..-6]}*.txt").to_s].any? + end + + system(Spec::Path.root.join("bin", "rake").to_s, "man:build") || raise("Failed building man pages") + end + end +end diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index 88886c3f1f..cfc481ef83 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -8,7 +8,9 @@ module Spec deps = { # rack 2.x requires Ruby version >= 2.2.2. # artifice doesn't support rack 2.x now. - "rack" => "< 2", + # TODO: revert to `< 2` once https://github.com/rack/rack/issues/1168 is + # addressed + "rack" => "1.6.6", "artifice" => "~> 0.6.0", "compact_index" => "~> 0.11.0", "sinatra" => "~> 1.4.7", |