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.
- data/lib/init.rb +5 -2
- data/lib/limelight/animation.rb +2 -2
- data/lib/limelight/builtin/players/button.rb +1 -1
- data/lib/limelight/builtin/players/check_box.rb +1 -1
- data/lib/limelight/builtin/players/combo_box.rb +2 -4
- data/lib/limelight/builtin/players/combo_box_popup_list.rb +1 -1
- data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +1 -1
- data/lib/limelight/builtin/players/curtains.rb +1 -1
- data/lib/limelight/builtin/players/image.rb +3 -0
- data/lib/limelight/builtin/players/password_box.rb +1 -1
- data/lib/limelight/builtin/players/radio_button.rb +1 -1
- data/lib/limelight/builtin/players/text_area.rb +1 -1
- data/lib/limelight/builtin/players/text_box.rb +1 -1
- data/lib/limelight/builtin/players.rb +1 -1
- data/lib/limelight/builtin/styles.rb +1 -1
- data/lib/limelight/builtin/utilities_production/alert/props.rb +5 -0
- data/lib/limelight/builtin/utilities_production/alert/styles.rb +7 -0
- data/lib/limelight/builtin/utilities_production/incompatible_version/props.rb +17 -0
- data/lib/limelight/builtin/utilities_production/incompatible_version/styles.rb +9 -0
- data/lib/limelight/builtin/utilities_production/production.rb +59 -0
- data/lib/limelight/builtin/utilities_production/stages.rb +9 -0
- data/lib/limelight/builtin/utilities_production/styles.rb +50 -0
- data/lib/limelight/button_group_cache.rb +1 -1
- data/lib/limelight/casting_director.rb +1 -1
- data/lib/limelight/client/playbills.rb +3 -0
- data/lib/limelight/commands/command.rb +13 -7
- data/lib/limelight/commands/create_command.rb +13 -8
- data/lib/limelight/commands/freeze_command.rb +3 -0
- data/lib/limelight/commands/help_command.rb +12 -1
- data/lib/limelight/commands/open_command.rb +11 -1
- data/lib/limelight/commands/pack_command.rb +1 -1
- data/lib/limelight/commands/unpack_command.rb +1 -1
- data/lib/limelight/commands/version_command.rb +1 -1
- data/lib/limelight/data.rb +4 -14
- data/lib/limelight/dsl/build_exception.rb +12 -8
- data/lib/limelight/dsl/menu_bar.rb +1 -1
- data/lib/limelight/dsl/production_builder.rb +1 -1
- data/lib/limelight/dsl/prop_builder.rb +2 -2
- data/lib/limelight/dsl/stage_builder.rb +3 -3
- data/lib/limelight/dsl/styles_builder.rb +2 -1
- data/lib/limelight/file_chooser.rb +1 -1
- data/lib/limelight/file_filter.rb +1 -1
- data/lib/limelight/file_loader.rb +1 -1
- data/lib/limelight/gems.rb +4 -0
- data/lib/limelight/java_couplings.rb +3 -2
- data/lib/limelight/java_util.rb +1 -1
- data/lib/limelight/limelight_exception.rb +1 -1
- data/lib/limelight/main.rb +1 -1
- data/lib/limelight/paint_action.rb +1 -1
- data/lib/limelight/pen.rb +1 -1
- data/lib/limelight/producer.rb +52 -37
- data/lib/limelight/production.rb +81 -43
- data/lib/limelight/prop.rb +32 -13
- data/lib/limelight/scene.rb +19 -14
- data/lib/limelight/specs/spec_helper.rb +55 -28
- data/lib/limelight/stage.rb +163 -23
- data/lib/limelight/string.rb +3 -0
- data/lib/limelight/studio.rb +143 -6
- data/lib/limelight/styles.rb +14 -1
- data/lib/limelight/templates/production_templater.rb +6 -2
- data/lib/limelight/templates/scene_templater.rb +12 -7
- data/lib/limelight/templates/sources/production/production.rb.template +46 -6
- data/lib/limelight/templates/sources/production/spec/spec_helper.rb.template +5 -0
- data/lib/limelight/templates/sources/scene_spec/scene_spec.rb.template +13 -0
- data/lib/limelight/templates/templater.rb +4 -1
- data/lib/limelight/templates/templater_logger.rb +3 -0
- data/lib/limelight/theater.rb +15 -6
- data/lib/limelight/util/downloader.rb +3 -1
- data/lib/limelight/util.rb +8 -7
- data/lib/limelight/version.rb +3 -3
- data/lib/limelight.jar +0 -0
- data/productions/examples/8thlight.com/about/props.rb +1 -1
- data/productions/examples/8thlight.com/about/styles.rb +1 -1
- data/productions/examples/8thlight.com/footer.rb +1 -1
- data/productions/examples/8thlight.com/home/props.rb +1 -1
- data/productions/examples/8thlight.com/home/styles.rb +1 -1
- data/productions/examples/8thlight.com/menu.rb +1 -1
- data/productions/examples/8thlight.com/services/props.rb +1 -1
- data/productions/examples/8thlight.com/services/styles.rb +1 -1
- data/productions/examples/8thlight.com/stages.rb +1 -1
- data/productions/examples/8thlight.com/styles.rb +1 -1
- data/productions/examples/calculator/players/button.rb +1 -1
- data/productions/examples/calculator/players/calculator.rb +1 -1
- data/productions/examples/calculator/players/calculator_model.rb +1 -1
- data/productions/examples/calculator/props.rb +1 -1
- data/productions/examples/calculator/styles.rb +1 -1
- data/productions/examples/langstons_ant/init.rb +3 -0
- data/productions/examples/langstons_ant/players/ant.rb +1 -1
- data/productions/examples/langstons_ant/players/log.rb +1 -1
- data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
- data/productions/examples/langstons_ant/players/world.rb +1 -1
- data/productions/examples/langstons_ant/props.rb +1 -1
- data/productions/examples/langstons_ant/styles.rb +1 -1
- data/productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb +7 -0
- data/productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb +29 -0
- data/productions/examples/sandbox/alerts/incompatible_production/production.rb +49 -0
- data/productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb +13 -0
- data/productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb +5 -0
- data/productions/examples/sandbox/alerts/incompatible_production/stages.rb +17 -0
- data/productions/examples/sandbox/alerts/incompatible_production/styles.rb +12 -0
- data/productions/examples/sandbox/alerts/players/alerts.rb +14 -0
- data/productions/examples/sandbox/alerts/props.rb +7 -0
- data/productions/examples/sandbox/alerts/styles.rb +43 -0
- data/productions/examples/sandbox/background_images/props.rb +19 -0
- data/productions/examples/sandbox/background_images/styles.rb +40 -0
- data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
- data/productions/examples/sandbox/click_me/props.rb +1 -1
- data/productions/examples/sandbox/click_me/styles.rb +1 -1
- data/productions/examples/sandbox/floaters/players/floater.rb +9 -5
- data/productions/examples/sandbox/floaters/players/surface.rb +1 -1
- data/productions/examples/sandbox/floaters/props.rb +1 -1
- data/productions/examples/sandbox/floaters/styles.rb +13 -13
- data/productions/examples/sandbox/frameing/players/sandbox.rb +3 -0
- data/productions/examples/sandbox/frameing/props.rb +3 -0
- data/productions/examples/sandbox/frameing/styles.rb +3 -0
- data/productions/examples/sandbox/gradients/players/spinner.rb +1 -1
- data/productions/examples/sandbox/gradients/players/teaser.rb +1 -1
- data/productions/examples/sandbox/gradients/players/wave.rb +1 -1
- data/productions/examples/sandbox/gradients/players/waves.rb +1 -1
- data/productions/examples/sandbox/gradients/props.rb +1 -1
- data/productions/examples/sandbox/gradients/styles.rb +1 -1
- data/productions/examples/sandbox/header.rb +4 -1
- data/productions/examples/sandbox/homer/players/homer.rb +1 -1
- data/productions/examples/sandbox/homer/props.rb +1 -1
- data/productions/examples/sandbox/homer/styles.rb +2 -2
- data/productions/examples/sandbox/images/space.png +0 -0
- data/productions/examples/sandbox/images_scene/props.rb +3 -0
- data/productions/examples/sandbox/images_scene/styles.rb +3 -0
- data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/combo_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/props.rb +1 -1
- data/productions/examples/sandbox/inputs/styles.rb +1 -1
- data/productions/examples/sandbox/kiosk/players/kiosk.rb +36 -0
- data/productions/examples/sandbox/kiosk/props.rb +6 -0
- data/productions/examples/sandbox/kiosk/styles.rb +34 -0
- data/productions/examples/sandbox/players/sandbox.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
- data/productions/examples/sandbox/scrolling/players/add_button.rb +1 -1
- data/productions/examples/sandbox/scrolling/players/cell.rb +1 -1
- data/productions/examples/sandbox/scrolling/props.rb +1 -1
- data/productions/examples/sandbox/scrolling/styles.rb +1 -1
- data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
- data/productions/examples/sandbox/sketching/props.rb +1 -1
- data/productions/examples/sandbox/sketching/styles.rb +1 -1
- data/productions/examples/sandbox/sounds/players/clip.rb +1 -1
- data/productions/examples/sandbox/sounds/props.rb +1 -1
- data/productions/examples/sandbox/sounds/styles.rb +1 -1
- data/productions/examples/sandbox/spec/alerts/alerts_spec.rb +13 -0
- data/productions/examples/sandbox/stages.rb +2 -1
- data/productions/examples/sandbox/styles.rb +1 -1
- data/productions/examples/sandbox/teaser/players/fader.rb +1 -1
- data/productions/examples/sandbox/teaser/props.rb +1 -1
- data/productions/examples/sandbox/teaser/styles.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
- data/productions/stage_composer/init.rb +1 -1
- data/productions/stage_composer/inspector/players/inspector.rb +1 -1
- data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
- data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
- data/productions/stage_composer/inspector/players/style_table.rb +1 -1
- data/productions/stage_composer/inspector/players/style_value.rb +1 -1
- data/productions/stage_composer/inspector/props.rb +1 -1
- data/productions/stage_composer/inspector/styles.rb +1 -1
- data/productions/stage_composer/lib/init.rb +1 -1
- data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
- data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
- data/productions/stage_composer/production.rb +1 -1
- data/productions/stage_composer/stages.rb +1 -1
- data/productions/startup/production.rb +49 -0
- data/productions/startup/spec/default_scene/default_scene_spec.rb +13 -0
- data/productions/startup/spec/spec_helper.rb +5 -0
- data/productions/startup/stages.rb +5 -2
- data/productions/startup/styles.rb +12 -0
- data/productions/startup/welcome/players/browse_button.rb +1 -1
- data/productions/startup/welcome/players/download_button.rb +1 -1
- data/productions/startup/welcome/players/sandbox_button.rb +1 -1
- data/productions/startup/welcome/props.rb +2 -2
- data/productions/startup/welcome/styles.rb +1 -1
- data/spec/builtin/players/button_spec.rb +1 -1
- data/spec/builtin/players/check_box_spec.rb +1 -1
- data/spec/builtin/players/combo_box_spec.rb +1 -1
- data/spec/builtin/players/image_spec.rb +3 -0
- data/spec/builtin/players/password_box_spec.rb +1 -1
- data/spec/builtin/players/radio_button_spec.rb +7 -7
- data/spec/builtin/players/text_area_spec.rb +1 -1
- data/spec/builtin/players/text_box_spec.rb +1 -1
- data/spec/builtin/utilities_production/spec_helper.rb +4 -0
- data/spec/builtin/utilities_production/utilities_production_spec.rb +143 -0
- data/spec/casting_director_spec.rb +7 -7
- data/spec/client/playbills_spec.rb +3 -0
- data/spec/commands/command_spec.rb +9 -1
- data/spec/commands/create_command_spec.rb +35 -5
- data/spec/commands/freeze_command_spec.rb +3 -0
- data/spec/commands/help_command_spec.rb +6 -3
- data/spec/commands/open_command_spec.rb +24 -2
- data/spec/commands/pack_command_spec.rb +3 -0
- data/spec/commands/unpack_command_spec.rb +4 -1
- data/spec/data_spec.rb +5 -16
- data/spec/dsl/production_builder_spec.rb +1 -1
- data/spec/dsl/prop_builder_spec.rb +19 -19
- data/spec/dsl/stage_builder_spec.rb +1 -1
- data/spec/dsl/styles_builder_spec.rb +1 -1
- data/spec/file_chooser_spec.rb +1 -1
- data/spec/file_filter_spec.rb +1 -1
- data/spec/file_loader_spec.rb +1 -1
- data/spec/gems_spec.rb +3 -0
- data/spec/java_util_spec.rb +1 -1
- data/spec/main_spec.rb +4 -1
- data/spec/paint_action_spec.rb +1 -1
- data/spec/pen_spec.rb +1 -1
- data/spec/producer_spec.rb +73 -32
- data/spec/production_spec.rb +23 -44
- data/spec/prop_spec.rb +102 -64
- data/spec/scene_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -2
- data/spec/stage_spec.rb +172 -36
- data/spec/string_spec.rb +3 -0
- data/spec/studio_spec.rb +131 -3
- data/spec/styles_spec.rb +3 -0
- data/spec/templates/production_templater_spec.rb +12 -1
- data/spec/templates/scene_templater_spec.rb +17 -2
- data/spec/templates/templater_logger_spec.rb +3 -0
- data/spec/templates/templater_spec.rb +3 -0
- data/spec/theater_spec.rb +16 -1
- data/spec/util/downloader_spec.rb +3 -0
- metadata +56 -6
- data/lib/i4jruntime.jar +0 -0
- 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
|
-
|
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'
|
data/lib/limelight/animation.rb
CHANGED
@@ -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
|
@@ -80,9 +80,7 @@ module Limelight
|
|
80
80
|
end
|
81
81
|
|
82
82
|
curtains.add(popup_list)
|
83
|
-
|
84
|
-
scene.add(curtains)
|
85
|
-
puts "curtains added to scene"
|
83
|
+
scene.add(curtains)
|
86
84
|
end
|
87
85
|
|
88
86
|
end
|
@@ -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,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,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,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
|
-
|
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
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
31
|
+
attr_reader :template_type, :path, :scene_name, :production_path #:nodoc:
|
29
32
|
|
30
|
-
|
33
|
+
protected ###########################################
|
31
34
|
|
32
35
|
def initialize #:nodoc:
|
33
|
-
@
|
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> <
|
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| @
|
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, @
|
69
|
-
Templates::SceneTemplater.new(
|
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,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
|
-
|
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
|
data/lib/limelight/data.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
|
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 =
|
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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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
|
require 'limelight/prop'
|
@@ -12,7 +12,7 @@ module Limelight
|
|
12
12
|
#
|
13
13
|
# See Limelight::PropBuilder
|
14
14
|
#
|
15
|
-
def self.
|
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,
|
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,
|
92
|
+
@__stage__.send(setter_sym, *values)
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|