summaryrefslogtreecommitdiff
path: root/lib/rubygems/specification.rb
AgeCommit message (Collapse)Author
2025-04-08Merge RubyGems-3.6.7 and Bundler-2.6.7Hiroshi SHIBATA
2025-02-20Merge RubyGems-3.6.4 and Bundler-2.6.4Hiroshi SHIBATA
2025-02-20Merge RubyGems-3.6.3 and Bundler-2.6.3Hiroshi SHIBATA
2024-12-24Merge RubyGems-3.6.2 and Bundler-2.6.2David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/12444
2024-12-06[rubygems/rubygems] Skip unresolved deps warning on ↵David Rodríguez
`Gem::Specification.reset` on benign cases If `Gem::Specification.reset` is used, but there are still unresolved dependencies, RubyGems prints a warning. There are though, certain cases where the situation will not cause any issues. One such case is when the unresolved dependency does not restrict any versions (>= 0) and there's a default gem matching it. In this situation, it doesn't matter if Gem paths change, because default gems are still activatable, so the dependency will be properly activated if ever needed. https://github.com/rubygems/rubygems/commit/e5f8a3068e
2024-11-26[rubygems/rubygems] More aggressive `Performance/FlatMap` cop configurationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d8d68cc00e
2024-11-06[rubygems/rubygems] Fix manifest in gem package using incorrect platform ↵David Rodríguez
sometimes If a gem package is built from a specification whose platform has been modified, it will include metadata using the old platform. This change should fix the problem by making sure `original_platform` is always properly set. https://github.com/rubygems/rubygems/commit/ecd5cd4547
2024-10-16[rubygems/rubygems] Add missing comma in documentationLeo Arnold
https://github.com/rubygems/rubygems/commit/fe9999f2cf
2024-10-09[rubygems/rubygems] Add `Gem::Specification#gem_dir` backDavid Rodríguez
If old Bundler versions that unconditionally try to remove this method are run with RubyGems versions _without_ this method, Bundler crashes because it tries to remove a method that does not exist. We need to wait until RubyGems cannot install any Bundler versions that unconditionally remove this method. https://github.com/rubygems/rubygems/commit/98804d261d
2024-10-09[rubygems/rubygems] Fix `Gem::Specification#gem_dir` losing custom source ↵David Rodríguez
for some reason https://github.com/rubygems/rubygems/commit/f8f589b1b8
2024-09-30[rubygems/rubygems] Don't add duplicated specs to unresolved specsDavid Rodríguez
This could happen when a regular gem shadows a default gem. https://github.com/rubygems/rubygems/commit/9ef70dd1f7
2024-09-30[rubygems/rubygems] Don't list duplicated version in ↵David Rodríguez
`Gem::Specification.reset` warning https://github.com/rubygems/rubygems/commit/e6e3db821f
2024-09-20[rubygems/rubygems] Unconditionally set installed_by_versionSamuel Giddins
It has been supported since RubyGems 2.2.0 via https://github.com/rubygems/rubygems/commit/4525e45a4d45 Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/bf39c583e8
2024-09-18[rubygems/rubygems] Add a note about when hack can be removedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/058b29fe98
2024-09-18[rubygems/rubygems] Stop fighting with ourselvesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7cf2fdcfa1
2024-08-31[rubygems/rubygems] fix `@license` typo preventing licenses from being ↵Durable Programming Team
correctly unmarshalled https://github.com/rubygems/rubygems/commit/d6ba7ef79f
2024-07-18[rubygems/rubygems] Fix gemspec `require_paths` type validationDavid Rodríguez
It was not properly being detected as an Array attribute, and thus not properly validated. Fixing this allows us to remove a strange `rescue` clause in Bundler. https://github.com/rubygems/rubygems/commit/4121a32408
2024-07-18[rubygems/rubygems] Use `caller_locations` instead of splitting `caller`Nobuyoshi Nakada
Also limit caller ranges https://github.com/rubygems/rubygems/commit/a274b1af78
2024-07-02[rubygems/rubygems] Feature add_dependency more prominentlyJerome Dalbert
https://github.com/rubygems/rubygems/commit/0236cb6191
2024-06-25[rubygems/rubygems] Add Specification#validate_for_resolutionThomas Marshall
This method validates only what is required for resolution, skipping any irrelevant metadata validation. This will be used by Bundler instead of doing a full validation, allowing gem authors to use `bundle` commands immediately in newly created gems without first having to fix invalid metafata fields in the default gemspec. https://github.com/rubygems/rubygems/commit/da7704cfc0
2024-06-13[rubygems/rubygems] Also disambiguate gems not in the first Gem.path positionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7e6e7ccc58
2024-06-13[rubygems/rubygems] Fix default gem priority when sorting specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8dbe1dbdc7 Co-authored-by: MSP-Greg <Greg.mpls@gmail.com>
2024-05-31[rubygems/rubygems] Make stub sorting stableDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6b70e9043d
2024-05-16[rubygems/rubygems] Fix binstubs sometimes not getting regenerated when ↵David Rodriguez
`--destdir` is given This was only working for gems also installed in the default gem home. https://github.com/rubygems/rubygems/commit/47df02dbd9
2024-05-16[rubygems/rubygems] Refactor `Gem::Specification#find_all_by_name`David Rodriguez
So that it can also be delegated to `Gem::SpecificationRecord`. https://github.com/rubygems/rubygems/commit/1407807a99
2024-05-14[rubygems/rubygems] Fix issue when cleaning up plugin stubsDavid Rodriguez
When `gem uninstall <gem> --install-dir <dir>` is run, if the version removed had a plugin, and that same version happened to also be installed globally, then the plugin stub would fail to be removed. https://github.com/rubygems/rubygems/commit/4e2fa0be77
2024-05-14[rubygems/rubygems] Extract a `Gem::SpecificationRecord` classDavid Rodriguez
This class handles all logic to handle the list of specifications, given a set of GEM_PATH directories. Makes `Gem::Specification` has less responsibilities and will help with fixing some bugs next. https://github.com/rubygems/rubygems/commit/df280dbbed
2024-05-14[rubygems/rubygems] Add missing docsDavid Rodriguez
Other analog methods are documented, so document this one too. https://github.com/rubygems/rubygems/commit/76da34d44d
2024-05-14[rubygems/rubygems] Simplify documentationDavid Rodriguez
I don't think this method is any worse than others, let's only document what it does. https://github.com/rubygems/rubygems/commit/dec722187f
2024-05-14[rubygems/rubygems] Remove redundant receiversDavid Rodriguez
https://github.com/rubygems/rubygems/commit/7b71965a70
2024-05-03[rubygems/rubygems] Remove `Gem::Specification#mark_version`David Rodriguez
This gets in the middle if we ever start allowing to build as if using a different RubyGems version than the one being run. This could be useful to make `gem rebuild` a little more usable, and it's already done by Bundler specs which already make this method a noop when they need this. I'm not sure forcefully setting this, even if user explicitly specified something else is helpful. Since this could potentially prevent gems explicitly setting a constant RubyGems version from building, I changed the error of incorrect RubyGems version from a hard error to a warning, since it will start happening in those cases if we stop overwriting the version. https://github.com/rubygems/rubygems/commit/45676af80d
2024-02-21[rubygems/rubygems] Skip nil-value keys to make metadata reproducibleNobuyoshi Nakada
Nil-value keys in a mapping end with a space or not depending on libyaml versions, and result metadata are different per platforms. This commit makes to skip such keys to make metadata reproducible accross platforms. https://github.com/rubygems/rubygems/commit/74b4db8d30
2024-02-21[rubygems/rubygems] Use https instead of httpHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/bcbe6f7b7a
2024-02-02[rubygems/rubygems] feat: Gem::Specification#initialize_copy deep-copies ↵Mike Dalessio
requirements to avoid accidentally mutating the original's state when doing: ```ruby spec2 = spec.dup spec2.required_rubygems_version.concat([">= 3.3.22"]) ``` see https://github.com/rake-compiler/rake-compiler/pull/236 for a real-world use case that would be made simpler with this behavior. https://github.com/rubygems/rubygems/commit/c1d52389f0
2024-01-18[rubygems/rubygems] Drop two TODOs from specification.rbOlle Jonsson
These were introduced 13 years ago, in a documentation update. Perhaps we can let the TODOs go, without taking any action? https://github.com/rubygems/rubygems/commit/fb23fa84f9
2024-01-11[rubygems/rubygems] Update documentation to use squiggly heredocBrave Hager
https://github.com/rubygems/rubygems/commit/4691b959ad
2023-12-12[rubygems/rubygems] Remove non-transparent requirement added to prerelease gemsDavid Rodríguez
I think we can safely assume these days that all RubyGems and Bundler versions that will ever bundle a new gem created in 2023 support prereleases. So this non transparent requirement is not necessary. In my opinion, it should be the gem author to explicitly add this constraint, not RubyGems. https://github.com/rubygems/rubygems/commit/b165e6d725
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-11-13[rubygems/rubygems] Remove now unnecessary dupsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/56ce2a6445
2023-11-13[rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-11-13[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in RubyGemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/10c26a483d
2023-11-08[rubygems/rubygems] Hack to get `Gem::Specification#extensions_dir` documentedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/625b8293f7
2023-10-23[rubygems/rubygems] Refactor to checksums stored via sourceSamuel Giddins
This gets the specs passing, and handles the fact that we expect checkums to be pinned only to a particular source This also avoids reading in .gem files during lockfile generation, instead allowing us to query the source for each resolved gem to grab the checksum Finally, this opens up a route to having user-stored checksum databases, similar to how other package managers do this! Add checksums to dev lockfiles Handle full name conflicts from different original_platforms when adding checksums to store from compact index Specs passing on Bundler 3 https://github.com/rubygems/rubygems/commit/86c7084e1c
2023-10-23[rubygems/rubygems] Use the server checksum, then calculate from gem on disk ↵Mercedes Bernard
if possible 1. Use the checksum provided by the server if provided: provides security knowing if the gem you downloaded matches the gem on the server 2. Calculate the checksum from the gem on disk: provides security knowing if the gem has changed between installs 3. In some cases, neither is possible in which case we don't put anything in the checksum and we maintain functionality as it is today Add the checksums to specs in the index if we already have them Prior to checksums, we didn't lose any information when overwriting specs in the index with stubs. But now when we overwrite EndpointSpecifications or RemoteSpecifications with more generic specs, we could lose checksum info. This manually sets checksum info so we keep it in the index. https://github.com/rubygems/rubygems/commit/de00a4f153
2023-10-03[rubygems/rubygems] Update suggested variable for bindirHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/f9cc6fed25
2023-09-21[rubygems/rubygems] Freeze more strings in generated gemspecsSamuel Giddins
Specifically, this will have frozen string literals for: - Gem platform tuple entries - Gem::Version strings - Gem::Specification#installed_by_version - Dependency requirement strings https://github.com/rubygems/rubygems/commit/6195da5bdb
2023-09-20[rubygems/rubygems] Add a Marshal.load replacement that walks an AST to ↵Samuel Giddins
safely load permitted classes/symbols https://github.com/rubygems/rubygems/commit/7e4478fe73
2023-08-20Update specification.rbSamuel Giddins
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-08-20[rubygems/rubygems] Ensure that loading multiple gemspecs with legacy YAML ↵Samuel Giddins
class references does not warn Before this, you would get constant redefinition warnings on Psych::DefaultKey Additionally, ensure the retries wont continue infinitely in the case of the ArgumentError not being caused by Marshal trying to load the undefined classes https://github.com/rubygems/rubygems/commit/919e8c2de4
2023-07-19[rubygems/rubygems] Clear `YAML` constant if it was undefined previouslyNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/31d0311258