From 39afdc40296871d9f7c1732ff3f7e1e3b7b28bbe Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 24 Feb 2020 09:59:15 -0700 Subject: Exclude development/test dependencies * Remove develoment and test dependencies from java-maven fixtures * Ensure that ruby projects with bundler 2.0 are scannable * Update CHANGELOG * Assign @errors ivar for error message * Remove --cache-from * Use default ruby and install bundler conservatively * Install gems to local path * Add --no-prepare when gems are installed * Print ruby, rubygems and bundler version --- spec/integration/ruby/bundler_spec.rb | 41 ++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'spec/integration/ruby') diff --git a/spec/integration/ruby/bundler_spec.rb b/spec/integration/ruby/bundler_spec.rb index 2cb8f7d..d9b9c85 100644 --- a/spec/integration/ruby/bundler_spec.rb +++ b/spec/integration/ruby/bundler_spec.rb @@ -13,7 +13,6 @@ gem 'saml-kit' end report = runner.scan - expect(report).not_to be_empty expect(report).to match_schema(version: '2.0') expect(report[:licenses]).not_to be_empty expect(report[:dependencies].map { |x| x[:name] }).to include("saml-kit") @@ -87,4 +86,44 @@ BUNDLED WITH expect(report[:dependencies].map { |x| x[:name] }).to include("saml-kit") end end + + context "when a project depends on bundler `~> 2.0`" do + it 'produces a valid report' do + runner.add_file('Gemfile') do + <<~RAW +source 'https://rubygems.org' + +gem 'net-hippie' + RAW + end + runner.add_file('Gemfile.lock') do + <<~RAW +GEM + remote: https://rubygems.org/ + specs: + net-hippie (0.3.2) + +PLATFORMS + ruby + +DEPENDENCIES + net-hippie + +BUNDLED WITH + 2.1.4 + RAW + end + + report = runner.scan + expect(report).to match_schema(version: '2.0') + expect(report[:licenses]).not_to be_empty + expect(find_in(report, 'net-hippie')).to eql({ + name: 'net-hippie', + description: "net/http for hippies. ☮️", + url: "https://github.com/mokhan/net-hippie/", + paths: ['.'], + licenses: ['MIT'] + }) + end + end end -- cgit v1.2.3