diff --git a/shard.yml b/shard.yml index 9726238..fcefde2 100644 --- a/shard.yml +++ b/shard.yml @@ -8,6 +8,8 @@ authors: # Short description of package dependencies: + weird-crystal-base: + git: https://git.karchnu.fr/WeirdOS/weird-crystal-base specparser: git: https://git.karchnu.fr/WeirdOS/recipes-parser diff --git a/src/io.cr b/src/io.cr deleted file mode 100644 index bac30fb..0000000 --- a/src/io.cr +++ /dev/null @@ -1,34 +0,0 @@ -require "colorize" - -class Weird::Context - # FIXME: Use log files. - # FIXME: def log(), that puts stuff as-is in the logs. - - def debug(text) - STDERR.puts ":: #{text}".colorize(:cyan) - STDERR.flush - end - def info(text) - STDOUT - .<<(":: ".colorize(:blue)) - .<<(text.colorize(:white)) - .<<("\n") - STDOUT.flush - end - def title(text) - STDOUT - .<<("|> ".colorize(:blue).bright) - .<<(text.colorize(:white).bright) - .<<("\n") - STDOUT.flush - end - def warning(text) - STDERR.puts ":: #{text}".colorize(:yellow) - STDERR.flush - end - def error(text) - STDERR.puts "!! #{text}".colorize(:red) - STDERR.flush - end -end - diff --git a/src/package/context.cr b/src/package/context.cr index 7e5b29d..1e3963b 100644 --- a/src/package/context.cr +++ b/src/package/context.cr @@ -3,13 +3,13 @@ require "uuid" require "file_utils" require "uri" -require "../io.cr" +require "weird-crystal-base" require "./weird.cr" require "./configuration.cr" require "./repository.cr" -class Package::Context < Weird::Context +class Package::Context < Weird::Base property root = "/" # Stores informations about already installed packages, their