mangos 0.3 → 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56f79d3fe8221ed638d73e158b60c45bd18092993cb3117fd0fc83c2403ffd5e
4
- data.tar.gz: 05e239fa6821f9a47cd345b8a8b1c045d853712bd41f7e6cb8f4ca93ce6915c0
3
+ metadata.gz: 04e5641bc4363c1a515c6b7af7f5098884d40f96c89039ad39bf889da4d232fa
4
+ data.tar.gz: 7f533a39d946049f27dc1318819ca99ff1379ee2c2b9c3302d5ce210345273f0
5
5
  SHA512:
6
- metadata.gz: 1fa3467468280687b46ee14b86f78c4cdb4949760d862b4b67a0454195225986f6677edcbe7ac1ec038cbde3b7bf4e4a2abb3350e243c62c01faee944c7693e7
7
- data.tar.gz: 3bde1bfee0cf1e539d390623032fcc45ff6eee3682dc483e931a2f0044b2c10c9d926522c66218920e7834c04a3f07be8b73f7834b4cd8b98e5279a2d14b5819
6
+ metadata.gz: 9edef353a26418b44a43e1c45b4b2e5695ab1c36a8e281d9b1e9e9c480d0e88d276645c44b51ba5af4a4d310e8c5622ec958ba2fc8a198e17e0c7c6a062a74ed
7
+ data.tar.gz: 2789b096c6d14b3744ff5b39f1e5fbbc10fa7e18eef9b8c44bb6e07709d6b3b236012643fbc7d5f728e562a0e6cb40c6b14a1fee94edea03216e7d4eb496fced
@@ -1,6 +1,6 @@
1
1
  class DecoratedPathname < Pathname
2
2
  def image?
3
- file? && extname && %w(.jpg .jpeg .png .gif).include?(extname.downcase)
3
+ file? && extname && %w(.jpg .jpeg .png .gif .webp).include?(extname.downcase)
4
4
  end
5
5
 
6
6
  def hidden?
@@ -9,8 +9,8 @@ class Mangos::Package
9
9
  end
10
10
 
11
11
  def update
12
- app_path.mkdir unless File.exists?(app_path)
13
- thumbnails_path.mkpath unless File.exists?(thumbnails_path)
12
+ app_path.mkdir unless File.exist?(app_path)
13
+ thumbnails_path.mkpath unless File.exist?(thumbnails_path)
14
14
 
15
15
  Mangos::Update.new(self, Mangos::Processor.new(self)).update
16
16
  end
@@ -9,11 +9,18 @@ class Mangos::Processor
9
9
  end
10
10
 
11
11
  def update(path, book)
12
- return false if !@package.force? && path.mtime < @original_mtime
12
+ return false if !update?(path, book)
13
13
  Mangos::BookUpdater.new(@package, book, path).update
14
14
  true
15
15
  end
16
16
 
17
+ def update?(path, book)
18
+ return true if @package.force?
19
+ return true if path.mtime >= @original_mtime
20
+ return true if book.pages == 0
21
+ false
22
+ end
23
+
17
24
  def delete(book)
18
25
  end
19
26
  end
@@ -1,3 +1,3 @@
1
1
  module Mangos
2
- VERSION = "0.3"
2
+ VERSION = "0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangos
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brenton "B-Train" Fletcher
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-21 00:00:00.000000000 Z
11
+ date: 2024-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -102,7 +102,7 @@ files:
102
102
  homepage: http://github.com/bloopletech/mangos
103
103
  licenses: []
104
104
  metadata: {}
105
- post_install_message:
105
+ post_install_message:
106
106
  rdoc_options: []
107
107
  require_paths:
108
108
  - lib
@@ -117,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: 1.3.6
119
119
  requirements: []
120
- rubygems_version: 3.0.3
121
- signing_key:
120
+ rubygems_version: 3.5.4
121
+ signing_key:
122
122
  specification_version: 4
123
123
  summary: Mangos indexes a collection of manga or comis and generates a SPA that browses
124
124
  the collection.