summaryrefslogtreecommitdiff
path: root/lib/bundler/templates/newgem
AgeCommit message (Collapse)Author
2025-12-08[ruby/rubygems] Fix native extension loading in newgem template for ↵yoshoku
RHEL-based systems Add fallback to `require` when `require_relative` fails to load native extensions. This addresses an issue on RHEL-based Linux distributions where Ruby scripts and built native extension shared libraries are installed in separate directories. https://github.com/ruby/rubygems/commit/68599bd107
2025-11-21[ruby/rubygems] Fixed RuboCop offense in Rakefile generated by `bundle gem`sue445
``` Offenses: Rakefile:18:1: C: [Correctable] Layout/EmptyLines: Extra blank line detected. Diff: @@ -11,4 +11,5 @@ ext.lib_dir = "lib/test_gem" end + task default: :compile https://github.com/ruby/rubygems/commit/8c414729df
2025-11-21[ruby/rubygems] Add go_gem/rake_task for Go native extention gem skeletonsue445
https://github.com/ruby/rubygems/commit/64f92d2da0
2025-11-19[ruby/rubygems] Add `--ext=go` to `bundle gem`Go Sueyoshi
(https://github.com/ruby/rubygems/pull/8183) * Add new gem templates * Add `--ext=go` in `bundle gem` * Add setup-go to .github/workflows/main.yml * Embed go version in go.mod * Use go in bundler CI * Add example method to template * Install Go in .circleci/config.yml * Install Go in .gitlab-ci.yml * Allow hard tabs in go template * Run `rake update_manifest` * Fix test * Move go_gem to gemspec Respect to 9b0ec80 * nits: :golf: * includes valid module name in go.mod * generate header file * Run `go mod tidy` to create `go.sum` * Check if `go.sum` is generated only when Go is installed To avoid test failure in environments where Go is not installed * Run CI * Workaround for hung up c.f. https://github.com/rubygems/rubygems/actions/runs/11639408044/job/32415545422 * Write man for --ext=go * Re-generate man with `./bin/rake man:build` * pinning :pushpin: * Update with `./bin/rake man:build` * nits: Extract to method * nits: Use `sys_exec` instead of `system` * Clean go module cache after test Workaround following error ``` 1) bundle gem gem naming with underscore --ext parameter set with go includes go_gem extension in extconf.rb Failure/Error: FileUtils.rm_r(dir) Errno::EACCES: Permission denied @ apply2files - /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go # ./spec/support/helpers.rb:37:in `block in reset!' # ./spec/support/helpers.rb:21:in `each' # ./spec/support/helpers.rb:21:in `reset!' # ./spec/spec_helper.rb:130:in `block (2 levels) in <top (required)>' # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `load' # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `activate_and_load_bin_path' ``` Files installed with `go get` have permissions set to 444 ref. https://github.com/golang/go/issues/35615 ``` $ ls -l /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go -r--r--r-- 1 runner runner 42320 Nov 15 06:38 /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go ``` So they cannot be deleted by `FileUtils.rm_r`. Therefore, this is necessary to execute `go clean -modcache` separately from `FileUtils.rm_r` to circumvent it. * Remove needless changes ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532902051 * ci: setup-go is needless * Don't run go command in `bundle gem` ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532765470 * Revert unrelated date changes --------- https://github.com/ruby/rubygems/commit/260d7d60b3 Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2025-10-28[ruby/rubygems] Make more shortly with https://rubyonrails.org/conductHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/62ba34d6c9
2025-10-28[ruby/rubygems] Update new gem CoC and promptdysonreturns
Prompt wording "prefer safe, respectful, productive, and collaborative spaces" is copied verbatim from Ruby Community Conduct Guideline. https://github.com/ruby/rubygems/commit/6cdf5f6d8a
2025-10-20[ruby/rubygems] update magnus version in rust extension gem templateMat Sadler
https://github.com/ruby/rubygems/commit/1ba8eb4ab3
2025-07-25[rubygems/rubygems] Fix spacing in bundle gem newgem.gemspec.ttMartin Emde
The changelog line was generating indented more than it should. https://github.com/rubygems/rubygems/commit/da6109ef5b
2025-07-09[rubygems/rubygems] Update gemspec based on provided github username when existsSweta Sanghavi
* Conditionally set changelog_url if gh username passed and enabled * conditionally set homepage, source code uri, homepage uri when gh username passed in * update documentation to say username will also be used for gemspec file https://github.com/rubygems/rubygems/commit/1c1ada593b
2025-06-19[rubygems/rubygems] Use `persist-credentials: false` in templateLandon Grindheim
`actions/checkout` defaults this value to `true`, causing credentials to be written to `.git/config`. By setting it to `false`, we lessen the likelihood of secrets being written to disk. https://github.com/rubygems/rubygems/commit/a751d36456
2025-06-03[rubygems/rubygems] Rename `ignore_files` to `ignore_paths`TangRufus
https://github.com/rubygems/rubygems/commit/c07e3a88aa
2025-06-03[rubygems/rubygems] Refactor `spec.files` ignore list generationTangRufus
https://github.com/rubygems/rubygems/commit/c11539f325
2025-02-06[rubygems/rubygems] Add `irb` to a Gemfile for a newly created gemyuuji.yaginuma
I think we need this to silence the following warning when running `bin/console` with Ruby 3.4 ``` ./bin/console:10: warning: irb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0. You can add irb to your Gemfile or gemspec to silence this warning. ``` https://github.com/rubygems/rubygems/commit/c46230c856
2024-11-25[rubygems/rubygems] Fix test task name on generated readme when using test-unitgemmaro
* bundler/lib/bundler/templates/newgem/README.md.tt (Development): Use the test_task value to get the correct test task name ("test", not "test-unit"). * bundler/spec/commands/newgem_spec.rb (README.md): Add tests for test task names for each test frameworks. https://github.com/rubygems/rubygems/commit/2a24708a63
2024-10-30[rubygems/rubygems] Update `--ext=rust` to support compiling the native ↵Guilherme Carreiro
extension from source https://github.com/rubygems/rubygems/commit/9b0ec807c7
2024-10-30[rubygems/rubygems] Indent github workflow steps for generated gemsJerome Dalbert
https://github.com/rubygems/rubygems/commit/a1784e2efa
2024-08-19[rubygems/rubygems] Change new gem README template to have copyable code blocksMarco Roth
https://github.com/rubygems/rubygems/commit/c805e9b558
2024-05-28[rubygems/rubygems] Bump COCs to latest Contributor Covenant versionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/73794a95b9
2024-05-24[rubygems/rubygems] Fiks speeling cott bye codespellMartin Emde
https://github.com/rubygems/rubygems/commit/508ed917a5
2024-03-05[rubygems/rubygems] Use `IO.popen` to list filesNobuyoshi Nakada
- Redirect stderr `git ls-files` to null without shelling out. - When building by `gem`, `__FILE__` is the path name given in the command line, or the gemspec file name in the current directory. In that case, comparison it and expanded path never equal. Compare listed file names with the base name of `__FILE__` instead. https://github.com/rubygems/rubygems/commit/5583433dbb
2024-02-19[rubygems/rubygems] Remove redundant rubocop configsDouglas Eichelberger
https://github.com/rubygems/rubygems/commit/a3f60240bf
2023-12-08[rubygems/rubygems] Use `Minitest::TestTask` in a template file for `minitest`Yuji Yaginuma
`minitest` has introduced a rake task for running test on 5.16.0. https://github.com/minitest/minitest/blob/master/History.rdoc#5160--2022-06-14- This has some tasks related to running tests and it's useful for `minitest` user I think. https://github.com/minitest/minitest#rake-tasks- This PR changed to use the task in a template file for `minitest` https://github.com/rubygems/rubygems/commit/7a86d13062
2023-11-29[rubygems/rubygems] update Magnus library in Rust extension gem templateMichael Go
https://github.com/rubygems/rubygems/commit/46f09800da
2023-10-25[rubygems/rubygems] Handle CI configuration on ignore list for ↵Hiroshi SHIBATA
Gem::Specification#files https://github.com/rubygems/rubygems/commit/4bb0ef3e55
2023-10-02[rubygems/rubygems] Include gemspec in ExtensionTask for native gem tasksGraham Marlow
https://github.com/rubygems/rubygems/commit/042cfb7007
2023-09-19[rubygems/rubygems] Bump actions/checkout to v4 in bundler gem templateYoshiki Takagi
https://github.com/rubygems/rubygems/commit/5ed4c600da
2023-07-31[rubygems/rubygems] update Magnus library in Rust extension gem templateMat Sadler
https://github.com/rubygems/rubygems/commit/19a92a3367
2023-07-12[rubygems/rubygems] Update GitHub organization of Standard RubyKoichi ITO
## What was the end-user or developer problem that led to this PR? The old URL https://github.com/testdouble/standard is mentioned. ## What is your fix for the problem, implemented in this PR? This PR updates to the new URL https://github.com/standardrb/standard. https://github.com/rubygems/rubygems/commit/eeafba72fc
2023-06-08[rubygems/rubygems] Stop publishing Gemfile in default gem templateGareth Adams
Similarly to how the other ignored files are intended for local development and not for production, the Gemfile and Gemfile.lock files for a gem only relate to local development and aren't useful to people installing the gem. https://github.com/rubygems/rubygems/commit/59049c04be
2023-04-06Revert accidentally commit of wrong fileHiroshi SHIBATA
Revert "[ruby/syntax_suggest] Remove unnecessary `--color` option" This reverts commit 588dd44d418d56dce3f2a388c4021d11f9aa4324.
2023-04-06[ruby/syntax_suggest] Remove unnecessary `--color` optionNobuyoshi Nakada
It is enabled automatically if possible. Forcing this option makes https://github.com/rspec/rspec-core/pull/3017 useless. https://github.com/ruby/syntax_suggest/commit/8e7141b472
2023-03-28[rubygems/rubygems] Partly revertedHiroshi SHIBATA
https://github.com/rubygems/rubygems/pull/6541 https://github.com/rubygems/rubygems/commit/21e07a04a1
2023-03-27[rubygems/rubygems] Use append_cflags instead of directly append for CFLAGSHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/61ec0c8389
2023-03-25[rubygems/rubygems] Generate native gems with `-fvisibility=hidden`Jean Boussier
I recently ran into very nasty issues with dynamic symbols clashing between two native gems. I believe the overwhelming majority of native gems don't want to export their symbols, so hidding them by default would make sense to me. https://github.com/rubygems/rubygems/commit/449624aa54
2023-03-22[rubygems/rubygems] Remove reference to `pry` gem from generated ↵Justin Searls
`bin/console` file This is just a suggestion, but since recent versions of Ruby have shipped with a `binding.irb` that provides almost all of the features that `pry` pioneered, it may be time to remove this suggestion in the name of simplicity and not confusing newer developers who aren't familiar with what to use.
2023-03-10[rubygems/rubygems] Use `RbSys::ExtensionTask` when creating new rust gemsIan Ker-Seymer
https://github.com/rubygems/rubygems/commit/125f9fece9
2023-03-07[rubygems/rubygems] Fix gemspec file filterDavid Rodríguez
Explicitly match directory separator to not match files in repo root accidentally. https://github.com/rubygems/rubygems/commit/b936805ea9 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-03-02[rubygems/rubygems] Simplify the gem package file filter in the gemspec templateOrien Madgwick
The regular expression is difficult to understand at a glance. Let's replace it with a much simpler string comparison. https://github.com/rubygems/rubygems/commit/a3745aa03f
2023-02-06[rubygems/rubygems] Properly exclude gemspec file itself from gemAkira Matsuda
by comparing the file names with full path. Follows up https://github.com/rubygems/rubygems/commit/f444478eaccf https://github.com/rubygems/rubygems/commit/9637a82d2e
2023-02-05[rubygems/rubygems] Replace "prior to" with "immediately after"Sam Bostock
Currently, the instructions and placeholder contradict each other. The commit that introduced this placeholder (42bc4715d920e836c8499883d) makes it clear that the placeholder should be replaced AFTER publishing (i.e. once the author successfully claims the gem name on Rubygems), so the placeholder should match. https://github.com/rubygems/rubygems/commit/23e2dea828
2023-01-10Merge RubyGems and Bundler masterHiroshi SHIBATA
from https://github.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609 Notes: Merged: https://github.com/ruby/ruby/pull/7094
2022-12-24Merge RubyGems-3.4.0 and Bundler-2.4.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6987
2022-12-20Merge RubyGems/Bundler masterHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/ba3adad4d80038ffd7bea015da2f11d3e8a2ff82 Notes: Merged: https://github.com/ruby/ruby/pull/6966
2022-09-22[rubygems/rubygems] Update GitLab CI template with new oneTakuya Noguchi
GitLab CI now needs the default keyword on specification of image and before_script. https://docs.gitlab.com/ee/ci/yaml/#default Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> https://github.com/rubygems/rubygems/commit/b79e78e733
2022-04-28Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-04[rubygems/rubygems] bump actions/checkout to 3 in bundler gem templateHartley McGuire
Dependabot bumped the repo's configuration in 0c996fa but it did not bump the version in the template for `bundler gem` https://github.com/rubygems/rubygems/commit/e14980e169
2022-03-07[rubygems/rubygems] Update README.md.ttBrad Gessler
Reduce the number of steps required to install a gem from two steps to one by using `bundle add` https://github.com/rubygems/rubygems/commit/2c968420cd
2022-01-20[rubygems/rubygems] Change generated namespaced test class name in minitestYusuke Nakamura
* `foo` => `TestFoo` * `foo_bar` => `TestFooBar` * `foo-bar` => `Foo::TestBar` https://github.com/rubygems/rubygems/commit/353cdd61c3
2022-01-20[rubygems/rubygems] Create minitest file to underscored path in "bundle gem" ↵Yusuke Nakamura
command ...with dashed gem name In "bundle gem" command with dashed name gem (e.g. foo-bar) generates `test/test_foo/bar.rb`, but this file contains undefined class `TestFoo` and moreover, does not include in "bundle exec rake test" target. Therefore, intentially the first test after gem created is fail, but in case of gem name contains dash character is not. The change doings... (when "bundle gem foo-bar" called) * create `test/test_foo_bar.rb` * define `TestFooBar` class in `test/test_foo_bar.rb` https://github.com/rubygems/rubygems/commit/5d9a69fc0f
2022-01-13[rubygems/rubygems] Lock standard.yml to the required ruby versionJustin Searls
https://github.com/rubygems/rubygems/commit/1791b5b9e5