Class: Sweetie::Bitbucket

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/sweetie/bitbucket.rb

Overview

The class to get the repositorie updates from Bitbucket

Instance Method Summary collapse

Methods included from Helper

#check_directory_and_config_file, #harvest, #output_count, #perform_global_search, #perform_search_for_single_page, #traverse, #write_config

Constructor Details

#initialize(bitbucket_stati_helper) ⇒ BitbucketStatiHelper

A basic initialize method.

Parameters:



14
15
16
# File 'lib/sweetie/bitbucket.rb', line 14

def initialize(bitbucket_stati_helper)
  @bitbucket_stati_helper = bitbucket_stati_helper
end

Instance Method Details

#update_statinil

Wrapper to start all the other methods which will use methods to write the changes of the bitbucket in the config file, which can be configured in the BitbucketStatiHelper

Returns:

  • (nil)


23
24
25
26
27
# File 'lib/sweetie/bitbucket.rb', line 23

def update_stati
  json_repositories = @bitbucket_stati_helper.get_repositories
  repositories_change_hashs = @bitbucket_stati_helper.get_repositories_changes(json_repositories)
  @bitbucket_stati_helper.write_repository_changes(repositories_change_hashs)
end