From f48a61fb46304d35043d013c8cf4539c5be1ecab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 10 Jul 2019 17:26:55 +0200 Subject: [bundler/bundler] Commit man pages to source control This has the benefit that: * Allows the installation of bundler as a default gem from rubygems to include man pages. * Removes the need to build man pages during our tests. * Makes working with the manifest easier, because we only have source controlled files, and not a mix of source control and generated files. To make sure they never fall out of sync, we replace the previous `man:build` CI task with a `man:check` task that makes sure the generated man pages are up to date. https://github.com/bundler/bundler/commit/23de1d0177 --- spec/bundler/quality_spec.rb | 7 +++---- spec/bundler/spec_helper.rb | 2 -- spec/bundler/support/manpages.rb | 14 -------------- 3 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 spec/bundler/support/manpages.rb (limited to 'spec/bundler') diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb index a011196d23..f1fd154d77 100644 --- a/spec/bundler/quality_spec.rb +++ b/spec/bundler/quality_spec.rb @@ -105,7 +105,7 @@ RSpec.describe "The library itself" do end it "has no malformed whitespace" do - exempt = /\.gitmodules|\.marshal|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff/ + exempt = /\.gitmodules|\.marshal|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff|\.txt$/ error_messages = [] Dir.chdir(root) do files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` @@ -132,7 +132,7 @@ RSpec.describe "The library itself" do end it "does not include any leftover debugging or development mechanisms" do - exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn} + exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn|\.txt|\.5|\.1} error_messages = [] Dir.chdir(root) do files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z` @@ -253,9 +253,8 @@ RSpec.describe "The library itself" do it "ships the correct set of files", :ruby_repo do Dir.chdir(root) do - git_list = IO.popen("git ls-files -z", &:read).split("\x0").select {|f| f.match(%r{^(lib|exe)/}) } + git_list = IO.popen("git ls-files -z", &:read).split("\x0").select {|f| f.match(%r{^(lib|man|exe)/}) } git_list += %w[CHANGELOG.md LICENSE.md README.md bundler.gemspec] - git_list += Dir.glob("man/**/*") gem_list = Gem::Specification.load(gemspec.to_s).files diff --git a/spec/bundler/spec_helper.rb b/spec/bundler/spec_helper.rb index 182472ae34..0a957dd0be 100644 --- a/spec/bundler/spec_helper.rb +++ b/spec/bundler/spec_helper.rb @@ -22,8 +22,6 @@ end $debug = false -Spec::Manpages.setup unless Gem.win_platform? - module Gem def self.ruby=(ruby) @ruby = ruby diff --git a/spec/bundler/support/manpages.rb b/spec/bundler/support/manpages.rb deleted file mode 100644 index ce1f72cc49..0000000000 --- a/spec/bundler/support/manpages.rb +++ /dev/null @@ -1,14 +0,0 @@ -# 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 -- cgit v1.2.3