Skip to content

Commit

Permalink
Only install license_finder on modern Rubies
Browse files Browse the repository at this point in the history
Reasons:
- The latest license_finder requires 2.3
- We don't need to run license_finder on all Rubies, just one is enough
  for the Travis builds
- Running license_finder is not part of the day-to-day development
  process, so not having it available is not a problem.
  • Loading branch information
mvz committed Jan 8, 2019
1 parent bd0f39e commit 017bc32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 2 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ group :debug do
end
end

# Tools to run during development
group :development do
# Needed for lint:yard:junk task
if RUBY_VERSION >= '2.3.0'
Expand Down Expand Up @@ -76,17 +77,10 @@ group :development, :test do
# gem 'cucumber-pro', '~> 0.0'

# License compliance
if RUBY_VERSION < '2.3'
gem 'license_finder', '~> 2.0'
else
if RUBY_VERSION >= '2.3'
gem 'license_finder', '~> 5.0'
end

# Force compatible version of httparty for use by license_finder
if RUBY_VERSION <= '2.0.0'
gem 'httparty', '0.14.0'
end

# Upload documentation
# gem 'relish', '~> 0.7.1'

Expand Down
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ namespace :lint do

desc 'Check for relevant licenses in project'
task :licenses do
sh 'bundle exec license_finder'
if RUBY_VERSION >= '2.3'
sh 'bundle exec license_finder'
else
warn 'Your ruby version is not supported for license checking'
end
end

begin
Expand Down

0 comments on commit 017bc32

Please sign in to comment.