RUIC 0.5.0 → 0.6.0
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/HISTORY +23 -0
- data/README.md +2 -2
- data/lib/ruic.rb +11 -3
- data/lib/ruic/application.rb +28 -22
- data/lib/ruic/attributes.rb +10 -2
- data/lib/ruic/behaviors.rb +2 -15
- data/lib/ruic/effect.rb +32 -0
- data/lib/ruic/interfaces.rb +51 -13
- data/lib/ruic/presentation.rb +46 -20
- data/lib/ruic/renderplugin.rb +18 -0
- data/lib/ruic/ripl.rb +45 -0
- data/lib/ruic/statemachine.rb +142 -25
- data/lib/ruic/version.rb +1 -1
- data/test/customclasses.ruic +0 -1
- data/test/filtering.ruic +0 -1
- data/test/futureassets.ruic +0 -1
- data/test/nonmaster.ruic +0 -1
- data/test/paths.ruic +0 -2
- data/test/projects/MissingAssets/Existing.uip +87 -0
- data/test/projects/MissingAssets/MissingAssets.uia +21 -0
- data/test/projects/MissingAssets/MissingAssets.uia-user +14 -0
- data/test/projects/MissingAssets/RoundedPlane-1/RoundedPlane-1.import +18 -0
- data/test/projects/MissingAssets/RoundedPlane-1/meshes/RoundedPlane.mesh +0 -0
- data/test/projects/MissingAssets/effects/effects.txt +3 -0
- data/test/projects/MissingAssets/effects/existing.effect +38 -0
- data/test/projects/MissingAssets/fonts/Arimo-Regular.ttf +0 -0
- data/test/projects/MissingAssets/fonts/Chivo-Black.ttf +0 -0
- data/test/projects/MissingAssets/fonts/OFL.txt +92 -0
- data/test/projects/MissingAssets/maps/effects/brushnoise.dds +0 -0
- data/test/projects/MissingAssets/maps/existing.png +0 -0
- data/test/projects/MissingAssets/maps/existing2.png +0 -0
- data/test/projects/MissingAssets/maps/maps.txt +2 -0
- data/test/projects/MissingAssets/maps/materials/concrete_plain.png +0 -0
- data/test/projects/MissingAssets/maps/materials/concrete_plain_bump.png +0 -0
- data/test/projects/MissingAssets/maps/materials/spherical_checker.png +0 -0
- data/test/projects/MissingAssets/maps/unused.png +0 -0
- data/test/projects/MissingAssets/materials/concrete.material +251 -0
- data/test/projects/MissingAssets/materials/materials.txt +3 -0
- data/test/projects/MissingAssets/scripts/existing1.lua +2 -0
- data/test/projects/MissingAssets/scripts/existing2.lua +470 -0
- data/test/projects/MissingAssets/states/existing.scxml +4 -0
- data/test/projects/MissingAssets/tests/interface-navigation.scxml-test +3 -0
- data/test/properties.ruic +0 -2
- data/test/referencematerials.ruic +0 -2
- data/test/usage.ruic +38 -4
- metadata +53 -3
- data/lib/ruic/ripl-after-result.rb +0 -25
data/test/properties.ruic
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
3
|
uia 'projects/BMW_Cluster/BMW_Cluster.uia' # required before other commands
|
4
4
|
|
5
|
-
show "Uh oh!", app.errors if app.errors?
|
6
|
-
|
7
5
|
assert app.filename == 'BMW_Cluster.uia'
|
8
6
|
assert app.assets.length==10, "There should be 10 assets"
|
9
7
|
assert app.behaviors.length==3
|
@@ -2,9 +2,7 @@ require 'fileutils'
|
|
2
2
|
FileUtils.copy_entry('projects/ReferencedMaterials','projects/_RefMat',false,false,true)
|
3
3
|
|
4
4
|
metadata 'MetaData.xml'
|
5
|
-
|
6
5
|
uia 'projects/_RefMat/ReferencedMaterials.uia'
|
7
|
-
show app.errors if app.errors?
|
8
6
|
|
9
7
|
layer = app/'main:Scene.Layer'
|
10
8
|
cubemat = layer/"Cube"/"Material"
|
data/test/usage.ruic
CHANGED
@@ -1,7 +1,41 @@
|
|
1
|
-
metadata 'MetaData.xml'
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
metadata 'MetaData.xml'
|
2
|
+
uia 'projects/MissingAssets/MissingAssets.uia'
|
3
|
+
|
4
|
+
missing = app.missing_files.map(&app.method(:relative_path))
|
5
|
+
show missing
|
6
|
+
%w[
|
7
|
+
Missing.uip
|
8
|
+
maps/missing.png
|
9
|
+
maps/missing2.png
|
10
|
+
maps/missing3.png
|
11
|
+
materials/missing.material
|
12
|
+
effects/missing.effect
|
13
|
+
scripts/missing1.lua
|
14
|
+
scripts/missing2.lua
|
15
|
+
scripts/missing.so
|
16
|
+
states/missing.scxml
|
17
|
+
].each{ |path| warn "File '#{path}' should be reported as missing, but it is not." unless missing.include?(path) }
|
18
|
+
|
19
|
+
unused = app.unused_files.map(&app.method(:relative_path))
|
20
|
+
show "Unused"
|
21
|
+
show unused
|
22
|
+
%w[
|
23
|
+
MissingAssets.uia
|
24
|
+
Existing.uip
|
25
|
+
scripts/existing1.lua
|
26
|
+
scripts/existing2.lua
|
27
|
+
states/existing.scxml
|
28
|
+
maps/existing.png
|
29
|
+
maps/existing2.png
|
30
|
+
].each{ |path| warn "File '#{path}' should be reported as used, but it is not." if unused.include?(path) }
|
31
|
+
|
32
|
+
assert !missing.include?("maps/existing.png")
|
33
|
+
|
34
|
+
exit
|
35
|
+
|
36
|
+
unused = app.unused_files
|
37
|
+
|
38
|
+
assert unused.grep
|
5
39
|
|
6
40
|
show app.image_usage # hash mapping image paths, relative to uia, to arrays of things referencing them: materials; scxml visual actions; effects;
|
7
41
|
show app.image_paths # Just the paths
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RUIC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Kistner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -147,9 +147,11 @@ files:
|
|
147
147
|
- lib/ruic/assets.rb
|
148
148
|
- lib/ruic/attributes.rb
|
149
149
|
- lib/ruic/behaviors.rb
|
150
|
+
- lib/ruic/effect.rb
|
150
151
|
- lib/ruic/interfaces.rb
|
151
152
|
- lib/ruic/presentation.rb
|
152
|
-
- lib/ruic/
|
153
|
+
- lib/ruic/renderplugin.rb
|
154
|
+
- lib/ruic/ripl.rb
|
153
155
|
- lib/ruic/statemachine.rb
|
154
156
|
- lib/ruic/version.rb
|
155
157
|
- ruic.gemspec
|
@@ -170,6 +172,30 @@ files:
|
|
170
172
|
- test/projects/CustomClasses/maps/materials/spherical_checker.png
|
171
173
|
- test/projects/CustomClasses/scripts/DataDrivenTime.lua
|
172
174
|
- test/projects/CustomClasses/scripts/TimeDrivenAttribute.lua
|
175
|
+
- test/projects/MissingAssets/Existing.uip
|
176
|
+
- test/projects/MissingAssets/MissingAssets.uia
|
177
|
+
- test/projects/MissingAssets/MissingAssets.uia-user
|
178
|
+
- test/projects/MissingAssets/RoundedPlane-1/RoundedPlane-1.import
|
179
|
+
- test/projects/MissingAssets/RoundedPlane-1/meshes/RoundedPlane.mesh
|
180
|
+
- test/projects/MissingAssets/effects/effects.txt
|
181
|
+
- test/projects/MissingAssets/effects/existing.effect
|
182
|
+
- test/projects/MissingAssets/fonts/Arimo-Regular.ttf
|
183
|
+
- test/projects/MissingAssets/fonts/Chivo-Black.ttf
|
184
|
+
- test/projects/MissingAssets/fonts/OFL.txt
|
185
|
+
- test/projects/MissingAssets/maps/effects/brushnoise.dds
|
186
|
+
- test/projects/MissingAssets/maps/existing.png
|
187
|
+
- test/projects/MissingAssets/maps/existing2.png
|
188
|
+
- test/projects/MissingAssets/maps/maps.txt
|
189
|
+
- test/projects/MissingAssets/maps/materials/concrete_plain.png
|
190
|
+
- test/projects/MissingAssets/maps/materials/concrete_plain_bump.png
|
191
|
+
- test/projects/MissingAssets/maps/materials/spherical_checker.png
|
192
|
+
- test/projects/MissingAssets/maps/unused.png
|
193
|
+
- test/projects/MissingAssets/materials/concrete.material
|
194
|
+
- test/projects/MissingAssets/materials/materials.txt
|
195
|
+
- test/projects/MissingAssets/scripts/existing1.lua
|
196
|
+
- test/projects/MissingAssets/scripts/existing2.lua
|
197
|
+
- test/projects/MissingAssets/states/existing.scxml
|
198
|
+
- test/projects/MissingAssets/tests/interface-navigation.scxml-test
|
173
199
|
- test/projects/Paths/Paths.uia
|
174
200
|
- test/projects/Paths/Paths.uip
|
175
201
|
- test/projects/ReferencedMaterials/ReferencedMaterials.uia
|
@@ -221,6 +247,30 @@ test_files:
|
|
221
247
|
- test/projects/CustomClasses/maps/materials/spherical_checker.png
|
222
248
|
- test/projects/CustomClasses/scripts/DataDrivenTime.lua
|
223
249
|
- test/projects/CustomClasses/scripts/TimeDrivenAttribute.lua
|
250
|
+
- test/projects/MissingAssets/Existing.uip
|
251
|
+
- test/projects/MissingAssets/MissingAssets.uia
|
252
|
+
- test/projects/MissingAssets/MissingAssets.uia-user
|
253
|
+
- test/projects/MissingAssets/RoundedPlane-1/RoundedPlane-1.import
|
254
|
+
- test/projects/MissingAssets/RoundedPlane-1/meshes/RoundedPlane.mesh
|
255
|
+
- test/projects/MissingAssets/effects/effects.txt
|
256
|
+
- test/projects/MissingAssets/effects/existing.effect
|
257
|
+
- test/projects/MissingAssets/fonts/Arimo-Regular.ttf
|
258
|
+
- test/projects/MissingAssets/fonts/Chivo-Black.ttf
|
259
|
+
- test/projects/MissingAssets/fonts/OFL.txt
|
260
|
+
- test/projects/MissingAssets/maps/effects/brushnoise.dds
|
261
|
+
- test/projects/MissingAssets/maps/existing.png
|
262
|
+
- test/projects/MissingAssets/maps/existing2.png
|
263
|
+
- test/projects/MissingAssets/maps/maps.txt
|
264
|
+
- test/projects/MissingAssets/maps/materials/concrete_plain.png
|
265
|
+
- test/projects/MissingAssets/maps/materials/concrete_plain_bump.png
|
266
|
+
- test/projects/MissingAssets/maps/materials/spherical_checker.png
|
267
|
+
- test/projects/MissingAssets/maps/unused.png
|
268
|
+
- test/projects/MissingAssets/materials/concrete.material
|
269
|
+
- test/projects/MissingAssets/materials/materials.txt
|
270
|
+
- test/projects/MissingAssets/scripts/existing1.lua
|
271
|
+
- test/projects/MissingAssets/scripts/existing2.lua
|
272
|
+
- test/projects/MissingAssets/states/existing.scxml
|
273
|
+
- test/projects/MissingAssets/tests/interface-navigation.scxml-test
|
224
274
|
- test/projects/Paths/Paths.uia
|
225
275
|
- test/projects/Paths/Paths.uip
|
226
276
|
- test/projects/ReferencedMaterials/ReferencedMaterials.uia
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# Allows [Ripl](https://github.com/cldwalker/ripl) to execute code or print a message after every result.
|
2
|
-
#
|
3
|
-
# @example 1) Printing a blank line after each result
|
4
|
-
# require_relative 'ripl-after-result'
|
5
|
-
# Ripl::Shell.include Ripl::AfterResult
|
6
|
-
# Ripl.config.merge! after_result:"\n"
|
7
|
-
#
|
8
|
-
# @example 2) Executing arbitrary code with the result
|
9
|
-
# results = []
|
10
|
-
# require_relative 'ripl-after-result'
|
11
|
-
# Ripl::Shell.include Ripl::AfterResult
|
12
|
-
# Ripl.config.merge! after_result:proc{ |result| results << result }
|
13
|
-
module Ripl::AfterResult
|
14
|
-
# @private no need to document the method
|
15
|
-
def print_result(result)
|
16
|
-
super
|
17
|
-
if after=config[:after_result]
|
18
|
-
if after.respond_to?(:call)
|
19
|
-
after.call(result)
|
20
|
-
else
|
21
|
-
puts after
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|