diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-14 06:01:35 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-14 06:01:35 +0000 |
commit | 68ddd4d300e9a88737c4f37af74e1a0312949b2f (patch) | |
tree | 787e1e83d76934ce039eb336995a8d5bb53a89e6 /spec/bundler/quality_spec.rb | |
parent | d636809c057432e8d42abe30c6c6785eb0721d77 (diff) | |
download | ruby-68ddd4d300e9a88737c4f37af74e1a0312949b2f.tar.gz |
Merge Bundler 2.1.0.pre.1 as developed version from upstream.
https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/quality_spec.rb')
-rw-r--r-- | spec/bundler/quality_spec.rb | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb index b24b42c542..f9c815aee1 100644 --- a/spec/bundler/quality_spec.rb +++ b/spec/bundler/quality_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true if defined?(Encoding) && Encoding.default_external.name != "UTF-8" - # Poor man's ruby -E UTF-8, since it works on 1.8.7 + # An approximation of ruby -E UTF-8, since it works on 1.8.7 Encoding.default_external = Encoding.find("UTF-8") end @@ -96,16 +96,8 @@ RSpec.describe "The library itself" do failing_line_message unless failing_line_message.empty? end - RSpec::Matchers.define :be_well_formed do - match(&:empty?) - - failure_message do |actual| - actual.join("\n") - end - end - it "has no malformed whitespace" do - exempt = /\.gitmodules|\.marshal|fixtures|vendor|ssl_certs|LICENSE|vcr_cassettes/ + exempt = /\.gitmodules|\.marshal|fixtures|vendor|LICENSE|vcr_cassettes/ error_messages = [] Dir.chdir(root) do lib_files = ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler` : `git ls-files -z -- lib` @@ -175,16 +167,13 @@ RSpec.describe "The library itself" do exemptions = %w[ auto_config_jobs cache_command_is_package - console_command deployment_means_frozen forget_cli_options gem.coc gem.mit + github.https inline - lockfile_upgrade_warning - lockfile_uses_separate_rubygems_sources use_gem_version_promoter_for_major_updates - viz_command ] all_settings = Hash.new {|h, k| h[k] = [] } @@ -235,14 +224,10 @@ RSpec.describe "The library itself" do gem_command! :build, gemspec end - if Bundler.rubygems.provides?(">= 2.4") - # there's no way aroudn this warning - last_command.stderr.sub!(/^YAML safe loading.*/, "") + # there's no way around this warning + last_command.stderr.sub!(/^YAML safe loading.*/, "") - # older rubygems have weird warnings, and we won't actually be using them - # to build the gem for releases anyways - expect(last_command.stderr).to be_empty, "bundler should build as a gem without warnings, but\n#{err}" - end + expect(last_command.stderr).to be_empty, "bundler should build as a gem without warnings, but\n#{err}" ensure # clean up the .gem generated FileUtils.rm("bundler-#{Bundler::VERSION}.gem") @@ -250,6 +235,18 @@ RSpec.describe "The library itself" do end end + it "ships the correct set of files" 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 += %w[CHANGELOG.md LICENSE.md README.md bundler.gemspec] + git_list += Dir.glob("man/**/*") + + gem_list = Gem::Specification.load(gemspec.to_s).files + + expect(git_list.to_set).to eq(gem_list.to_set) + end + end + it "does not contain any warnings" do Dir.chdir(root) do exclusions = %w[ |