drakkon 0.0.7 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/drakkon/build.rb +61 -4
  3. data/lib/drakkon/cli.rb +3 -1
  4. data/lib/drakkon/gem/bundle.rb +86 -17
  5. data/lib/drakkon/gem/cli.rb +2 -0
  6. data/lib/drakkon/gem/helpers/modules.rb +5 -0
  7. data/lib/drakkon/init.rb +23 -15
  8. data/lib/drakkon/lib/fonts/fonts.rb +88 -0
  9. data/lib/drakkon/lib/hub.rb +4 -3
  10. data/lib/drakkon/lib/images/biggest.rb +8 -6
  11. data/lib/drakkon/lib/images/bulk_rename.rb +1 -13
  12. data/lib/drakkon/lib/images/cli.rb +35 -19
  13. data/lib/drakkon/lib/images/compress.rb +60 -0
  14. data/lib/drakkon/lib/images/double.rb +77 -0
  15. data/lib/drakkon/lib/images/downcase_normalize.rb +70 -0
  16. data/lib/drakkon/lib/images/hue_modulation.rb +71 -0
  17. data/lib/drakkon/lib/images/index.rb +43 -20
  18. data/lib/drakkon/lib/images/layers.rb +55 -0
  19. data/lib/drakkon/lib/images/resize.rb +3 -2
  20. data/lib/drakkon/lib/images/split.rb +4 -4
  21. data/lib/drakkon/lib/images/spritesheet.rb +52 -13
  22. data/lib/drakkon/lib/images/text.rb +4 -1
  23. data/lib/drakkon/lib/images/trim.rb +7 -6
  24. data/lib/drakkon/lib/manifest.rb +24 -16
  25. data/lib/drakkon/lib/pastel.rb +1 -1
  26. data/lib/drakkon/lib/platform_compat.rb +27 -0
  27. data/lib/drakkon/lib/settings.rb +68 -5
  28. data/lib/drakkon/lib/sounds/sounds.rb +126 -0
  29. data/lib/drakkon/lib/utils/cli.rb +38 -0
  30. data/lib/drakkon/lib/utils/rename_normalize.rb +75 -0
  31. data/lib/drakkon/lib/version.rb +17 -2
  32. data/lib/drakkon/release.rb +1 -1
  33. data/lib/drakkon/run/commands/utils.rb +14 -0
  34. data/lib/drakkon/run/helpers.rb +15 -4
  35. data/lib/drakkon/run/reader_shim.rb +9 -5
  36. data/lib/drakkon/run/tty.rb +1 -1
  37. data/lib/drakkon/run.rb +6 -2
  38. data/lib/drakkon/skeleton/deploy.rb +4 -1
  39. data/lib/drakkon/web.rb +16 -44
  40. data/lib/drakkon.rb +10 -7
  41. metadata +32 -35
data/lib/drakkon/web.rb CHANGED
@@ -3,66 +3,38 @@ module Drakkon
3
3
  module Web
4
4
  # Free running
5
5
  def self.run!(_args = [])
6
- # Web::Runny.run!
7
-
8
6
  # Save Current Directory before changing to Version Directory
9
7
  @context = Dir.pwd
10
8
 
11
9
  # Yes... Run.run!
12
10
  Dir.chdir(Run.version_dir) do
13
- system run_cmd
11
+ runtime
12
+ output
14
13
  end
14
+ rescue SystemExit, Interrupt
15
+ LogBot.info('Web', 'Exiting')
16
+ exit 0
15
17
  end
16
18
 
17
- def self.runtime
18
- @dragonruby = IO.popen(run_cmd)
19
+ # Send output to console
20
+ def self.output
21
+ loop do
22
+ next unless @dragonruby.ready?
23
+
24
+ puts @dragonruby.readline
25
+ end
26
+ end
19
27
 
20
- # @dragonruby = Process.spawn run_cmd
28
+ def self.runtime
29
+ @dragonruby = IO.popen(Run.run_env, run_cmd)
21
30
  end
22
31
 
23
32
  # Exec skips the weird shell stuff
24
33
  def self.run_cmd
25
- "PATH=#{Run.version_dir}:$PATH exec dragonruby-httpd #{@context} 8000"
34
+ ['./dragonruby-httpd', @context, '8000']
26
35
  end
27
36
 
28
37
  # ==========================================================================
29
38
  end
30
39
  # ==========================================================================
31
40
  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'
@@ -28,15 +28,18 @@ require 'filewatcher'
28
28
  # Dev
29
29
  require 'pry'
30
30
 
31
- # Web
32
- require 'sinatra/base'
31
+ # Install handling
32
+ require 'zip'
33
+
34
+ # Audio
35
+ require 'wahwah'
36
+
37
+ # Require this first
38
+ require_relative 'drakkon/lib/platform_compat'
33
39
 
34
40
  # Load All Sub Directories / Order Matters
35
41
  require_all "#{File.dirname(__FILE__)}/drakkon"
36
42
 
37
- # Oj Settings
38
- Oj.default_options = { symbol_keys: true, mode: :compat }
39
-
40
43
  # HashDot Instead of Struct
41
44
  require 'hash_dot'
42
45
  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.7
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davin Walker
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-15 00:00:00.000000000 Z
11
+ date: 2024-09-04 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
@@ -109,7 +81,7 @@ dependencies:
109
81
  - !ruby/object:Gem::Version
110
82
  version: '3.0'
111
83
  - !ruby/object:Gem::Dependency
112
- name: semantic
84
+ name: rubyzip
113
85
  requirement: !ruby/object:Gem::Requirement
114
86
  requirements:
115
87
  - - ">="
@@ -123,7 +95,7 @@ dependencies:
123
95
  - !ruby/object:Gem::Version
124
96
  version: '0'
125
97
  - !ruby/object:Gem::Dependency
126
- name: sinatra
98
+ name: semantic
127
99
  requirement: !ruby/object:Gem::Requirement
128
100
  requirements:
129
101
  - - ">="
@@ -206,6 +178,20 @@ dependencies:
206
178
  - - ">="
207
179
  - !ruby/object:Gem::Version
208
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: wahwah
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
209
195
  description: DragonRuby Helpers
210
196
  email:
211
197
  - dishcandanty@gmail.com
@@ -230,16 +216,22 @@ files:
230
216
  - lib/drakkon/gem/helpers/source.rb
231
217
  - lib/drakkon/gem/install.rb
232
218
  - lib/drakkon/init.rb
219
+ - lib/drakkon/lib/fonts/fonts.rb
233
220
  - lib/drakkon/lib/hub.rb
234
221
  - lib/drakkon/lib/images/biggest.rb
235
222
  - lib/drakkon/lib/images/blur.rb
236
223
  - lib/drakkon/lib/images/bulk_rename.rb
237
224
  - lib/drakkon/lib/images/canvas.rb
238
225
  - lib/drakkon/lib/images/cli.rb
226
+ - lib/drakkon/lib/images/compress.rb
239
227
  - lib/drakkon/lib/images/desaturate.rb
228
+ - lib/drakkon/lib/images/double.rb
229
+ - lib/drakkon/lib/images/downcase_normalize.rb
240
230
  - lib/drakkon/lib/images/flip_flop.rb
241
231
  - lib/drakkon/lib/images/gif.rb
232
+ - lib/drakkon/lib/images/hue_modulation.rb
242
233
  - lib/drakkon/lib/images/index.rb
234
+ - lib/drakkon/lib/images/layers.rb
243
235
  - lib/drakkon/lib/images/list.rb
244
236
  - lib/drakkon/lib/images/modulate.rb
245
237
  - lib/drakkon/lib/images/resize.rb
@@ -256,14 +248,19 @@ files:
256
248
  - lib/drakkon/lib/logbot.rb
257
249
  - lib/drakkon/lib/manifest.rb
258
250
  - lib/drakkon/lib/pastel.rb
251
+ - lib/drakkon/lib/platform_compat.rb
259
252
  - lib/drakkon/lib/settings.rb
260
253
  - lib/drakkon/lib/shims.rb
254
+ - lib/drakkon/lib/sounds/sounds.rb
255
+ - lib/drakkon/lib/utils/cli.rb
256
+ - lib/drakkon/lib/utils/rename_normalize.rb
261
257
  - lib/drakkon/lib/version.rb
262
258
  - lib/drakkon/release.rb
263
259
  - lib/drakkon/run.rb
264
260
  - lib/drakkon/run/commands/images.rb
265
261
  - lib/drakkon/run/commands/log.rb
266
262
  - lib/drakkon/run/commands/restart.rb
263
+ - lib/drakkon/run/commands/utils.rb
267
264
  - lib/drakkon/run/helpers.rb
268
265
  - lib/drakkon/run/reader_shim.rb
269
266
  - lib/drakkon/run/tty.rb
@@ -281,7 +278,7 @@ licenses:
281
278
  - MIT
282
279
  metadata:
283
280
  rubygems_mfa_required: 'true'
284
- post_install_message:
281
+ post_install_message:
285
282
  rdoc_options: []
286
283
  require_paths:
287
284
  - lib
@@ -297,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
294
  version: '0'
298
295
  requirements: []
299
296
  rubygems_version: 3.3.26
300
- signing_key:
297
+ signing_key:
301
298
  specification_version: 4
302
299
  summary: DragonRuby Helpers
303
300
  test_files: []