Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4"]
ruby: ["3.2", "3.3", "3.4", "4.0"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
Expand Down
1 change: 1 addition & 0 deletions .licensed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ reviewed:
- csv
- logger
- net-http
- ostruct
- racc
- uri

Expand Down
2 changes: 1 addition & 1 deletion .licenses/bundler/nokogiri.dep.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: nokogiri
version: 1.18.10
version: 1.19.0
type: bundler
summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
homepage: https://nokogiri.org
Expand Down
69 changes: 69 additions & 0 deletions .licenses/bundler/ostruct.dep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
name: ostruct
version: 0.6.3
type: bundler
summary: Class to build custom data structures, similar to a Hash.
homepage: https://github.com/ruby/ostruct
license: other
licenses:
- sources: COPYING
text: |
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:

1. You may make and give away verbatim copies of the source form of the
software without restriction, provided that you duplicate all of the
original copyright notices and associated disclaimers.

2. You may modify your copy of the software in any way, provided that
you do at least ONE of the following:

a. place your modifications in the Public Domain or otherwise
make them Freely Available, such as by posting said
modifications to Usenet or an equivalent medium, or by allowing
the author to include your modifications in the software.

b. use the modified software only within your corporation or
organization.

c. give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.

d. make other distribution arrangements with the author.

3. You may distribute the software in object code or binary form,
provided that you do at least ONE of the following:

a. distribute the binaries and library files of the software,
together with instructions (in the manual page or equivalent)
on where to get the original distribution.

b. accompany the distribution with the machine-readable source of
the software.

c. give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.

d. make other distribution arrangements with the author.

4. You may modify and include the part of the software into any other
software (possibly commercial). But some files in the distribution
are not written by the author, so that they are not under these terms.

For the list of those files and their copying conditions, see the
file LEGAL.

5. The scripts and library files supplied as input to or produced as
output from the software do not automatically fall under the
copyright of the software, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this
software.

6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
- sources: README.md
text: The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).
notices: []
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.7
4.0.1
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PATH
csv (~> 3.3)
json (~> 2.6)
licensee (~> 9.16)
ostruct (~> 0.6.3)
parallel (~> 1.22)
pathname-common_prefix (~> 0.0.1)
reverse_markdown (>= 2.1, < 4.0)
Expand Down Expand Up @@ -65,12 +66,13 @@ GEM
ruby2_keywords (>= 0.0.5)
net-http (0.9.1)
uri (>= 0.11.1)
nokogiri (1.18.10)
nokogiri (1.19.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (9.2.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
ostruct (0.6.3)
parallel (1.27.0)
parser (3.3.10.1)
ast (~> 2.4.1)
Expand Down
6 changes: 3 additions & 3 deletions docs/migrations/v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v1

# install ruby
- uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc
- uses: ruby/setup-ruby@80740b3b13bf9857e28854481ca95a84e78a2bdf
with:
ruby-version: "3.0"

Expand All @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v1

# install ruby and bundler
- uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc
- uses: ruby/setup-ruby@80740b3b13bf9857e28854481ca95a84e78a2bdf
with:
ruby-version: "3.0"

Expand All @@ -95,7 +95,7 @@ jobs:
- uses: actions/checkout@v1

# install ruby and bundler
- uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc
- uses: ruby/setup-ruby@80740b3b13bf9857e28854481ca95a84e78a2bdf
with:
ruby-version: "3.0"

Expand Down
95 changes: 51 additions & 44 deletions lib/licensed/sources/bundler/missing_specification.rb
Original file line number Diff line number Diff line change
@@ -1,64 +1,71 @@
# frozen_string_literal: true

require "bundler/match_platform"
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("4.0.0")
require "bundler/match_platform"

# Bundler normally raises a "GemNotFound" error when a specification
# can't be materialized which halts bundler dependency enumeration.
# Bundler normally raises a "GemNotFound" error when a specification
# can't be materialized which halts bundler dependency enumeration.

# This monkey patch instead creates MissingSpecification objects to
# identify missing specs without raising errors and halting enumeration.
# It was the most minimal-touch solution I could think of that should reliably
# work across many bundler versions
# This monkey patch instead creates MissingSpecification objects to
# identify missing specs without raising errors and halting enumeration.
# It was the most minimal-touch solution I could think of that should reliably
# work across many bundler versions

module Licensed
module Bundler
class MissingSpecification < Gem::BasicSpecification
include ::Bundler::MatchPlatform
module Licensed
module Bundler
class MissingSpecification < Gem::BasicSpecification
include ::Bundler::MatchPlatform

attr_reader :name, :version, :platform, :source
def initialize(name:, version:, platform:, source:)
@name = name
@version = version
@platform = platform
@source = source
end
attr_reader :name, :version, :platform, :source
def initialize(name:, version:, platform:, source:)
@name = name
@version = version
@platform = platform
@source = source
end

def dependencies
[]
end
def dependencies
[]
end

def gem_dir; end
def gems_dir
Gem.dir
end
def summary; end
def homepage; end
def gem_dir; end
def gems_dir
Gem.dir
end
def summary; end
def homepage; end

def error
"could not find #{name} (#{version}) in any sources"
def error
"could not find #{name} (#{version}) in any sources"
end
end
end

module LazySpecification
def materialize_for_installation(*args)
spec = super(*args)
return spec unless spec.is_a?(LazySpecification)
module LazySpecification
def materialize_for_installation(*args)
spec = super(*args)
return spec unless spec.is_a?(LazySpecification)

Licensed::Bundler::MissingSpecification.new(name: name, version: version, platform: platform, source: source)
end
Licensed::Bundler::MissingSpecification.new(name: name, version: version, platform: platform, source: source)
end

def __materialize__(*args, **kwargs)
spec = super(*args, **kwargs)
return spec if spec
def __materialize__(*args, **kwargs)
spec = super(*args, **kwargs)
return spec if spec

Licensed::Bundler::MissingSpecification.new(name: name, version: version, platform: platform, source: source)
Licensed::Bundler::MissingSpecification.new(name: name, version: version, platform: platform, source: source)
end
end
end
end
end

module Bundler
class LazySpecification
prepend ::Licensed::Bundler::LazySpecification
module Bundler
class LazySpecification
prepend ::Licensed::Bundler::LazySpecification
end
end
else
module Licensed
module Bundler
end
end
end
1 change: 1 addition & 0 deletions licensed.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "parallel", "~> 1.22"
spec.add_dependency "reverse_markdown", ">= 2.1", "< 4.0"
spec.add_dependency "json", "~> 2.6"
spec.add_dependency "ostruct", "~> 0.6.3"

spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "minitest", "~> 5.17"
Expand Down
Loading
Loading