Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PURL test suite #7

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ Metrics/BlockLength:
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/ClassLength:
Max: 500
Enabled: false
Metrics/MethodLength:
Max: 100
Enabled: false
Metrics/ParameterLists:
Max: 7
Metrics/PerceivedComplexity:
Max: 15
Max: 25
Layout/LineLength:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1.23.0'
gem 'rubocop-rake', '~> 0.6.0'
gem 'rubocop-rspec', '~> 2.6.0'
gem 'steep', '~> 0.46.0'
gem 'steep', '~> 0.47.1'
gem 'yard', '~> 0.9.0'
34 changes: 16 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,28 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.4.1)
activesupport (7.0.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
diff-lcs (1.4.4)
ffi (1.15.4)
i18n (1.8.11)
ffi (1.15.5)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
language_server-protocol (3.16.0.3)
listen (3.7.0)
language_server-protocol (3.17.0.1)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
minitest (5.14.4)
parallel (1.21.0)
parser (3.0.3.0)
minitest (5.16.3)
parallel (1.22.1)
parser (3.1.2.1)
ast (~> 2.4.1)
rainbow (3.0.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbs (1.7.1)
Expand Down Expand Up @@ -63,22 +62,21 @@ GEM
rubocop-rspec (2.6.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
steep (0.46.0)
steep (0.47.1)
activesupport (>= 5.1)
language_server-protocol (>= 3.15, < 4.0)
listen (~> 3.0)
parallel (>= 1.0.0)
parser (>= 3.0)
rainbow (>= 2.2.2, < 4.0)
rbs (>= 1.2.0)
rbs (~> 1.7.0)
terminal-table (>= 2, < 4)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
unicode-display_width (2.3.0)
yard (0.9.26)
zeitwerk (2.5.1)

PLATFORMS
x86_64-darwin-19
Expand All @@ -93,7 +91,7 @@ DEPENDENCIES
rubocop (~> 1.23.0)
rubocop-rake (~> 0.6.0)
rubocop-rspec (~> 2.6.0)
steep (~> 0.46.0)
steep (~> 0.47.1)
yard (~> 0.9.0)

BUNDLED WITH
Expand Down
16 changes: 15 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'open-uri'

RSpec::Core::RakeTask.new(:spec)
require 'rake/clean'

RSpec::Core::RakeTask.new(:spec, [] => ['spec/fixtures/test-suite-data.json'])

directory 'spec/fixtures/'
file 'spec/fixtures/test-suite-data.json' => 'spec/fixtures/' do |t|
File.open(t.name, 'wb') do |file|
URI.open('https://raw.githubusercontent.com/package-url/purl-spec/master/test-suite-data.json') do |uri|
file.write(uri.read)
end
end
end

CLOBBER << 'spec/fixtures/test-suite-data.json'

task :lint do
system 'rubocop'
Expand Down
1 change: 1 addition & 0 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ target :lib do
configure_code_diagnostics do |config|
config[Steep::Diagnostic::Ruby::UnsupportedSyntax] = :hint
config[Steep::Diagnostic::Ruby::MethodDefinitionMissing] = :hint
config[Steep::Diagnostic::Ruby::NoMethod] = :hint
end
end

Expand Down
Loading