Commit graph

119 commits

Author SHA1 Message Date
Martin Emde
80712140af [rubygems/rubygems] Fix spacing in bundle gem newgem.gemspec.tt
The changelog line was generating indented more than it should.

da6109ef5b
2025-07-25 11:10:40 +09:00
Sweta Sanghavi
4ed2757543 [rubygems/rubygems] Update gemspec based on provided github username when exists
* 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

1c1ada593b
2025-07-09 13:48:37 +09:00
Landon Grindheim
471da0f0bd
[rubygems/rubygems] Use persist-credentials: false in template
`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.

a751d36456
2025-06-19 10:23:36 +09:00
TangRufus
ab63fb0e3b [rubygems/rubygems] Rename ignore_files to ignore_paths
c07e3a88aa
2025-06-03 08:06:05 +09:00
TangRufus
04a396409d [rubygems/rubygems] Refactor spec.files ignore list generation
c11539f325
2025-06-03 08:04:04 +09:00
yuuji.yaginuma
dd1fe03b8a [rubygems/rubygems] Add irb to a Gemfile for a newly created gem
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.
```

c46230c856
2025-02-06 15:58:01 +09:00
David Rodríguez
451d848a76
Stop generating binstubs for Bundler itself 2025-01-31 14:34:55 +09:00
gemmaro
1d510a952d [rubygems/rubygems] Fix test task name on generated readme when using test-unit
* 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.

2a24708a63
2024-11-25 16:20:52 +00:00
Guilherme Carreiro
c3fea18094 [rubygems/rubygems] Update --ext=rust to support compiling the native extension from source
9b0ec807c7
2024-10-30 23:09:12 +00:00
Jerome Dalbert
caa6bcc91f [rubygems/rubygems] Indent github workflow steps for generated gems
a1784e2efa
2024-10-30 14:06:58 +00:00
Marco Roth
7061359564 [rubygems/rubygems] Change new gem README template to have copyable code blocks
c805e9b558
2024-08-19 00:04:48 +00:00
David Rodríguez
6b3935250e [rubygems/rubygems] Bump COCs to latest Contributor Covenant version
73794a95b9
2024-05-28 15:10:59 +00:00
Martin Emde
acdd19facc [rubygems/rubygems] Fiks speeling cott bye codespell
508ed917a5
2024-05-24 01:53:35 +00:00
Nobuyoshi Nakada
e1026000af [rubygems/rubygems] Use IO.popen to list files
- 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.

5583433dbb
2024-03-05 06:53:20 +00:00
Douglas Eichelberger
b4be283485 [rubygems/rubygems] Remove redundant rubocop configs
a3f60240bf
2024-02-19 04:48:42 +00:00
Samuel Giddins
baf2ec2ca8 [rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations

b04726c9a7
2023-12-13 22:00:26 +00:00
Yuji Yaginuma
8bb90f4d77 [rubygems/rubygems] Use Minitest::TestTask in a template file for minitest
`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`

7a86d13062
2023-12-08 03:25:43 +00:00
Michael Go
bd2b6b702c [rubygems/rubygems] update Magnus library in Rust extension gem template
46f09800da
2023-11-29 02:21:38 +00:00
Hiroshi SHIBATA
c5861903ac [rubygems/rubygems] Handle CI configuration on ignore list for Gem::Specification#files
4bb0ef3e55
2023-10-25 00:46:09 +00:00
Graham Marlow
f3aea74c3d [rubygems/rubygems] Include gemspec in ExtensionTask for native gem tasks
042cfb7007
2023-10-02 01:34:01 +00:00
Yoshiki Takagi
465c222ef1 [rubygems/rubygems] Bump actions/checkout to v4 in bundler gem template
5ed4c600da
2023-09-19 01:06:35 +00:00
Mat Sadler
a3c0e9d90d [rubygems/rubygems] update Magnus library in Rust extension gem template
19a92a3367
2023-07-31 06:25:21 +00:00
Koichi ITO
4fbfc116ca [rubygems/rubygems] Update GitHub organization of Standard Ruby
## 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.

eeafba72fc
2023-07-12 12:29:29 +00:00
Gareth Adams
eaf11d3dd4 [rubygems/rubygems] Stop publishing Gemfile in default gem template
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.

59049c04be
2023-06-08 15:20:05 +00:00
Hiroshi SHIBATA
70371aa071
Revert accidentally commit of wrong file
Revert "[ruby/syntax_suggest] Remove unnecessary `--color` option"

  This reverts commit 588dd44d41.
2023-04-06 16:30:00 +09:00
Nobuyoshi Nakada
588dd44d41 [ruby/syntax_suggest] Remove unnecessary --color option
It is enabled automatically if possible.  Forcing this option makes
https://github.com/rspec/rspec-core/pull/3017 useless.

8e7141b472
2023-04-06 15:45:27 +09:00
Hiroshi SHIBATA
d766d5346b [rubygems/rubygems] Partly reverted
https://github.com/rubygems/rubygems/pull/6541

21e07a04a1
2023-03-28 07:26:46 +00:00
Hiroshi SHIBATA
36254c5ddf [rubygems/rubygems] Use append_cflags instead of directly append for CFLAGS
61ec0c8389
2023-03-27 09:47:20 +00:00
Jean Boussier
276f4be96d [rubygems/rubygems] Generate native gems with -fvisibility=hidden
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.

449624aa54
2023-03-25 00:31:46 +00:00
Justin Searls
464a264cd4 [rubygems/rubygems] Remove reference to pry gem from generated 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-22 08:32:03 +00:00
Ian Ker-Seymer
dd47ce10db [rubygems/rubygems] Use RbSys::ExtensionTask when creating new rust gems
125f9fece9
2023-03-10 11:50:06 +00:00
David Rodríguez
93f0749a64 [rubygems/rubygems] Fix gemspec file filter
Explicitly match directory separator to not match files in repo root
accidentally.

b936805ea9

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-03-07 16:51:36 +09:00
Orien Madgwick
573522bd84 [rubygems/rubygems] Simplify the gem package file filter in the gemspec template
The regular expression is difficult to understand at a glance.
Let's replace it with a much simpler string comparison.

a3745aa03f
2023-03-02 17:05:04 +00:00
Tony Hsu
5f3c7ac196 [rubygems/rubygems] Replace lockfile with .locked
203f3e3802
2023-03-02 14:43:27 +00:00
Hiroshi SHIBATA
38fa8eb4cb Merge rubygems/bundler master
Pick from e9304aed7e
2023-02-21 19:28:12 +09:00
Akira Matsuda
cab8c11611 [rubygems/rubygems] Properly exclude gemspec file itself from gem
by comparing the file names with full path.

Follows up f444478eac

9637a82d2e
2023-02-06 16:19:46 +00:00
Sam Bostock
45a2f1c5c2 [rubygems/rubygems] Replace "prior to" with "immediately after"
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.

23e2dea828
2023-02-05 01:37:36 +00:00
Hiroshi SHIBATA
a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Hiroshi SHIBATA
f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Hiroshi SHIBATA
18ba89093a Merge RubyGems/Bundler master
Pick from ba3adad4d8
2022-12-20 13:15:02 +09:00
Hiroshi SHIBATA
bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
Takuya Noguchi
830b2e217b [rubygems/rubygems] Update GitLab CI template with new one
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>

b79e78e733
2022-09-22 11:42:57 +09:00
Hiroshi SHIBATA
71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Hiroshi SHIBATA
678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
Hartley McGuire
4db75b6fe7 [rubygems/rubygems] bump actions/checkout to 3 in bundler gem template
Dependabot bumped the repo's configuration in 0c996fa but it did not
bump the version in the template for `bundler gem`

e14980e169
2022-04-04 14:14:40 +09:00
Brad Gessler
8ae09706f3 [rubygems/rubygems] Update README.md.tt
Reduce the number of steps required to install a gem from two steps to one by using `bundle add`

2c968420cd
2022-03-07 07:03:35 +09:00
Yusuke Nakamura
7353f950c3 [rubygems/rubygems] Change generated namespaced test class name in minitest
* `foo` => `TestFoo`
* `foo_bar` => `TestFooBar`
* `foo-bar` => `Foo::TestBar`

353cdd61c3
2022-01-20 01:04:53 +09:00
Yusuke Nakamura
4e955b2e37 [rubygems/rubygems] Create minitest file to underscored path in "bundle gem" 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`

5d9a69fc0f
2022-01-20 01:04:52 +09:00
Justin Searls
a485152660 [rubygems/rubygems] Lock standard.yml to the required ruby version
1791b5b9e5
2022-01-13 23:59:55 +09:00
Hiroshi SHIBATA
8bba6d3d54 [rubygems/rubygems] Exclude bin directory for newgem template, Because it contains only development script
01017ee8ca
2022-01-05 19:16:53 +09:00