webcomics2 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 93563d60578097e9b1ed48c6464e976b224534bb
4
+ data.tar.gz: 743d30135731e106c521a080abe8bf22f9c08a2d
5
+ SHA512:
6
+ metadata.gz: 6e4a9428a51aa1b0ad586596222a0c223d61c24f8a06f83a85bb804f195a7a76c09edc283082c07e831e6a126c72b63dd647f37f6a866b29f5bfa0d316440dd3
7
+ data.tar.gz: 975de92205a816bced92d50d18f65cfaa9fc98479f57b59a72b1683ead8f7406a16481b25faaaa6db107223f5aa69fc01330d871e83f6df6ec6969fbe30f9361
@@ -0,0 +1,3 @@
1
+ module Webcomics2
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,11 @@
1
+ require "webcomics"
2
+
3
+ module Webcomics2
4
+ # Returns true if a folder matching the folder name to the database query. Returns false otherwise.
5
+ #
6
+ # @param query_value [String] The value of the query from a database.
7
+ # @param assets_path [String] The path to the assets pipeline.
8
+ def self.db_assets_match?(query_value, assets_path)
9
+ is_there_a_db_field_value_that_matches_an_asset?(query_value, assets_path)
10
+ end
11
+ end
@@ -0,0 +1,114 @@
1
+ require "webcomics"
2
+
3
+ module Webcomics2
4
+ class Dir
5
+
6
+ # Returns entries from the series path without the previous or current directories.
7
+ #
8
+ # @param series_path [String] Path to the series.
9
+ # @return [Array] Entries.
10
+ def self.comics_entries(series_path)
11
+ return_an_array_of_comics_entries(series_path)
12
+ end
13
+
14
+ # Returns an array of pages without file extentions.
15
+ #
16
+ # @param pages [String] Filenames or pages.
17
+ # @return [Array] Entries.
18
+ def self.no_ext(pages)
19
+ return_comics_entries_without_file_extentions(pages)
20
+ end
21
+
22
+ # Returns true if the series path is considered a chapter/directory.
23
+ #
24
+ # @param series_path [String] Path to the series.
25
+ def self.chapter?(series_path)
26
+ is_this_series_path_a_chapter?(series_path)
27
+ end
28
+
29
+ # Returns true if the series path is considered a page/file.
30
+ #
31
+ # @param series_path [String] Path to the series.
32
+ def self.page?(series_path)
33
+ is_this_series_path_a_page?(series_path)
34
+ end
35
+
36
+ # Returns an array of what is considered comic book pages/files.
37
+ #
38
+ # @param series_path [String] Path to the series.
39
+ # @return [Array] Comic book pages.
40
+ def self.pages(series_path)
41
+ return_an_array_of_comics_pages(series_path)
42
+ end
43
+
44
+ # Returns an array of all the directories within this series path that only consist of letters.
45
+ #
46
+ # @param series_path [String] Path to the series.
47
+ # @return [Array] Comic book pages.
48
+ def self.alpha_chapters(series_path)
49
+ return_an_array_of_alpha_chapters(series_path)
50
+ end
51
+
52
+ # Returns an array of all the numeric directories within this series path.
53
+ #
54
+ # @param series_path [String] Path to the series.
55
+ # @return [Array] Comic book pages.
56
+ def self.numeric_chapters(series_path)
57
+ return_an_array_of_numeric_chapters(series_path)
58
+ end
59
+
60
+ # Returns true if the comic book series has chapters.
61
+ def self.series_have_chapters?(series_path)
62
+ does_this_series_have_chapters?(series_path)
63
+ end
64
+
65
+ def initialize(series_path)
66
+ @series_path = series_path
67
+ end
68
+
69
+ # Returns the path.
70
+ #
71
+ # @return [String] The series path.
72
+ def series_path
73
+ @series_path
74
+ end
75
+
76
+ # Returns true if the series path is considered a chapter/directory.
77
+ def chapter?
78
+ Dir.chapter?(@series_path)
79
+ end
80
+
81
+ # Returns true if the series path is considered a page/file.
82
+ def page?
83
+ Dir.page?(@series_path)
84
+ end
85
+
86
+ # Returns an array of what is considered comic book pages/files.
87
+ #
88
+ # @return [Array] Comic book pages.
89
+ def pages
90
+ Dir.pages(@series_path)
91
+ end
92
+
93
+ # Returns an array of all the directories within this series path that only consist of letters.
94
+ #
95
+ # @return [Array] Comic book pages.
96
+ def alpha_chapters
97
+ Dir.alpha_chapters(@series_path)
98
+ end
99
+
100
+ # Returns an array of all the numeric directories within this series path.
101
+ #
102
+ # @return [Array] Comic book pages.
103
+ def numeric_chapters
104
+ Dir.numeric_chapters(@series_path)
105
+ end
106
+
107
+ # Returns true if the comic book series has chapters.
108
+ def series_have_chapters?
109
+ Dir.series_have_chapters?(@series_path)
110
+ end
111
+
112
+ alias :path :series_path
113
+ end
114
+ end
@@ -0,0 +1,3 @@
1
+ require_relative "version"
2
+ require_relative "wc2_dir"
3
+ require_relative "wc2_db"
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: webcomics2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ralph Desir(Mav7)
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.9'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 5.9.1
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '5.9'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 5.9.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: rake
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: webcomics
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.1'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.1'
61
+ description: A gem for implementing a web based comic reader application.
62
+ email: gehirnmav7@gmail.com
63
+ executables: []
64
+ extensions: []
65
+ extra_rdoc_files: []
66
+ files:
67
+ - lib/version.rb
68
+ - lib/wc2_db.rb
69
+ - lib/wc2_dir.rb
70
+ - lib/webcomics2.rb
71
+ homepage:
72
+ licenses:
73
+ - GPL-3.0
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.5.2
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Generation 2 of the webcomics library.
95
+ test_files: []