Class: RightPublish::MsiRepo
- Defined in:
- lib/right_publish/repos/msi.rb
Constant Summary collapse
- DEFAULT_MSI_DIR =
'msi/'- REPO_KEY =
:msi_repo- REPO_OPTIONS =
{:subdir=>DEFAULT_MSI_DIR, :prune=>true}
- GEMS_SUBDIRECTORY =
'gems'- MSI_EXT =
'msi'
Constants inherited from Repo
Repo::LOCK_FILE_NAME, Repo::LOCK_PERIOD, Repo::LOCK_RETRY_INTERVAL
Instance Method Summary collapse
Methods inherited from Repo
#initialize, #publish, #pull, #push
Constructor Details
This class inherits a constructor from RightPublish::Repo
Instance Method Details
#add(file_or_dir, target) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/right_publish/repos/msi.rb', line 10 def add(file_or_dir, target) msi_list = get_pkg_list(file_or_dir, MSI_EXT) # Copy MSI files to the repository destination = repo_config[:subdir] msi_list.each do |path| # RubyGems repos do not normally prune; it must be explicitly enabled. if repo_config[:prune] do_in_subdir(destination) { prune_all("#{pkg_parts(path)[:name]}-*.msi") } end install_file(path, destination) end # No index generation is necessary; MSI is not a distribution mechanism. The annotated # HTML will suffice to direct people to the proper download. end |
#annotate(options = {}) ⇒ Object
28 29 30 31 32 |
# File 'lib/right_publish/repos/msi.rb', line 28 def annotate(={}) [:subdir] ||= repo_config[:subdir] [:filter] = ['*.msi'] super() end |