Commit graph

38 commits

Author SHA1 Message Date
Mike Perham
5d0708378e
[rubygems/rubygems] Smoother authentication experience
Copying the URL is painful here because the URL is embedded within a paragraph of text. I presume we don't want to automatically open the browser.

Instead, move the URL to its own line so that "triple click" will automatically select the whole thing.

21532a69ae
2025-05-02 09:49:15 +09:00
Vitaliy Serov
93fdf66bc5 [rubygems/rubygems] Adapt failing tests to new output
cf549e71aa
2024-02-02 19:26:58 +00:00
Jenny Shen
afca1a31d0 [rubygems/rubygems] Create MockServer object to test WebAuthn logic to prevent real TCPServers from being created and be leaked into other tests
96d6cb33a2
2023-07-28 16:08:10 +00:00
Jenny Shen
3954a87d65 [rubygems/rubygems] Create MultifactorAuthFetcher to reduce duplication among tests
dead211206
2023-07-28 16:08:09 +00:00
Jenny Shen
24913e3dda [rubygems/rubygems] Move Webauthn listener thread to WebauthnListener class
6ec474975e
2023-07-28 16:08:08 +00:00
Jenny Shen
fce04f9a6c [rubygems/rubygems] Move WebauthnListener into the Gem::GemcutterUtilities namespace
3080394f81
2023-07-28 16:08:08 +00:00
Jenny Shen
023d0f662b [rubygems/rubygems] Add Webauthn verification poller to fetch OTP
39c5e86a67
2023-07-28 16:08:07 +00:00
Ashley Ellis Pierce
851344965a
Ensure api_key is sent if basic auth not provided on webauthn_verification_url
Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2023-04-12 12:00:25 +09:00
Eric Herscovich
1b1485ae4d
Add message for otp bypass
Update tests

Fix wording of message
2023-04-12 11:59:18 +09:00
Jenny Shen
c7a8d63df8
Terminate interaction when rescuing WebauthnVerificationError during wait_for_otp
Co-authored-by: Betty Li <makewithbetty@gmail.com>
2023-04-12 11:57:43 +09:00
Jenny Shen
353f9adccc [rubygems/rubygems] Add otp command tests
c494112063
2023-04-12 11:51:05 +09:00
Ashley Ellis Pierce
6275284f02 [rubygems/rubygems] Ask user to otp at webauthn verification url
004eadb0c5
2023-04-12 11:51:01 +09:00
Hiroshi SHIBATA
e003784fc8 [rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
9264d83421
2023-04-05 09:50:29 +00:00
Hiroshi SHIBATA
f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Jenny Shen
0522e31d57 [rubygems/rubygems] Refactor tests to use Net::HTTPResponse instances for fetcher.data[:path]
4d91cacb1f

Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2022-09-29 17:56:36 +09:00
Takuya Noguchi
d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
Hiroshi SHIBATA
f3bda8987e
Merge the master branch of rubygems repo
Picked from 4b498709a0
2021-11-16 20:19:13 +09:00
Yusuke Endoh
b957c3dbcb [rubygems/rubygems] Rename test/rubygems/test_{case,utilities}.rb to avoid "test_" prefix
This changes "test/rubygems/test_case.rb" to "test/rubygems/helper.rb",
and "test/rubygems/test_utilities.rb" to "test/rubygems/utilities.rb".

The two files are a helper for tests, not test files. However, a file
starting with "test_" prefix is handled as a test file directly loaded
by test-unit because Rakefile specifies:

```
t.test_files = FileList['test/**/test_*.rb']
```

Directly loading test/rubygems/test_utilities.rb caused "uninitialized
constant Gem::TestCase". This issue was fixed by
59c6820971, but the fix caused a
"circular require" warning because test_utilities.rb and test_case.rb
are now requiring each other.

Anyway, adding "test_" prefix to a test helper file is confusing, so
this changeset reverts the fix and solve the issue by renaming them.

6460e018df
2021-06-03 12:23:22 +09:00
David Rodríguez
f7732ae2eb [rubygems/rubygems] Require the new files in test/ relatively
c77868a555
2021-05-28 11:53:09 +09:00
Hiroshi SHIBATA
c30594bb0c [rubygems/rubygems] Use assert_raise instead of assert_raises
769e87f011
2021-05-12 17:24:43 +09:00
Hiroshi SHIBATA
4aca77edde Merge prepare version of RubyGems 3.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA
b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc1 is obsoleted with
  https://github.com/rubygems/rubygems/pull/3820
2020-09-23 22:01:44 +09:00
Hiroshi SHIBATA
31a6eaabc1
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23 21:02:56 +09:00
David Rodríguez
a89665b7b1 Enforce no empty lines around class body in rubygems
To normalize the code style with `bundler`.
2020-07-31 21:07:19 +09:00
David Rodríguez
c3ecd1cbd3 Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""
This reverts commit ac2c07e983.
2020-06-15 19:48:25 +09:00
Hiroshi SHIBATA
ac2c07e983 Revert "[rubygems/rubygems] Remove unneeded global teardown"
This reverts commit 93d1588c78.
2020-05-08 14:13:29 +09:00
David Rodríguez
93293043f1 [rubygems/rubygems] Remove unneeded global teardown
Instead, make each test cleanup after itself.

e0aba9d64f
2020-05-08 14:13:29 +09:00
Hiroshi SHIBATA
ab1b31ffe0 [rubygems/rubygems] Also added credential_setup to the some of tests
2ac557d008
2020-05-08 14:13:29 +09:00
David Rodríguez
061add792e
[rubygems/rubygems] Enable Style/ExtraSpacing and auto-correct
6fa0b1b679
2020-03-30 12:48:23 +09:00
David Rodríguez
ba9dcdab36
[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygems
So it matches the style used by bundler.

ab0580fd65
2020-03-30 12:42:10 +09:00
hsbt
f28be7e02d Merge rubygems/rubygems from upstream.
The current master branch is
  97b264f0fa

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 11:48:18 +00:00
hsbt
08f8cfe14e Merge RubyGems upstream: 56c0bbb69e4506bda7ef7f447dfec5db820df20b
It fixed the multiple vulnerabilities.
  https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-05 03:32:58 +00:00
hsbt
4ae3df42f7 Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
This version contains the some style changes by RuboCop.

    * 9d810be0ed
    * 61ea98a727
    * 795893dce3
    * 9be7858f7f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 12:59:03 +00:00
hsbt
5335ce0e06 Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
    https://github.com/rubygems/rubygems/pull/2478
  * Enable Style/MultilineIfThen in Rubocop
    https://github.com/rubygems/rubygems/pull/2479
  * Fix required_ruby_version with prereleases and improve error message
    https://github.com/rubygems/rubygems/pull/2344
  * Fix bundler rubygems binstub not properly looking for bundler
    https://github.com/rubygems/rubygems/pull/2426

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 10:20:47 +00:00
hsbt
a21d403f21 * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
It supports to enable frozen string literal and add `--norc` option for
  disable to `.gemrc` configuration.
  See 2.5.2 release notes for other fixes and enhancements.
  a8aa3bac72/History.txt (L3)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01 12:43:26 +00:00
naruse
3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
hsbt
4de117a615 * lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
  https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-14 03:30:02 +00:00
drbrain
9694bb8cac * lib/rubygems*: Updated to RubyGems 2.0
* test/rubygems*:  ditto.

* common.mk (prelude):  Updated for RubyGems 2.0 source rearrangement.

* tool/change_maker.rb:  Allow invalid UTF-8 characters in source
  files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 06:52:18 +00:00