mirror of
https://github.com/hkalexling/Mango.git
synced 2026-01-24 00:03:14 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa147602fc | ||
|
|
d58c83fbd8 | ||
|
|
1a0c3d81ce | ||
|
|
33c61fd8c1 | ||
|
|
6eba3fe351 |
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
patreon: hkalexling
|
||||
24
.github/workflows/build.yml
vendored
Normal file
24
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, dev ]
|
||||
pull_request:
|
||||
branches: [ master, dev ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: crystallang/crystal:0.32.1-alpine
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: apk add --no-cache yarn yaml sqlite-static
|
||||
- name: Build
|
||||
run: make
|
||||
- name: Run tests
|
||||
run: make test
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
# Mango
|
||||
|
||||
[](https://gitter.im/mango-cr/mango?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://www.patreon.com/hkalexling)  [](https://gitter.im/mango-cr/mango?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
Mango is a self-hosted manga server and reader. Its features include
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: mango
|
||||
version: 0.2.1
|
||||
version: 0.2.3
|
||||
|
||||
authors:
|
||||
- Alex Ling <hkalexling@gmail.com>
|
||||
|
||||
@@ -25,4 +25,12 @@ describe "compare_alphanumerically" do
|
||||
compare_alphanumerically a, b
|
||||
}.should eq ary
|
||||
end
|
||||
|
||||
# https://github.com/hkalexling/Mango/issues/22
|
||||
it "handles numbers larger than Int32" do
|
||||
ary = ["14410155591588.jpg", "21410155591588.png", "104410155591588.jpg"]
|
||||
ary.reverse.sort {|a, b|
|
||||
compare_alphanumerically a, b
|
||||
}.should eq ary
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ require "./context"
|
||||
require "./mangadex/*"
|
||||
require "option_parser"
|
||||
|
||||
VERSION = "0.2.1"
|
||||
VERSION = "0.2.3"
|
||||
|
||||
config_path = nil
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
require "big"
|
||||
|
||||
IMGS_PER_PAGE = 5
|
||||
|
||||
macro layout(name)
|
||||
@@ -56,7 +58,7 @@ def compare_alphanumerically(c, d)
|
||||
return -1 if a.nil?
|
||||
return 1 if b.nil?
|
||||
if is_numeric(a) && is_numeric(b)
|
||||
compare = a.to_i <=> b.to_i
|
||||
compare = a.to_big_i <=> b.to_big_i
|
||||
return compare if compare != 0
|
||||
else
|
||||
compare = a <=> b
|
||||
|
||||
Reference in New Issue
Block a user