Skip to content

Commit

Permalink
HighLine namespace fix (#177)
Browse files Browse the repository at this point in the history
* Use HighLine in a way that does not pollute the global namespace

* version bump
  • Loading branch information
eeggers authored Jan 3, 2022
1 parent 24fa16d commit 5f0072a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.5.6
- Modify usage of HighLine so that it does not pollute the global namespace

v1.5.5
- Add logging of an errored oauth2 response

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.5
1.5.6
4 changes: 2 additions & 2 deletions lib/spark_api/authentication/oauth2_impl/cli_provider.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "highline/import"
require "highline"

module SparkApi
module Authentication
Expand All @@ -18,7 +18,7 @@ def initialize(credentials)
def redirect(url)
puts "Missing OAuth2 session, redirecting..."
puts "Please visit #{url}, login as a user, and paste the authorization code here:"
self.code = ask("Authorization code?") do |q|
self.code = HighLine.ask("Authorization code?") do |q|
q.whitespace = :strip_and_collapse
q.validate = /^\w+$/
end
Expand Down

0 comments on commit 5f0072a

Please sign in to comment.