atome 0.5.6.0.3 → 0.5.6.0.4
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 +5 -3
- data/exe/atome +4 -2
- data/lib/atome/version.rb +1 -1
- data/server/atome_server.rb +178 -33
- data/vendor/assets/application/examples/server.rb +4 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b631fc09724548cd4174533e5268f6372b99666faa476dc825bbc4e37ebcd1b3
|
4
|
+
data.tar.gz: 55f81e5c141e9a4bada159e02196ae72d47fa60eac7b4c117b6c1c4dea3bddc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd78709ac74a5ba36f1b5fb047f42f4610460cf38ca77a368585b832a2fbb478f57d9198cd07a3ddbd82352a8916a6885ff6faf6480c253a220a339c179d106c
|
7
|
+
data.tar.gz: 7b1b793d748434f5a47f8f41843b6ed4e5ef8de0007cffe02ab4a278c5489a89c71e18f8ffa08cce9a8633a890a6970f1f5eb3fc463029801d028b869c3050a1
|
data/Rakefile
CHANGED
@@ -137,7 +137,7 @@ task :test_opal do
|
|
137
137
|
# open the app
|
138
138
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
139
139
|
# code to exec for Windows
|
140
|
-
`start
|
140
|
+
`start #{destination}\\#{project_name}\\src\\index_opal.html`
|
141
141
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
142
142
|
# code to exec for MacOS
|
143
143
|
`open #{destination}/#{project_name}/src/index_opal.html`
|
@@ -184,11 +184,13 @@ task :test_server do
|
|
184
184
|
# build and open the app
|
185
185
|
threads = []
|
186
186
|
threads << Thread.new do
|
187
|
-
|
187
|
+
|
188
188
|
|
189
189
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
190
190
|
# code to exec for Windows
|
191
|
-
|
191
|
+
`start http://localhost:9292`
|
192
|
+
# `start #{destination}\\#{project_name}\\src\\index_server.html`
|
193
|
+
|
192
194
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
193
195
|
# code to exec for MacOS
|
194
196
|
`open http://localhost:9292`
|
data/exe/atome
CHANGED
@@ -682,6 +682,7 @@ else
|
|
682
682
|
end
|
683
683
|
|
684
684
|
threads.each(&:join)
|
685
|
+
|
685
686
|
end
|
686
687
|
|
687
688
|
if ARGV.include?('server_refresh')
|
@@ -689,13 +690,14 @@ else
|
|
689
690
|
build_opal_application(nil, destination, project_name)
|
690
691
|
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
691
692
|
# code to exec with Windows
|
692
|
-
|
693
|
+
# `start #{destination}\\#{project_name}\\src\\index_server.html`
|
694
|
+
`start http://localhost:9292`
|
693
695
|
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
694
696
|
# code to exec with MacOS
|
695
697
|
`open http://localhost:9292`
|
696
698
|
else
|
697
699
|
# code to exec with Unix/Linux
|
698
|
-
|
700
|
+
`open http://localhost:9292`
|
699
701
|
end
|
700
702
|
end
|
701
703
|
|
data/lib/atome/version.rb
CHANGED
data/server/atome_server.rb
CHANGED
@@ -58,28 +58,175 @@ class Database
|
|
58
58
|
eden = Sequel.connect("sqlite://eden.sqlite3")
|
59
59
|
eden.create_table :atome do
|
60
60
|
primary_key :atome_id
|
61
|
-
String :
|
62
|
-
|
61
|
+
String :creator
|
62
|
+
end
|
63
|
+
|
64
|
+
eden.create_table :communication do
|
65
|
+
primary_key :communication_id
|
66
|
+
String :connection
|
67
|
+
JSON :message
|
68
|
+
JSON :controller
|
69
|
+
end
|
70
|
+
|
71
|
+
eden.create_table :effect do
|
72
|
+
primary_key :effect_id
|
73
|
+
Int :smooth
|
74
|
+
Int :blur
|
75
|
+
end
|
76
|
+
|
77
|
+
eden.create_table :event do
|
78
|
+
primary_key :event_id
|
79
|
+
JSON :touch
|
80
|
+
Boolean :play
|
81
|
+
Boolean :pause
|
82
|
+
Int :time
|
83
|
+
Boolean :on
|
84
|
+
Boolean :fullscreen
|
85
|
+
Boolean :mute
|
86
|
+
Boolean :drag
|
87
|
+
Boolean :drop
|
88
|
+
Boolean :over
|
89
|
+
String :targets
|
90
|
+
Boolean :start
|
91
|
+
Boolean :stop
|
92
|
+
Time :begin
|
93
|
+
Time :end
|
94
|
+
Int :duration
|
95
|
+
Int :mass
|
96
|
+
Int :damping
|
97
|
+
Int :stiffness
|
98
|
+
Int :velocity
|
99
|
+
Boolean :repeat
|
100
|
+
Boolean :ease
|
101
|
+
Boolean :keyboard
|
102
|
+
Boolean :resize
|
103
|
+
Boolean :overflow
|
104
|
+
end
|
105
|
+
|
106
|
+
eden.create_table :geometry do
|
107
|
+
primary_key :geometry_id
|
108
|
+
Int :width
|
109
|
+
Int :height
|
110
|
+
Int :size
|
111
|
+
end
|
112
|
+
|
113
|
+
eden.create_table :hierarchy do
|
114
|
+
primary_key :hierarchy_id
|
115
|
+
String :attach
|
116
|
+
String :attached
|
117
|
+
String :apply
|
118
|
+
String :affect
|
119
|
+
String :detached
|
120
|
+
String :collect
|
121
|
+
end
|
122
|
+
|
123
|
+
eden.create_table :identity do
|
124
|
+
primary_key :identity_id
|
125
|
+
String :real
|
63
126
|
String :type
|
127
|
+
Int :id
|
64
128
|
String :name
|
65
|
-
|
66
|
-
String :
|
67
|
-
String :
|
68
|
-
String :
|
69
|
-
String :
|
70
|
-
String :
|
71
|
-
|
72
|
-
String :
|
73
|
-
String :
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
129
|
+
Boolean :active
|
130
|
+
String :markup
|
131
|
+
String :bundle
|
132
|
+
String :data
|
133
|
+
String :category
|
134
|
+
String :selection
|
135
|
+
Boolean :selected
|
136
|
+
String :format
|
137
|
+
String :alien
|
138
|
+
end
|
139
|
+
|
140
|
+
eden.create_table :material do
|
141
|
+
primary_key :material_id
|
142
|
+
String :component
|
143
|
+
Boolean :edit
|
144
|
+
String :style
|
145
|
+
Boolean :hide
|
146
|
+
Boolean :remove
|
147
|
+
JSON :classes
|
148
|
+
Boolean :remove_classes
|
149
|
+
Int :opacity
|
150
|
+
String :definition
|
151
|
+
Int :gradient
|
152
|
+
Int :border
|
153
|
+
end
|
154
|
+
|
155
|
+
eden.create_table :property do
|
156
|
+
primary_key :property_id
|
157
|
+
String :red
|
158
|
+
String :green
|
159
|
+
String :blue
|
160
|
+
String :alpha
|
161
|
+
String :diffusion
|
162
|
+
Boolean :clean
|
163
|
+
String :insert
|
164
|
+
Boolean :remove
|
165
|
+
Int :sort
|
166
|
+
end
|
167
|
+
|
168
|
+
eden.create_table :security do
|
169
|
+
primary_key :security_id
|
170
|
+
String :password
|
171
|
+
end
|
172
|
+
|
173
|
+
eden.create_table :spatial do
|
174
|
+
primary_key :spatial_id
|
175
|
+
Int :left
|
176
|
+
Int :right
|
177
|
+
Int :top
|
178
|
+
Int :bottom
|
179
|
+
Int :rotate
|
180
|
+
String :direction
|
181
|
+
String :center
|
182
|
+
Int :depth
|
183
|
+
Int :position
|
184
|
+
String :organise
|
185
|
+
String :spacing
|
186
|
+
Boolean :display
|
187
|
+
String :layout
|
188
|
+
end
|
189
|
+
|
190
|
+
eden.create_table :time do
|
191
|
+
primary_key :time_id
|
192
|
+
JSON :markers
|
193
|
+
end
|
194
|
+
|
195
|
+
eden.create_table :utility do
|
196
|
+
primary_key :utility_id
|
197
|
+
String :renderers
|
198
|
+
String :code
|
199
|
+
Boolean :run
|
200
|
+
Boolean :delete
|
201
|
+
Boolean :clear
|
202
|
+
String :path
|
203
|
+
String :schedule
|
204
|
+
String :read
|
205
|
+
String :cursor
|
206
|
+
String :preset
|
207
|
+
JSON :relations
|
208
|
+
JSON :tag
|
209
|
+
String :web
|
210
|
+
JSON :unit
|
211
|
+
String :initialize
|
212
|
+
String :login
|
213
|
+
String :hypertext
|
214
|
+
String :hyperedit
|
215
|
+
String :terminal
|
216
|
+
String :browse
|
217
|
+
String :copies
|
218
|
+
Int :temporary
|
219
|
+
String :atomes
|
220
|
+
String :match
|
221
|
+
Boolean :invert
|
222
|
+
String :option
|
223
|
+
String :duplicate
|
224
|
+
String :copy
|
225
|
+
String :paste
|
226
|
+
String :backup
|
227
|
+
String :import
|
228
|
+
String :compute
|
229
|
+
String :get
|
83
230
|
end
|
84
231
|
|
85
232
|
end
|
@@ -88,6 +235,7 @@ class Database
|
|
88
235
|
|
89
236
|
end
|
90
237
|
|
238
|
+
|
91
239
|
class App < Roda
|
92
240
|
|
93
241
|
# comment below when test will be done
|
@@ -96,13 +244,13 @@ class App < Roda
|
|
96
244
|
items = eden[:atome]
|
97
245
|
|
98
246
|
# populate the table
|
99
|
-
items.insert(
|
100
|
-
items.insert(
|
101
|
-
items.insert(
|
247
|
+
items.insert(creator: 'moi')
|
248
|
+
items.insert(creator: 'toi')
|
249
|
+
items.insert(creator: 'vous')
|
102
250
|
puts "Item count: #{items.count}"
|
103
|
-
|
251
|
+
test= "Item count: #{items.count}"
|
252
|
+
# puts "My name is: #{items(:creator)}"
|
104
253
|
index_content = File.read("../src/index_server.html")
|
105
|
-
|
106
254
|
opts[:root] = '../src'
|
107
255
|
plugin :static, %w[/css /js /medias], root: '../src'
|
108
256
|
route do |r|
|
@@ -117,20 +265,17 @@ class App < Roda
|
|
117
265
|
ws.on(:message) do |event|
|
118
266
|
json_string = event.data.gsub(/(\w+):/) { "\"#{$1}\":" }.gsub('=>', ':')
|
119
267
|
full_data = JSON.parse(json_string)
|
120
|
-
|
121
268
|
message = full_data['message']
|
122
269
|
action_requested = full_data['action']
|
123
270
|
value= full_data['value']
|
124
271
|
option= full_data['option']
|
125
272
|
current_user = full_data['user']
|
126
273
|
user_pass = full_data['pass']['global']
|
127
|
-
|
128
|
-
# request (message)
|
129
|
-
# end
|
274
|
+
if action_requested
|
130
275
|
return_message = EDen.safe_send(action_requested, message,option,ws,value, current_user, user_pass)
|
131
|
-
|
132
|
-
|
133
|
-
|
276
|
+
else
|
277
|
+
return_message = "no action msg: #{test}"
|
278
|
+
end
|
134
279
|
ws.send(return_message.to_json)
|
135
280
|
end
|
136
281
|
|
@@ -145,4 +290,4 @@ class App < Roda
|
|
145
290
|
|
146
291
|
end
|
147
292
|
|
148
|
-
end
|
293
|
+
end
|
@@ -6,23 +6,15 @@ human({ id: :jeezs, login: true, password: user_password, data: { birthday: '10/
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
|
10
|
-
b.connection('localhost:9292') do |params|
|
11
|
-
alert " the connection is : #{params}"
|
12
|
-
end
|
13
|
-
b.touch(true) do
|
14
|
-
b.connection('localhost:9292') do |params|
|
15
|
-
alert " the connection is : #{params}"
|
16
|
-
end
|
17
|
-
end
|
9
|
+
|
18
10
|
|
19
11
|
|
20
12
|
c = box({ color: :yellow, left: 333 })
|
21
13
|
|
22
14
|
c.touch(true) do
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
c.message({message: 'cd ..;cd server;ls; pwd', action: :terminal })
|
16
|
+
c.message({message: 'capture.rb', action: :file, option: :read })
|
17
|
+
c.message({message: 'tototo.rb', action: :file, option: :write, value: :hello })
|
26
18
|
# b.message({message: 'cd ..;cd server;ls; pwd'})
|
27
19
|
# c = box({ color: :red, left: 333 })
|
28
20
|
end
|