distorted 0.5.4 → 0.7.0
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 +4 -4
- data/LICENSE +661 -0
- data/README.md +5 -140
- data/bin/console +14 -0
- data/bin/distorted +6 -0
- data/bin/setup +8 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Less_Perfect_DOS_VGA.png +0 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/More_Perfect_DOS_VGA.png +0 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Perfect_DOS_VGA.png +0 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/less_more_perfect_dos_vga_437.html +52 -0
- data/font/1252/LICENSE/PerfectDOSVGA437/font-comment.php@file=perfect_dos_vga_437.html +5 -0
- data/font/1252/LessPerfectDOSVGA.ttf +0 -0
- data/font/1252/MorePerfectDOSVGA.ttf +0 -0
- data/font/1252/Perfect DOS VGA 437 Win.ttf +0 -0
- data/font/437/Perfect DOS VGA 437.ttf +0 -0
- data/font/437/dos437.txt +72 -0
- data/font/65001/Anonymous Pro B.ttf +0 -0
- data/font/65001/Anonymous Pro BI.ttf +0 -0
- data/font/65001/Anonymous Pro I.ttf +0 -0
- data/font/65001/Anonymous Pro.ttf +0 -0
- data/font/65001/LICENSE/AnonymousPro/FONTLOG.txt +45 -0
- data/font/65001/LICENSE/AnonymousPro/OFL-FAQ.txt +235 -0
- data/font/65001/LICENSE/AnonymousPro/OFL.txt +94 -0
- data/font/65001/LICENSE/AnonymousPro/README.txt +55 -0
- data/font/850/ProFont-Bold-01/LICENSE +22 -0
- data/font/850/ProFont-Bold-01/readme.txt +28 -0
- data/font/850/ProFontWindows-Bold.ttf +0 -0
- data/font/850/ProFontWindows.ttf +0 -0
- data/font/850/Profont/LICENSE +22 -0
- data/font/850/Profont/readme.txt +31 -0
- data/font/932/LICENSE/README-ttf.txt +213 -0
- data/font/932/mona.ttf +0 -0
- data/lib/distorted.rb +2 -0
- data/lib/distorted/checking_you_out.rb +219 -0
- data/lib/distorted/checking_you_out/README +4 -0
- data/lib/distorted/checking_you_out/application.yaml +33 -0
- data/lib/distorted/checking_you_out/font.yaml +29 -0
- data/lib/distorted/checking_you_out/image.yaml +108 -0
- data/lib/distorted/click_again.rb +333 -0
- data/lib/distorted/element_of_media.rb +2 -0
- data/lib/distorted/element_of_media/change.rb +119 -0
- data/lib/distorted/element_of_media/compound.rb +120 -0
- data/lib/distorted/error_code.rb +51 -0
- data/lib/distorted/floor.rb +17 -0
- data/lib/distorted/invoker.rb +97 -0
- data/lib/distorted/media_molecule.rb +58 -0
- data/lib/distorted/media_molecule/font.rb +195 -0
- data/lib/distorted/media_molecule/image.rb +33 -0
- data/lib/distorted/media_molecule/pdf.rb +44 -0
- data/lib/distorted/media_molecule/svg.rb +45 -0
- data/lib/distorted/media_molecule/text.rb +203 -0
- data/lib/distorted/media_molecule/video.rb +18 -0
- data/lib/distorted/modular_technology/gstreamer.rb +174 -0
- data/lib/distorted/modular_technology/pango.rb +90 -0
- data/lib/distorted/modular_technology/ttfunk.rb +48 -0
- data/lib/distorted/modular_technology/vips.rb +17 -0
- data/lib/distorted/modular_technology/vips/foreign.rb +489 -0
- data/lib/distorted/modular_technology/vips/load.rb +133 -0
- data/lib/distorted/modular_technology/vips/save.rb +161 -0
- data/lib/distorted/monkey_business/encoding.rb +317 -0
- data/lib/distorted/monkey_business/hash.rb +18 -0
- data/lib/distorted/monkey_business/set.rb +15 -0
- data/lib/distorted/monkey_business/string.rb +6 -0
- data/lib/distorted/triple_counter.rb +52 -0
- data/lib/distorted/version.rb +22 -0
- data/test/distorted_test.rb +11 -0
- data/test/test_helper.rb +4 -0
- metadata +130 -20
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
class Hash
|
4
|
+
|
5
|
+
# Complement Ruby::YAML behavior, where usage of Set syntax
|
6
|
+
# returns a Hash with all-nil values.
|
7
|
+
# Calling :to_set on a Hash with all-nil values should return
|
8
|
+
# a Set of the Hash's keys.
|
9
|
+
this_old_set = instance_method(:to_set)
|
10
|
+
define_method(:to_set) do
|
11
|
+
if self.values.all?{ |v| v.nil? }
|
12
|
+
self.keys.to_set
|
13
|
+
else
|
14
|
+
this_old_set.bind(self).()
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
# Override Set.to_hash to complement Ruby::YAML's Set implementation,
|
4
|
+
# where the YAML Set syntax returns a Hash with all-nil values,
|
5
|
+
# at least without some decorator sugar in the YAML itself:
|
6
|
+
# https://rhnh.net/2011/01/31/yaml-tutorial/
|
7
|
+
#
|
8
|
+
# Since Set is implemented using a Hash internally I think it makes
|
9
|
+
# more sense for Set.to_hash to return a Hash with all-nil values
|
10
|
+
# with keys matching the contents of the original Set.
|
11
|
+
class Set
|
12
|
+
def to_hash
|
13
|
+
Hash[self.map { |s| [s, nil] }]
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
TripleCounter = Struct.new(:major, :minor, :micro) do
|
2
|
+
attr_reader :major, :minor, :micro
|
3
|
+
|
4
|
+
# Include a catch-all so we can splat Array-generating functions
|
5
|
+
# into TripleCounter.new(), e.g. Ruby/GStreamer's library version:
|
6
|
+
# irb> require 'gst'
|
7
|
+
# => true
|
8
|
+
# irb> Gst.version
|
9
|
+
# => [1, 19, 0, 1]
|
10
|
+
def initialize(major = 0, minor = 0, micro = 0, *_)
|
11
|
+
@major = major
|
12
|
+
@minor = minor
|
13
|
+
@micro = micro
|
14
|
+
super(major, minor, micro) # Intentionally not passing our splat to `super`
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_s
|
18
|
+
[major, minor, micro].join('.'.freeze)
|
19
|
+
end
|
20
|
+
|
21
|
+
def ==(otra)
|
22
|
+
major == otra.major && minor == otra.minor
|
23
|
+
end
|
24
|
+
|
25
|
+
def ===(otra)
|
26
|
+
all_operator(otra, :==)
|
27
|
+
end
|
28
|
+
|
29
|
+
def >=(otra)
|
30
|
+
all_operator(otra, :>=)
|
31
|
+
end
|
32
|
+
|
33
|
+
def <=(otra)
|
34
|
+
all_operator(otra, :<=)
|
35
|
+
end
|
36
|
+
|
37
|
+
def >(otra)
|
38
|
+
all_operator(otra, :>)
|
39
|
+
end
|
40
|
+
|
41
|
+
def <(otra)
|
42
|
+
all_operator(otra, :<)
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_array
|
46
|
+
[major, minor, micro]
|
47
|
+
end
|
48
|
+
|
49
|
+
def all_operator(otra, operator)
|
50
|
+
to_array.zip(otra.to_array).all?{|us, otra| us.send(operator, otra)}
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# `.........-` `:/:::://.`
|
3
|
+
# `+/``+ssss:``-/:` `:o+y. `::::-----``
|
4
|
+
# -+- :hmNNmdhs- `o++` `-:--/ -/... ./shhyoy. +mmmmds+:--...`
|
5
|
+
# .//``odmNmmd+++` :+/h:-------------:+. ./...-..........---/--:.------// -.--------//o//o+/+- :hhdmmmmmh/`-/-`
|
6
|
+
# `:+- :ymNmmyy:...-:` /: ./////////////- ::/:/- `++++++++` -y /:.`.////+- /////- `/+++++++. :- .::+sydmNm+ `/+.
|
7
|
+
# -+:` /syyyo:--:+oso` /: ---:::::::syys. -yoy+s` :mmmmmmmd- .h` ``:osshhyyy` /oshhs` -:::::::. :: `-..-/dmo` `/yo:
|
8
|
+
# `/o:--------:+syyy++``+s+++++++++/``:h+os``oshdos``odhhhddyy-`.h.`.ssyhmmdmoh/``o+mmho``:++++++++++y+``----::``-oyss.
|
9
|
+
# +sssssssyyyyyhdmmsyo-+/----------.`.yooy-`-hodss/``---------.`.h-`.sohdhsymhsy.`:+yNmy/`.-----------:++ooooooo+sss+`
|
10
|
+
# `+dmmmdddddmmNNddhsyosooooooooooooooysoysssyymssssssssssssssssshyssyoh:` .mhsyssssodddyooooooooooooooysoyyyyyyyyy/
|
11
|
+
# /mNmdddhmdmmdy+-+mdhhhhhhhhhhhhhhhmhhyhhhmdmmdhhhhhhhhhhhhhhhdhhhsm+ ydddhhhhd-hdmdddddddddddddddyhdhdmmNms.
|
12
|
+
# .---.......` -yhNmmhddhhhdhmhmhddmNNmyyy+dmNdydhyyyhddhmmmmNmhh. -hyhNNNh: .mNmdmdddhhhdddmmyssssssso:
|
13
|
+
# `/oooooooooooooo:`-+o+/. `+oo+o++++ooo+oooooo- `-+oo/` :oooooooooooooo/
|
14
|
+
#
|
15
|
+
|
16
|
+
require_relative 'triple_counter'
|
17
|
+
|
18
|
+
module Cooltrainer
|
19
|
+
module DistorteD
|
20
|
+
VERSION = TripleCounter.new(0, 7, 0)
|
21
|
+
end
|
22
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distorted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- okeeblow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.2'
|
20
20
|
type: :development
|
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: '2.
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
47
|
+
version: '5.14'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
54
|
+
version: '5.14'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: mime-types
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.3'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: ruby-filemagic
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0.7'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0.7'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: ruby-vips
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,28 +108,136 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.2.5
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gstreamer
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.4'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.4'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: hexapdf
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
131
|
+
version: '0.13'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.13'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: charlock_holmes
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.7'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.7'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: ttfunk
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.6'
|
118
160
|
type: :runtime
|
119
161
|
prerelease: false
|
120
162
|
version_requirements: !ruby/object:Gem::Requirement
|
121
163
|
requirements:
|
122
164
|
- - "~>"
|
123
165
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
166
|
+
version: '1.6'
|
125
167
|
description: Ruby implementation of core file-format operations used by DistorteD-Jekyll.
|
126
168
|
email:
|
127
169
|
- root@cooltrainer.org
|
128
|
-
executables:
|
170
|
+
executables:
|
171
|
+
- distorted
|
129
172
|
extensions: []
|
130
173
|
extra_rdoc_files: []
|
131
174
|
files:
|
175
|
+
- LICENSE
|
132
176
|
- README.md
|
177
|
+
- bin/console
|
178
|
+
- bin/distorted
|
179
|
+
- bin/setup
|
180
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Less_Perfect_DOS_VGA.png
|
181
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/More_Perfect_DOS_VGA.png
|
182
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Perfect_DOS_VGA.png
|
183
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/less_more_perfect_dos_vga_437.html
|
184
|
+
- font/1252/LICENSE/PerfectDOSVGA437/font-comment.php@file=perfect_dos_vga_437.html
|
185
|
+
- font/1252/LessPerfectDOSVGA.ttf
|
186
|
+
- font/1252/MorePerfectDOSVGA.ttf
|
187
|
+
- font/1252/Perfect DOS VGA 437 Win.ttf
|
188
|
+
- font/437/Perfect DOS VGA 437.ttf
|
189
|
+
- font/437/dos437.txt
|
190
|
+
- font/65001/Anonymous Pro B.ttf
|
191
|
+
- font/65001/Anonymous Pro BI.ttf
|
192
|
+
- font/65001/Anonymous Pro I.ttf
|
193
|
+
- font/65001/Anonymous Pro.ttf
|
194
|
+
- font/65001/LICENSE/AnonymousPro/FONTLOG.txt
|
195
|
+
- font/65001/LICENSE/AnonymousPro/OFL-FAQ.txt
|
196
|
+
- font/65001/LICENSE/AnonymousPro/OFL.txt
|
197
|
+
- font/65001/LICENSE/AnonymousPro/README.txt
|
198
|
+
- font/850/ProFont-Bold-01/LICENSE
|
199
|
+
- font/850/ProFont-Bold-01/readme.txt
|
200
|
+
- font/850/ProFontWindows-Bold.ttf
|
201
|
+
- font/850/ProFontWindows.ttf
|
202
|
+
- font/850/Profont/LICENSE
|
203
|
+
- font/850/Profont/readme.txt
|
204
|
+
- font/932/LICENSE/README-ttf.txt
|
205
|
+
- font/932/mona.ttf
|
206
|
+
- lib/distorted.rb
|
207
|
+
- lib/distorted/checking_you_out.rb
|
208
|
+
- lib/distorted/checking_you_out/README
|
209
|
+
- lib/distorted/checking_you_out/application.yaml
|
210
|
+
- lib/distorted/checking_you_out/font.yaml
|
211
|
+
- lib/distorted/checking_you_out/image.yaml
|
212
|
+
- lib/distorted/click_again.rb
|
213
|
+
- lib/distorted/element_of_media.rb
|
214
|
+
- lib/distorted/element_of_media/change.rb
|
215
|
+
- lib/distorted/element_of_media/compound.rb
|
216
|
+
- lib/distorted/error_code.rb
|
217
|
+
- lib/distorted/floor.rb
|
218
|
+
- lib/distorted/invoker.rb
|
219
|
+
- lib/distorted/media_molecule.rb
|
220
|
+
- lib/distorted/media_molecule/font.rb
|
221
|
+
- lib/distorted/media_molecule/image.rb
|
222
|
+
- lib/distorted/media_molecule/pdf.rb
|
223
|
+
- lib/distorted/media_molecule/svg.rb
|
224
|
+
- lib/distorted/media_molecule/text.rb
|
225
|
+
- lib/distorted/media_molecule/video.rb
|
226
|
+
- lib/distorted/modular_technology/gstreamer.rb
|
227
|
+
- lib/distorted/modular_technology/pango.rb
|
228
|
+
- lib/distorted/modular_technology/ttfunk.rb
|
229
|
+
- lib/distorted/modular_technology/vips.rb
|
230
|
+
- lib/distorted/modular_technology/vips/foreign.rb
|
231
|
+
- lib/distorted/modular_technology/vips/load.rb
|
232
|
+
- lib/distorted/modular_technology/vips/save.rb
|
233
|
+
- lib/distorted/monkey_business/encoding.rb
|
234
|
+
- lib/distorted/monkey_business/hash.rb
|
235
|
+
- lib/distorted/monkey_business/set.rb
|
236
|
+
- lib/distorted/monkey_business/string.rb
|
237
|
+
- lib/distorted/triple_counter.rb
|
238
|
+
- lib/distorted/version.rb
|
239
|
+
- test/distorted_test.rb
|
240
|
+
- test/test_helper.rb
|
133
241
|
homepage: https://cooltrainer.org
|
134
242
|
licenses:
|
135
243
|
- AGPL-3.0
|
@@ -152,5 +260,7 @@ requirements: []
|
|
152
260
|
rubygems_version: 3.1.4
|
153
261
|
signing_key:
|
154
262
|
specification_version: 4
|
155
|
-
summary:
|
156
|
-
test_files:
|
263
|
+
summary: Multimedia toolkit core.
|
264
|
+
test_files:
|
265
|
+
- test/test_helper.rb
|
266
|
+
- test/distorted_test.rb
|