Skip to content

Commit 227214b

Browse files
committed
♻️ Refactor to OAuth::TTY
- Backwards compatible with OAuth::CLI namespace
1 parent 4b6152a commit 227214b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
3535

3636
## Code of Conduct
3737

38-
Everyone interacting in the OAuth::CLI project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/oauth-xx/oauth-tty/-/blob/main/CODE_OF_CONDUCT.md).
38+
Everyone interacting in the OAuth::TTY project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/oauth-xx/oauth-tty/-/blob/main/CODE_OF_CONDUCT.md).

exe/oauth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ end
1212
ARGV << "help" if ARGV.empty?
1313
command = ARGV.shift
1414

15-
OAuth::CLI.new($stdout, $stdin, $stderr, command, ARGV).run
15+
OAuth::TTY::CLI.new($stdout, $stdin, $stderr, command, ARGV).run

lib/oauth_tty.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# A gem was released in 2011 which was a rudimentary commands for the oauth gem,
77
# thus it occupies the name in RubyGems.org.
8-
# This library was originally written as part of the oauth gem, in 2016, as OAuth::CLI.
8+
# This library was originally written as part of the oauth gem, in 2016, as OAuth::TTY.
99
# This gem is named oauth-tty, but intends to have backwards compatibility with oauth gem v1.0.x.
1010
# Now that it is being extracted there is a name conflict.
1111
#

spec/oauth/cli_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
RSpec.describe OAuth::CLI do
3+
RSpec.describe OAuth::TTY do
44
it "has a version number" do
5-
expect(OAuth::CLI::VERSION).not_to be nil
5+
expect(OAuth::TTY::VERSION).not_to be nil
66
end
77

88
it "does something useful" do

test/cli_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,14 @@ def test_sign
261261
def run_command(arguments = [])
262262
s = StringIO.new
263263
command = arguments.shift
264-
OAuth::CLI.new(s, StringIO.new, StringIO.new, command, arguments).run
264+
OAuth::TTY::CLI.new(s, StringIO.new, StringIO.new, command, arguments).run
265265

266266
s.rewind
267267
s.read
268268
end
269269

270270
def parse(command)
271-
cli = OAuth::CLI.new(StringIO.new, StringIO.new, StringIO.new, command, [])
271+
cli = OAuth::TTY::CLI.new(StringIO.new, StringIO.new, StringIO.new, command, [])
272272
cli.send(:parse_command, command)
273273
end
274274

0 commit comments

Comments
 (0)