drakkon 0.0.6 → 0.0.8
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/lib/drakkon/build.rb +4 -0
- data/lib/drakkon/gem/bundle.rb +76 -7
- data/lib/drakkon/init.rb +2 -0
- data/lib/drakkon/lib/hub.rb +2 -2
- data/lib/drakkon/lib/images/cli.rb +2 -0
- data/lib/drakkon/lib/images/fonts.rb +88 -0
- data/lib/drakkon/lib/images/text.rb +89 -0
- data/lib/drakkon/lib/settings.rb +20 -5
- data/lib/drakkon/release.rb +1 -1
- data/lib/drakkon/run/helpers.rb +4 -0
- data/lib/drakkon/run/tty.rb +1 -1
- data/lib/drakkon/run.rb +2 -1
- data/lib/drakkon/web.rb +0 -37
- data/lib/drakkon.rb +2 -5
- metadata +4 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d96f5b298a5a1e72de4af63cc4586b919d087944132ff010e9a764ed1c6efee
|
4
|
+
data.tar.gz: 60245722e0177e6228bc4c4f99b89c25e394c4474ff4ce314316ac0251bab21b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f01268dbb5324527bbd69d4dbb5bd6a4c5c9ab33866782a47fc4b264b1bc6e41f332b668d71ca288340684d0b666863baef5327b78780cfd3c677a6ee90fec8
|
7
|
+
data.tar.gz: 324e6d67efb2a03400dc0a474525d5f8676e323a6bc6b9f4a9a9ff92a91bc31c967332d3f45706534b00018bc9c446c6c51700e49541496c36b000f5b94cf2e5
|
data/lib/drakkon/build.rb
CHANGED
data/lib/drakkon/gem/bundle.rb
CHANGED
@@ -3,7 +3,8 @@ module Drakkon
|
|
3
3
|
# Run Command for CLI
|
4
4
|
module Bundle
|
5
5
|
def self.build!(args, context)
|
6
|
-
|
6
|
+
# Gems are not required
|
7
|
+
# return if Settings.gems.empty?
|
7
8
|
|
8
9
|
@context = context
|
9
10
|
|
@@ -16,14 +17,63 @@ module Drakkon
|
|
16
17
|
|
17
18
|
idx = collect
|
18
19
|
|
19
|
-
|
20
|
+
if Settings.bundle_compile?
|
21
|
+
LogBot.info('Gems Bundle', 'Compile')
|
22
|
+
compiled_bundle(idx)
|
23
|
+
else
|
24
|
+
LogBot.info('Gems Bundle', 'Expand')
|
25
|
+
expand_bundle(idx)
|
26
|
+
end
|
20
27
|
|
21
28
|
Settings.update(:bundle_digest, digest)
|
22
29
|
rescue TTY::Reader::InputInterrupt
|
23
30
|
exit 0
|
24
31
|
end
|
25
32
|
|
26
|
-
|
33
|
+
# Including files without merging them
|
34
|
+
def self.expand_bundle(idx)
|
35
|
+
# Make Directory `app/drakkon` if it doesn't exist
|
36
|
+
FileUtils.mkdir_p('app/drakkon') unless File.directory?('app/drakkon')
|
37
|
+
|
38
|
+
# Create Sub Directory to make switching to compile / eaiser
|
39
|
+
# Always clear to ensure fresh directory
|
40
|
+
FileUtils.rm_rf(unbundle_dir) if File.directory?(unbundle_dir)
|
41
|
+
FileUtils.mkdir_p(unbundle_dir)
|
42
|
+
|
43
|
+
# Touch the file if it doesn't exist
|
44
|
+
FileUtils.touch(bundle_file) unless File.exist?(bundle_file)
|
45
|
+
|
46
|
+
File.open(bundle_file, 'w') do |f|
|
47
|
+
idx.keys.sort.reverse.each do |i|
|
48
|
+
idx[i].each do |file_data|
|
49
|
+
file = file_data[:path]
|
50
|
+
unless File.exist?(file)
|
51
|
+
LogBot.fatal('Bundle', "File not found #{file.pastel(:red)}")
|
52
|
+
next
|
53
|
+
end
|
54
|
+
|
55
|
+
file_path = "#{unbundle_dir}/#{File.basename(file_data[:safe_name])}.rb"
|
56
|
+
|
57
|
+
FileUtils.cp(file, file_path)
|
58
|
+
f << "require '#{file_path}'\n"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Include other files
|
63
|
+
f << "require 'app/drakkon/image_index.rb' \n" if Settings.image_index?
|
64
|
+
f << "require 'app/drakkon/manifest.rb' \n" if Settings.manifest?
|
65
|
+
f << "require 'app/drakkon/font_index.rb' \n" if Settings.font_index?
|
66
|
+
|
67
|
+
# File Close
|
68
|
+
end
|
69
|
+
|
70
|
+
# FileUtils.cp(bundle_file, "#{drakkon_dir}/bundle/#{Time.now.to_i}.rb")
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.compiled_bundle(idx)
|
74
|
+
# Always clear to ensure fresh directory
|
75
|
+
FileUtils.rm_rf(unbundle_dir) if File.directory?(unbundle_dir)
|
76
|
+
|
27
77
|
# Make Directory `app/drakkon` if it doesn't exist
|
28
78
|
FileUtils.mkdir_p('app/drakkon') unless File.directory?('app/drakkon')
|
29
79
|
|
@@ -33,7 +83,13 @@ module Drakkon
|
|
33
83
|
File.open(bundle_file, 'w') do |f|
|
34
84
|
# Index Writer
|
35
85
|
idx.keys.sort.reverse.each do |i|
|
36
|
-
idx[i].each do |
|
86
|
+
idx[i].each do |file_data|
|
87
|
+
file = file_data[:path]
|
88
|
+
|
89
|
+
unless File.exist?(file)
|
90
|
+
LogBot.fatal('Bundle', "File not found #{file.pastel(:red)}")
|
91
|
+
next
|
92
|
+
end
|
37
93
|
f << File.read(file)
|
38
94
|
f << "\n"
|
39
95
|
end
|
@@ -42,6 +98,7 @@ module Drakkon
|
|
42
98
|
# Include other files
|
43
99
|
f << "require 'app/drakkon/image_index.rb' \n" if Settings.image_index?
|
44
100
|
f << "require 'app/drakkon/manifest.rb' \n" if Settings.manifest?
|
101
|
+
f << "require 'app/drakkon/font_index.rb' \n" if Settings.font_index?
|
45
102
|
|
46
103
|
# File Close
|
47
104
|
end
|
@@ -49,7 +106,8 @@ module Drakkon
|
|
49
106
|
|
50
107
|
def self.collect
|
51
108
|
idx = {}
|
52
|
-
Settings.gems.
|
109
|
+
Settings.gems.each do |gem_name, gem|
|
110
|
+
gem[:name] = gem_name.to_s.downcase
|
53
111
|
case gem[:source].to_sym
|
54
112
|
when :local then collect_local_source(idx, gem)
|
55
113
|
else
|
@@ -74,7 +132,10 @@ module Drakkon
|
|
74
132
|
next
|
75
133
|
end
|
76
134
|
|
77
|
-
|
135
|
+
# Convert full file path into single string / relative naming (no directories)
|
136
|
+
safe_name = "#{gem.name}_#{file.gsub('/', '_')}"
|
137
|
+
|
138
|
+
idx[mod.weight].push(path: file_name, name: file, safe_name: safe_name)
|
78
139
|
end
|
79
140
|
end
|
80
141
|
|
@@ -82,7 +143,10 @@ module Drakkon
|
|
82
143
|
if gem[:data].key?(:files)
|
83
144
|
gem[:data][:files].each_value do |f|
|
84
145
|
idx[f.weight] ||= []
|
85
|
-
idx[f.weight].push "#{path}/#{f.file}"
|
146
|
+
# idx[f.weight].push "#{path}/#{f.file}"
|
147
|
+
safe_name = "#{gem.name}_#{f.file.gsub('/', '_')}"
|
148
|
+
|
149
|
+
idx[f.weight].push(path: "#{path}/#{f.file}", name: f.file, safe_name: safe_name)
|
86
150
|
end
|
87
151
|
|
88
152
|
end
|
@@ -101,6 +165,11 @@ module Drakkon
|
|
101
165
|
"#{@context}/app/drakkon"
|
102
166
|
end
|
103
167
|
|
168
|
+
# Directory for uncompiled files / Relative
|
169
|
+
def self.unbundle_dir
|
170
|
+
'app/drakkon/unbundle'
|
171
|
+
end
|
172
|
+
|
104
173
|
def self.prompt
|
105
174
|
TTY::Prompt.new(active_color: :cyan, interrupt: :exit)
|
106
175
|
end
|
data/lib/drakkon/init.rb
CHANGED
data/lib/drakkon/lib/hub.rb
CHANGED
@@ -68,7 +68,7 @@ module Drakkon
|
|
68
68
|
|
69
69
|
def self.config
|
70
70
|
# Write Default
|
71
|
-
File.write(config_file,
|
71
|
+
File.write(config_file, JSON.pretty_generate({})) unless File.exist?(config_file)
|
72
72
|
|
73
73
|
@config ||= JSON.parse(File.read(config_file), { symbolize_names: true })
|
74
74
|
|
@@ -92,7 +92,7 @@ module Drakkon
|
|
92
92
|
|
93
93
|
def self.write
|
94
94
|
# LogBot.debug('Hub', "Writing Config: #{config_file}")
|
95
|
-
File.write(config_file,
|
95
|
+
File.write(config_file, JSON.pretty_generate(config))
|
96
96
|
end
|
97
97
|
|
98
98
|
def self.log_file
|
@@ -33,6 +33,7 @@ module Drakkon
|
|
33
33
|
when :sepia then Images::Sepia.run!(args)
|
34
34
|
when :modulate then Images::Modulate.run!(args)
|
35
35
|
when :bulk_rename then Images::BulkRename.run!(args)
|
36
|
+
when :text_to_image then Images::TextToImage.run!(args)
|
36
37
|
when :index then Images::Index.run!(force: true)
|
37
38
|
when :exit then exit(0)
|
38
39
|
else
|
@@ -61,6 +62,7 @@ module Drakkon
|
|
61
62
|
menu.choice name: 'Gif Split (gif_split)', value: :gif_split
|
62
63
|
menu.choice name: 'Sepia', value: :sepia
|
63
64
|
menu.choice name: 'Modulate', value: :modulate
|
65
|
+
menu.choice name: 'TextToImage', value: :text_to_image
|
64
66
|
menu.choice name: 'Index (Re-run Index)', value: :index
|
65
67
|
menu.choice name: 'exit', value: :exit
|
66
68
|
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
module Drakkon
|
2
|
+
module Fonts
|
3
|
+
# General Font Index Helper
|
4
|
+
module Index
|
5
|
+
def self.index
|
6
|
+
@index ||= {}
|
7
|
+
|
8
|
+
@index
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.context
|
12
|
+
@context ||= Dir.pwd
|
13
|
+
|
14
|
+
@context
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.digest
|
18
|
+
list = Dir["#{fonts_directory}/*"]
|
19
|
+
Digest::MD5.hexdigest(list.map { |x| Digest::MD5.file(x).hexdigest }.join)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.fonts_directory
|
23
|
+
"#{context}/fonts/"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.run!(force: false, dir: nil)
|
27
|
+
@context = dir || Dir.pwd
|
28
|
+
|
29
|
+
# Create Directory if sprites directory is missing
|
30
|
+
FileUtils.mkdir_p(fonts_directory)
|
31
|
+
|
32
|
+
if Settings.config[:font_digest] == digest
|
33
|
+
LogBot.info('Fonts Index', 'Nothing New')
|
34
|
+
return unless force
|
35
|
+
end
|
36
|
+
|
37
|
+
build_index
|
38
|
+
|
39
|
+
Settings.update(:font_digest, digest)
|
40
|
+
|
41
|
+
File.write("#{context}/app/drakkon/font_index.rb", result)
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.build_index
|
45
|
+
check fonts_directory
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.result
|
49
|
+
<<~RB
|
50
|
+
module Drakkon
|
51
|
+
module Fonts
|
52
|
+
def self.index
|
53
|
+
#{index.inspect}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
RB
|
58
|
+
end
|
59
|
+
|
60
|
+
# Recursively Go through
|
61
|
+
def self.check(dir = nil)
|
62
|
+
LogBot.info('Font Index', "Check: #{dir}")
|
63
|
+
|
64
|
+
# Collect Fonts
|
65
|
+
list = Dir["#{dir}/*"]
|
66
|
+
|
67
|
+
# Ignore Empties
|
68
|
+
return if list.empty?
|
69
|
+
|
70
|
+
# Do other things
|
71
|
+
Dir["#{dir}/*"].each do |file|
|
72
|
+
next if File.directory?(file)
|
73
|
+
|
74
|
+
process(file)
|
75
|
+
end
|
76
|
+
|
77
|
+
:done
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.process(file = nil)
|
81
|
+
name = File.basename(file, File.extname(file))
|
82
|
+
index[name] = file.gsub(fonts_directory, '')[1..]
|
83
|
+
end
|
84
|
+
# =========================================================
|
85
|
+
end
|
86
|
+
# =========================================================
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module Drakkon
|
2
|
+
module Images
|
3
|
+
# Make some img files from fonts
|
4
|
+
module TextToImage
|
5
|
+
def self.run!(args = [])
|
6
|
+
text = if args.empty?
|
7
|
+
prompt.ask('Text? (e.g. rawr): ')
|
8
|
+
else
|
9
|
+
args.shift
|
10
|
+
end
|
11
|
+
|
12
|
+
size = if args.empty?
|
13
|
+
24
|
14
|
+
else
|
15
|
+
args.shift
|
16
|
+
end
|
17
|
+
|
18
|
+
color = if args.empty?
|
19
|
+
'white'
|
20
|
+
else
|
21
|
+
args.shift
|
22
|
+
end
|
23
|
+
|
24
|
+
file = if args.empty?
|
25
|
+
text.gsub(' ', '').downcase
|
26
|
+
else
|
27
|
+
args.shift
|
28
|
+
end
|
29
|
+
|
30
|
+
file.gsub!(/[^0-9A-Za-z.-]/, '_')
|
31
|
+
|
32
|
+
font = if args.empty?
|
33
|
+
font_prompt
|
34
|
+
else
|
35
|
+
args.shift
|
36
|
+
end
|
37
|
+
|
38
|
+
puts <<~HELP
|
39
|
+
Usage [text] [size=24] [color=white] [file=text] [font]
|
40
|
+
- Will look for fonts directory
|
41
|
+
- Generates via MiniMagick on transparent background
|
42
|
+
|
43
|
+
|
44
|
+
Text: #{text}
|
45
|
+
Size: #{size}
|
46
|
+
Color: #{color}
|
47
|
+
File: #{file}
|
48
|
+
Font: #{font}
|
49
|
+
HELP
|
50
|
+
|
51
|
+
puts
|
52
|
+
|
53
|
+
exit unless prompt.yes? 'Are you sure?'.pastel(:bright_yellow).to_s
|
54
|
+
|
55
|
+
generate(font: font, text: text, size: size, color: color, file: file)
|
56
|
+
rescue TTY::Reader::InputInterrupt
|
57
|
+
exit 0
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.font_prompt
|
61
|
+
list = Dir['*.ttf', '*.otf', 'fonts/*']
|
62
|
+
|
63
|
+
prompt.select('Select Font:', filter: true) do |menu|
|
64
|
+
list.each do |font|
|
65
|
+
menu.choice name: font
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.generate(font:, text:, size:, color:, file:)
|
71
|
+
LogBot.info('TextToImage', file)
|
72
|
+
MiniMagick::Tool::Convert.new do |convert|
|
73
|
+
convert.background 'none'
|
74
|
+
convert.fill color
|
75
|
+
convert.font font
|
76
|
+
convert.pointsize size
|
77
|
+
convert << "label:#{text}"
|
78
|
+
convert << "#{file}.png"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.prompt
|
83
|
+
TTY::Prompt.new(active_color: :cyan, interrupt: :exit)
|
84
|
+
end
|
85
|
+
# =========================================================
|
86
|
+
end
|
87
|
+
# =========================================================
|
88
|
+
end
|
89
|
+
end
|
data/lib/drakkon/lib/settings.rb
CHANGED
@@ -12,7 +12,7 @@ module Drakkon
|
|
12
12
|
|
13
13
|
# Helper to exit if project isn't ready for drakkon usage
|
14
14
|
def self.ready?
|
15
|
-
return if init?
|
15
|
+
return false if init?
|
16
16
|
|
17
17
|
LogBot.warn('Setup', "Drakkon not configured. Run #{'init'.pastel(:green)} first")
|
18
18
|
|
@@ -51,6 +51,14 @@ module Drakkon
|
|
51
51
|
config[:image_index]
|
52
52
|
end
|
53
53
|
|
54
|
+
def self.font_index?
|
55
|
+
config[:font_index]
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.bundle_compile?
|
59
|
+
config[:bundle_compile]
|
60
|
+
end
|
61
|
+
|
54
62
|
def self.manifest?
|
55
63
|
config[:manifest]
|
56
64
|
end
|
@@ -63,8 +71,10 @@ module Drakkon
|
|
63
71
|
# Defaults
|
64
72
|
@config[:platforms] ||= []
|
65
73
|
@config[:version] ||= Hub.version_latest
|
66
|
-
@config[:image_index]
|
67
|
-
@config[:manifest]
|
74
|
+
@config[:image_index] = true if @config[:image_index].nil?
|
75
|
+
@config[:manifest] = true if @config[:manifest].nil?
|
76
|
+
@config[:bundle_compile] = true if @config[:bundle_compile].nil?
|
77
|
+
@config[:font_index] = true if @config[:font_index].nil?
|
68
78
|
@config[:gems] ||= {}
|
69
79
|
end
|
70
80
|
|
@@ -74,7 +84,6 @@ module Drakkon
|
|
74
84
|
|
75
85
|
if @config.nil?
|
76
86
|
@config ||= JSON.parse(File.read(config_file), { symbolize_names: true })
|
77
|
-
# @config ||= Oj.load File.read(config_file)
|
78
87
|
config_defaults
|
79
88
|
end
|
80
89
|
|
@@ -94,7 +103,6 @@ module Drakkon
|
|
94
103
|
def self.write
|
95
104
|
# LogBot.debug('Settings', "Writing Config: #{config_file}")
|
96
105
|
File.write(config_file, JSON.pretty_generate(config))
|
97
|
-
# File.write(config_file, Oj.dump(config))
|
98
106
|
end
|
99
107
|
|
100
108
|
def self.menu
|
@@ -102,7 +110,9 @@ module Drakkon
|
|
102
110
|
menu.choice name: 'platforms', value: :platforms
|
103
111
|
menu.choice name: 'version', value: :version
|
104
112
|
menu.choice name: 'image_index', value: :image_index
|
113
|
+
menu.choice name: 'font_index', value: :font_index
|
105
114
|
menu.choice name: 'manifest', value: :manifest
|
115
|
+
menu.choice name: 'bundle_compile', value: :bundle_compile
|
106
116
|
menu.choice name: 'exit', value: :exit
|
107
117
|
end
|
108
118
|
rescue TTY::Reader::InputInterrupt
|
@@ -119,6 +129,11 @@ module Drakkon
|
|
119
129
|
Settings.update(:image_index, prompt.yes?("Index Images? (Enabled: #{image_index?})"))
|
120
130
|
when :manifest
|
121
131
|
Settings.update(:image_index, prompt.yes?("Write Manifest? (Enabled: #{manifest?})"))
|
132
|
+
when :bundle_compile
|
133
|
+
Settings.update(:bundle_compile,
|
134
|
+
prompt.yes?("Create Bundle / Compile Gems? (Enabled: #{config[:bundle_compile]})"))
|
135
|
+
when :font_index
|
136
|
+
Settings.update(:font_index, prompt.yes?("Index Fonts? (Enabled: #{config[:font_index]})"))
|
122
137
|
when :exit
|
123
138
|
exit 0
|
124
139
|
end
|
data/lib/drakkon/release.rb
CHANGED
data/lib/drakkon/run/helpers.rb
CHANGED
data/lib/drakkon/run/tty.rb
CHANGED
data/lib/drakkon/run.rb
CHANGED
@@ -49,7 +49,7 @@ module Drakkon
|
|
49
49
|
# Watch for Updates
|
50
50
|
# ======================================
|
51
51
|
# Force the bundle
|
52
|
-
files = Gems::Bundle.collect.values.flatten
|
52
|
+
files = Gems::Bundle.collect.values.flatten.map(&:path)
|
53
53
|
files.push "#{Run.context}/sprites/" if Settings.image_index?
|
54
54
|
|
55
55
|
Filewatcher.new(files, every: true).watch do |changes|
|
@@ -62,6 +62,7 @@ module Drakkon
|
|
62
62
|
def self.run_setup
|
63
63
|
Images::Index.run!(force: force_images?) if Settings.image_index?
|
64
64
|
Manifest.run!(force: force_manifest?) if Settings.manifest?
|
65
|
+
Fonts::Index.run!(force: force_fonts?) if Settings.font_index?
|
65
66
|
Gems::Bundle.build!(args, @context)
|
66
67
|
end
|
67
68
|
|
data/lib/drakkon/web.rb
CHANGED
@@ -29,40 +29,3 @@ module Drakkon
|
|
29
29
|
end
|
30
30
|
# ==========================================================================
|
31
31
|
end
|
32
|
-
|
33
|
-
# set :port, 4567
|
34
|
-
# set :bind, '0.0.0.0'
|
35
|
-
# set :server, :puma
|
36
|
-
# set :show_exceptions, false
|
37
|
-
# disable :logging # Duplicate Log Entries
|
38
|
-
# set :dump_errors, false # Duplicate Eception Dumping
|
39
|
-
|
40
|
-
# use Rack::CommonLogger
|
41
|
-
|
42
|
-
module Drakkon
|
43
|
-
module Web
|
44
|
-
# WebApp
|
45
|
-
class Runny < Sinatra::Base
|
46
|
-
configure do
|
47
|
-
set :public_folder, Dir.pwd
|
48
|
-
end
|
49
|
-
|
50
|
-
# I hate you Cors
|
51
|
-
enable :cross_origin
|
52
|
-
before do
|
53
|
-
response.headers['Access-Control-Allow-Origin'] = '*'
|
54
|
-
response.headers['Access-Control-Allow-Headers'] = '*'
|
55
|
-
response.headers['Access-Control-Allow-Methods'] = 'GET,PUT,POST,PATCH,DELETE,OPTIONS'
|
56
|
-
|
57
|
-
response.headers['Cross-Origin-Opener-Policy'] = 'same-origin'
|
58
|
-
response.headers['Cross-Origin-Embedder-Policy'] = 'require-corp'
|
59
|
-
end
|
60
|
-
|
61
|
-
get '/' do
|
62
|
-
File.read(File.join(settings.public_folder, 'index.html'))
|
63
|
-
end
|
64
|
-
# ========================================================================
|
65
|
-
end
|
66
|
-
# ==========================================================================
|
67
|
-
end
|
68
|
-
end
|
data/lib/drakkon.rb
CHANGED
@@ -13,8 +13,8 @@ require 'tty-pager'
|
|
13
13
|
# Templates
|
14
14
|
require 'erb'
|
15
15
|
|
16
|
-
# Parsing
|
17
|
-
require 'oj'
|
16
|
+
# Parsing || Move to vanilla JSON for simplification
|
17
|
+
# require 'oj'
|
18
18
|
|
19
19
|
# Image Handling
|
20
20
|
require 'mini_magick'
|
@@ -34,9 +34,6 @@ require 'sinatra/base'
|
|
34
34
|
# Load All Sub Directories / Order Matters
|
35
35
|
require_all "#{File.dirname(__FILE__)}/drakkon"
|
36
36
|
|
37
|
-
# Oj Settings
|
38
|
-
Oj.default_options = { symbol_keys: true, mode: :compat }
|
39
|
-
|
40
37
|
# HashDot Instead of Struct
|
41
38
|
require 'hash_dot'
|
42
39
|
Hash.use_dot_syntax = true
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drakkon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davin Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: faker
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: filewatcher
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +52,6 @@ dependencies:
|
|
66
52
|
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: oj
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
56
|
name: pry
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +94,6 @@ dependencies:
|
|
122
94
|
- - ">="
|
123
95
|
- !ruby/object:Gem::Version
|
124
96
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: sinatra
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
97
|
- !ruby/object:Gem::Dependency
|
140
98
|
name: tty-option
|
141
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,6 +196,7 @@ files:
|
|
238
196
|
- lib/drakkon/lib/images/cli.rb
|
239
197
|
- lib/drakkon/lib/images/desaturate.rb
|
240
198
|
- lib/drakkon/lib/images/flip_flop.rb
|
199
|
+
- lib/drakkon/lib/images/fonts.rb
|
241
200
|
- lib/drakkon/lib/images/gif.rb
|
242
201
|
- lib/drakkon/lib/images/index.rb
|
243
202
|
- lib/drakkon/lib/images/list.rb
|
@@ -250,6 +209,7 @@ files:
|
|
250
209
|
- lib/drakkon/lib/images/shift.rb
|
251
210
|
- lib/drakkon/lib/images/split.rb
|
252
211
|
- lib/drakkon/lib/images/spritesheet.rb
|
212
|
+
- lib/drakkon/lib/images/text.rb
|
253
213
|
- lib/drakkon/lib/images/trim.rb
|
254
214
|
- lib/drakkon/lib/images/white.rb
|
255
215
|
- lib/drakkon/lib/logbot.rb
|