Sha256: 9a4103252ef7c06663f5a7f756629d7677c313a6a4cc2dd4bfad449220ca9a7a

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

#--
# Yast rake
#
# Copyright (C) 2020, SUSE LLC
#   This library is free software; you can redistribute it and/or modify
# it only under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
#   This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
#   You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#++

require_relative "../yast/tarball_server"

# Rake task for running a source code web server,
# designed for the `yupdate` script.
desc "Start an HTTP server providing dynamically generated source code tarball"
task :server, [:port] do |_task, args|
  server = Yast::TarballServer.new(args[:port])

  puts "Starting tarball webserver:"
  server.addresses.each { |a| puts " * #{a}" }
  puts

  server.start
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yast-rake-0.2.42 lib/tasks/server.rake
yast-rake-0.2.41 lib/tasks/server.rake
yast-rake-0.2.40 lib/tasks/server.rake
yast-rake-0.2.39 lib/tasks/server.rake
yast-rake-0.2.38 lib/tasks/server.rake
yast-rake-0.2.37 lib/tasks/server.rake