Sha256: ddb4a6c21dc29f625f6e267c28bc8ae8dbf319317f0280c2508482a7f933959d

Contents?: true

Size: 1.26 KB

Versions: 9

Compression:

Stored size: 1.26 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
#++

# 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|
  begin
    require_relative "../yast/tarball_server"
  rescue LoadError
    abort "Webrick server is not installed, please install the webrick Ruby gem"
  end

  server = Yast::TarballServer.new(args[:port])

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

  server.start
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
yast-rake-0.2.51 lib/tasks/server.rake
yast-rake-0.2.50 lib/tasks/server.rake
yast-rake-0.2.49 lib/tasks/server.rake
yast-rake-0.2.48 lib/tasks/server.rake
yast-rake-0.2.47 lib/tasks/server.rake
yast-rake-0.2.46 lib/tasks/server.rake
yast-rake-0.2.45 lib/tasks/server.rake
yast-rake-0.2.44 lib/tasks/server.rake
yast-rake-0.2.43 lib/tasks/server.rake