bibliothecary 12.3.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2789d542e6457ea4e069d4dc2ff4237d8cccc9c8ea018d9418a943188e461316
4
- data.tar.gz: 0f5ba9b30929a30690d7d68f41106b1bb36bc41e5703243279de828ee5d0987e
3
+ metadata.gz: 9b8a1d72ed1c6410170cd105bd8fbac80589da11434227f6803c89d5903a6985
4
+ data.tar.gz: ee6c6623a6a53ae65ccc5009091fea4640188f37d89baf1a871a39fceecba988
5
5
  SHA512:
6
- metadata.gz: d889c20a78d617d51f10206e826a7bfcc17ba7723e78c867708fc28e7c8e4592c9c8633187eadb151f9418896cc29705bc2f361d2d26ba71450af0480f4b85b2
7
- data.tar.gz: 1b327cb0a9c53b6b711600defd2f6c43bb7740beaa7f381b7e67dcecc17da9effbedc85511685e69f08be4140b35887886a0d01a52f60f8731c5265fe96dd4f4
6
+ metadata.gz: 43df91da96ccbd93aa7a9b69e0f6a111a1962b4515bb211488cedb26b148f0cb5c76c0e0ff29758ee23eeaa4015aa4d73d468625e85a3cb7f1e9b12a0b6370f9
7
+ data.tar.gz: 9826ee8c30e798b2d83decc6d25ec4dd673f24371a9992e60cf18bcef9eded7f7d492fc9b96caac3e378f0bec02a049d5ae4e66d0c9562587f1db70300c5b2aa
data/CHANGELOG.md CHANGED
@@ -13,6 +13,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Removed
15
15
 
16
+ ## [13.0.0] - 2025-06-17
17
+
18
+ ### Removed
19
+
20
+ - Removed parsing of environment.yml from Pypi parsing
21
+
22
+ ## [12.3.1] - 2025-06-06
23
+
24
+ ### Changed
25
+
26
+ - Handle .csproj files that begin with an <?xml> tag
27
+
16
28
  ## [12.3.0] - 2025-06-06
17
29
 
18
30
  ### Added
@@ -109,7 +109,17 @@ module Bibliothecary
109
109
 
110
110
  def self.parse_csproj(file_contents, options: {})
111
111
  manifest = Ox.parse file_contents
112
- packages = manifest
112
+
113
+ # The dotnet samples repo has examples with both of these cases, so both need to be handled:
114
+ project = if manifest.locate("Project").any?
115
+ # 1) If there's an <?xml> tag, we need to pick out the "Project" element
116
+ manifest.locate("Project").first
117
+ else
118
+ # 2) If there's no <?xml> tag, the root element is "Project"
119
+ manifest
120
+ end
121
+
122
+ packages = project
113
123
  .locate("ItemGroup/PackageReference")
114
124
  .select { |dep| dep.respond_to? "Include" }
115
125
  .map do |dependency|
@@ -132,7 +142,7 @@ module Bibliothecary
132
142
  )
133
143
  end
134
144
 
135
- packages += manifest
145
+ packages += project
136
146
  .locate("ItemGroup/Reference")
137
147
  .select { |dep| dep.respond_to? "Include" }
138
148
  .map do |dependency|
@@ -72,15 +72,6 @@ module Bibliothecary
72
72
  kind: "lockfile",
73
73
  parser: :parse_poetry_lock,
74
74
  },
75
- # Pip dependencies can be embedded in conda environment files
76
- match_filename("environment.yml") => {
77
- parser: :parse_conda,
78
- kind: "manifest",
79
- },
80
- match_filename("environment.yaml") => {
81
- parser: :parse_conda,
82
- kind: "manifest",
83
- },
84
75
  }
85
76
  end
86
77
 
@@ -130,17 +121,6 @@ module Bibliothecary
130
121
  end
131
122
  end
132
123
 
133
- def self.parse_conda(file_contents, options: {})
134
- contents = YAML.safe_load(file_contents)
135
- return [] unless contents
136
-
137
- dependencies = contents["dependencies"]
138
- pip = dependencies.find { |dep| dep.is_a?(Hash) && dep["pip"] }
139
- return [] unless pip
140
-
141
- Pypi.parse_requirements_txt(pip["pip"].join("\n"), options:)
142
- end
143
-
144
124
  def self.map_dependencies(packages, type, source = nil)
145
125
  return [] unless packages
146
126
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bibliothecary
4
- VERSION = "12.3.0"
4
+ VERSION = "13.0.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.3.0
4
+ version: 13.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2025-06-06 00:00:00.000000000 Z
11
+ date: 2025-06-17 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: commander
@@ -135,6 +136,7 @@ dependencies:
135
136
  - - ">="
136
137
  - !ruby/object:Gem::Version
137
138
  version: '0'
139
+ description:
138
140
  email:
139
141
  - andrewnez@gmail.com
140
142
  executables:
@@ -208,6 +210,7 @@ licenses:
208
210
  - AGPL-3.0
209
211
  metadata:
210
212
  rubygems_mfa_required: 'true'
213
+ post_install_message:
211
214
  rdoc_options: []
212
215
  require_paths:
213
216
  - lib
@@ -222,7 +225,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
225
  - !ruby/object:Gem::Version
223
226
  version: '0'
224
227
  requirements: []
225
- rubygems_version: 3.6.3
228
+ rubygems_version: 3.4.19
229
+ signing_key:
226
230
  specification_version: 4
227
231
  summary: Find and parse manifests
228
232
  test_files: []