diff options
Diffstat (limited to 'spec/unit/ruby')
| -rw-r--r-- | spec/unit/ruby/gateway_spec.rb | 23 | ||||
| -rw-r--r-- | spec/unit/ruby/parsers/gemfile_lock_spec.rb | 55 |
2 files changed, 52 insertions, 26 deletions
diff --git a/spec/unit/ruby/gateway_spec.rb b/spec/unit/ruby/gateway_spec.rb new file mode 100644 index 0000000..32b2150 --- /dev/null +++ b/spec/unit/ruby/gateway_spec.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +RSpec.describe Spandx::Ruby::Gateway do + subject { described_class.new } + + describe '#each' do + let(:items) { [] } + + before do + VCR.use_cassette('index.rubygems.org/versions') do + subject.each do |item| + items << item + end + end + end + + specify { expect(items.count).to be(1_110_304) } + specify { expect(items[0][:name]).to eql('-') } + specify { expect(items[0][:version]).to eql('1') } + specify { expect(items[-1][:name]).to eql('rpg_paradise') } + specify { expect(items[-1][:version]).to eql('0.0.190') } + end +end diff --git a/spec/unit/ruby/parsers/gemfile_lock_spec.rb b/spec/unit/ruby/parsers/gemfile_lock_spec.rb index adf981c..6140f88 100644 --- a/spec/unit/ruby/parsers/gemfile_lock_spec.rb +++ b/spec/unit/ruby/parsers/gemfile_lock_spec.rb @@ -40,51 +40,54 @@ RSpec.describe Spandx::Ruby::Parsers::GemfileLock do expect(subject).to match_array([ build('addressable', '2.7.0', path), build('ast', '2.4.1', path), - build('benchmark-ips', '2.8.2', path), + build('benchmark-ips', '2.8.4', path), build('benchmark-malloc', '0.2.0', path), build('benchmark-perf', '0.6.0', path), build('benchmark-trend', '0.4.0', path), build('bundler-audit', '0.7.0.1', path), build('byebug', '11.1.3', path), - build('crack', '0.4.3', path), + build('crack', '0.4.4', path), build('diff-lcs', '1.4.4', path), build('dotenv', '2.7.6', path), - build('faraday', '1.0.1', path), + build('faraday', '1.2.0', path), build('hashdiff', '1.0.1', path), - build('licensed', '2.12.2', path), - build('licensee', '9.14.0', path), + build('licensed', '2.14.3', path), + build('licensee', '9.14.1', path), build('mini_portile2', '2.4.0', path), build('multipart-post', '2.1.1', path), - build('net-hippie', '1.0.1', path), + build('net-hippie', '1.1.0', path), build('nokogiri', '1.10.10', path), - build('octokit', '4.18.0', path), - build('oj', '3.10.16', path), - build('parallel', '1.19.2', path), - build('parser', '2.7.1.4', path), + build('octokit', '4.19.0', path), + build('oj', '3.10.18', path), + build('parallel', '1.20.1', path), + build('parser', '3.0.0.0', path), build('parslet', '2.0.0', path), build('pathname-common_prefix', '0.0.1', path), - build('public_suffix', '4.0.5', path), + build('public_suffix', '4.0.6', path), build('rainbow', '3.0.0', path), - build('rake', '13.0.1', path), + build('rake', '13.0.3', path), build('rake-compiler', '1.1.1', path), - build('regexp_parser', '1.7.1', path), + build('rbtree3', '0.6.0', path), + build('regexp_parser', '2.0.2', path), build('reverse_markdown', '1.4.0', path), build('rexml', '3.2.4', path), - build('rspec', '3.9.0', path), + build('rspec', '3.10.0', path), build('rspec-benchmark', '0.6.0', path), - build('rspec-core', '3.9.2', path), - build('rspec-expectations', '3.9.2', path), - build('rspec-mocks', '3.9.1', path), - build('rspec-support', '3.9.3', path), - build('rubocop', '0.88.0', path), - build('rubocop-ast', '0.2.0', path), - build('rubocop-rspec', '1.42.0', path), - build('ruby-prof', '1.4.1', path), + build('rspec-core', '3.10.0', path), + build('rspec-expectations', '3.10.0', path), + build('rspec-mocks', '3.10.0', path), + build('rspec-support', '3.10.0', path), + build('rubocop', '0.93.1', path), + build('rubocop-ast', '1.3.0', path), + build('rubocop-rspec', '1.44.1', path), + build('ruby-prof', '1.4.2', path), build('ruby-progressbar', '1.10.1', path), build('ruby-xxHash', '0.4.0.1', path), - build('rugged', '0.99.0', path), - build('safe_yaml', '1.0.5', path), + build('ruby2_keywords', '0.0.2', path), + build('rugged', '1.1.0', path), build('sawyer', '0.8.2', path), + build('set', '1.0.1', path), + build('sorted_set', '1.0.2', path), build('spandx', Spandx::VERSION, path), build('terminal-table', '1.8.0', path), build('thor', '1.0.1', path), @@ -93,8 +96,8 @@ RSpec.describe Spandx::Ruby::Parsers::GemfileLock do build('tty-spinner', '0.9.3', path), build('unicode-display_width', '1.7.0', path), build('vcr', '6.0.0', path), - build('webmock', '3.8.3', path), - build('zeitwerk', '2.4.1', path), + build('webmock', '3.11.0', path), + build('zeitwerk', '2.4.2', path), ]) end |
