limelight 0.3.1-java → 0.4.0-java

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.
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/lib/init.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
  $LIMELIGHT_LIB = File.expand_path(File.dirname(__FILE__))
@@ -6,7 +6,10 @@ $: << $LIMELIGHT_LIB unless $:.include?($LIMELIGHT_LIB)
6
6
  $LIMELIGHT_HOME = File.expand_path(File.join($LIMELIGHT_LIB, ".."))
7
7
 
8
8
  require 'java'
9
- require File.expand_path(File.dirname(__FILE__) + "/limelight.jar")
9
+ if File.exists?(File.dirname(__FILE__) + "/limelight.jar")
10
+ require File.expand_path(File.dirname(__FILE__) + "/limelight.jar")
11
+ end
12
+
10
13
 
11
14
  # ENV["GEM_HOME"] = ENV["GEM_PATH"] = File.expand_path(File.dirname(__FILE__) + "/../../jruby/lib/ruby/gems/1.8")
12
15
  require 'rubygems'
@@ -1,6 +1,6 @@
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
  module Limelight
5
5
 
6
6
  # An object to manage a seqeunce of changes, assuably to a prop. The Animation object is constructed with options
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -80,9 +80,7 @@ module Limelight
80
80
  end
81
81
 
82
82
  curtains.add(popup_list)
83
- puts "Adding popuplist to curtains"
84
- scene.add(curtains)
85
- puts "curtains added to scene"
83
+ scene.add(curtains)
86
84
  end
87
85
 
88
86
  end
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -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
  module Limelight
2
5
  module Builtin
3
6
  module Players
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -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
  module Limelight
@@ -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 'limelight/builtin/players/button'
@@ -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
  limelight_builtin_players_curtains {
@@ -0,0 +1,5 @@
1
+ title :id => "title", :text => "Limelight Alert"
2
+ advise :id => "message", :text => @message
3
+ buttons do
4
+ button :id => "ok_button", :text => "OK", :players => "button", :on_button_pressed => "production.process_alert_response(true)"
5
+ end
@@ -0,0 +1,7 @@
1
+ alert {
2
+ background_color "#b2db5b"
3
+ secondary_background_color "#8fc927"
4
+ gradient :on
5
+ gradient_angle 270
6
+ padding 20
7
+ }
@@ -0,0 +1,17 @@
1
+ title :text => "Incompatible Version"
2
+ label :text => "Production:"
3
+ bold_label :id => "production_name_label", :text => @production_name
4
+ label :text => "Minimum Required Version:"
5
+ bold_label :id => "required_version_label", :text => @required_version
6
+ label :text => "Current Limelight Version:"
7
+ bold_label :id => "current_version_label", :text => Limelight::VERSION::STRING
8
+ advise_text = <<END
9
+ To open this production, it is recommended that you install a newer version of Limelight. Proceeding to open this production with the current version may lead to unpredictable results.
10
+
11
+ Would you like to open this production anyway?
12
+ END
13
+ advise :text => advise_text
14
+ buttons do
15
+ button :id => "cancel_button", :text => "Cancel", :players => "button", :on_button_pressed => "production.process_incompatible_version_response(false)"
16
+ button :id => "proceed_button", :width => "150", :text => "Open Production", :players => "button", :on_button_pressed => "production.process_incompatible_version_response(true)"
17
+ end
@@ -0,0 +1,9 @@
1
+ incompatible_version {
2
+ background_color "#b2db5b"
3
+ secondary_background_color "#8fc927"
4
+ gradient :on
5
+ gradient_angle 270
6
+ # rounded_corner_radius 15
7
+ padding 20
8
+ }
9
+
@@ -0,0 +1,59 @@
1
+ require 'monitor'
2
+
3
+ module Production
4
+
5
+ def production_opening
6
+ @monitor = Monitor.new
7
+ @alert_monitor = @monitor.new_cond
8
+ end
9
+
10
+ def default_scene
11
+ nil
12
+ end
13
+
14
+ def process_incompatible_version_response(response)
15
+ @incompatible_version_response = response
16
+ @incompatible_version_stage.close
17
+ @main_thread.run
18
+ end
19
+
20
+ def proceed_with_incompatible_version?(production_name, required_version)
21
+ @incompatible_version_response = nil
22
+ @main_thread = Thread.current
23
+ load_incompatible_version_scene(production_name, required_version)
24
+ while @incompatible_version_response == nil
25
+ Thread.stop
26
+ end
27
+ return @incompatible_version_response
28
+ end
29
+
30
+ def load_incompatible_version_scene(production_name, required_version)
31
+ if !theater["Incompatible Version"]
32
+ @incompatible_version_stage = theater.add_stage("Incompatible Version", :location => [:center, :center], :size => [400, :auto],
33
+ :background_color => :white, :framed => false, :always_on_top => true, :vital => false)
34
+ end
35
+ producer.open_scene("incompatible_version", @incompatible_version_stage, :instance_variables => { :production_name => production_name, :required_version => required_version })
36
+ end
37
+
38
+ def alert(message)
39
+ @alert_monitor = @monitor.new_cond
40
+ load_alert_scene(message)
41
+ @monitor.synchronize{ @alert_monitor.wait }
42
+ @alert_stage.close
43
+ return @alert_response
44
+ end
45
+
46
+ def process_alert_response(response)
47
+ @alert_response = response
48
+ @monitor.synchronize{ @alert_monitor.signal } if @alert_monitor
49
+ end
50
+
51
+ def load_alert_scene(message)
52
+ if !theater["Alert"]
53
+ @alert_stage = theater.add_stage("Alert", :location => [:center, :center], :size => [400, :auto],
54
+ :background_color => :white, :framed => false, :always_on_top => true, :vital => false)
55
+ end
56
+ producer.open_scene("alert", @alert_stage, :instance_variables => { :message => message })
57
+ end
58
+
59
+ end
@@ -0,0 +1,9 @@
1
+ #stage "default" do
2
+ # default_scene :incompatible_version
3
+ # location :center, :center
4
+ # size 400, :auto
5
+ # background_color "#fff"
6
+ ## background_color :transparent
7
+ # framed false
8
+ # always_on_top true
9
+ #end
@@ -0,0 +1,50 @@
1
+ title {
2
+ width "100%"
3
+ font_size 30
4
+ font_face "Arial Rounded MT Bold"
5
+ text_color :white
6
+ horizontal_alignment :center
7
+ bottom_padding 10
8
+ }
9
+
10
+ label {
11
+ width "50%"
12
+ font_size 12
13
+ font_face :arial
14
+ font_style :plain
15
+ text_color "#363636"
16
+ horizontal_alignment :right
17
+ right_padding 5
18
+ }
19
+
20
+ bold_label {
21
+ width "50%"
22
+ min_height 1
23
+ font_size 12
24
+ font_face :arial
25
+ font_style :bold
26
+ text_color "#363636"
27
+ horizontal_alignment :left
28
+ left_padding 5
29
+ }
30
+
31
+ advise {
32
+ width "100%"
33
+ font_size 12
34
+ font_face :arial
35
+ font_style :plain
36
+ text_color "#363636"
37
+ horizontal_alignment :left
38
+ top_padding 10
39
+ }
40
+
41
+ buttons {
42
+ width "100%"
43
+ padding 5
44
+ horizontal_alignment :center
45
+ top_padding 20
46
+ }
47
+
48
+ button {
49
+ # background_color "#bad452"
50
+ }
@@ -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
  module Limelight
@@ -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 'limelight/builtin/players'
@@ -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 'rexml/document'
2
5
  require 'uri'
3
6
  require 'net/http'
@@ -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 'optparse'
2
5
 
3
6
  module Limelight
@@ -8,17 +11,20 @@ module Limelight
8
11
  class << self
9
12
 
10
13
  def [](name) #:nodoc:
11
- load_listing if !@listing_loaded
14
+ name = "help" if name.to_s.empty?
15
+ if LISTING[name].nil?
16
+ load_command(name)
17
+ end
18
+
12
19
  return LISTING[name]
13
20
  end
14
21
 
15
- def load_listing #:nodoc:
16
- Dir.entries(File.dirname(__FILE__)).each do |file|
17
- if file != "." && file != ".."
18
- require "limelight/commands/#{file.gsub('.rb', '')}"
19
- end
22
+ def load_command(name)
23
+ begin
24
+ name = name.gsub('-', '')
25
+ require "limelight/commands/#{name}_command"
26
+ rescue LoadError => e
20
27
  end
21
- @listing_loaded = true
22
28
  end
23
29
 
24
30
  def output=(value) #:nodoc:
@@ -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 'limelight/commands/command'
2
5
 
3
6
  module Limelight
@@ -25,12 +28,13 @@ module Limelight
25
28
  return "Creates the directories and files for a production and/or scene."
26
29
  end
27
30
 
28
- protected ###########################################
31
+ attr_reader :template_type, :path, :scene_name, :production_path #:nodoc:
29
32
 
30
- attr_reader :template_type, :path, :default_scene_name #:nodoc:
33
+ protected ###########################################
31
34
 
32
35
  def initialize #:nodoc:
33
- @default_scene_name = "default_scene"
36
+ @scene_name = "default_scene"
37
+ @production_path = "."
34
38
  @actions = {}
35
39
  @actions["production"] = :create_production
36
40
  @actions["scene"] = :create_scene
@@ -42,7 +46,7 @@ module Limelight
42
46
  end
43
47
 
44
48
  def parameter_description #:nodoc:
45
- return "[options] <production|scene> <path>"
49
+ return "[options] <production|scene> <name>"
46
50
  end
47
51
 
48
52
  def parse_remainder(args) #:nodoc:
@@ -59,18 +63,19 @@ module Limelight
59
63
  end
60
64
 
61
65
  def build_options(spec) #:nodoc:
62
- spec.on("-s <name>", "--scene=<name>", "Name of scene when creating a production. Defaults to 'default_scene'.") { |value| @default_scene_name = value}
66
+ spec.on("-s <name>", "--scene=<name>", "Name of scene when creating a production. Defaults to 'default_scene'.") { |value| @scene_name = value}
67
+ spec.on("-p <path>", "--production_path=<path>", "Path of production to contain scene. Defaults to '.'.") { |value| @production_path = value}
63
68
  end
64
69
 
65
70
  private #############################################
66
71
 
67
72
  def create_production
68
- Templates::ProductionTemplater.new(@path, @default_scene_name).generate
69
- Templates::SceneTemplater.new("#{@path}/#{@default_scene_name}").generate
73
+ Templates::ProductionTemplater.new(@path, @scene_name).generate
74
+ Templates::SceneTemplater.new(@path, @scene_name).generate
70
75
  end
71
76
 
72
77
  def create_scene
73
- Templates::SceneTemplater.new(@path).generate
78
+ Templates::SceneTemplater.new(@production_path, @path).generate
74
79
  end
75
80
 
76
81
  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 'limelight/commands/command'
2
5
 
3
6
  module Limelight
@@ -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 'limelight/commands/command'
@@ -19,6 +19,8 @@ module Limelight
19
19
  protected ###########################################
20
20
 
21
21
  def process #:nodoc:
22
+ load_listing
23
+
22
24
  @options = []
23
25
  @commands = []
24
26
  sort_commands
@@ -40,6 +42,15 @@ module Limelight
40
42
  @commands << "\t#{key}\t\t#{command.description}"
41
43
  end
42
44
  end
45
+ @commands.sort!
46
+ end
47
+
48
+ def load_listing #:nodoc:
49
+ Dir.entries(File.dirname(__FILE__)).each do |file|
50
+ if file != "." && file != ".."
51
+ require "limelight/commands/#{file.gsub('.rb', '')}"
52
+ end
53
+ end
43
54
  end
44
55
 
45
56
  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 'limelight/commands/command'
2
5
 
3
6
  module Limelight
@@ -16,6 +19,8 @@ module Limelight
16
19
 
17
20
  DEFAULT_PRODUCTION = File.expand_path($LIMELIGHT_HOME + "/productions/startup")
18
21
 
22
+ attr_reader :drb_port
23
+
19
24
  def initialize
20
25
  self.print_backtrace = true
21
26
  end
@@ -35,12 +40,17 @@ module Limelight
35
40
  require 'limelight/producer'
36
41
  end
37
42
 
43
+ def build_options(spec) #:nodoc:
44
+ spec.on("-d <port>", "--drb_port=<port>", "Publish the opened production using DRb on the specified port.") { |value| @drb_port = value }
45
+ end
46
+
38
47
  def parse_remainder(args)
39
48
  @production_path = args.shift || DEFAULT_PRODUCTION
40
49
  end
41
50
 
42
51
  def process
43
- Limelight::Producer.open(@production_path)
52
+ Studio.publish_on_drb(@drb_port.to_i) if @drb_port
53
+ Studio.open(@production_path)
44
54
  end
45
55
 
46
56
  end
@@ -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 'limelight/commands/command'
@@ -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 'limelight/commands/command'
@@ -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 'limelight/commands/command'
@@ -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
  module Limelight
2
5
 
3
6
  class Data
@@ -9,7 +12,7 @@ module Limelight
9
12
  end
10
13
 
11
14
  def root
12
- @root = calculate_root if @root == nil
15
+ @root = Context.instance.os.dataRoot if @root == nil
13
16
  return @root
14
17
  end
15
18
 
@@ -27,19 +30,6 @@ module Limelight
27
30
  Dir.mkdir(productions_dir) if !File.exists?(productions_dir)
28
31
  end
29
32
 
30
- private #############################################
31
-
32
- def calculate_root
33
- case Context.instance.os
34
- when "osx"
35
- return File.expand_path(File.join("~/Library/Application Support/Limelight"))
36
- when "windows"
37
- return File.expand_path(File.join("~/Application Data/Limelight"))
38
- else
39
- raise "Unknown operating system: #{Context.os}"
40
- end
41
- end
42
-
43
33
  end
44
34
 
45
35
  end
@@ -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
  module Limelight
@@ -35,17 +35,21 @@ module Limelight
35
35
 
36
36
  def build_error_message
37
37
  lines = @file_contents.split("\n")
38
- start_line = @line_number - 4 < 0 ? 0 : @line_number - 4
39
- end_line = @line_number + 2 >= lines.size ? lines.size - 1: @line_number + 2
40
- message = "#{@filename}:#{@line_number}: #{@original_exception.message}"
41
- message << "\n\t----- #{@filename} lines #{start_line + 1} - #{end_line + 1} -----"
42
- (start_line..end_line).each do |i|
43
- message << "\n\t#{i == @line_number - 1 ? "*": " "} #{i+1}: #{lines[i]}"
38
+ if @line_number
39
+ start_line = @line_number - 4 < 0 ? 0 : @line_number - 4
40
+ end_line = @line_number + 2 >= lines.size ? lines.size - 1: @line_number + 2
41
+ message = "#{@filename}:#{@line_number}: #{@original_exception.message}"
42
+ message << "\n\t----- #{@filename} lines #{start_line + 1} - #{end_line + 1} -----"
43
+ (start_line..end_line).each do |i|
44
+ message << "\n\t#{i == @line_number - 1 ? "*": " "} #{i+1}: #{lines[i]}"
45
+ end
46
+ else
47
+ message = "#{@filename}:? : #{@original_exception.message}"
44
48
  end
45
49
  message << "\n"
46
50
  return message
47
51
  end
48
52
  end
49
-
53
+
50
54
  end
51
55
  end
@@ -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
  module Limelight
@@ -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 'limelight/production'
@@ -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 'limelight/prop'
@@ -12,7 +12,7 @@ module Limelight
12
12
  #
13
13
  # See Limelight::PropBuilder
14
14
  #
15
- def self.build_scene(root, options={}, &block)
15
+ def self.build_props(root, options={}, &block)
16
16
  loader = options.delete(:build_loader)
17
17
  instance_variables = options.delete(:instance_variables)
18
18
  root.add_options(options)
@@ -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 'limelight/stage'
@@ -86,10 +86,10 @@ module Limelight
86
86
  @__stage__.default_scene = scene_name
87
87
  end
88
88
 
89
- def method_missing(sym, value) #:nodoc:
89
+ def method_missing(sym, *values) #:nodoc:
90
90
  setter_sym = "#{sym}=".to_s
91
91
  raise StageBuilderException.new(sym) if !@__stage__.respond_to?(setter_sym)
92
- @__stage__.send(setter_sym, value)
92
+ @__stage__.send(setter_sym, *values)
93
93
  end
94
94
  end
95
95
 
@@ -1,5 +1,6 @@
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
  require 'limelight/util'
4
5
 
5
6
  module Limelight
@@ -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 'limelight/file_filter'