atome 0.5.5.6.6 → 0.5.5.6.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/Rakefile +215 -151
- data/atome.gemspec +64 -0
- data/documentation/deep learning/basic_infos.txt +66 -2
- data/exe/atome +56 -32
- data/lib/atome/version.rb +1 -2
- data/vendor/assets/src/js/atome/atome.js +91 -90
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7aa3c214fe912034722449b518e98283ed26c7e019e9da115967f6d095523216
|
4
|
+
data.tar.gz: 47cd9aaaf658e5765967ee8b24897bb7ddde926b61d2c93975e7bac57e24e539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24ab3d48bf981172a88cd12d761bf1aac72e367fba8f45b8d4ee99b00a3d956c1d0bae9cd02ba8e1d26bb42558ef3b7878143e9c5b9e1aff51d96b5ceb044b3d
|
7
|
+
data.tar.gz: 420f83ab9e7a50d6abd527190d7423cd5caec49f42b60928512816c205469c07b8bd82dcd1f818f3adfa811922437af91d1f9b636efaf46396f76d57ce3adb9c
|
data/Rakefile
CHANGED
@@ -2,42 +2,66 @@
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'securerandom'
|
4
4
|
require 'digest/sha2'
|
5
|
+
require 'rubygems'
|
6
|
+
require 'rubygems/command_manager'
|
7
|
+
require 'rubygems/uninstaller'
|
5
8
|
require 'bundler/gem_tasks'
|
6
9
|
load 'exe/atome'
|
7
10
|
|
8
11
|
task :cleanup do
|
9
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
10
|
-
# Code à exécuter sous Windows
|
11
|
-
`gem cleanup atome`
|
12
|
-
`echo yes | gem uninstall atome`
|
13
|
-
`cd pkg`
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
manager = Gem::CommandManager.instance
|
14
|
+
cleanup_command = manager['cleanup']
|
15
|
+
|
16
|
+
begin
|
17
|
+
cleanup_command.invoke('atome')
|
18
|
+
rescue Gem::SystemExitException => e
|
19
|
+
puts "Erreur lors du nettoyage : #{e.message}"
|
21
20
|
end
|
22
21
|
|
22
|
+
begin
|
23
|
+
uninstaller = Gem::Uninstaller.new('atome', { executables: true, all: true, force: true })
|
24
|
+
uninstaller.uninstall
|
25
|
+
rescue Gem::InstallError => e
|
26
|
+
puts "Erreur lors de la désinstallation : #{e.message}"
|
27
|
+
end
|
23
28
|
|
24
|
-
|
25
|
-
|
29
|
+
Dir.chdir('pkg') do
|
30
|
+
# Effectuez vos opérations dans le dossier 'pkg'
|
31
|
+
end
|
26
32
|
|
27
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
28
|
-
|
29
|
-
`
|
30
|
-
|
33
|
+
# if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
34
|
+
# # code to exec for Windows
|
35
|
+
# `gem cleanup atome`
|
36
|
+
# `echo yes | gem uninstall atome`
|
37
|
+
# `cd pkg`
|
38
|
+
#
|
39
|
+
# elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
40
|
+
# # code to exec for MacOS
|
41
|
+
# `gem cleanup atome;yes | gem uninstall atome;cd pkg`
|
42
|
+
# else
|
43
|
+
# # code to exec for Unix/Linux
|
44
|
+
# `gem cleanup atome;yes | gem uninstall atome;cd pkg`
|
45
|
+
# end
|
31
46
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
47
|
+
end
|
48
|
+
task :reset_cache do
|
49
|
+
FileUtils.rm_rf('./tmp')
|
50
|
+
FileUtils.rm_rf('./pkg')
|
51
|
+
# if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
52
|
+
# # code to exec for Windows
|
53
|
+
# `rmdir /s /q .\\tmp`
|
54
|
+
# `rmdir /s /q .\\pkg`
|
55
|
+
#
|
56
|
+
# elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
57
|
+
# # code to exec for MacOS
|
58
|
+
# `rm -r -f ./tmp`
|
59
|
+
# `rm -r -f ./pkg`
|
60
|
+
# else
|
61
|
+
# # code to exec for Unix/Linux
|
62
|
+
# `rm -r -f ./tmp`
|
63
|
+
# `rm -r -f ./pkg`
|
64
|
+
# end
|
41
65
|
|
42
66
|
end
|
43
67
|
|
@@ -70,99 +94,122 @@ def generate_resolved_file(source_file_path)
|
|
70
94
|
resolve_requires(source_file_path, root_path)
|
71
95
|
end
|
72
96
|
|
73
|
-
|
74
|
-
project_name = :test
|
75
|
-
source = '.'
|
76
|
-
destination = './tmp'
|
77
|
-
script_source = './test/application'
|
78
|
-
wasi_file = 'wasi-vfs-osx_arm'
|
79
|
-
host_mode = 'pure_wasm'
|
97
|
+
def wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
|
80
98
|
create_application(source, destination, project_name)
|
81
99
|
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
|
82
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
83
|
-
# Code à exécuter sous Windows
|
84
|
-
`start "" ".\\tmp\\#{project_name}\\src\\index.html"`
|
85
|
-
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
86
|
-
# Code à exécuter sous MacOS
|
87
|
-
`open ./tmp/#{project_name}/src/index.html`
|
88
|
-
else
|
89
|
-
# Code à exécuter sous Unix/Linux
|
90
|
-
`open ./tmp/#{project_name}/src/index.html`
|
91
|
-
end
|
92
|
-
|
93
|
-
|
94
|
-
puts 'atome wasm is build and running!'
|
95
100
|
end
|
96
101
|
|
97
|
-
task :
|
98
|
-
# wasi Source here : https://github.com/kateinoigakukun/wasi-vfs/releases
|
102
|
+
task :test_wasm do
|
99
103
|
project_name = :test
|
100
104
|
source = '.'
|
101
|
-
|
102
|
-
script_source = './test/application'
|
103
|
-
wasi_file = 'wasi-vfs-osx_x86'
|
105
|
+
|
104
106
|
host_mode = 'pure_wasm'
|
105
|
-
create_application(source, destination, project_name)
|
106
|
-
wasm_common(source, destination, project_name, wasi_file, script_source, host_mode, script_source)
|
107
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
108
|
-
# Code à exécuter sous Windows
|
109
|
-
`start "" ".\\tmp\\#{project_name}\\src\\index.html"`
|
110
|
-
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
111
|
-
# Code à exécuter sous MacOS
|
112
|
-
`open ./tmp/#{project_name}/src/index.html`
|
113
|
-
else
|
114
|
-
# Code à exécuter sous Unix/Linux
|
115
|
-
`open ./tmp/#{project_name}/src/index.html`
|
116
|
-
end
|
117
107
|
|
108
|
+
file_path = "./tmp/#{project_name}/src/index.html"
|
118
109
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
destination = './tmp'
|
148
|
-
script_source = './test/application'
|
149
|
-
wasi_file = 'wasi-vfs-unix pack tmp'
|
150
|
-
host_mode = 'pure_wasm'
|
151
|
-
create_application(source, destination, project_name)
|
152
|
-
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
|
153
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
154
|
-
# Code à exécuter sous Windows
|
155
|
-
`start "" ".\\tmp\\#{project_name}\\src\\index.html"`
|
156
|
-
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
157
|
-
# Code à exécuter sous MacOS
|
158
|
-
`open ./tmp/#{project_name}/src/index.html`
|
110
|
+
case RbConfig::CONFIG['host_os']
|
111
|
+
when /darwin|mac os/
|
112
|
+
|
113
|
+
cpu_type = RbConfig::CONFIG['host_cpu']
|
114
|
+
wasi_file = if cpu_type.include?('arm') || cpu_type.include?('aarch64')
|
115
|
+
# Commande pour Mac ARM
|
116
|
+
'wasi-vfs-osx_arm'
|
117
|
+
else
|
118
|
+
# Commande pour Mac Intel x86
|
119
|
+
'wasi-vfs-osx_x86'
|
120
|
+
end
|
121
|
+
destination = './tmp'
|
122
|
+
script_source = './test/application'
|
123
|
+
|
124
|
+
wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
|
125
|
+
system "open", file_path
|
126
|
+
when /linux|bsd/
|
127
|
+
destination = './tmp'
|
128
|
+
script_source = './test/application'
|
129
|
+
wasi_file = 'wasi-vfs-unix pack tmp'
|
130
|
+
wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
|
131
|
+
system "xdg-open", file_path
|
132
|
+
when /mswin|mingw|cygwin/
|
133
|
+
destination = '.\\tmp'
|
134
|
+
script_source = '.\\test\\application'
|
135
|
+
wasi_file = 'wasi-vfs.exe pack'
|
136
|
+
wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
|
137
|
+
system "start", file_path
|
159
138
|
else
|
160
|
-
|
161
|
-
`open ./tmp/#{project_name}/src/index.html`
|
139
|
+
raise "Système d'exploitation non reconnu"
|
162
140
|
end
|
141
|
+
|
163
142
|
puts 'atome wasm is build and running!'
|
164
143
|
end
|
165
144
|
|
145
|
+
# task :test_wasm_osx_x86 do
|
146
|
+
# # wasi Source here : https://github.com/kateinoigakukun/wasi-vfs/releases
|
147
|
+
# project_name = :test
|
148
|
+
# source = '.'
|
149
|
+
# destination = './tmp'
|
150
|
+
# script_source = './test/application'
|
151
|
+
# wasi_file = 'wasi-vfs-osx_x86'
|
152
|
+
# host_mode = 'pure_wasm'
|
153
|
+
# create_application(source, destination, project_name)
|
154
|
+
# wasm_common(source, destination, project_name, wasi_file, script_source, host_mode, script_source)
|
155
|
+
# if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
156
|
+
# # code to exec for Windows
|
157
|
+
# `start "" ".\\tmp\\#{project_name}\\src\\index.html"`
|
158
|
+
# elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
159
|
+
# # code to exec for MacOS
|
160
|
+
# `open ./tmp/#{project_name}/src/index.html`
|
161
|
+
# else
|
162
|
+
# # code to exec for Unix/Linux
|
163
|
+
# `open ./tmp/#{project_name}/src/index.html`
|
164
|
+
# end
|
165
|
+
#
|
166
|
+
# puts 'atome wasm is build and running!'
|
167
|
+
# end
|
168
|
+
# task :test_wasm_windows do
|
169
|
+
# # wasi Source here : https://github.com/kateinoigakukun/wasi-vfs/releases
|
170
|
+
# project_name = :test
|
171
|
+
# source = '.'
|
172
|
+
# destination = './tmp'
|
173
|
+
# script_source = './test/application'
|
174
|
+
# wasi_file = 'wasi-vfs.exe pack'
|
175
|
+
# host_mode = 'pure_wasm'
|
176
|
+
# create_application(source, destination, project_name)
|
177
|
+
# wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
|
178
|
+
# if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
179
|
+
# # code to exec for Windows
|
180
|
+
# `start "" ".\\tmp\\#{project_name}\\src\\index.html"`
|
181
|
+
# elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
182
|
+
# # code to exec for MacOS
|
183
|
+
# `open ./tmp/#{project_name}/src/index.html`
|
184
|
+
# else
|
185
|
+
# # code to exec for Unix/Linux
|
186
|
+
# `open ./tmp/#{project_name}/src/index.html`
|
187
|
+
# end
|
188
|
+
# puts 'atome wasm is build and running!'
|
189
|
+
# end
|
190
|
+
# task :test_wasm_unix do
|
191
|
+
# # wasi Source here : https://github.com/kateinoigakukun/wasi-vfs/releases
|
192
|
+
# project_name = :test
|
193
|
+
# source = '.'
|
194
|
+
# destination = './tmp'
|
195
|
+
# script_source = './test/application'
|
196
|
+
# wasi_file = 'wasi-vfs-unix pack tmp'
|
197
|
+
# host_mode = 'pure_wasm'
|
198
|
+
# create_application(source, destination, project_name)
|
199
|
+
# wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
|
200
|
+
# if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
201
|
+
# # code to exec for Windows
|
202
|
+
# `start "" ".\\tmp\\#{project_name}\\src\\index.html"`
|
203
|
+
# elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
204
|
+
# # code to exec for MacOS
|
205
|
+
# `open ./tmp/#{project_name}/src/index.html`
|
206
|
+
# else
|
207
|
+
# # code to exec for Unix/Linux
|
208
|
+
# `open ./tmp/#{project_name}/src/index.html`
|
209
|
+
# end
|
210
|
+
# puts 'atome wasm is build and running!'
|
211
|
+
# end
|
212
|
+
|
166
213
|
task :test_opal do
|
167
214
|
project_name = :test
|
168
215
|
source = '.'
|
@@ -185,13 +232,13 @@ task :test_opal do
|
|
185
232
|
build_opal_application(source, destination, project_name)
|
186
233
|
# open the app
|
187
234
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
188
|
-
#
|
235
|
+
# code to exec for Windows
|
189
236
|
`start "" "#{destination}\\#{project_name}\\src\\index_opal.html"`
|
190
237
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
191
|
-
#
|
238
|
+
# code to exec for MacOS
|
192
239
|
`open #{destination}/#{project_name}/src/index_opal.html`
|
193
240
|
else
|
194
|
-
#
|
241
|
+
# code to exec for Unix/Linux
|
195
242
|
`open #{destination}/#{project_name}/src/index_opal.html`
|
196
243
|
end
|
197
244
|
|
@@ -237,13 +284,13 @@ task :test_server do
|
|
237
284
|
sleep 1
|
238
285
|
|
239
286
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
240
|
-
#
|
287
|
+
# code to exec for Windows
|
241
288
|
`start "" "http://localhost:9292"`
|
242
289
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
243
|
-
#
|
290
|
+
# code to exec for MacOS
|
244
291
|
`open http://localhost:9292`
|
245
292
|
else
|
246
|
-
#
|
293
|
+
# code to exec for Unix/Linux
|
247
294
|
`open http://localhost:9292`
|
248
295
|
end
|
249
296
|
|
@@ -296,68 +343,85 @@ end
|
|
296
343
|
|
297
344
|
task :osx_server do
|
298
345
|
project_name = :test
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
project_name = :test
|
320
|
-
source = '.'
|
321
|
-
destination = './tmp'
|
322
|
-
script_source = './test/application'
|
323
|
-
wasi_file = 'wasi-vfs-osx_arm'
|
324
|
-
host_mode = 'tauri'
|
325
|
-
create_application(source, destination, project_name)
|
326
|
-
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
|
327
|
-
destination = './tmp'
|
328
|
-
threads = []
|
329
|
-
threads << Thread.new do
|
330
|
-
build_for_server(destination, project_name, 9292, :production)
|
331
|
-
end
|
332
|
-
build_for_osx(destination)
|
346
|
+
source = '.'
|
347
|
+
destination = './tmp'
|
348
|
+
script_source = './test/application'
|
349
|
+
create_application(source, destination, project_name)
|
350
|
+
# the line below is to add addition script to the application folder (useful for test per example)
|
351
|
+
add_to_application_folder(script_source, destination, project_name)
|
352
|
+
# build opal
|
353
|
+
build_opal_library(source, destination, project_name)
|
354
|
+
# build parser
|
355
|
+
build_opal_parser(source, destination, project_name)
|
356
|
+
# build atome kernel
|
357
|
+
build_atome_kernel_for_opal(source, destination, project_name)
|
358
|
+
# build host_mode
|
359
|
+
build_host_mode(destination, project_name, 'puma-roda')
|
360
|
+
# build Opal extensions
|
361
|
+
build_opal_extensions(source, destination, project_name)
|
362
|
+
# build application
|
363
|
+
build_opal_application(source, destination, project_name)
|
364
|
+
# build and open the app
|
333
365
|
|
366
|
+
project_name = :test
|
367
|
+
source = '.'
|
368
|
+
destination = './tmp'
|
369
|
+
script_source = './test/application'
|
370
|
+
wasi_file = 'wasi-vfs-osx_arm'
|
371
|
+
host_mode = 'tauri'
|
372
|
+
create_application(source, destination, project_name)
|
373
|
+
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
|
374
|
+
destination = './tmp'
|
375
|
+
threads = []
|
376
|
+
threads << Thread.new do
|
377
|
+
build_for_server(destination, project_name, 9292, :production)
|
378
|
+
end
|
379
|
+
build_for_osx(destination)
|
334
380
|
|
335
|
-
|
381
|
+
puts 'atome osx is running'
|
336
382
|
|
337
383
|
end
|
338
384
|
|
339
|
-
|
340
385
|
task :build_gem do
|
341
386
|
# building the gem
|
342
387
|
`rake build` # run build_app thru ARGV in exe atome
|
343
388
|
# installing the gem
|
344
389
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
345
|
-
#
|
390
|
+
# code to exec for Windows
|
346
391
|
`cd pkg && gem install atome --local`
|
347
392
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
348
|
-
#
|
393
|
+
# code to exec for MacOS
|
349
394
|
`cd pkg; gem install atome --local`
|
350
395
|
# open the app
|
351
396
|
else
|
352
|
-
#
|
397
|
+
# code to exec for Unix/Linux
|
353
398
|
`cd pkg; gem install atome --local`
|
354
399
|
# open the app
|
355
400
|
end
|
356
401
|
|
357
|
-
|
358
402
|
puts 'atome gem built and installed'
|
359
403
|
end
|
360
404
|
|
405
|
+
|
406
|
+
task :push_gem do
|
407
|
+
|
408
|
+
# # pushing the gem
|
409
|
+
# if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
410
|
+
# # code to exec for Windows
|
411
|
+
# `cd pkg && gem push atome`
|
412
|
+
# elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
413
|
+
# # code to exec for MacOS
|
414
|
+
# `cd pkg; gem push atome`
|
415
|
+
# # open the app
|
416
|
+
# else
|
417
|
+
# # code to exec for Unix/Linux
|
418
|
+
# `cd pkg; gem push atome`
|
419
|
+
# # open the app
|
420
|
+
# end
|
421
|
+
#
|
422
|
+
# puts 'atome gem pushed'
|
423
|
+
end
|
424
|
+
|
361
425
|
# task :run_wasm_client_code do
|
362
426
|
# app_name = :test
|
363
427
|
# dest_path = './tmp/'
|
data/atome.gemspec
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/atome/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'atome'
|
7
|
+
spec.version = Atome::VERSION
|
8
|
+
spec.authors = ['Jean-Eric Godard']
|
9
|
+
spec.email = ['jeezs@atopme.one']
|
10
|
+
|
11
|
+
spec.summary = 'the creative framework'
|
12
|
+
spec.description = 'the creative framework.'
|
13
|
+
spec.homepage = 'https://atome.one'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = '>= 3.1'
|
16
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
17
|
+
|
18
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
19
|
+
spec.metadata['source_code_uri'] = 'https://github.com/atomecorp/atome'
|
20
|
+
spec.metadata['changelog_uri'] = 'https://github.com/atomecorp/atome'
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
spec.bindir = 'exe'
|
32
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
33
|
+
spec.require_paths = ['lib']
|
34
|
+
|
35
|
+
spec.add_runtime_dependency 'arduino_firmata', '~> 0.3'
|
36
|
+
spec.add_runtime_dependency 'eventmachine', '~> 1.2.7'
|
37
|
+
spec.add_runtime_dependency 'faye-websocket', '~> 0.1'
|
38
|
+
spec.add_runtime_dependency 'geocoder', '~> 1.8'
|
39
|
+
spec.add_runtime_dependency 'guard', '~> 2.1'
|
40
|
+
spec.add_runtime_dependency 'guard-rake', '~> 1.0'
|
41
|
+
spec.add_runtime_dependency 'image_size', '~> 3.0'
|
42
|
+
spec.add_runtime_dependency 'mail', '~> 2.1'
|
43
|
+
spec.add_runtime_dependency 'net-ping', '~> 2.0'
|
44
|
+
spec.add_runtime_dependency 'opal', '~> 1.5'
|
45
|
+
spec.add_runtime_dependency 'parser', '~> 3.1'
|
46
|
+
spec.add_runtime_dependency 'puma', '~> 6.0'
|
47
|
+
spec.add_runtime_dependency 'rack', '~> 2.2'
|
48
|
+
spec.add_runtime_dependency 'rack-unreloader', '~> 1.8'
|
49
|
+
spec.add_runtime_dependency 'rake', '~> 13.0'
|
50
|
+
spec.add_runtime_dependency 'roda', '~> 3.5'
|
51
|
+
spec.add_runtime_dependency 'ruby2js', '~> 5.0'
|
52
|
+
spec.add_runtime_dependency 'rufus-scheduler', '~> 3.8'
|
53
|
+
spec.add_runtime_dependency 'securerandom', '~> 0.2'
|
54
|
+
spec.add_runtime_dependency 'sequel', '~> 5.5'
|
55
|
+
spec.add_runtime_dependency 'sqlite3', '~> 1.4'
|
56
|
+
spec.add_runtime_dependency 'uglifier', '~> 0.1'
|
57
|
+
#spec.add_runtime_dependency 'webrick', '~> 1.7.0'
|
58
|
+
|
59
|
+
# Uncomment to register a new dependency of your gem
|
60
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
61
|
+
|
62
|
+
# For more information and examples about making a new gem, check out our
|
63
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
64
|
+
end
|
@@ -20,7 +20,8 @@ Install Homebew
|
|
20
20
|
Install rbenv, wasi-vfs, wasmtime :
|
21
21
|
brew install rbenv
|
22
22
|
#brew install wasmtime
|
23
|
-
#
|
23
|
+
# => please chack as it is certainly useless because we have in vendor/src-wasm/wasm/wasi_vfs_...,
|
24
|
+
if need to install use : brew install wasi-vfs
|
24
25
|
|
25
26
|
brew install npm
|
26
27
|
npm install --save ruby-3_2-wasm-wasi@latest
|
@@ -42,12 +43,75 @@ In the terminal at atome root , type:
|
|
42
43
|
bundle install
|
43
44
|
Bundle update
|
44
45
|
|
45
|
-
Ruby wasm
|
46
|
+
Ruby wasm time allow local use of ruby wasm :
|
46
47
|
1 - download :
|
47
48
|
https://cdn.jsdelivr.net/npm/@ruby/3.2-wasm-wasi@2.3.0/dist/browser.script.iife.js
|
48
49
|
2 - change
|
49
50
|
|
50
51
|
|
52
|
+
# how to Install on windows :
|
53
|
+
|
54
|
+
# Install ruby :
|
55
|
+
https://rubyinstaller.org/downloads install with devkit
|
56
|
+
# check install using :
|
57
|
+
ruby -v
|
58
|
+
gem list
|
59
|
+
|
60
|
+
# update gem using the two following commands
|
61
|
+
gem update --system
|
62
|
+
gem update
|
63
|
+
|
64
|
+
#install node:
|
65
|
+
https://nodejs.org/en/download
|
66
|
+
# check install using :
|
67
|
+
node -v
|
68
|
+
|
69
|
+
#install wasi :
|
70
|
+
npm install --save ruby-3_2-wasm-wasi@latest
|
71
|
+
|
72
|
+
#install rust :
|
73
|
+
https://www.rust-lang.org/tools/install use rustup
|
74
|
+
# check install using :
|
75
|
+
rustc --version
|
76
|
+
|
77
|
+
|
78
|
+
#install tauri:
|
79
|
+
npm install --save-dev @tauri-apps/cli
|
80
|
+
# check install using :
|
81
|
+
npm fund
|
82
|
+
|
83
|
+
#install wasmtime :
|
84
|
+
https://wasmtime.dev/
|
85
|
+
# check install using :
|
86
|
+
ruby wastime --version
|
87
|
+
|
88
|
+
#install git :
|
89
|
+
https://git-scm.com/
|
90
|
+
|
91
|
+
|
92
|
+
# Get atome framework :
|
93
|
+
git clone https://github.com/atomecorp/atome.git
|
94
|
+
|
95
|
+
# go in the cloned directory the in the terminal at atome root , type:
|
96
|
+
bundle install
|
97
|
+
Bundle update
|
98
|
+
|
99
|
+
# to check we build atome gem
|
100
|
+
rake build_gem
|
101
|
+
|
102
|
+
# in the terminal type
|
103
|
+
gem list
|
104
|
+
# check atome is part of the list of the gems
|
105
|
+
|
106
|
+
# then in the folder of your choice create a new atome app using :
|
107
|
+
atome create my_app
|
108
|
+
cd my_app
|
109
|
+
atome run browser
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
51
115
|
|
52
116
|
#Third parties javascript library is located at different location
|
53
117
|
#If you need to update it or add a JS library you need to clone : https://github.com/atomecorp/atome_third_parties_js.git
|
data/exe/atome
CHANGED
@@ -70,6 +70,7 @@ def build_aui(destination, project_name)
|
|
70
70
|
# now building opal version
|
71
71
|
js_directory = "#{destination}/#{project_name}/src/js"
|
72
72
|
opal_js = "#{js_directory}/aui.js"
|
73
|
+
FileUtils.mkdir_p(js_directory)
|
73
74
|
File.new opal_js, 'w'
|
74
75
|
# we add platform_specific script to the Opal framework
|
75
76
|
opal_content = Opal::Builder.build("#{path}aui.rb").to_s
|
@@ -142,7 +143,6 @@ STR
|
|
142
143
|
else
|
143
144
|
# Code à exécuter sous Unix/Linux
|
144
145
|
`cd #{destination}/#{project_name}/tmp/application/;pwd;ruby .opal_compiler.rb`
|
145
|
-
|
146
146
|
end
|
147
147
|
|
148
148
|
end
|
@@ -178,7 +178,7 @@ def create_application(source, destination, project_name)
|
|
178
178
|
end
|
179
179
|
# we copy all folder to be refreshed
|
180
180
|
files_list.each do |file|
|
181
|
-
FileUtils.cp_r("#{source}/vendor/assets/#{file}", "#{destination}/#{project_name}/#{file}")
|
181
|
+
FileUtils.cp_r("#{source}/vendor/assets/#{file}", "#{destination}/#{project_name}/#{file}")
|
182
182
|
end
|
183
183
|
build_aui(destination, project_name)
|
184
184
|
end
|
@@ -214,6 +214,7 @@ def build_atome_kernel_for_opal(source, destination, project_name)
|
|
214
214
|
# now lets build the atome kernel
|
215
215
|
atome_directory = "#{destination}/#{project_name}/src/js/atome"
|
216
216
|
kernel_js = "#{atome_directory}/kernel.js"
|
217
|
+
FileUtils.mkdir_p(atome_directory)
|
217
218
|
File.new kernel_js, 'w'
|
218
219
|
builder = Opal::Builder.new
|
219
220
|
builder.append_paths("#{source}/lib/")
|
@@ -258,7 +259,9 @@ def wasm_initialize (source, destination, project_name, wasi_source)
|
|
258
259
|
unless File.exist?("#{wasm_temp_folder}/ruby-3_2-wasm32-unknown-wasi-full-js.tar.gz")
|
259
260
|
|
260
261
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
261
|
-
|
262
|
+
application_location = "#{destination}\\#{project_name}"
|
263
|
+
wasm_temp_folder = "#{application_location}\\tmp"
|
264
|
+
`cd /d #{wasm_temp_folder} && curl -LO https://github.com/ruby/ruby.wasm/releases/download/2023-11-17-a/ruby-3_2-wasm32-unknown-wasi-full-js.tar.gz
|
262
265
|
`
|
263
266
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
264
267
|
# Code à exécuter sous MacOS
|
@@ -276,10 +279,11 @@ def wasm_initialize (source, destination, project_name, wasi_source)
|
|
276
279
|
|
277
280
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
278
281
|
# Code à exécuter sous Windows
|
279
|
-
|
280
|
-
`move %wasm_temp_folder%\\3_2-wasm32-unknown-wasi-full-js\\usr\\local\\bin\\ruby %wasm_temp_folder%\\system_ruby_browser.wasm`
|
281
|
-
`del %application_location%\\src\\wasm\\ruby_browser.wasm`
|
282
|
+
application_location = "#{destination}\\#{project_name}"
|
282
283
|
|
284
|
+
`cd /d #{wasm_temp_folder} && tar xfz ruby-3_2-wasm32-unknown-wasi-full-js.tar.gz`
|
285
|
+
`move #{wasm_temp_folder}\\3_2-wasm32-unknown-wasi-full-js\\usr\\local\\bin\\ruby #{wasm_temp_folder}\\system_ruby_browser.wasm`
|
286
|
+
`del #{application_location}\\src\\wasm\\ruby_browser.wasm`
|
283
287
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
284
288
|
# Code à exécuter sous MacOS
|
285
289
|
`cd #{wasm_temp_folder}; tar xfz ruby-3_2-wasm32-unknown-wasi-full-js.tar.gz`
|
@@ -292,14 +296,38 @@ def wasm_initialize (source, destination, project_name, wasi_source)
|
|
292
296
|
`rm -f #{application_location}/src/wasm/ruby_browser.wasm`
|
293
297
|
end
|
294
298
|
|
295
|
-
|
296
|
-
#
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
299
|
+
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
300
|
+
# Code à exécuter sous Windows
|
301
|
+
cmd = <<~STRDELIM
|
302
|
+
"#{application_location}\\src-wasm\\wasm\\#{wasi_source}" pack "#{wasm_temp_folder}\\system_ruby_browser.wasm"
|
303
|
+
-mapdir usr::"#{wasm_temp_folder}\\3_2-wasm32-unknown-wasi-full-js\\usr"
|
304
|
+
-mapdir lib::"#{source}\\lib\\"
|
305
|
+
-mapdir \::"#{application_location}\\application\\"
|
306
|
+
-mapdir utilities::"#{application_location}\\src\\utilities\\"
|
307
|
+
-o "#{application_location}\\src\\wasm\\ruby_browser.wasm"
|
308
|
+
STRDELIM
|
309
|
+
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
310
|
+
# Code à exécuter sous MacOS
|
311
|
+
cmd = <<~STRDELIM
|
312
|
+
#{application_location}/src-wasm/wasm/#{wasi_source} pack #{wasm_temp_folder}/system_ruby_browser.wasm
|
313
|
+
--mapdir usr::#{wasm_temp_folder}/3_2-wasm32-unknown-wasi-full-js/usr
|
314
|
+
--mapdir lib::#{source}/lib/
|
315
|
+
--mapdir /::#{application_location}/application/
|
316
|
+
--mapdir utilities::#{application_location}/src/utilities/
|
317
|
+
-o #{application_location}/src/wasm/ruby_browser.wasm
|
318
|
+
STRDELIM
|
319
|
+
else
|
320
|
+
# Code à exécuter sous Unix/Linux
|
321
|
+
cmd = <<~STRDELIM
|
322
|
+
#{application_location}/src-wasm/wasm/#{wasi_source} pack #{wasm_temp_folder}/system_ruby_browser.wasm
|
323
|
+
--mapdir usr::#{wasm_temp_folder}/3_2-wasm32-unknown-wasi-full-js/usr
|
324
|
+
--mapdir lib::#{source}/lib/
|
325
|
+
--mapdir /::#{application_location}/application/
|
326
|
+
--mapdir utilities::#{application_location}/src/utilities/
|
327
|
+
-o #{application_location}/src/wasm/ruby_browser.wasm
|
328
|
+
STRDELIM
|
329
|
+
end
|
330
|
+
|
303
331
|
cleaned_cmd = cmd.lines.reject { |line| line.start_with?('#') }.join
|
304
332
|
command = cleaned_cmd.chomp.gsub("\n", ' ')
|
305
333
|
system(command)
|
@@ -320,7 +348,7 @@ def build_for_osx(destination, mode = :dev)
|
|
320
348
|
# dev or build
|
321
349
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
322
350
|
# Code à exécuter sous Windows
|
323
|
-
`cd /d #{destination} && cargo tauri
|
351
|
+
`cd /d #{destination} && cargo tauri #{mode}`
|
324
352
|
|
325
353
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
326
354
|
# Code à exécuter sous MacOS
|
@@ -330,14 +358,13 @@ def build_for_osx(destination, mode = :dev)
|
|
330
358
|
`cd #{destination};cargo tauri #{mode}`
|
331
359
|
end
|
332
360
|
|
333
|
-
|
334
361
|
end
|
335
362
|
|
336
363
|
def build_for_server(destination, project_name, port, production)
|
337
364
|
prod = '--env production' if production
|
338
365
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
339
366
|
# Code à exécuter sous Windows
|
340
|
-
|
367
|
+
`cd /d #{destination}\\#{project_name}\\server && puma --port #{port} #{prod}`
|
341
368
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
342
369
|
# Code à exécuter sous MacOS
|
343
370
|
`cd #{destination}/#{project_name}/server;puma --port #{port} #{prod}`
|
@@ -360,17 +387,20 @@ project_name = ARGV[1]
|
|
360
387
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
361
388
|
# Code à exécuter sous Windows
|
362
389
|
destination = `cd`.chomp
|
390
|
+
wasi_file = 'wasi-vfs.exe'
|
391
|
+
|
363
392
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
364
393
|
# Code à exécuter sous MacOS
|
365
394
|
destination = `pwd`.chomp
|
395
|
+
wasi_file = 'wasi-vfs-osx_arm' # default to osx arm
|
366
396
|
else
|
367
397
|
# Code à exécuter sous Unix/Linux
|
368
398
|
destination = `pwd`.chomp
|
399
|
+
wasi_file = 'wasi-vfs-unix'
|
369
400
|
end
|
370
401
|
|
371
402
|
source = Pathname(__FILE__).parent.parent.to_s
|
372
403
|
|
373
|
-
wasi_file = 'wasi-vfs-osx_arm' # default to osx arm
|
374
404
|
# TODO : get wasi params from ARG to allow compile on windows / Unix
|
375
405
|
if ARGV.include?('create')
|
376
406
|
create_application(source, destination, project_name)
|
@@ -391,23 +421,18 @@ end
|
|
391
421
|
if ARGV.include?('update')
|
392
422
|
# TODO: also update index.html and all other files except the application folder
|
393
423
|
# first we delete everything but application
|
394
|
-
|
395
|
-
|
424
|
+
|
425
|
+
files_to_treat = %w[server src-tauri src-wasm Guardfile Rakefile src/css src/js/atome src/js/third_parties src/medias
|
426
|
+
src/favicon.ico src/index.html src/index_opal.html src/index_server.html src/index_server_wasm.html]
|
427
|
+
files_to_treat.each do |item|
|
396
428
|
item_path = File.join(destination, item)
|
397
|
-
if File.directory?(item_path)
|
429
|
+
if File.directory?(item_path)
|
398
430
|
FileUtils.rm_rf(item_path) unless item == '.' || item == '..'
|
399
431
|
elsif File.file?(item_path)
|
400
432
|
File.delete(item_path)
|
401
433
|
end
|
402
|
-
|
403
|
-
|
404
|
-
puts "#{source}/vendor/assets"
|
405
|
-
|
406
|
-
update_source = "#{source}/vendor/assets"
|
407
|
-
|
408
|
-
Dir.glob("#{update_source}/*").each do |item|
|
409
|
-
target = File.join(destination, File.basename(item))
|
410
|
-
FileUtils.cp_r(item, target) unless File.exist?(target)
|
434
|
+
source_item = "#{source}/vendor/assets/#{item}"
|
435
|
+
FileUtils.cp_r(source_item, item)
|
411
436
|
end
|
412
437
|
end
|
413
438
|
|
@@ -449,7 +474,6 @@ if ARGV.include?('run')
|
|
449
474
|
threads << Thread.new do
|
450
475
|
sleep 1
|
451
476
|
|
452
|
-
|
453
477
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
454
478
|
# Code à exécuter sous Windows
|
455
479
|
`start "" "#{destination}\\#{project_name}\\src\\index_opal.html`
|
@@ -483,7 +507,7 @@ if ARGV.include?('run')
|
|
483
507
|
|
484
508
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
485
509
|
# Code à exécuter sous Windows
|
486
|
-
`start "" "
|
510
|
+
`start "" "#{current_path}\\src\\index.html"`
|
487
511
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
488
512
|
# Code à exécuter sous MacOS
|
489
513
|
`open #{current_path}/src/index.html`
|
data/lib/atome/version.rb
CHANGED
@@ -218,98 +218,99 @@ function fileForOpal(parent, bloc) {
|
|
218
218
|
})
|
219
219
|
|
220
220
|
}
|
221
|
-
|
222
|
-
function importer(){
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
document.body.addEventListener('drop', function(e) {
|
231
|
-
e.preventDefault();
|
232
|
-
let files = e.dataTransfer.files; // Obtention de la liste des fichiers déposés
|
233
|
-
|
234
|
-
if (files.length) {
|
235
|
-
// Parcourir chaque fichier
|
236
|
-
for (let i = 0; i < files.length; i++) {
|
237
|
-
let file = files[i];
|
238
|
-
let reader = new FileReader();
|
239
|
-
|
240
|
-
// Lire le fichier en tant que texte
|
241
|
-
reader.readAsText(file);
|
242
|
-
|
243
|
-
// Événement déclenché une fois la lecture terminée
|
244
|
-
reader.onload = function() {
|
245
|
-
console.log('Contenu du fichier #' + (i + 1));
|
246
|
-
console.log('Nom: ' + file.name);
|
247
|
-
console.log('Type: ' + file.type);
|
248
|
-
console.log('Taille: ' + file.size + ' octets');
|
249
|
-
console.log('Contenu: \n' + reader.result); // Affichage du contenu du fichier
|
250
|
-
};
|
251
|
-
|
252
|
-
// Gestion des erreurs de lecture
|
253
|
-
reader.onerror = function() {
|
254
|
-
console.error('Erreur de lecture du fichier: ' + file.name);
|
255
|
-
};
|
256
|
-
}
|
257
|
-
}
|
258
|
-
// if (e.dataTransfer.files.length) {
|
259
|
-
// alert (e.dataTransfer.files);
|
260
|
-
// // Traiter les fichiers déposés
|
261
|
-
// }
|
262
|
-
});
|
263
|
-
|
264
|
-
// Gestionnaire pour les éléments div
|
265
|
-
var divs = document.querySelectorAll('.draggable-div');
|
266
|
-
divs.forEach(function(div) {
|
267
|
-
div.addEventListener('dragstart', function(e) {
|
268
|
-
e.dataTransfer.setData('text/plain', 'some-data');
|
269
|
-
e.stopPropagation(); // Empêcher la propagation au body
|
270
|
-
});
|
271
|
-
});
|
272
|
-
|
273
|
-
}
|
274
|
-
|
275
|
-
importer()
|
276
|
-
|
277
|
-
|
278
|
-
function exception_import (){
|
279
|
-
// Sélectionner la div spéciale par son ID
|
280
|
-
var specialDiv = document.getElementById('exept');
|
281
|
-
|
282
|
-
// Gestionnaire d'événements pour la 'special-div' pour le drag over
|
283
|
-
specialDiv.addEventListener('dragover', function(e) {
|
284
|
-
|
285
|
-
specialDiv.style.backgroundColor= 'red';
|
286
|
-
e.preventDefault(); // Prévenir le comportement par défaut
|
287
|
-
e.stopPropagation(); // Arrêter la propagation de l'événement
|
288
|
-
});
|
289
|
-
specialDiv.addEventListener('dragleave', function(e) {
|
290
|
-
specialDiv.style.backgroundColor = 'yellow'; // Réinitialiser la couleur de fond lors du drag out
|
291
|
-
e.stopPropagation(); // Arrêter la propagation de l'événement
|
292
|
-
});
|
293
|
-
// Gestionnaire d'événements pour la 'special-div' pour le drop
|
294
|
-
specialDiv.addEventListener('drop', function(e) {
|
295
|
-
e.preventDefault(); // Prévenir le comportement par défaut
|
296
|
-
e.stopPropagation(); // Arrêter la propagation de l'événement
|
297
|
-
|
298
|
-
// Traitement spécifique pour les fichiers déposés sur la 'special-div'
|
299
|
-
console.log('Fichier déposé dans la zone spéciale');
|
300
|
-
});
|
301
|
-
|
302
|
-
// Gestionnaire d'événements pour le body pour le drop
|
221
|
+
//
|
222
|
+
// function importer(){
|
223
|
+
//
|
224
|
+
// // Gestionnaire pour le drag and drop de fichiers
|
225
|
+
// document.body.addEventListener('dragover', function(e) {
|
226
|
+
// e.preventDefault(); // Nécessaire pour autoriser le drop
|
227
|
+
// // Modifier le style si nécessaire
|
228
|
+
// });
|
229
|
+
//
|
303
230
|
// document.body.addEventListener('drop', function(e) {
|
231
|
+
// e.preventDefault();
|
232
|
+
// let files = e.dataTransfer.files; // Obtention de la liste des fichiers déposés
|
233
|
+
//
|
234
|
+
// if (files.length) {
|
235
|
+
// // Parcourir chaque fichier
|
236
|
+
// for (let i = 0; i < files.length; i++) {
|
237
|
+
// let file = files[i];
|
238
|
+
// let reader = new FileReader();
|
239
|
+
//
|
240
|
+
// // Lire le fichier en tant que texte
|
241
|
+
// reader.readAsText(file);
|
242
|
+
//
|
243
|
+
// // Événement déclenché une fois la lecture terminée
|
244
|
+
// reader.onload = function() {
|
245
|
+
// console.log('Contenu du fichier #' + (i + 1));
|
246
|
+
// console.log('Nom: ' + file.name);
|
247
|
+
// console.log('Type: ' + file.type);
|
248
|
+
// console.log('Taille: ' + file.size + ' octets');
|
249
|
+
// console.log('Contenu: \n' + reader.result); // Affichage du contenu du fichier
|
250
|
+
// };
|
251
|
+
//
|
252
|
+
// // Gestion des erreurs de lecture
|
253
|
+
// reader.onerror = function() {
|
254
|
+
// console.error('Erreur de lecture du fichier: ' + file.name);
|
255
|
+
// };
|
256
|
+
// }
|
257
|
+
// }
|
258
|
+
// // if (e.dataTransfer.files.length) {
|
259
|
+
// // alert (e.dataTransfer.files);
|
260
|
+
// // // Traiter les fichiers déposés
|
261
|
+
// // }
|
262
|
+
// });
|
263
|
+
//
|
264
|
+
// // Gestionnaire pour les éléments div
|
265
|
+
// var divs = document.querySelectorAll('.draggable-div');
|
266
|
+
// divs.forEach(function(div) {
|
267
|
+
// div.addEventListener('dragstart', function(e) {
|
268
|
+
// e.dataTransfer.setData('text/plain', 'some-data');
|
269
|
+
// e.stopPropagation(); // Empêcher la propagation au body
|
270
|
+
// });
|
271
|
+
// });
|
272
|
+
//
|
273
|
+
// }
|
274
|
+
//
|
275
|
+
// importer()
|
276
|
+
//
|
277
|
+
//
|
278
|
+
// function exception_import (){
|
279
|
+
// // Sélectionner la div spéciale par son ID
|
280
|
+
// var specialDiv = document.getElementById('exept');
|
281
|
+
//
|
282
|
+
// // Gestionnaire d'événements pour la 'special-div' pour le drag over
|
283
|
+
// specialDiv.addEventListener('dragover', function(e) {
|
284
|
+
//
|
285
|
+
// specialDiv.style.backgroundColor= 'red';
|
286
|
+
// e.preventDefault(); // Prévenir le comportement par défaut
|
287
|
+
// e.stopPropagation(); // Arrêter la propagation de l'événement
|
288
|
+
// });
|
289
|
+
// specialDiv.addEventListener('dragleave', function(e) {
|
290
|
+
// specialDiv.style.backgroundColor = 'yellow'; // Réinitialiser la couleur de fond lors du drag out
|
291
|
+
// e.stopPropagation(); // Arrêter la propagation de l'événement
|
292
|
+
// });
|
293
|
+
// // Gestionnaire d'événements pour la 'special-div' pour le drop
|
294
|
+
// specialDiv.addEventListener('drop', function(e) {
|
304
295
|
// e.preventDefault(); // Prévenir le comportement par défaut
|
296
|
+
// e.stopPropagation(); // Arrêter la propagation de l'événement
|
305
297
|
//
|
306
|
-
// // Traitement pour les fichiers déposés
|
307
|
-
// console.log('Fichier déposé
|
298
|
+
// // Traitement spécifique pour les fichiers déposés sur la 'special-div'
|
299
|
+
// console.log('Fichier déposé dans la zone spéciale');
|
308
300
|
// });
|
301
|
+
//
|
302
|
+
// // Gestionnaire d'événements pour le body pour le drop
|
303
|
+
// // document.body.addEventListener('drop', function(e) {
|
304
|
+
// // e.preventDefault(); // Prévenir le comportement par défaut
|
305
|
+
// //
|
306
|
+
// // // Traitement pour les fichiers déposés en dehors de la 'special-div'
|
307
|
+
// // console.log('Fichier déposé hors de la zone spéciale');
|
308
|
+
// // });
|
309
|
+
//
|
310
|
+
//
|
311
|
+
// }
|
312
|
+
// setTimeout(function () {
|
313
|
+
// exception_import();
|
314
|
+
// console.log('ready');
|
315
|
+
// }, 3000);
|
309
316
|
|
310
|
-
|
311
|
-
}
|
312
|
-
setTimeout(function () {
|
313
|
-
exception_import();
|
314
|
-
console.log('ready');
|
315
|
-
}, 3000);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.5.6.
|
4
|
+
version: 0.5.5.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Eric Godard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: arduino_firmata
|
@@ -318,20 +318,6 @@ dependencies:
|
|
318
318
|
- - "~>"
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: '0.1'
|
321
|
-
- !ruby/object:Gem::Dependency
|
322
|
-
name: webrick
|
323
|
-
requirement: !ruby/object:Gem::Requirement
|
324
|
-
requirements:
|
325
|
-
- - "~>"
|
326
|
-
- !ruby/object:Gem::Version
|
327
|
-
version: 1.7.0
|
328
|
-
type: :runtime
|
329
|
-
prerelease: false
|
330
|
-
version_requirements: !ruby/object:Gem::Requirement
|
331
|
-
requirements:
|
332
|
-
- - "~>"
|
333
|
-
- !ruby/object:Gem::Version
|
334
|
-
version: 1.7.0
|
335
321
|
description: the creative framework.
|
336
322
|
email:
|
337
323
|
- jeezs@atopme.one
|
@@ -346,6 +332,7 @@ files:
|
|
346
332
|
- LICENSE.txt
|
347
333
|
- README.md
|
348
334
|
- Rakefile
|
335
|
+
- atome.gemspec
|
349
336
|
- documentation/atome.md
|
350
337
|
- documentation/basic.md
|
351
338
|
- documentation/database.JPG
|
@@ -728,7 +715,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
728
715
|
- !ruby/object:Gem::Version
|
729
716
|
version: '0'
|
730
717
|
requirements: []
|
731
|
-
rubygems_version: 3.4.
|
718
|
+
rubygems_version: 3.4.22
|
732
719
|
signing_key:
|
733
720
|
specification_version: 4
|
734
721
|
summary: the creative framework
|