-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from apainintheneck/add-versions-sub-view
Add versions sub view
- Loading branch information
Showing
8 changed files
with
396 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module Gemview | ||
module Client | ||
# Create a client manually so that we don't accidentally pick up credentials. | ||
def self.v1 | ||
@client_v1 ||= Gems::V1::Client.new( | ||
username: nil, | ||
password: nil, | ||
key: nil | ||
) | ||
end | ||
|
||
# Create a client manually so that we don't accidentally pick up credentials. | ||
def self.v2 | ||
@client_v2 ||= Gems::V2::Client.new( | ||
username: nil, | ||
password: nil, | ||
key: nil | ||
) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
module Gemview | ||
module Number | ||
# Ex. 1234567890 -> "1,234,567,890" | ||
# @param integer [Integer] | ||
# @return [String] | ||
def self.humanized_integer(integer) | ||
integer | ||
.to_s | ||
.chars | ||
.reverse | ||
.each_slice(3) | ||
.map(&:join) | ||
.join(",") | ||
.reverse | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.