limelight 0.3.1-java → 0.4.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. data/lib/init.rb +5 -2
  2. data/lib/limelight/animation.rb +2 -2
  3. data/lib/limelight/builtin/players/button.rb +1 -1
  4. data/lib/limelight/builtin/players/check_box.rb +1 -1
  5. data/lib/limelight/builtin/players/combo_box.rb +2 -4
  6. data/lib/limelight/builtin/players/combo_box_popup_list.rb +1 -1
  7. data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +1 -1
  8. data/lib/limelight/builtin/players/curtains.rb +1 -1
  9. data/lib/limelight/builtin/players/image.rb +3 -0
  10. data/lib/limelight/builtin/players/password_box.rb +1 -1
  11. data/lib/limelight/builtin/players/radio_button.rb +1 -1
  12. data/lib/limelight/builtin/players/text_area.rb +1 -1
  13. data/lib/limelight/builtin/players/text_box.rb +1 -1
  14. data/lib/limelight/builtin/players.rb +1 -1
  15. data/lib/limelight/builtin/styles.rb +1 -1
  16. data/lib/limelight/builtin/utilities_production/alert/props.rb +5 -0
  17. data/lib/limelight/builtin/utilities_production/alert/styles.rb +7 -0
  18. data/lib/limelight/builtin/utilities_production/incompatible_version/props.rb +17 -0
  19. data/lib/limelight/builtin/utilities_production/incompatible_version/styles.rb +9 -0
  20. data/lib/limelight/builtin/utilities_production/production.rb +59 -0
  21. data/lib/limelight/builtin/utilities_production/stages.rb +9 -0
  22. data/lib/limelight/builtin/utilities_production/styles.rb +50 -0
  23. data/lib/limelight/button_group_cache.rb +1 -1
  24. data/lib/limelight/casting_director.rb +1 -1
  25. data/lib/limelight/client/playbills.rb +3 -0
  26. data/lib/limelight/commands/command.rb +13 -7
  27. data/lib/limelight/commands/create_command.rb +13 -8
  28. data/lib/limelight/commands/freeze_command.rb +3 -0
  29. data/lib/limelight/commands/help_command.rb +12 -1
  30. data/lib/limelight/commands/open_command.rb +11 -1
  31. data/lib/limelight/commands/pack_command.rb +1 -1
  32. data/lib/limelight/commands/unpack_command.rb +1 -1
  33. data/lib/limelight/commands/version_command.rb +1 -1
  34. data/lib/limelight/data.rb +4 -14
  35. data/lib/limelight/dsl/build_exception.rb +12 -8
  36. data/lib/limelight/dsl/menu_bar.rb +1 -1
  37. data/lib/limelight/dsl/production_builder.rb +1 -1
  38. data/lib/limelight/dsl/prop_builder.rb +2 -2
  39. data/lib/limelight/dsl/stage_builder.rb +3 -3
  40. data/lib/limelight/dsl/styles_builder.rb +2 -1
  41. data/lib/limelight/file_chooser.rb +1 -1
  42. data/lib/limelight/file_filter.rb +1 -1
  43. data/lib/limelight/file_loader.rb +1 -1
  44. data/lib/limelight/gems.rb +4 -0
  45. data/lib/limelight/java_couplings.rb +3 -2
  46. data/lib/limelight/java_util.rb +1 -1
  47. data/lib/limelight/limelight_exception.rb +1 -1
  48. data/lib/limelight/main.rb +1 -1
  49. data/lib/limelight/paint_action.rb +1 -1
  50. data/lib/limelight/pen.rb +1 -1
  51. data/lib/limelight/producer.rb +52 -37
  52. data/lib/limelight/production.rb +81 -43
  53. data/lib/limelight/prop.rb +32 -13
  54. data/lib/limelight/scene.rb +19 -14
  55. data/lib/limelight/specs/spec_helper.rb +55 -28
  56. data/lib/limelight/stage.rb +163 -23
  57. data/lib/limelight/string.rb +3 -0
  58. data/lib/limelight/studio.rb +143 -6
  59. data/lib/limelight/styles.rb +14 -1
  60. data/lib/limelight/templates/production_templater.rb +6 -2
  61. data/lib/limelight/templates/scene_templater.rb +12 -7
  62. data/lib/limelight/templates/sources/production/production.rb.template +46 -6
  63. data/lib/limelight/templates/sources/production/spec/spec_helper.rb.template +5 -0
  64. data/lib/limelight/templates/sources/scene_spec/scene_spec.rb.template +13 -0
  65. data/lib/limelight/templates/templater.rb +4 -1
  66. data/lib/limelight/templates/templater_logger.rb +3 -0
  67. data/lib/limelight/theater.rb +15 -6
  68. data/lib/limelight/util/downloader.rb +3 -1
  69. data/lib/limelight/util.rb +8 -7
  70. data/lib/limelight/version.rb +3 -3
  71. data/lib/limelight.jar +0 -0
  72. data/productions/examples/8thlight.com/about/props.rb +1 -1
  73. data/productions/examples/8thlight.com/about/styles.rb +1 -1
  74. data/productions/examples/8thlight.com/footer.rb +1 -1
  75. data/productions/examples/8thlight.com/home/props.rb +1 -1
  76. data/productions/examples/8thlight.com/home/styles.rb +1 -1
  77. data/productions/examples/8thlight.com/menu.rb +1 -1
  78. data/productions/examples/8thlight.com/services/props.rb +1 -1
  79. data/productions/examples/8thlight.com/services/styles.rb +1 -1
  80. data/productions/examples/8thlight.com/stages.rb +1 -1
  81. data/productions/examples/8thlight.com/styles.rb +1 -1
  82. data/productions/examples/calculator/players/button.rb +1 -1
  83. data/productions/examples/calculator/players/calculator.rb +1 -1
  84. data/productions/examples/calculator/players/calculator_model.rb +1 -1
  85. data/productions/examples/calculator/props.rb +1 -1
  86. data/productions/examples/calculator/styles.rb +1 -1
  87. data/productions/examples/langstons_ant/init.rb +3 -0
  88. data/productions/examples/langstons_ant/players/ant.rb +1 -1
  89. data/productions/examples/langstons_ant/players/log.rb +1 -1
  90. data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
  91. data/productions/examples/langstons_ant/players/world.rb +1 -1
  92. data/productions/examples/langstons_ant/props.rb +1 -1
  93. data/productions/examples/langstons_ant/styles.rb +1 -1
  94. data/productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb +7 -0
  95. data/productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb +29 -0
  96. data/productions/examples/sandbox/alerts/incompatible_production/production.rb +49 -0
  97. data/productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb +13 -0
  98. data/productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb +5 -0
  99. data/productions/examples/sandbox/alerts/incompatible_production/stages.rb +17 -0
  100. data/productions/examples/sandbox/alerts/incompatible_production/styles.rb +12 -0
  101. data/productions/examples/sandbox/alerts/players/alerts.rb +14 -0
  102. data/productions/examples/sandbox/alerts/props.rb +7 -0
  103. data/productions/examples/sandbox/alerts/styles.rb +43 -0
  104. data/productions/examples/sandbox/background_images/props.rb +19 -0
  105. data/productions/examples/sandbox/background_images/styles.rb +40 -0
  106. data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
  107. data/productions/examples/sandbox/click_me/props.rb +1 -1
  108. data/productions/examples/sandbox/click_me/styles.rb +1 -1
  109. data/productions/examples/sandbox/floaters/players/floater.rb +9 -5
  110. data/productions/examples/sandbox/floaters/players/surface.rb +1 -1
  111. data/productions/examples/sandbox/floaters/props.rb +1 -1
  112. data/productions/examples/sandbox/floaters/styles.rb +13 -13
  113. data/productions/examples/sandbox/frameing/players/sandbox.rb +3 -0
  114. data/productions/examples/sandbox/frameing/props.rb +3 -0
  115. data/productions/examples/sandbox/frameing/styles.rb +3 -0
  116. data/productions/examples/sandbox/gradients/players/spinner.rb +1 -1
  117. data/productions/examples/sandbox/gradients/players/teaser.rb +1 -1
  118. data/productions/examples/sandbox/gradients/players/wave.rb +1 -1
  119. data/productions/examples/sandbox/gradients/players/waves.rb +1 -1
  120. data/productions/examples/sandbox/gradients/props.rb +1 -1
  121. data/productions/examples/sandbox/gradients/styles.rb +1 -1
  122. data/productions/examples/sandbox/header.rb +4 -1
  123. data/productions/examples/sandbox/homer/players/homer.rb +1 -1
  124. data/productions/examples/sandbox/homer/props.rb +1 -1
  125. data/productions/examples/sandbox/homer/styles.rb +2 -2
  126. data/productions/examples/sandbox/images/space.png +0 -0
  127. data/productions/examples/sandbox/images_scene/props.rb +3 -0
  128. data/productions/examples/sandbox/images_scene/styles.rb +3 -0
  129. data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
  130. data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
  131. data/productions/examples/sandbox/inputs/players/combo_box_input.rb +1 -1
  132. data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
  133. data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
  134. data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
  135. data/productions/examples/sandbox/inputs/props.rb +1 -1
  136. data/productions/examples/sandbox/inputs/styles.rb +1 -1
  137. data/productions/examples/sandbox/kiosk/players/kiosk.rb +36 -0
  138. data/productions/examples/sandbox/kiosk/props.rb +6 -0
  139. data/productions/examples/sandbox/kiosk/styles.rb +34 -0
  140. data/productions/examples/sandbox/players/sandbox.rb +1 -1
  141. data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
  142. data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
  143. data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
  144. data/productions/examples/sandbox/scrolling/players/add_button.rb +1 -1
  145. data/productions/examples/sandbox/scrolling/players/cell.rb +1 -1
  146. data/productions/examples/sandbox/scrolling/props.rb +1 -1
  147. data/productions/examples/sandbox/scrolling/styles.rb +1 -1
  148. data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
  149. data/productions/examples/sandbox/sketching/props.rb +1 -1
  150. data/productions/examples/sandbox/sketching/styles.rb +1 -1
  151. data/productions/examples/sandbox/sounds/players/clip.rb +1 -1
  152. data/productions/examples/sandbox/sounds/props.rb +1 -1
  153. data/productions/examples/sandbox/sounds/styles.rb +1 -1
  154. data/productions/examples/sandbox/spec/alerts/alerts_spec.rb +13 -0
  155. data/productions/examples/sandbox/stages.rb +2 -1
  156. data/productions/examples/sandbox/styles.rb +1 -1
  157. data/productions/examples/sandbox/teaser/players/fader.rb +1 -1
  158. data/productions/examples/sandbox/teaser/props.rb +1 -1
  159. data/productions/examples/sandbox/teaser/styles.rb +1 -1
  160. data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
  161. data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
  162. data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
  163. data/productions/stage_composer/init.rb +1 -1
  164. data/productions/stage_composer/inspector/players/inspector.rb +1 -1
  165. data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
  166. data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
  167. data/productions/stage_composer/inspector/players/style_table.rb +1 -1
  168. data/productions/stage_composer/inspector/players/style_value.rb +1 -1
  169. data/productions/stage_composer/inspector/props.rb +1 -1
  170. data/productions/stage_composer/inspector/styles.rb +1 -1
  171. data/productions/stage_composer/lib/init.rb +1 -1
  172. data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
  173. data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
  174. data/productions/stage_composer/production.rb +1 -1
  175. data/productions/stage_composer/stages.rb +1 -1
  176. data/productions/startup/production.rb +49 -0
  177. data/productions/startup/spec/default_scene/default_scene_spec.rb +13 -0
  178. data/productions/startup/spec/spec_helper.rb +5 -0
  179. data/productions/startup/stages.rb +5 -2
  180. data/productions/startup/styles.rb +12 -0
  181. data/productions/startup/welcome/players/browse_button.rb +1 -1
  182. data/productions/startup/welcome/players/download_button.rb +1 -1
  183. data/productions/startup/welcome/players/sandbox_button.rb +1 -1
  184. data/productions/startup/welcome/props.rb +2 -2
  185. data/productions/startup/welcome/styles.rb +1 -1
  186. data/spec/builtin/players/button_spec.rb +1 -1
  187. data/spec/builtin/players/check_box_spec.rb +1 -1
  188. data/spec/builtin/players/combo_box_spec.rb +1 -1
  189. data/spec/builtin/players/image_spec.rb +3 -0
  190. data/spec/builtin/players/password_box_spec.rb +1 -1
  191. data/spec/builtin/players/radio_button_spec.rb +7 -7
  192. data/spec/builtin/players/text_area_spec.rb +1 -1
  193. data/spec/builtin/players/text_box_spec.rb +1 -1
  194. data/spec/builtin/utilities_production/spec_helper.rb +4 -0
  195. data/spec/builtin/utilities_production/utilities_production_spec.rb +143 -0
  196. data/spec/casting_director_spec.rb +7 -7
  197. data/spec/client/playbills_spec.rb +3 -0
  198. data/spec/commands/command_spec.rb +9 -1
  199. data/spec/commands/create_command_spec.rb +35 -5
  200. data/spec/commands/freeze_command_spec.rb +3 -0
  201. data/spec/commands/help_command_spec.rb +6 -3
  202. data/spec/commands/open_command_spec.rb +24 -2
  203. data/spec/commands/pack_command_spec.rb +3 -0
  204. data/spec/commands/unpack_command_spec.rb +4 -1
  205. data/spec/data_spec.rb +5 -16
  206. data/spec/dsl/production_builder_spec.rb +1 -1
  207. data/spec/dsl/prop_builder_spec.rb +19 -19
  208. data/spec/dsl/stage_builder_spec.rb +1 -1
  209. data/spec/dsl/styles_builder_spec.rb +1 -1
  210. data/spec/file_chooser_spec.rb +1 -1
  211. data/spec/file_filter_spec.rb +1 -1
  212. data/spec/file_loader_spec.rb +1 -1
  213. data/spec/gems_spec.rb +3 -0
  214. data/spec/java_util_spec.rb +1 -1
  215. data/spec/main_spec.rb +4 -1
  216. data/spec/paint_action_spec.rb +1 -1
  217. data/spec/pen_spec.rb +1 -1
  218. data/spec/producer_spec.rb +73 -32
  219. data/spec/production_spec.rb +23 -44
  220. data/spec/prop_spec.rb +102 -64
  221. data/spec/scene_spec.rb +3 -3
  222. data/spec/spec_helper.rb +3 -2
  223. data/spec/stage_spec.rb +172 -36
  224. data/spec/string_spec.rb +3 -0
  225. data/spec/studio_spec.rb +131 -3
  226. data/spec/styles_spec.rb +3 -0
  227. data/spec/templates/production_templater_spec.rb +12 -1
  228. data/spec/templates/scene_templater_spec.rb +17 -2
  229. data/spec/templates/templater_logger_spec.rb +3 -0
  230. data/spec/templates/templater_spec.rb +3 -0
  231. data/spec/theater_spec.rb +16 -1
  232. data/spec/util/downloader_spec.rb +3 -0
  233. metadata +56 -6
  234. data/lib/i4jruntime.jar +0 -0
  235. data/lib/junit-4.4.jar +0 -0
data/spec/studio_spec.rb CHANGED
@@ -1,14 +1,142 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
2
5
  require 'limelight/studio'
3
6
 
7
+ Studio = Limelight::Studio
8
+
4
9
  describe Limelight::Studio do
5
10
 
11
+ class TestProduction
12
+ attr_accessor :name
13
+ end
14
+
15
+ before do
16
+ Studio.reset
17
+ @production = TestProduction.new
18
+ end
19
+
6
20
  it "should install itsself" do
7
- Limelight::Studio.install
21
+ Studio.install
22
+
23
+ Limelight::Context.instance.studio.should == Studio.instance
24
+ end
25
+
26
+ def prepare_for_open()
27
+ @producer = mock("producer", :production => @production, :open => nil)
28
+ Limelight::Producer.stub!(:new).and_return(@producer)
29
+ end
30
+
31
+ it "should keep track of productions opened" do
32
+ prepare_for_open
33
+ @production.name = "Sven"
34
+ Studio.productions.length.should == 0
35
+
36
+ Studio.open(@production)
37
+
38
+ Studio.productions.length.should == 1
39
+ Studio["Sven"].should be(@production)
40
+ end
41
+
42
+ it "should ask all the production if it's okay to close and not shutdown" do
43
+ Studio.index(@production)
44
+
45
+ @production.should_receive(:allow_close?).and_return(false)
46
+ Studio.should_allow_shutdown.should == false
47
+ end
48
+
49
+ it "should ask all the production if it's okay to close and shutdown" do
50
+ Studio.index(@production)
51
+
52
+ @production.should_receive(:allow_close?).and_return(true)
53
+ Studio.should_allow_shutdown.should == true
54
+ end
55
+
56
+ it "should removed productions that are closed" do
57
+ production1 = TestProduction.new
58
+ production2 = TestProduction.new
59
+ Studio.index(production1)
60
+ Studio.index(production2)
61
+
62
+ Studio.production_closed(production1)
63
+
64
+ Studio.productions.length.should == 1
65
+ Studio.productions[0].should be(production2)
66
+ end
67
+
68
+ it "should shutdown if all the productions are closed" do
69
+ prepare_for_open
70
+ Studio.open("blah")
71
+ Limelight::Context.instance().should_receive(:shutdown)
72
+
73
+ Studio.production_closed(@production)
74
+
75
+ sleep(0.1)
76
+ end
77
+
78
+ it "should add productions to the index" do
79
+ @production.name = "Bob"
80
+
81
+ Limelight::Studio.index(@production)
82
+
83
+ Limelight::Studio["Bob"].should == @production
84
+ end
85
+
86
+ it "should give a production a name if it doesn't have one" do
87
+ Limelight::Studio.index(@production)
88
+
89
+ @production.name.should == "1"
90
+ Limelight::Studio["1"].should == @production
91
+
92
+ production2 = TestProduction.new
93
+ Limelight::Studio.index(production2)
8
94
 
9
- studio = Limelight::Studio.instance
10
- Limelight::Context.instance.studio.should == studio
95
+ production2.name.should == "2"
96
+ Limelight::Studio["2"].should == production2
11
97
  end
12
98
 
99
+ it "should modify the name of a production until it's unique" do
100
+ prod1 = TestProduction.new
101
+ prod2 = TestProduction.new
102
+ prod3 = TestProduction.new
103
+ prod1.name = prod2.name = prod3.name = "Fido"
104
+
105
+ Studio.index(prod1)
106
+ Studio.index(prod2)
107
+ Studio.index(prod3)
108
+
109
+ Studio["Fido"].should be(prod1)
110
+ Studio["Fido_2"].should be(prod2)
111
+ Studio["Fido_3"].should be(prod3)
112
+ prod1.name.should == "Fido"
113
+ prod2.name.should == "Fido_2"
114
+ prod3.name.should == "Fido_3"
115
+ end
116
+
117
+ it "should shutdown" do
118
+ Studio.index(@production)
119
+ @production.should_receive(:allow_close?).and_return(true)
120
+ @production.should_receive(:close).and_return(true)
121
+ Limelight::Context.instance().should_receive(:shutdown)
122
+
123
+ Studio.shutdown
124
+ sleep(0.1)
125
+ end
126
+
127
+ it "should publish on drb" do
128
+ Studio.publish_on_drb("9876")
129
+
130
+ DRb.start_service
131
+ proxy = DRbObject.new(nil, "druby://127.0.0.1:9876")
132
+ proxy.instance.should_not == nil
133
+ end
134
+
135
+ it "should provide the utilities production" do
136
+ Studio.utilities_production.should_not == nil
137
+ Studio.utilities_production.name.should == "utilities_production"
138
+ Studio.utilities_production.should be(Studio.utilities_production)
139
+ # Studio.utilities_production.close
140
+ end
13
141
 
14
142
  end
data/spec/styles_spec.rb CHANGED
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
2
5
  require 'limelight/styles'
3
6
 
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
5
  require 'limelight/templates/production_templater'
3
6
 
@@ -34,11 +37,19 @@ describe Limelight::Templates::ProductionTemplater do
34
37
  templater = Limelight::Templates::ProductionTemplater.new("some_production", "default_scene")
35
38
 
36
39
  templater.should_receive(:file).with("some_production/production.rb", "production/production.rb.template", templater.tokens)
37
- templater.should_receive(:file).with("some_production/init.rb", "production/init.rb.template", templater.tokens)
38
40
  templater.should_receive(:file).with("some_production/stages.rb", "production/stages.rb.template", templater.tokens)
39
41
  templater.should_receive(:file).with("some_production/styles.rb", "production/styles.rb.template", templater.tokens)
42
+ templater.should_receive(:file).with("some_production/spec/spec_helper.rb", "production/spec/spec_helper.rb.template", templater.tokens)
40
43
 
41
44
  templater.generate
42
45
  end
43
46
 
47
+ it "should have tokens" do
48
+ templater = Limelight::Templates::ProductionTemplater.new("some_production", "default_scene")
49
+
50
+ templater.tokens[:PRODUCTION_NAME].should == "Some Production"
51
+ templater.tokens[:DEFAULT_SCENE_NAME].should == "default_scene"
52
+ templater.tokens[:CURRENT_VERSION].should == Limelight::VERSION::STRING
53
+ end
54
+
44
55
  end
@@ -1,10 +1,13 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
5
  require 'limelight/templates/scene_templater'
3
6
 
4
7
  describe Limelight::Templates::SceneTemplater do
5
8
 
6
9
  it "should initialize" do
7
- templater = Limelight::Templates::SceneTemplater.new("prod/some_scene")
10
+ templater = Limelight::Templates::SceneTemplater.new("prod", "some_scene")
8
11
 
9
12
  templater.target_root.should == "./prod"
10
13
  templater.source_root.should == Limelight::Templates::Templater.source_dir
@@ -13,11 +16,23 @@ describe Limelight::Templates::SceneTemplater do
13
16
  end
14
17
 
15
18
  it "should generate files" do
16
- templater = Limelight::Templates::SceneTemplater.new("prod/some_scene")
19
+ templater = Limelight::Templates::SceneTemplater.new("prod", "some_scene")
17
20
 
18
21
  templater.should_receive(:file).with("some_scene/props.rb", "scene/props.rb.template", templater.tokens)
19
22
  templater.should_receive(:file).with("some_scene/styles.rb", "scene/styles.rb.template", templater.tokens)
20
23
  templater.should_receive(:directory).with("some_scene/players")
24
+ templater.should_receive(:file).with("spec/some_scene/some_scene_spec.rb", "scene_spec/scene_spec.rb.template", templater.tokens)
25
+
26
+ templater.generate
27
+ end
28
+
29
+ it "should generate files for a nested scene" do
30
+ templater = Limelight::Templates::SceneTemplater.new("prod", "nested/some_scene")
31
+
32
+ templater.should_receive(:file).with("nested/some_scene/props.rb", "scene/props.rb.template", templater.tokens)
33
+ templater.should_receive(:file).with("nested/some_scene/styles.rb", "scene/styles.rb.template", templater.tokens)
34
+ templater.should_receive(:directory).with("nested/some_scene/players")
35
+ templater.should_receive(:file).with("spec/nested/some_scene/some_scene_spec.rb", "scene_spec/scene_spec.rb.template", templater.tokens)
21
36
 
22
37
  templater.generate
23
38
  end
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
5
  require 'limelight/templates/templater_logger'
3
6
 
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
5
  require 'limelight/templates/templater'
3
6
 
data/spec/theater_spec.rb CHANGED
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
@@ -54,4 +54,19 @@ describe Limelight::Theater do
54
54
  @theater.default_stage.should be(@theater.default_stage)
55
55
  end
56
56
 
57
+ it "should construct stages with options" do
58
+ @theater.add_stage("Joe", :title => "Blowey")
59
+
60
+ @theater["Joe"].title.should == "Blowey"
61
+ end
62
+
63
+ it "should remove closed stages" do
64
+ @theater.stage_activated(@stage)
65
+
66
+ @theater.stage_closed(@stage)
67
+
68
+ @theater["default"].should == nil
69
+ @theater.active_stage.should == nil
70
+ end
71
+
57
72
  end
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
5
  require 'limelight/util/downloader'
3
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limelight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: java
6
6
  authors:
7
7
  - Micah Martin, 8th Light
@@ -9,7 +9,7 @@ autorequire: init
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-13 00:00:00 -06:00
12
+ date: 2009-08-17 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,10 +22,7 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - lib/i4jruntime.jar
26
25
  - lib/init.rb
27
- - lib/junit-4.4.jar
28
- - lib/limelight
29
26
  - lib/limelight/animation.rb
30
27
  - lib/limelight/builtin
31
28
  - lib/limelight/builtin/players
@@ -42,6 +39,17 @@ files:
42
39
  - lib/limelight/builtin/players/text_box.rb
43
40
  - lib/limelight/builtin/players.rb
44
41
  - lib/limelight/builtin/styles.rb
42
+ - lib/limelight/builtin/utilities_production
43
+ - lib/limelight/builtin/utilities_production/alert
44
+ - lib/limelight/builtin/utilities_production/alert/players
45
+ - lib/limelight/builtin/utilities_production/alert/props.rb
46
+ - lib/limelight/builtin/utilities_production/alert/styles.rb
47
+ - lib/limelight/builtin/utilities_production/incompatible_version
48
+ - lib/limelight/builtin/utilities_production/incompatible_version/props.rb
49
+ - lib/limelight/builtin/utilities_production/incompatible_version/styles.rb
50
+ - lib/limelight/builtin/utilities_production/production.rb
51
+ - lib/limelight/builtin/utilities_production/stages.rb
52
+ - lib/limelight/builtin/utilities_production/styles.rb
45
53
  - lib/limelight/button_group_cache.rb
46
54
  - lib/limelight/casting_director.rb
47
55
  - lib/limelight/client
@@ -92,11 +100,15 @@ files:
92
100
  - lib/limelight/templates/sources/production
93
101
  - lib/limelight/templates/sources/production/init.rb.template
94
102
  - lib/limelight/templates/sources/production/production.rb.template
103
+ - lib/limelight/templates/sources/production/spec
104
+ - lib/limelight/templates/sources/production/spec/spec_helper.rb.template
95
105
  - lib/limelight/templates/sources/production/stages.rb.template
96
106
  - lib/limelight/templates/sources/production/styles.rb.template
97
107
  - lib/limelight/templates/sources/scene
98
108
  - lib/limelight/templates/sources/scene/props.rb.template
99
109
  - lib/limelight/templates/sources/scene/styles.rb.template
110
+ - lib/limelight/templates/sources/scene_spec
111
+ - lib/limelight/templates/sources/scene_spec/scene_spec.rb.template
100
112
  - lib/limelight/templates/templater.rb
101
113
  - lib/limelight/templates/templater_logger.rb
102
114
  - lib/limelight/theater.rb
@@ -113,6 +125,8 @@ files:
113
125
  - spec/builtin/players/radio_button_spec.rb
114
126
  - spec/builtin/players/text_area_spec.rb
115
127
  - spec/builtin/players/text_box_spec.rb
128
+ - spec/builtin/utilities_production/spec_helper.rb
129
+ - spec/builtin/utilities_production/utilities_production_spec.rb
116
130
  - spec/casting_director_spec.rb
117
131
  - spec/client/playbills_spec.rb
118
132
  - spec/commands/command_spec.rb
@@ -199,6 +213,27 @@ files:
199
213
  - productions/examples/langstons_ant/props.rb
200
214
  - productions/examples/langstons_ant/styles.rb
201
215
  - productions/examples/sandbox
216
+ - productions/examples/sandbox/alerts
217
+ - productions/examples/sandbox/alerts/incompatible_production
218
+ - productions/examples/sandbox/alerts/incompatible_production/default_scene
219
+ - productions/examples/sandbox/alerts/incompatible_production/default_scene/players
220
+ - productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb
221
+ - productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb
222
+ - productions/examples/sandbox/alerts/incompatible_production/production.rb
223
+ - productions/examples/sandbox/alerts/incompatible_production/spec
224
+ - productions/examples/sandbox/alerts/incompatible_production/spec/default_scene
225
+ - productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb
226
+ - productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb
227
+ - productions/examples/sandbox/alerts/incompatible_production/stages.rb
228
+ - productions/examples/sandbox/alerts/incompatible_production/styles.rb
229
+ - productions/examples/sandbox/alerts/players
230
+ - productions/examples/sandbox/alerts/players/alerts.rb
231
+ - productions/examples/sandbox/alerts/props.rb
232
+ - productions/examples/sandbox/alerts/styles.rb
233
+ - productions/examples/sandbox/background_images
234
+ - productions/examples/sandbox/background_images/players
235
+ - productions/examples/sandbox/background_images/props.rb
236
+ - productions/examples/sandbox/background_images/styles.rb
202
237
  - productions/examples/sandbox/click_me
203
238
  - productions/examples/sandbox/click_me/players
204
239
  - productions/examples/sandbox/click_me/players/chromaton.rb
@@ -236,6 +271,7 @@ files:
236
271
  - productions/examples/sandbox/images/limelight_spotlight.jpg
237
272
  - productions/examples/sandbox/images/logo.png
238
273
  - productions/examples/sandbox/images/marilyn.jpg
274
+ - productions/examples/sandbox/images/space.png
239
275
  - productions/examples/sandbox/images_scene
240
276
  - productions/examples/sandbox/images_scene/players
241
277
  - productions/examples/sandbox/images_scene/props.rb
@@ -250,6 +286,11 @@ files:
250
286
  - productions/examples/sandbox/inputs/players/text_box_input.rb
251
287
  - productions/examples/sandbox/inputs/props.rb
252
288
  - productions/examples/sandbox/inputs/styles.rb
289
+ - productions/examples/sandbox/kiosk
290
+ - productions/examples/sandbox/kiosk/players
291
+ - productions/examples/sandbox/kiosk/players/kiosk.rb
292
+ - productions/examples/sandbox/kiosk/props.rb
293
+ - productions/examples/sandbox/kiosk/styles.rb
253
294
  - productions/examples/sandbox/players
254
295
  - productions/examples/sandbox/players/sandbox.rb
255
296
  - productions/examples/sandbox/rounded_corners
@@ -279,6 +320,9 @@ files:
279
320
  - productions/examples/sandbox/sounds/players/clip.rb
280
321
  - productions/examples/sandbox/sounds/props.rb
281
322
  - productions/examples/sandbox/sounds/styles.rb
323
+ - productions/examples/sandbox/spec
324
+ - productions/examples/sandbox/spec/alerts
325
+ - productions/examples/sandbox/spec/alerts/alerts_spec.rb
282
326
  - productions/examples/sandbox/stages.rb
283
327
  - productions/examples/sandbox/styles.rb
284
328
  - productions/examples/sandbox/teaser
@@ -315,7 +359,13 @@ files:
315
359
  - productions/startup/images
316
360
  - productions/startup/images/logo.png
317
361
  - productions/startup/images/splash.png
362
+ - productions/startup/production.rb
363
+ - productions/startup/spec
364
+ - productions/startup/spec/default_scene
365
+ - productions/startup/spec/default_scene/default_scene_spec.rb
366
+ - productions/startup/spec/spec_helper.rb
318
367
  - productions/startup/stages.rb
368
+ - productions/startup/styles.rb
319
369
  - productions/startup/welcome
320
370
  - productions/startup/welcome/players
321
371
  - productions/startup/welcome/players/browse_button.rb
@@ -355,7 +405,7 @@ rubyforge_project: limelight
355
405
  rubygems_version: 1.3.1
356
406
  signing_key:
357
407
  specification_version: 2
358
- summary: Limelight-0.3.1 - Limelight http://limelight.8thlight.com
408
+ summary: Limelight-0.4.0 - Limelight http://limelight.8thlight.com
359
409
  test_files:
360
410
  - spec/casting_director_spec.rb
361
411
  - spec/data_spec.rb
data/lib/i4jruntime.jar DELETED
Binary file
data/lib/junit-4.4.jar DELETED
Binary file