atome 0.5.5.7.5 → 0.5.5.7.7
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/atome.gemspec +1 -1
- data/exe/atome +102 -39
- data/lib/atome/genesis/generators/atome.rb +0 -1
- data/lib/atome/version.rb +1 -1
- data/vendor/assets/application/examples/atome.rb +3 -5
- data/vendor/assets/application/examples/atome_sparkle_use.rb +6 -0
- data/vendor/assets/application/examples/display.rb +1 -1
- data/vendor/assets/application/examples/display_bck.rb +1 -1
- data/vendor/assets/application/examples/generator_and_build.rb +1 -1
- data/vendor/assets/application/examples/www.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a47df79a8df1efe611c135f99a343afefe4e76b8a23bec82385f6f4a95890b4
|
|
4
|
+
data.tar.gz: b1315627fd2df81fbc1bb45d19bbc1d6d8a25c8b49e13ab409bc5d0a5b565456
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 809b5491aa72a6f62ac9c4765bc4ed7f6910f444ee1447e2ce394c6f1217c72ad1e15f39fd5e0f07c13ca0706acca5e7c66a4fb573c8418d54eef532342ffd3b
|
|
7
|
+
data.tar.gz: 3df3f9ab29f3d5775fc16d4372cc65f8c9b902771958806eedb7f5fbf05706e5042771248083b6b97a3476eb27055346510a7c3c0772c60e68740ab88bf9ef47
|
data/atome.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.description = 'the creative framework.'
|
|
13
13
|
spec.homepage = 'https://atome.one'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
|
-
spec.required_ruby_version = '>= 3.
|
|
15
|
+
spec.required_ruby_version = '>= 3.1'
|
|
16
16
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
17
17
|
|
|
18
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
data/exe/atome
CHANGED
|
@@ -201,7 +201,6 @@ def update_application(source, destination, project_name)
|
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
def build_opal_parser(source, destination, project_name)
|
|
204
|
-
|
|
205
204
|
parser_js = "#{destination}/#{project_name}/src/js/opal/opal_parser.js"
|
|
206
205
|
File.new parser_js, 'w'
|
|
207
206
|
parser_content = Opal::Builder.build("#{source}/lib/platform_specific/opal/opal_parser.rb").to_s
|
|
@@ -333,13 +332,6 @@ def wasm_initialize (source, destination, project_name, wasi_source)
|
|
|
333
332
|
system(command)
|
|
334
333
|
end
|
|
335
334
|
|
|
336
|
-
# def guard_check
|
|
337
|
-
# # loop do
|
|
338
|
-
# # sleep 1
|
|
339
|
-
# # end
|
|
340
|
-
# nil unless ARGV.include?('guard')
|
|
341
|
-
# end
|
|
342
|
-
|
|
343
335
|
def build_for_wasm(source, destination, project_name, wasi_file)
|
|
344
336
|
wasm_initialize(source, destination, project_name, wasi_file)
|
|
345
337
|
end
|
|
@@ -400,10 +392,39 @@ STR
|
|
|
400
392
|
|
|
401
393
|
end
|
|
402
394
|
|
|
403
|
-
#
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
395
|
+
# utils
|
|
396
|
+
def ensure_rb_extension(filename)
|
|
397
|
+
filename.end_with?('.rb') ? filename : "#{filename}.rb"
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
def find_requires(file)
|
|
401
|
+
requires = []
|
|
402
|
+
File.foreach(file) do |line|
|
|
403
|
+
trimmed_line = line.strip
|
|
404
|
+
if trimmed_line.start_with?('require ') || trimmed_line.start_with?('require_relative ')
|
|
405
|
+
match = trimmed_line.match(/['"]([^'"]+)['"]/)
|
|
406
|
+
if match
|
|
407
|
+
path = match[1].end_with?('.rb') ? match[1][0...-3] : match[1]
|
|
408
|
+
requires << path
|
|
409
|
+
end
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
requires
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
def copy_file(source, destination)
|
|
416
|
+
FileUtils.mkdir_p(File.dirname(destination))
|
|
417
|
+
FileUtils.cp(source, destination)
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
def copy_with_requires(source, destination, base_folder)
|
|
421
|
+
destination_file = File.join(destination, source.sub(base_folder + '/', ''))
|
|
422
|
+
copy_file(source, destination_file)
|
|
423
|
+
find_requires(source).each do |relative_path|
|
|
424
|
+
required_file = File.join(base_folder, "#{relative_path}.rb")
|
|
425
|
+
copy_with_requires(required_file, destination, base_folder) if File.exist?(required_file)
|
|
426
|
+
end
|
|
427
|
+
end
|
|
407
428
|
|
|
408
429
|
# below we analyse the ARGV
|
|
409
430
|
location = if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
|
@@ -470,6 +491,20 @@ src/favicon.ico src/index.html src/index_opal.html src/index_server.html src/ind
|
|
|
470
491
|
source_item = "#{source}/vendor/assets/#{item}"
|
|
471
492
|
FileUtils.cp_r(source_item, item)
|
|
472
493
|
end
|
|
494
|
+
# now rebuilding aop lib
|
|
495
|
+
# build opal
|
|
496
|
+
build_opal_library(source, destination, project_name)
|
|
497
|
+
# build parser
|
|
498
|
+
build_opal_parser(source, destination, project_name)
|
|
499
|
+
# build atome kernel
|
|
500
|
+
build_atome_kernel_for_opal(source, destination, project_name)
|
|
501
|
+
# build host_mode
|
|
502
|
+
build_host_mode(destination, project_name, 'web-opal')
|
|
503
|
+
# build Opal extensions
|
|
504
|
+
build_opal_extensions(source, destination, project_name)
|
|
505
|
+
# build application
|
|
506
|
+
build_opal_application(source, destination, project_name)
|
|
507
|
+
|
|
473
508
|
end
|
|
474
509
|
|
|
475
510
|
current_path = Pathname.new(Dir.pwd)
|
|
@@ -477,7 +512,6 @@ project_name = current_path.basename.to_s
|
|
|
477
512
|
destination = current_path.parent.to_s
|
|
478
513
|
|
|
479
514
|
if ARGV.include?('run')
|
|
480
|
-
guard_content = ''
|
|
481
515
|
case ARGV[1]
|
|
482
516
|
when 'opal'
|
|
483
517
|
guard_content = <<STR
|
|
@@ -486,6 +520,14 @@ guard 'rake', first_match: true, :task => 'build_opal' do
|
|
|
486
520
|
watch(%r{^application.+\.rb})
|
|
487
521
|
end
|
|
488
522
|
STR
|
|
523
|
+
|
|
524
|
+
File.open("./#{location}/Guardfile", "w") do |f|
|
|
525
|
+
f.write(guard_content)
|
|
526
|
+
end
|
|
527
|
+
puts 'guarding'
|
|
528
|
+
Dir.chdir("./#{location}") do
|
|
529
|
+
`guard`
|
|
530
|
+
end
|
|
489
531
|
when 'wasm' # osx wasi
|
|
490
532
|
guard_content = <<STR
|
|
491
533
|
guard 'rake', first_match: true, :task => 'build_wasm' do
|
|
@@ -493,6 +535,14 @@ guard 'rake', first_match: true, :task => 'build_wasm' do
|
|
|
493
535
|
watch(%r{^application.+\.rb})
|
|
494
536
|
end
|
|
495
537
|
STR
|
|
538
|
+
|
|
539
|
+
File.open("./#{location}/Guardfile", "w") do |f|
|
|
540
|
+
f.write(guard_content)
|
|
541
|
+
end
|
|
542
|
+
puts 'guarding'
|
|
543
|
+
Dir.chdir("./#{location}") do
|
|
544
|
+
`guard`
|
|
545
|
+
end
|
|
496
546
|
when 'server'
|
|
497
547
|
guard_content = <<STR
|
|
498
548
|
guard 'rake', first_match: true, :task => 'build_server' do
|
|
@@ -501,8 +551,18 @@ guard 'rake', first_match: true, :task => 'build_server' do
|
|
|
501
551
|
end
|
|
502
552
|
|
|
503
553
|
STR
|
|
504
|
-
when 'osx'
|
|
505
554
|
|
|
555
|
+
File.open("./#{location}/Guardfile", "w") do |f|
|
|
556
|
+
f.write(guard_content)
|
|
557
|
+
end
|
|
558
|
+
puts 'guarding'
|
|
559
|
+
threads = []
|
|
560
|
+
Dir.chdir("./#{location}") do
|
|
561
|
+
threads << Thread.new do
|
|
562
|
+
`guard`
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
when 'osx'
|
|
506
566
|
when 'android'
|
|
507
567
|
# to be filled
|
|
508
568
|
when 'ios'
|
|
@@ -515,17 +575,6 @@ STR
|
|
|
515
575
|
# to be filled
|
|
516
576
|
end
|
|
517
577
|
|
|
518
|
-
File.open("./#{location}/Guardfile", "w") do |f|
|
|
519
|
-
f.write(guard_content)
|
|
520
|
-
end
|
|
521
|
-
puts 'guarding'
|
|
522
|
-
threads = []
|
|
523
|
-
Dir.chdir("./#{location}") do
|
|
524
|
-
threads << Thread.new do
|
|
525
|
-
`guard`
|
|
526
|
-
end
|
|
527
|
-
end
|
|
528
|
-
|
|
529
578
|
end
|
|
530
579
|
|
|
531
580
|
if ARGV.include?('opal')
|
|
@@ -570,6 +619,7 @@ end
|
|
|
570
619
|
if ARGV.include?('server')
|
|
571
620
|
puts 'building Server'
|
|
572
621
|
build_opal_application(nil, destination, project_name)
|
|
622
|
+
build_host_mode(destination, project_name, 'web-opal')
|
|
573
623
|
threads = []
|
|
574
624
|
threads << Thread.new do
|
|
575
625
|
sleep 1
|
|
@@ -613,21 +663,34 @@ if ARGV.include?('osx')
|
|
|
613
663
|
build_for_osx(destination)
|
|
614
664
|
end
|
|
615
665
|
|
|
616
|
-
if ARGV.include?('android')
|
|
617
|
-
puts 'building Android'
|
|
618
|
-
end
|
|
666
|
+
puts 'building Android' if ARGV.include?('android')
|
|
619
667
|
|
|
620
|
-
if ARGV.include?('ios')
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
if ARGV.include?('
|
|
624
|
-
puts 'building Windows'
|
|
668
|
+
puts 'building iOS' if ARGV.include?('ios')
|
|
669
|
+
puts 'building Windows' if ARGV.include?('windows')
|
|
670
|
+
puts 'building Linux' if ARGV.include?('linux')
|
|
671
|
+
puts 'building Freebsd' if ARGV.include?('freebsd')
|
|
625
672
|
|
|
626
|
-
|
|
627
|
-
if
|
|
628
|
-
|
|
673
|
+
if ARGV.include?('sparkle')
|
|
674
|
+
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
|
675
|
+
temp_dir = 'C:\Windows\Temp'
|
|
676
|
+
# code to exec with Windows
|
|
677
|
+
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
|
678
|
+
temp_dir = '/tmp'
|
|
679
|
+
# code to exec with MacOS
|
|
680
|
+
else
|
|
681
|
+
temp_dir = '/tmp'
|
|
682
|
+
# code to exec with Unix/Linux
|
|
683
|
+
end
|
|
684
|
+
unless Dir.exist?("#{temp_dir}/atome_app")
|
|
685
|
+
# `cd #{temp_dir}; atome create atome_app;cd atome_app;atome run opal`
|
|
686
|
+
`cd #{temp_dir}; atome create atome_app`
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
project_name = ARGV[1]
|
|
690
|
+
project_name = ensure_rb_extension(project_name)
|
|
691
|
+
base_folder = File.dirname(project_name)
|
|
692
|
+
|
|
693
|
+
copy_with_requires(project_name, "#{temp_dir}/atome_app/application", base_folder)
|
|
694
|
+
`cd #{temp_dir}/atome_app;atome run opal`
|
|
629
695
|
|
|
630
|
-
end
|
|
631
|
-
if ARGV.include?('freebsd')
|
|
632
|
-
puts 'building Freebsd'
|
|
633
696
|
end
|
data/lib/atome/version.rb
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
Atome.new(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
Atome.new( { renderers: [:html], attach: :view,id: :my_test_box, type: :shape, apply: [:shape_color],
|
|
4
|
+
left: 120, top: 0, width: 100, smooth: 15, height: 100, overflow: :visible, attached: [], center: true
|
|
5
|
+
})
|
|
7
6
|
|
|
8
|
-
)
|
|
@@ -195,7 +195,7 @@ new ({ particle: :build, store: false }) do |params|
|
|
|
195
195
|
#
|
|
196
196
|
# now we'll created the wanted atomes
|
|
197
197
|
# here are the default params
|
|
198
|
-
default_styles = { type: :shape, renderers: [:html], width: 66, height: 66, color: :gray, left: 12, top: 12, copies: 0, attach:
|
|
198
|
+
default_styles = { type: :shape, renderers: [:html], width: 66, height: 66, color: :gray, left: 12, top: 12, copies: 0, attach: :view }
|
|
199
199
|
params = default_styles.merge(params)
|
|
200
200
|
color_found = color(params[:color])
|
|
201
201
|
left_pos = params[:left]
|
|
@@ -141,7 +141,7 @@ c.touch(true) do
|
|
|
141
141
|
end
|
|
142
142
|
############## Generator #############
|
|
143
143
|
gen = generator({ id: :genesis, build: { top: 66, copies: 1 } })
|
|
144
|
-
gen.build({ id: :bundler, copies: 32, tag: { group: :to_grid }, color: :red, width: 33, height: 44, left: 123, smooth: 9, blur: 3, attach:
|
|
144
|
+
gen.build({ id: :bundler, copies: 32, tag: { group: :to_grid }, color: :red, width: 33, height: 44, left: 123, smooth: 9, blur: 3, attach: :view })
|
|
145
145
|
grab(:bundler_1).color(:blue)
|
|
146
146
|
|
|
147
147
|
color({ id: :the_orange, red: 1, green: 0.4 })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
gen = generator({ id: :genesis, build: {top: 66, copies: 1} })
|
|
4
|
-
gen.build({ id: :bundler, copies: 32, color: :red, width: 33, height: 44, left: 123, smooth: 9, blur: 3, attach:
|
|
4
|
+
gen.build({ id: :bundler, copies: 32, color: :red, width: 33, height: 44, left: 123, smooth: 9, blur: 3, attach: :view })
|
|
5
5
|
grab(:bundler_1).color(:blue)
|
|
6
6
|
|
|
7
7
|
|
|
@@ -5,6 +5,6 @@ b = box
|
|
|
5
5
|
b.www({ path: "https://www.youtube.com/embed/usQDazZKWAk", left: 333 })
|
|
6
6
|
|
|
7
7
|
Atome.new(
|
|
8
|
-
renderers: [:html], id: :youtube1, type: :www, attach:
|
|
8
|
+
renderers: [:html], id: :youtube1, type: :www, attach: :view, path: "https://www.youtube.com/embed/fjJOyfQCMvc?si=lPTz18xXqIfd_3Ql", left: 33, top: 33, width: 199, height: 199,
|
|
9
9
|
|
|
10
10
|
)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atome
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.5.7.
|
|
4
|
+
version: 0.5.5.7.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean-Eric Godard
|
|
@@ -482,6 +482,7 @@ files:
|
|
|
482
482
|
- vendor/assets/application/examples/animation.rb
|
|
483
483
|
- vendor/assets/application/examples/apply.rb
|
|
484
484
|
- vendor/assets/application/examples/atome.rb
|
|
485
|
+
- vendor/assets/application/examples/atome_sparkle_use.rb
|
|
485
486
|
- vendor/assets/application/examples/attach.rb
|
|
486
487
|
- vendor/assets/application/examples/attached.rb
|
|
487
488
|
- vendor/assets/application/examples/basic_understanding.rb
|
|
@@ -724,7 +725,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
724
725
|
requirements:
|
|
725
726
|
- - ">="
|
|
726
727
|
- !ruby/object:Gem::Version
|
|
727
|
-
version: '3.
|
|
728
|
+
version: '3.1'
|
|
728
729
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
729
730
|
requirements:
|
|
730
731
|
- - ">="
|