limelight 0.4.0-java → 0.5.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.
- data/lib/limelight.jar +0 -0
- data/lib/limelight/animation.rb +4 -3
- data/lib/limelight/builtin/players.rb +3 -1
- data/lib/limelight/builtin/players/image.rb +4 -0
- data/lib/limelight/builtin/players/stage_mover.rb +31 -0
- data/lib/limelight/builtin/players/stage_sizer.rb +34 -0
- data/lib/limelight/builtin/utilities_production/alert/players/alert.rb +11 -0
- data/lib/limelight/builtin/utilities_production/alert/props.rb +3 -0
- data/lib/limelight/builtin/utilities_production/alert/styles.rb +7 -0
- data/lib/limelight/builtin/utilities_production/incompatible_version/props.rb +3 -0
- data/lib/limelight/builtin/utilities_production/incompatible_version/styles.rb +3 -0
- data/lib/limelight/builtin/utilities_production/production.rb +3 -0
- data/lib/limelight/builtin/utilities_production/stages.rb +3 -0
- data/lib/limelight/builtin/utilities_production/styles.rb +3 -0
- data/lib/limelight/casting_director.rb +1 -1
- data/lib/limelight/commands/create_command.rb +33 -19
- data/lib/limelight/commands/freeze_command.rb +20 -5
- data/lib/limelight/commands/open_command.rb +2 -1
- data/lib/limelight/dsl/styles_builder.rb +40 -18
- data/lib/limelight/file_loader.rb +1 -1
- data/lib/limelight/gems.rb +3 -1
- data/lib/limelight/java_couplings.rb +1 -0
- data/lib/limelight/producer.rb +4 -47
- data/lib/limelight/production.rb +20 -0
- data/lib/limelight/prop.rb +32 -32
- data/lib/limelight/scene.rb +2 -1
- data/lib/limelight/specs/spec_helper.rb +24 -22
- data/lib/limelight/specs/test_scene_opener.rb +60 -0
- data/lib/limelight/string.rb +1 -1
- data/lib/limelight/studio.rb +28 -9
- data/lib/limelight/templates/production_templater.rb +5 -2
- data/lib/limelight/templates/scene_templater.rb +7 -6
- data/lib/limelight/templates/sources/production/production.rb.template +1 -1
- data/lib/limelight/templates/sources/production/spec/spec_helper.rb.template +8 -1
- data/lib/limelight/version.rb +1 -1
- data/productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb +3 -0
- data/productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb +3 -0
- data/productions/examples/sandbox/alerts/incompatible_production/production.rb +3 -0
- data/productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb +3 -0
- data/productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb +3 -0
- data/productions/examples/sandbox/alerts/incompatible_production/stages.rb +3 -0
- data/productions/examples/sandbox/alerts/incompatible_production/styles.rb +3 -0
- data/productions/examples/sandbox/alerts/players/alerts.rb +3 -0
- data/productions/examples/sandbox/alerts/props.rb +3 -0
- data/productions/examples/sandbox/alerts/styles.rb +3 -0
- data/productions/examples/sandbox/background_images/props.rb +3 -0
- data/productions/examples/sandbox/header.rb +1 -0
- data/productions/examples/sandbox/images_scene/props.rb +8 -0
- data/productions/examples/sandbox/kiosk/players/kiosk.rb +3 -0
- data/productions/examples/sandbox/kiosk/props.rb +3 -0
- data/productions/examples/sandbox/kiosk/styles.rb +3 -0
- data/productions/examples/sandbox/spec/alerts/alerts_spec.rb +3 -0
- data/productions/examples/sandbox/stage_handles/players/sizer.rb +35 -0
- data/productions/examples/sandbox/stage_handles/props.rb +17 -0
- data/productions/examples/sandbox/stage_handles/styles.rb +58 -0
- data/productions/playbills.lll +1 -0
- data/productions/startup/production.rb +3 -0
- data/productions/startup/spec/default_scene/default_scene_spec.rb +3 -0
- data/productions/startup/spec/spec_helper.rb +3 -0
- data/productions/startup/styles.rb +3 -0
- data/spec/{builtin → limelight/builtin}/players/button_spec.rb +1 -1
- data/spec/{builtin → limelight/builtin}/players/check_box_spec.rb +1 -1
- data/spec/{builtin → limelight/builtin}/players/combo_box_spec.rb +1 -1
- data/spec/{builtin → limelight/builtin}/players/image_spec.rb +1 -2
- data/spec/{builtin → limelight/builtin}/players/password_box_spec.rb +1 -1
- data/spec/{builtin → limelight/builtin}/players/radio_button_spec.rb +1 -1
- data/spec/limelight/builtin/players/stage_mover_spec.rb +36 -0
- data/spec/limelight/builtin/players/stage_sizer_spec.rb +40 -0
- data/spec/{builtin → limelight/builtin}/players/text_area_spec.rb +1 -1
- data/spec/{builtin → limelight/builtin}/players/text_box_spec.rb +1 -1
- data/spec/limelight/builtin/utilities_production/spec_helper.rb +7 -0
- data/spec/{builtin → limelight/builtin}/utilities_production/utilities_production_spec.rb +3 -0
- data/spec/{casting_director_spec.rb → limelight/casting_director_spec.rb} +1 -1
- data/spec/{client → limelight/client}/playbills_spec.rb +1 -1
- data/spec/{commands → limelight/commands}/command_spec.rb +1 -1
- data/spec/{commands → limelight/commands}/create_command_spec.rb +23 -19
- data/spec/limelight/commands/freeze_command_spec.rb +143 -0
- data/spec/{commands → limelight/commands}/help_command_spec.rb +1 -1
- data/spec/{commands → limelight/commands}/open_command_spec.rb +1 -1
- data/spec/{commands → limelight/commands}/pack_command_spec.rb +1 -1
- data/spec/{commands → limelight/commands}/unpack_command_spec.rb +1 -1
- data/spec/{data_spec.rb → limelight/data_spec.rb} +1 -1
- data/spec/{dsl → limelight/dsl}/prop_builder_spec.rb +1 -1
- data/spec/{dsl → limelight/dsl}/stage_builder_spec.rb +1 -1
- data/spec/{dsl → limelight/dsl}/styles_builder_spec.rb +52 -13
- data/spec/{file_chooser_spec.rb → limelight/file_chooser_spec.rb} +1 -1
- data/spec/{file_filter_spec.rb → limelight/file_filter_spec.rb} +1 -1
- data/spec/{file_loader_spec.rb → limelight/file_loader_spec.rb} +1 -1
- data/spec/{gems_spec.rb → limelight/gems_spec.rb} +10 -4
- data/spec/{java_util_spec.rb → limelight/java_util_spec.rb} +1 -1
- data/spec/{main_spec.rb → limelight/main_spec.rb} +1 -1
- data/spec/{paint_action_spec.rb → limelight/paint_action_spec.rb} +1 -1
- data/spec/{pen_spec.rb → limelight/pen_spec.rb} +1 -1
- data/spec/{producer_spec.rb → limelight/producer_spec.rb} +4 -12
- data/spec/{production_spec.rb → limelight/production_spec.rb} +32 -11
- data/spec/{prop_spec.rb → limelight/prop_spec.rb} +30 -2
- data/spec/{scene_spec.rb → limelight/scene_spec.rb} +28 -2
- data/spec/{stage_spec.rb → limelight/stage_spec.rb} +1 -1
- data/spec/{string_spec.rb → limelight/string_spec.rb} +1 -1
- data/spec/{studio_spec.rb → limelight/studio_spec.rb} +16 -1
- data/spec/{styles_spec.rb → limelight/styles_spec.rb} +1 -1
- data/spec/{templates → limelight/templates}/production_templater_spec.rb +17 -6
- data/spec/{templates → limelight/templates}/scene_templater_spec.rb +15 -4
- data/spec/{templates → limelight/templates}/templater_logger_spec.rb +1 -1
- data/spec/{templates → limelight/templates}/templater_spec.rb +1 -1
- data/spec/{theater_spec.rb → limelight/theater_spec.rb} +1 -1
- data/spec/{util → limelight/util}/downloader_spec.rb +1 -1
- data/spec/spec_helper.rb +11 -0
- metadata +62 -70
- data/lib/limelight/dsl/production_builder.rb +0 -71
- data/spec/builtin/utilities_production/spec_helper.rb +0 -4
- data/spec/commands/freeze_command_spec.rb +0 -62
- data/spec/dsl/production_builder_spec.rb +0 -46
|
@@ -1,71 +0,0 @@
|
|
|
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
|
-
|
|
4
|
-
require 'limelight/production'
|
|
5
|
-
require 'limelight/limelight_exception'
|
|
6
|
-
require 'limelight/util'
|
|
7
|
-
|
|
8
|
-
module Limelight
|
|
9
|
-
|
|
10
|
-
# A trigger to configure Production objects using the ProductionBuilder DSL.
|
|
11
|
-
#
|
|
12
|
-
# See Limelight::ProductionBuilder
|
|
13
|
-
#
|
|
14
|
-
def self.build_production(production, &block)
|
|
15
|
-
builder = DSL::ProductionBuilder.new(production)
|
|
16
|
-
builder.instance_eval(&block) if block
|
|
17
|
-
return builder.__production__
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
module DSL
|
|
21
|
-
# The basis of the DSL for building Style objects.
|
|
22
|
-
#
|
|
23
|
-
# name "Stage Composer"
|
|
24
|
-
# attribute :controller
|
|
25
|
-
# attribute :inspector
|
|
26
|
-
#
|
|
27
|
-
# The above example names the Production 'Stage Composer' and creates two attributes on the Production: 'controller'
|
|
28
|
-
# and 'inspector'
|
|
29
|
-
#
|
|
30
|
-
class ProductionBuilder
|
|
31
|
-
|
|
32
|
-
Limelight::Util.lobotomize(self)
|
|
33
|
-
|
|
34
|
-
class << self
|
|
35
|
-
|
|
36
|
-
attr_accessor :current_attribute
|
|
37
|
-
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
attr_reader :__production__
|
|
41
|
-
|
|
42
|
-
def initialize(production)
|
|
43
|
-
@__production__ = production
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def method_missing(sym, value) #:nodoc:
|
|
47
|
-
setter_sym = "#{sym}=".to_s
|
|
48
|
-
raise ProductionBuilderException.new(sym) if !@__production__.respond_to?(setter_sym)
|
|
49
|
-
@__production__.send(setter_sym, value)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# Creates an attribute on the Production
|
|
53
|
-
#
|
|
54
|
-
def attribute(sym)
|
|
55
|
-
ProductionBuilder.current_attribute = sym
|
|
56
|
-
class << @__production__
|
|
57
|
-
attr_accessor ProductionBuilder.current_attribute
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Thrown if there is an error in the ProductionBuilder DSL
|
|
63
|
-
#
|
|
64
|
-
class ProductionBuilderException < LimelightException
|
|
65
|
-
def initialize(name)
|
|
66
|
-
super("'#{name}' is not a valid production property")
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
end
|
|
71
|
-
end
|
|
@@ -1,62 +0,0 @@
|
|
|
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
|
-
|
|
4
|
-
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
5
|
-
require 'limelight/commands/freeze_command'
|
|
6
|
-
|
|
7
|
-
describe Limelight::Commands::FreezeCommand do
|
|
8
|
-
|
|
9
|
-
before(:all) do
|
|
10
|
-
@command_class = Limelight::Commands::FreezeCommand
|
|
11
|
-
@command = @command_class.new
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
before(:each) do
|
|
15
|
-
@command = @command_class.new
|
|
16
|
-
@command.instance_eval("def usage(e=nil); raise 'Usage called! ' + e; end;")
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it "should be listed" do
|
|
20
|
-
Limelight::Commands::LISTING["freeze"].should == @command_class
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
it "should parse no options" do
|
|
24
|
-
@command.parse ["some_gem"]
|
|
25
|
-
|
|
26
|
-
@command.gem_name.should == "some_gem"
|
|
27
|
-
@command.production_path.should == "."
|
|
28
|
-
@command.gem_version.should == nil
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
it "should parse production path option" do
|
|
32
|
-
@command.parse ["-p", "prod/path", "some_gem"]
|
|
33
|
-
@command.gem_name.should == "some_gem"
|
|
34
|
-
@command.production_path.should == "prod/path"
|
|
35
|
-
|
|
36
|
-
@command.parse ["--production=prod/path2", "some_gem"]
|
|
37
|
-
@command.gem_name.should == "some_gem"
|
|
38
|
-
@command.production_path.should == "prod/path2"
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
it "should parse version option" do
|
|
42
|
-
@command.parse ["-v", "1.2.3", "some_gem"]
|
|
43
|
-
@command.gem_name.should == "some_gem"
|
|
44
|
-
@command.gem_version.should == "1.2.3"
|
|
45
|
-
|
|
46
|
-
@command.parse ["--version=3.2.1", "some_gem"]
|
|
47
|
-
@command.gem_name.should == "some_gem"
|
|
48
|
-
@command.gem_version.should == "3.2.1"
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
it "should check if it's a gem file" do
|
|
52
|
-
@command.is_gem_file?("some.gem").should == true
|
|
53
|
-
@command.is_gem_file?("some-java_0.2.1.gem").should == true
|
|
54
|
-
@command.is_gem_file?("/some.gem").should == true
|
|
55
|
-
@command.is_gem_file?("/dir/dir2/some.gem").should == true
|
|
56
|
-
@command.is_gem_file?("../dir/dir2/some.gem").should == true
|
|
57
|
-
|
|
58
|
-
@command.is_gem_file?("some_gem").should == false
|
|
59
|
-
@command.is_gem_file?("some_gem-java.0.3.1").should == false
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
end
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
|
|
4
|
-
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
5
|
-
require 'limelight/dsl/production_builder'
|
|
6
|
-
|
|
7
|
-
describe Limelight::DSL::ProductionBuilder do
|
|
8
|
-
|
|
9
|
-
before(:each) do
|
|
10
|
-
@production = Limelight::Production.new("/tmp")
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
it "should build a production" do
|
|
14
|
-
result = Limelight.build_production(@production)
|
|
15
|
-
|
|
16
|
-
result.should == @production
|
|
17
|
-
result.path.should == "/tmp"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it "should build able to set the production's name" do
|
|
21
|
-
result = Limelight.build_production(@production) do
|
|
22
|
-
name "My Production"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
result.name.should == "My Production"
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
it "should build attribute accessors" do
|
|
29
|
-
result = Limelight.build_production(@production) do
|
|
30
|
-
name "My Production2"
|
|
31
|
-
attribute :foo
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
result.respond_to?(:foo).should == true
|
|
35
|
-
result.foo = "foo"
|
|
36
|
-
result.foo.should == "foo"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
it "should raise an exception when setting an invalid property" do
|
|
40
|
-
lambda do
|
|
41
|
-
Limelight::build_production(@production) do
|
|
42
|
-
blah "blah"
|
|
43
|
-
end
|
|
44
|
-
end.should raise_error(Limelight::DSL::ProductionBuilderException, "'blah' is not a valid production property")
|
|
45
|
-
end
|
|
46
|
-
end
|