mangdown 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mangdown.rb +1 -2
- data/lib/mangdown/adapter/mangareader.rb +1 -1
- data/lib/mangdown/chapter.rb +1 -1
- data/lib/mangdown/client.rb +12 -9
- data/lib/mangdown/manga.rb +1 -1
- data/lib/mangdown/md_hash.rb +1 -1
- data/lib/mangdown/page.rb +1 -1
- data/lib/mangdown/support/tools.rb +1 -1
- data/lib/mangdown/version.rb +1 -1
- metadata +36 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 394d93835122c8b78b98f83c09908786c75831e9
|
4
|
+
data.tar.gz: 3d50677445c08b240f46a8be8e9fd95d94cd81ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b858ea5267457078c49f113002013a660086abbf12f6d1ccf4b70ba2123659eb59e14f362f7fe74c190b3646b7eb771ff296e8334c606dc2fd1658a5eab6fd
|
7
|
+
data.tar.gz: c2d48bdec2d6e5e771e7979d39e214ad57c0240142591e7bdf6abf774ec97e6131d75ec67b298ab5cc0f00995f71579335218435ab57f68a9de434610a64d3ae
|
data/lib/mangdown.rb
CHANGED
@@ -68,7 +68,7 @@ module Mangdown
|
|
68
68
|
(1..last_page).map do |page|
|
69
69
|
slug = manga_name.tr(' ', '-').gsub(/[:,!]/, '')
|
70
70
|
uri = "#{root}/#{slug}/#{chapter_number}/#{page}"
|
71
|
-
uri =
|
71
|
+
uri = Addressable::URI.escape(uri).downcase
|
72
72
|
{ uri: uri, name: page, site: site }
|
73
73
|
end
|
74
74
|
end
|
data/lib/mangdown/chapter.rb
CHANGED
data/lib/mangdown/client.rb
CHANGED
@@ -4,15 +4,14 @@ require_relative '../mangdown'
|
|
4
4
|
|
5
5
|
# Simple client for Mangdown
|
6
6
|
module M
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
'../../README.md', File.dirname(__FILE__)
|
12
|
-
)
|
7
|
+
DATA_FILE_PATH = Dir.home + '/.manga_list.yml'
|
8
|
+
HELP_FILE_PATH = File.expand_path(
|
9
|
+
'../../README.md', File.dirname(__FILE__)
|
10
|
+
)
|
13
11
|
|
14
|
-
|
12
|
+
DEFAULT_MANGA_PAGES = ['http://www.mangareader.net/alphabetical'].freeze
|
15
13
|
|
14
|
+
class << self
|
16
15
|
# return a list of hash with :uri and :name of mangas found in list
|
17
16
|
def find(search)
|
18
17
|
search = Regexp.new(/^#{search}$/) if search.respond_to?(:to_str)
|
@@ -37,6 +36,10 @@ module M
|
|
37
36
|
File.delete(DATA_FILE_PATH) if File.exist?(DATA_FILE_PATH)
|
38
37
|
end
|
39
38
|
|
39
|
+
def manga_pages
|
40
|
+
@manga_pages ||= DEFAULT_MANGA_PAGES.dup
|
41
|
+
end
|
42
|
+
|
40
43
|
private
|
41
44
|
|
42
45
|
# convenience method to access the data file path
|
@@ -51,7 +54,7 @@ module M
|
|
51
54
|
|
52
55
|
# attempt to get the list from the data file
|
53
56
|
def data_from_file
|
54
|
-
YAML.
|
57
|
+
YAML.load(File.read(path)) if file_current?(path)
|
55
58
|
end
|
56
59
|
|
57
60
|
# get saved current manga list, if data is less than a week old
|
@@ -60,7 +63,7 @@ module M
|
|
60
63
|
data = data_from_file
|
61
64
|
return Mangdown::MangaList.from_data(data) if data
|
62
65
|
|
63
|
-
list =
|
66
|
+
list = manga_pages.inject([]) do |manga, uri|
|
64
67
|
list = Mangdown::MDHash.new(uri: uri).to_manga_list
|
65
68
|
list.merge(manga)
|
66
69
|
end
|
data/lib/mangdown/manga.rb
CHANGED
data/lib/mangdown/md_hash.rb
CHANGED
data/lib/mangdown/page.rb
CHANGED
data/lib/mangdown/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mangdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jphager2
|
@@ -11,19 +11,19 @@ cert_chain: []
|
|
11
11
|
date: 2017-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: addressable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ruby-filemagic
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rubyzip
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,33 +67,33 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '1.1'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: typhoeus
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
75
|
+
version: '0.7'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
82
|
+
version: '0.7'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: minitest
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
89
|
+
version: '5.0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
96
|
+
version: '5.0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rake
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,21 +109,21 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: rubocop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
117
|
+
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - "
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
126
|
+
name: webmock
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|