Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e7bab05

Browse files
Always pass the auth token when listing all gists
1 parent ab14e27 commit e7bab05

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎lib/gist.rb‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,12 @@ def list_all_gists(user = "")
200200
url = "#{base_path}"
201201

202202
if user == ""
203-
access_token = auth_token()
204-
if access_token.to_s != ''
205-
url << "/gists?per_page=100"
206-
get_gist_pages(url, access_token)
207-
else
208-
raise Error, "Not authenticated. Use 'gist --login' to login or 'gist -l username' to view public gists."
209-
end
210-
203+
url << "/gists?per_page=100"
211204
else
212205
url << "/users/#{user}/gists?per_page=100"
213-
get_gist_pages(url)
214206
end
215207

208+
get_gist_pages(url, auth_token())
216209
end
217210

218211
def read_gist(id, file_name=nil)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /