mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-25 00:00:52 -04:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa147602fc | |||
| d58c83fbd8 | |||
| 1a0c3d81ce | |||
| 33c61fd8c1 | |||
| 6eba3fe351 |
@@ -0,0 +1,3 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
patreon: hkalexling
|
||||||
@@ -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
|
# 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
|
Mango is a self-hosted manga server and reader. Its features include
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: mango
|
name: mango
|
||||||
version: 0.2.1
|
version: 0.2.3
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Alex Ling <hkalexling@gmail.com>
|
- Alex Ling <hkalexling@gmail.com>
|
||||||
|
|||||||
@@ -25,4 +25,12 @@ describe "compare_alphanumerically" do
|
|||||||
compare_alphanumerically a, b
|
compare_alphanumerically a, b
|
||||||
}.should eq ary
|
}.should eq ary
|
||||||
end
|
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
|
end
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ require "./context"
|
|||||||
require "./mangadex/*"
|
require "./mangadex/*"
|
||||||
require "option_parser"
|
require "option_parser"
|
||||||
|
|
||||||
VERSION = "0.2.1"
|
VERSION = "0.2.3"
|
||||||
|
|
||||||
config_path = nil
|
config_path = nil
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,3 +1,5 @@
|
|||||||
|
require "big"
|
||||||
|
|
||||||
IMGS_PER_PAGE = 5
|
IMGS_PER_PAGE = 5
|
||||||
|
|
||||||
macro layout(name)
|
macro layout(name)
|
||||||
@@ -56,7 +58,7 @@ def compare_alphanumerically(c, d)
|
|||||||
return -1 if a.nil?
|
return -1 if a.nil?
|
||||||
return 1 if b.nil?
|
return 1 if b.nil?
|
||||||
if is_numeric(a) && is_numeric(b)
|
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
|
return compare if compare != 0
|
||||||
else
|
else
|
||||||
compare = a <=> b
|
compare = a <=> b
|
||||||
|
|||||||
Reference in New Issue
Block a user