mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Fix long lines
This commit is contained in:
parent
c3608c101b
commit
049bd3ab2c
@ -64,7 +64,8 @@ describe Rule do
|
||||
it "renders a few examples correctly" do
|
||||
rule = Rule.new "[Ch. {chapter }] {title | id} testing"
|
||||
rule.render({"id" => "ID"}).should eq "ID testing"
|
||||
rule.render({"chapter" => "CH", "id" => "ID"}).should eq "Ch. CH ID testing"
|
||||
rule.render({"chapter" => "CH", "id" => "ID"})
|
||||
.should eq "Ch. CH ID testing"
|
||||
rule.render({} of String => String).should eq "testing"
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,9 @@ class UploadHandler < Kemal::Handler
|
||||
return call_next env
|
||||
end
|
||||
|
||||
ary = env.request.path.split(File::SEPARATOR).select { |part| !part.empty? }
|
||||
ary = env.request.path.split(File::SEPARATOR).select do |part|
|
||||
!part.empty?
|
||||
end
|
||||
ary[0] = @upload_dir
|
||||
path = File.join ary
|
||||
|
||||
|
@ -141,7 +141,8 @@ module MangaDex
|
||||
end
|
||||
|
||||
def initialize
|
||||
@base_url = Config.current.mangadex["api_url"].to_s || "https://mangadex.org/api/"
|
||||
@base_url = Config.current.mangadex["api_url"].to_s ||
|
||||
"https://mangadex.org/api/"
|
||||
@lang = {} of String => String
|
||||
CSV.each_row {{read_file "src/assets/lang_codes.csv"}} do |row|
|
||||
@lang[row[1]] = row[0]
|
||||
|
@ -19,7 +19,8 @@ OptionParser.parse do |parser|
|
||||
exit
|
||||
end
|
||||
parser.on "-c PATH", "--config=PATH",
|
||||
"Path to the config file. Default is `~/.config/mango/config.yml`" do |path|
|
||||
"Path to the config file. " \
|
||||
"Default is `~/.config/mango/config.yml`" do |path|
|
||||
config_path = path
|
||||
end
|
||||
end
|
||||
|
@ -85,8 +85,8 @@ module Rename
|
||||
raise "unmatched ] at position #{i}"
|
||||
end
|
||||
if !pattern.nil?
|
||||
raise "patterns (`{}`) should be closed before closing the group " \
|
||||
"(`[]`)"
|
||||
raise "patterns (`{}`) should be closed before closing the " \
|
||||
"group (`[]`)"
|
||||
end
|
||||
@ary.push group
|
||||
group = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user