Skip to content

Update gemspec#1233

Open
sandstrom wants to merge 2 commits intosuketa:mainfrom
sandstrom:gemspec
Open

Update gemspec#1233
sandstrom wants to merge 2 commits intosuketa:mainfrom
sandstrom:gemspec

Conversation

@sandstrom
Copy link
Copy Markdown
Contributor

@sandstrom sandstrom commented Apr 3, 2026

  • Load only the version immediately
  • Don't rely on git for file inclusion
  • Simplify some URLs
  • Update descriptions slightly

Summary by CodeRabbit

  • Chores
    • Updated gem metadata and descriptions visible on package repositories.
    • Reorganized gem packaging configuration and file inclusion setup.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

The pull request updates duckdb.gemspec: switches to require_relative for version loading, rewrites summary/description, derives metadata URIs from spec.homepage, and replaces dynamic git ls-files file listing with a static Dir[...] glob list.

Changes

Cohort / File(s) Summary
Gem Specification Updates
duckdb.gemspec
Switched version load to require_relative "lib/duckdb/version", replaced spec.summary/spec.description with a heredoc, set source_code_uri/changelog_uri to derive from spec.homepage, and replaced dynamic git ls-files generation with a static Dir[...] glob for spec.files (includes bin/*, ext/**/*, lib/**/*, README.md, CHANGELOG.md, LICENSE, Rakefile, getduckdb.sh, .rdoc_options).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 I hopped into the gemspec lair,
swapped requires with a closer care,
files listed neat in one bright row,
homepage links that gently glow,
tiny hops — a cleaner hare! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update gemspec' is vague and generic, using a non-descriptive term that doesn't convey meaningful information about the specific changes made to the gemspec file. Enhance the title to be more specific about the main changes, such as 'Switch gemspec to use require_relative and static file lists' or 'Refactor gemspec: replace git ls-files with static paths and update metadata URLs'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sandstrom
Copy link
Copy Markdown
Contributor Author

sandstrom commented Apr 3, 2026

@suketa Let me know what you think!

Happy to change the description if you prefer something else.

Also, I excluded benchmark and example, and a few more files. Let me know if that doesn't make sense! 😄

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
duckdb.gemspec (1)

33-37: Remove duplicate Rakefile entry in spec.files.

Line 33 and Line 36 both include Rakefile; keep one entry to avoid redundant manifest entries.

Suggested fix
   spec.files = Dir[
     'bin/*',
     'ext/**/*',
     'lib/**/*',
     'CHANGELOG.md',
     'LICENSE',
     'README.md',
     'Rakefile',
     'getduckdb.sh',
     '.rdoc_options',
-    'Rakefile',
   ]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@duckdb.gemspec` around lines 33 - 37, Remove the duplicate 'Rakefile' entry
in the spec.files array in duckdb.gemspec: locate the spec.files list (the array
containing 'Rakefile', 'getduckdb.sh', '.rdoc_options', 'Rakefile') and delete
one of the two 'Rakefile' strings so the manifest contains a single 'Rakefile'
entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@duckdb.gemspec`:
- Line 23: The changelog_uri metadata is hardcoded to use the "master" branch;
update the string assigned to spec.metadata['changelog_uri'] to point to the
repository's "main" branch instead of "master" (replace
"/blob/master/CHANGELOG.md" with "/blob/main/CHANGELOG.md") so the gem metadata
link resolves correctly.

---

Nitpick comments:
In `@duckdb.gemspec`:
- Around line 33-37: Remove the duplicate 'Rakefile' entry in the spec.files
array in duckdb.gemspec: locate the spec.files list (the array containing
'Rakefile', 'getduckdb.sh', '.rdoc_options', 'Rakefile') and delete one of the
two 'Rakefile' strings so the manifest contains a single 'Rakefile' entry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 374d3ee9-47cc-4ac7-a0b6-ee0a0e6bf51c

📥 Commits

Reviewing files that changed from the base of the PR and between e347ed5 and dcdfcca.

📒 Files selected for processing (1)
  • duckdb.gemspec

spec.metadata['source_code_uri'] = 'https://github.com/suketa/ruby-duckdb'
spec.metadata['changelog_uri'] = 'https://github.com/suketa/ruby-duckdb/blob/master/CHANGELOG.md'
spec.metadata['source_code_uri'] = spec.homepage
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether this repository has main/master locally.
git branch --format='%(refname:short)' | rg -n '^(main|master)$'

# Show current changelog_uri line in gemspec.
rg -n "changelog_uri" duckdb.gemspec

Repository: suketa/ruby-duckdb

Length of output: 150


Update changelog_uri to use main branch instead of master.

The repository uses main as its default branch, but the changelog URI in duckdb.gemspec hardcodes /blob/master/..., which breaks the metadata link.

Suggested fix
-  spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
+  spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@duckdb.gemspec` at line 23, The changelog_uri metadata is hardcoded to use
the "master" branch; update the string assigned to
spec.metadata['changelog_uri'] to point to the repository's "main" branch
instead of "master" (replace "/blob/master/CHANGELOG.md" with
"/blob/main/CHANGELOG.md") so the gem metadata link resolves correctly.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@duckdb.gemspec`:
- Line 3: Change the double-quoted literal in the require_relative call to a
single-quoted string to satisfy RuboCop's Style/StringLiterals (replace the
require_relative "lib/duckdb/version" usage with single quotes); also scan other
top-level string literals in this gemspec for similar double-quote usage and
convert them to single quotes where interpolation is not required.
- Around line 25-36: The spec.files array in duckdb.gemspec contains a
duplicated 'Rakefile' entry and an unnecessary trailing comma; edit the
spec.files literal (the Dir[...] list) to remove the duplicate 'Rakefile' entry
and ensure the final element has no trailing comma so the array ends cleanly
(modify the Dir[...] block where 'Rakefile' appears twice).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 97a8d689-98a5-4a04-90ab-e960d8065ad0

📥 Commits

Reviewing files that changed from the base of the PR and between dcdfcca and 1ed0045.

📒 Files selected for processing (1)
  • duckdb.gemspec

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'duckdb/version'
require_relative "lib/duckdb/version"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix RuboCop Style/StringLiterals violation.

Pipeline indicates this project prefers single-quoted strings when interpolation isn't needed.

Suggested fix
-require_relative "lib/duckdb/version"
+require_relative 'lib/duckdb/version'
🧰 Tools
🪛 GitHub Actions: Linter

[error] 3-3: Rubocop Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. Offense at: require_relative "lib/duckdb/version"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@duckdb.gemspec` at line 3, Change the double-quoted literal in the
require_relative call to a single-quoted string to satisfy RuboCop's
Style/StringLiterals (replace the require_relative "lib/duckdb/version" usage
with single quotes); also scan other top-level string literals in this gemspec
for similar double-quote usage and convert them to single quotes where
interpolation is not required.

Comment on lines +25 to +36
spec.files = Dir[
'bin/*',
'ext/**/*',
'lib/**/*',
'CHANGELOG.md',
'LICENSE',
'README.md',
'Rakefile',
'getduckdb.sh',
'.rdoc_options',
'Rakefile',
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove duplicate Rakefile entry and fix trailing comma.

Rakefile appears on both lines 32 and 35. The pipeline also flags the trailing comma as a RuboCop Style/TrailingCommaInArguments violation.

Suggested fix
   spec.files = Dir[
     'bin/*',
     'ext/**/*',
     'lib/**/*',
     'CHANGELOG.md',
     'LICENSE',
     'README.md',
     'Rakefile',
     'getduckdb.sh',
-    '.rdoc_options',
-    'Rakefile',
+    '.rdoc_options'
   ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spec.files = Dir[
'bin/*',
'ext/**/*',
'lib/**/*',
'CHANGELOG.md',
'LICENSE',
'README.md',
'Rakefile',
'getduckdb.sh',
'.rdoc_options',
'Rakefile',
]
spec.files = Dir[
'bin/*',
'ext/**/*',
'lib/**/*',
'CHANGELOG.md',
'LICENSE',
'README.md',
'Rakefile',
'getduckdb.sh',
'.rdoc_options'
]
🧰 Tools
🪛 GitHub Actions: Linter

[error] 35-35: Rubocop Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call. Offense at: 'Rakefile',

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@duckdb.gemspec` around lines 25 - 36, The spec.files array in duckdb.gemspec
contains a duplicated 'Rakefile' entry and an unnecessary trailing comma; edit
the spec.files literal (the Dir[...] list) to remove the duplicate 'Rakefile'
entry and ensure the final element has no trailing comma so the array ends
cleanly (modify the Dir[...] block where 'Rakefile' appears twice).

Copy link
Copy Markdown
Owner

@suketa suketa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work. I commented some detailed points.

'LICENSE',
'README.md',
'Rakefile',
'getduckdb.sh',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getduckdb.sh is needed for docker environment to develop ruby-duckdb.
So I think we can remove it.

'Rakefile',
'getduckdb.sh',
'.rdoc_options',
'Rakefile',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rakefile exists in line 32. remove this line.

spec.metadata['source_code_uri'] = 'https://github.com/suketa/ruby-duckdb'
spec.metadata['changelog_uri'] = 'https://github.com/suketa/ruby-duckdb/blob/master/CHANGELOG.md'
spec.metadata['source_code_uri'] = spec.homepage
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'duckdb/version'
require_relative "lib/duckdb/version"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants