-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor current state for tests to pass. Increase coverage
- Loading branch information
Showing
17 changed files
with
185 additions
and
117 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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
class SUSE::Connect::YaST::Product | ||
#TODO replace hash representing products used elsewhere | ||
# TODO: replace hash representing products used elsewhere | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,3 @@ def initialize(name, url) | |
@url = url.is_a?(String) ? URI(url) : url | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# utility methods | ||
module SUSE | ||
module Connect | ||
class Utilities | ||
class << self | ||
include ::Net::HTTPHeader | ||
# utility methods | ||
module Utilities | ||
|
||
def token_auth(token) | ||
raise CannotBuildTokenAuth, 'token auth requested, but no token provided' unless token | ||
"Token token=#{token}" | ||
end | ||
include ::Net::HTTPHeader | ||
|
||
def basic_auth | ||
def token_auth(token) | ||
raise CannotBuildTokenAuth, 'token auth requested, but no token provided' unless token | ||
"Token token=#{token}" | ||
end | ||
|
||
username, password = System.credentials | ||
def basic_auth | ||
|
||
if username && password | ||
basic_encode(username, password) | ||
else | ||
raise CannotBuildBasicAuth, 'cannot get proper username and password' | ||
end | ||
username, password = System.credentials | ||
|
||
if username && password | ||
basic_encode(username, password) | ||
else | ||
raise CannotBuildBasicAuth, 'cannot get proper username and password' | ||
end | ||
|
||
end | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
class SUSE::Connect::YaST::Extension | ||
module SUSE | ||
module Connect | ||
module Yast | ||
# Yast Extension class | ||
class Extension | ||
|
||
attr_reader :short_name, :long_name, :description, :product_ident | ||
attr_reader :short_name, :long_name, :description, :product_ident | ||
|
||
# Constructor | ||
def initialize(short_name, long_name, description, product_ident) | ||
@short_name = short_name | ||
@long_name = long_name | ||
@description = description | ||
@product_ident = product_ident | ||
# Constructor | ||
def initialize(short_name, long_name, description, product_ident) | ||
@short_name = short_name | ||
@long_name = long_name | ||
@description = description | ||
@product_ident = product_ident | ||
end | ||
|
||
end | ||
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
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.