Ruby: fix linter errors

This commit is contained in:
0x1eef 2022-11-02 00:49:43 -03:00 committed by Robert
parent 93fc88e869
commit fc070c01b8
5 changed files with 18 additions and 11 deletions

14
Gemfile
View file

@ -1,8 +1,10 @@
source 'https://rubygems.org'
gem 'nanoc', '~> 4.12'
gem 'nanoc-live', '~> 1.0'
gem 'rainpress', '~> 1.0'
gem 'sass'
gem 'standardrb'
# frozen_string_literal: true
source "https://rubygems.org"
gem "nanoc", "~> 4.12"
gem "nanoc-live", "~> 1.0"
gem "rainpress", "~> 1.0"
gem "sass"
gem "standardrb"
gem "ryo.rb"
gem "paint"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "bundler/setup"
require_relative "lib/tasks"
include Tasks

2
Rules
View file

@ -50,4 +50,4 @@ compile "/images/*" do
end
compile("/**/*") { write(nil) }
layout('**/*', :erb)
layout("**/*", :erb)

View file

@ -1,14 +1,15 @@
# frozen_string_literal: true
module Cmd
def cmd(cmd, *args, silent: false)
print " -> #{cmd}: " unless silent
_, result = Process.wait2 Process.spawn(
[cmd, cmd],
*args,
STDERR=>File::NULL,
STDOUT=>File::NULL
$stderr => File::NULL,
$stdout => File::NULL
)
case
when result.success?
if result.success?
print Paint["OK", :green, :bold], "\n" unless silent
else
print Paint["ERROR", :red, :bold], "\n" unless silent

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Tasks::Deploy
require_relative "deploy/local"
end