lib/fig/repository.rb in fig-0.1.17 vs lib/fig/repository.rb in fig-0.1.18
- old
+ new
@@ -43,10 +43,12 @@
end
def publish_package(package_statements, package_name, version_name, local_only)
temp_dir = temp_dir_for_package(package_name, version_name)
@os.clear_directory(temp_dir)
+ local_dir = local_dir_for_package(package_name, version_name)
+ @os.clear_directory(local_dir)
fig_file = File.join(temp_dir, ".fig")
content = bundle_resources(package_statements).map do |statement|
if statement.is_a?(Publish)
nil
elsif statement.is_a?(Archive) || statement.is_a?(Resource)
@@ -62,12 +64,12 @@
@os.download(statement.url, archive_local)
else
archive_local = statement.url
end
@os.upload(archive_local, archive_remote, @remote_repository_user) unless local_only
- @os.copy(archive_local, local_dir_for_package(package_name, version_name) + "/" + archive_name)
+ @os.copy(archive_local, local_dir + "/" + archive_name)
if statement.is_a?(Archive)
- @os.unpack_archive(local_dir_for_package(package_name, version_name), archive_name)
+ @os.unpack_archive(local_dir, archive_name)
end
statement.class.new(archive_name).unparse('')
else
statement.unparse('')
end