Class: GhBbAudit::Bitbucket::BitbucketRepo
- Inherits:
-
Object
- Object
- GhBbAudit::Bitbucket::BitbucketRepo
- Includes:
- SemanticLogger::Loggable
- Defined in:
- lib/gh_bb_audit/bitbucket/bitbucket_repo.rb
Instance Method Summary collapse
- #get_all_file_paths ⇒ Object
-
#initialize(user_name, repo_name) ⇒ BitbucketRepo
constructor
A new instance of BitbucketRepo.
Constructor Details
#initialize(user_name, repo_name) ⇒ BitbucketRepo
Returns a new instance of BitbucketRepo.
8 9 10 11 |
# File 'lib/gh_bb_audit/bitbucket/bitbucket_repo.rb', line 8 def initialize(user_name,repo_name) @user_name = user_name @repo_name = repo_name end |
Instance Method Details
#get_all_file_paths ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gh_bb_audit/bitbucket/bitbucket_repo.rb', line 13 def get_all_file_paths return [] if ( !@user_name || !@repo_name ) begin bb_client = ::BitBucket.new {|config| config.endpoint = 'https://bitbucket.org/api/1.0'} @paths ||= get_files_in_dir('',bb_client) rescue StandardError => e logger.error "BITBUCKET:: Error in geting files for Bitbucket Repo:: #{@repo_name} for User:: #{@user_name}", error: e.inspect end @paths end |