Commit graph

90 commits

Author SHA1 Message Date
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
Hiroshi SHIBATA
69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00
David Rodríguez
852ea1e893 [rubygems/rubygems] Remove unnecessary comment
5e50f12e7a
2021-12-08 07:59:35 +09:00
David Rodríguez
76cad13759 [rubygems/rubygems] Don't add custom github source to bundle init Gemfile
It's provided by bundler.

25ccaab46b
2021-12-08 07:59:34 +09:00
Hiroshi SHIBATA
0b53a8895f
Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbd 2021-12-01 11:00:10 +09:00
Olle Jonsson
b68217fff9 [rubygems/rubygems] Update bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt
8836fe157b

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2021-12-01 07:15:18 +09:00
Olle Jonsson
46a24f7e77 [rubygems/rubygems] Update main.yml.tt
3260173c59
2021-12-01 07:15:18 +09:00
Olle Jonsson
a7fd639423 [rubygems/rubygems] newgem tmpl: ruby as "2.7" in GH Actions matrix
f5bead5634
2021-12-01 07:15:17 +09:00
Olle Jonsson
42efb8c185 [rubygems/rubygems] newgem templ: Avoid Float 3.0 -> "3" in GH Action
This change avoids a YAML Float-to-String conversion, which turns a 3.0 into a "3". That can make names of builds less clear.

In order to use this new capability, I added a "name" descriptor to the matrix-created Job.

6221241ad4
2021-12-01 07:15:17 +09:00
Justin Searls
d0cad8ad83 [rubygems/rubygems] Re-enable default_ignores option for standard
I am not sure why this flag was turned off (it wasn't explained in my commit message in 0365dc852767ae589376a7aad1fb129738e408b0 or in my PR in #4411). 

Whatever the reason, without `default_ignores` turned on, most default CI configurations will immediately fail, as they most likely vendor and cache their dependencies under `vendor`, which will cause standard to run against all the vendored gems and (most likely) fail. I think we should remove this before this feature is released.

677f74be48
2021-10-22 03:33:44 +09:00
fiveNinePlusR
105e037fe8 [rubygems/rubygems] Fix possible malicious website to example.com
example.com is the canonical stand in for domain examples and will never have a backing website.

via https://www.rfc-editor.org/rfc/rfc2606.html

26622c81c2
2021-09-22 10:14:04 +09:00
Keiko Kaneko
e841042070 [rubygems/rubygems] Add missing key branches:
ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags

Running jobs with only branch name, without `branches:`, CI fails

fcec167d61
2021-08-31 19:06:14 +09:00
David Rodríguez
43aecf216e [rubygems/rubygems] Get a CI matrix configured in default Github Actions generated config
Even if it only has one entry at the moment, it makes it easier to add
new entries by doing it this way.

46232fe265

Co-authored-by: NeimadTL <damientalbot26@gmail.com>
2021-08-31 19:06:14 +09:00
David Rodríguez
2e30d9ab42 [rubygems/rubygems] Avoid double CI runs in default Github Actions generated config
Otherwise CI will run once for every pull request update and once for
every push.

The disavantage is that people working on a non default branch without
creating pull requests won't get CI run at all.

I think the advantages are greater than the disadvantages, it's also my
personal workflow, and it's something desired enough so that someone
opened an issue about it.

So let's do it!

924d916a73

Co-authored-by: NeimadTL <damientalbot26@gmail.com>
2021-08-31 19:06:14 +09:00
Nobuyoshi Nakada
9fc16a31d9 [rubygems/rubygems] Exclude gemspec file itself from gem
The processed YML data is included as metadata, the source gemspec
file is unused and just confusing.

f444478eac
2021-08-31 19:06:14 +09:00
David Rodríguez
4271f4aea5
[rubygems/rubygems] Fix bundler binstub version selection
To mimic built-in rubygems behaviour, only thing that should be
approximated is the lockfile version. Other alternatives like
`BUNDLER_VERSION` should be respected exactly.

dbd667d4bc
2021-07-27 09:25:55 +09:00
David Rodríguez
6e2240a2f9 Sync latest bundler & rubygems development version 2021-07-07 13:30:20 +09:00
David Rodríguez
5b0abba931 Sync bundler & rubygems 2021-05-11 11:29:41 +09:00
Hiroshi SHIBATA
ed149dbf46 Merge the master branch of Bundler 2021-04-15 15:36:15 +09:00
David Rodríguez
53468cc111 Sync latest development version of bundler & rubygems 2021-03-08 13:47:35 +09:00
Hiroshi SHIBATA
69ed64949b Track Bundler master(2.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20 2021-01-04 13:14:43 +09:00
Hiroshi SHIBATA
473f9d2df0 Merge prepare version of Bundler 2.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA
d386a58f6f Merge bundler-2.2.0.rc.2 2020-10-15 17:19:02 +09:00
Steven Peckins
8863bfb1f4 [rubygems/rubygems] Move comment below shebang in bin/console template
In an executable script, the shebang line should be the first line (the
file needs to start with the bytes 0x23 0x21).  Putting a comment above
it will break the script.

(Regression test included per @deivid-rodriguez)

962e669feb
2020-09-28 14:54:22 +09:00
Nobuyoshi Nakada
18c642da86 [rubygems/rubygems] Fix ls-files matching regexp
As splitting by NUL means to allow the file names to contain
newlines, path names should match at beginning-of-string instead
of beginning-of-line.

8a81183236
2020-09-28 14:54:22 +09:00
Utkarsh Gupta
ca133c0366 [rubygems/rubygems] Fix line spacing to make Layout/EmptyLines happy
The Gemfile wasn't properly put in the last commit.
As a result, Layout/EmptyLines inspected an offense
in the Gemfile.

This also fixes the spec w.r.t change in the task
default.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

d1418fddd3
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
95f90e3d2b [rubygems/rubygems] Add blank lines to make Bundler/OrderedGems happy
If the blank lines aren't used, then rubocop tries to
sort them in alphabetical order within their section.
Thus, adding lines so rubocop considers them as
different sections and doesn't try to sort them.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

cf44b18f0f
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
281898ed6c [rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happy
In case of multiple Rake tasks, the default tasks would
look something like this:
`task default: [:spec, :rubocop]`

Instead, they should use %i and look something like this:
`task default: %i[spec rubocop]`

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

487ecd59ce
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
8c65f612f4 [rubygems/rubygems] Fix remaining RuboCop issues
With #3731 and #3740 merged, this covers up the
remaining part of the issues.
This was discovered when one tries to create a gem
with a different framework.
Could be reproduced with:
`bundle gem foo --ext --test=test-unit`

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

51b6457150
2020-07-15 16:05:12 +09:00
Utkarsh Gupta
e2837a77be [rubygems/rubygems] Constrain (shipped) RuboCop's version
Right now, we're not specifying the version constraints
on RuboCop that is shipped when a new gem is created.
This can break specs which runs rubocop on a new
skeleton gem as the newer versions of RuboCop are
released.

This commit ensures that the specs don't break by
constraining the RuboCop version.

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>

0b47243edd
2020-07-15 16:05:12 +09:00