limelight 0.4.0-java → 0.5.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/lib/limelight.jar +0 -0
  2. data/lib/limelight/animation.rb +4 -3
  3. data/lib/limelight/builtin/players.rb +3 -1
  4. data/lib/limelight/builtin/players/image.rb +4 -0
  5. data/lib/limelight/builtin/players/stage_mover.rb +31 -0
  6. data/lib/limelight/builtin/players/stage_sizer.rb +34 -0
  7. data/lib/limelight/builtin/utilities_production/alert/players/alert.rb +11 -0
  8. data/lib/limelight/builtin/utilities_production/alert/props.rb +3 -0
  9. data/lib/limelight/builtin/utilities_production/alert/styles.rb +7 -0
  10. data/lib/limelight/builtin/utilities_production/incompatible_version/props.rb +3 -0
  11. data/lib/limelight/builtin/utilities_production/incompatible_version/styles.rb +3 -0
  12. data/lib/limelight/builtin/utilities_production/production.rb +3 -0
  13. data/lib/limelight/builtin/utilities_production/stages.rb +3 -0
  14. data/lib/limelight/builtin/utilities_production/styles.rb +3 -0
  15. data/lib/limelight/casting_director.rb +1 -1
  16. data/lib/limelight/commands/create_command.rb +33 -19
  17. data/lib/limelight/commands/freeze_command.rb +20 -5
  18. data/lib/limelight/commands/open_command.rb +2 -1
  19. data/lib/limelight/dsl/styles_builder.rb +40 -18
  20. data/lib/limelight/file_loader.rb +1 -1
  21. data/lib/limelight/gems.rb +3 -1
  22. data/lib/limelight/java_couplings.rb +1 -0
  23. data/lib/limelight/producer.rb +4 -47
  24. data/lib/limelight/production.rb +20 -0
  25. data/lib/limelight/prop.rb +32 -32
  26. data/lib/limelight/scene.rb +2 -1
  27. data/lib/limelight/specs/spec_helper.rb +24 -22
  28. data/lib/limelight/specs/test_scene_opener.rb +60 -0
  29. data/lib/limelight/string.rb +1 -1
  30. data/lib/limelight/studio.rb +28 -9
  31. data/lib/limelight/templates/production_templater.rb +5 -2
  32. data/lib/limelight/templates/scene_templater.rb +7 -6
  33. data/lib/limelight/templates/sources/production/production.rb.template +1 -1
  34. data/lib/limelight/templates/sources/production/spec/spec_helper.rb.template +8 -1
  35. data/lib/limelight/version.rb +1 -1
  36. data/productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb +3 -0
  37. data/productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb +3 -0
  38. data/productions/examples/sandbox/alerts/incompatible_production/production.rb +3 -0
  39. data/productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb +3 -0
  40. data/productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb +3 -0
  41. data/productions/examples/sandbox/alerts/incompatible_production/stages.rb +3 -0
  42. data/productions/examples/sandbox/alerts/incompatible_production/styles.rb +3 -0
  43. data/productions/examples/sandbox/alerts/players/alerts.rb +3 -0
  44. data/productions/examples/sandbox/alerts/props.rb +3 -0
  45. data/productions/examples/sandbox/alerts/styles.rb +3 -0
  46. data/productions/examples/sandbox/background_images/props.rb +3 -0
  47. data/productions/examples/sandbox/header.rb +1 -0
  48. data/productions/examples/sandbox/images_scene/props.rb +8 -0
  49. data/productions/examples/sandbox/kiosk/players/kiosk.rb +3 -0
  50. data/productions/examples/sandbox/kiosk/props.rb +3 -0
  51. data/productions/examples/sandbox/kiosk/styles.rb +3 -0
  52. data/productions/examples/sandbox/spec/alerts/alerts_spec.rb +3 -0
  53. data/productions/examples/sandbox/stage_handles/players/sizer.rb +35 -0
  54. data/productions/examples/sandbox/stage_handles/props.rb +17 -0
  55. data/productions/examples/sandbox/stage_handles/styles.rb +58 -0
  56. data/productions/playbills.lll +1 -0
  57. data/productions/startup/production.rb +3 -0
  58. data/productions/startup/spec/default_scene/default_scene_spec.rb +3 -0
  59. data/productions/startup/spec/spec_helper.rb +3 -0
  60. data/productions/startup/styles.rb +3 -0
  61. data/spec/{builtin → limelight/builtin}/players/button_spec.rb +1 -1
  62. data/spec/{builtin → limelight/builtin}/players/check_box_spec.rb +1 -1
  63. data/spec/{builtin → limelight/builtin}/players/combo_box_spec.rb +1 -1
  64. data/spec/{builtin → limelight/builtin}/players/image_spec.rb +1 -2
  65. data/spec/{builtin → limelight/builtin}/players/password_box_spec.rb +1 -1
  66. data/spec/{builtin → limelight/builtin}/players/radio_button_spec.rb +1 -1
  67. data/spec/limelight/builtin/players/stage_mover_spec.rb +36 -0
  68. data/spec/limelight/builtin/players/stage_sizer_spec.rb +40 -0
  69. data/spec/{builtin → limelight/builtin}/players/text_area_spec.rb +1 -1
  70. data/spec/{builtin → limelight/builtin}/players/text_box_spec.rb +1 -1
  71. data/spec/limelight/builtin/utilities_production/spec_helper.rb +7 -0
  72. data/spec/{builtin → limelight/builtin}/utilities_production/utilities_production_spec.rb +3 -0
  73. data/spec/{casting_director_spec.rb → limelight/casting_director_spec.rb} +1 -1
  74. data/spec/{client → limelight/client}/playbills_spec.rb +1 -1
  75. data/spec/{commands → limelight/commands}/command_spec.rb +1 -1
  76. data/spec/{commands → limelight/commands}/create_command_spec.rb +23 -19
  77. data/spec/limelight/commands/freeze_command_spec.rb +143 -0
  78. data/spec/{commands → limelight/commands}/help_command_spec.rb +1 -1
  79. data/spec/{commands → limelight/commands}/open_command_spec.rb +1 -1
  80. data/spec/{commands → limelight/commands}/pack_command_spec.rb +1 -1
  81. data/spec/{commands → limelight/commands}/unpack_command_spec.rb +1 -1
  82. data/spec/{data_spec.rb → limelight/data_spec.rb} +1 -1
  83. data/spec/{dsl → limelight/dsl}/prop_builder_spec.rb +1 -1
  84. data/spec/{dsl → limelight/dsl}/stage_builder_spec.rb +1 -1
  85. data/spec/{dsl → limelight/dsl}/styles_builder_spec.rb +52 -13
  86. data/spec/{file_chooser_spec.rb → limelight/file_chooser_spec.rb} +1 -1
  87. data/spec/{file_filter_spec.rb → limelight/file_filter_spec.rb} +1 -1
  88. data/spec/{file_loader_spec.rb → limelight/file_loader_spec.rb} +1 -1
  89. data/spec/{gems_spec.rb → limelight/gems_spec.rb} +10 -4
  90. data/spec/{java_util_spec.rb → limelight/java_util_spec.rb} +1 -1
  91. data/spec/{main_spec.rb → limelight/main_spec.rb} +1 -1
  92. data/spec/{paint_action_spec.rb → limelight/paint_action_spec.rb} +1 -1
  93. data/spec/{pen_spec.rb → limelight/pen_spec.rb} +1 -1
  94. data/spec/{producer_spec.rb → limelight/producer_spec.rb} +4 -12
  95. data/spec/{production_spec.rb → limelight/production_spec.rb} +32 -11
  96. data/spec/{prop_spec.rb → limelight/prop_spec.rb} +30 -2
  97. data/spec/{scene_spec.rb → limelight/scene_spec.rb} +28 -2
  98. data/spec/{stage_spec.rb → limelight/stage_spec.rb} +1 -1
  99. data/spec/{string_spec.rb → limelight/string_spec.rb} +1 -1
  100. data/spec/{studio_spec.rb → limelight/studio_spec.rb} +16 -1
  101. data/spec/{styles_spec.rb → limelight/styles_spec.rb} +1 -1
  102. data/spec/{templates → limelight/templates}/production_templater_spec.rb +17 -6
  103. data/spec/{templates → limelight/templates}/scene_templater_spec.rb +15 -4
  104. data/spec/{templates → limelight/templates}/templater_logger_spec.rb +1 -1
  105. data/spec/{templates → limelight/templates}/templater_spec.rb +1 -1
  106. data/spec/{theater_spec.rb → limelight/theater_spec.rb} +1 -1
  107. data/spec/{util → limelight/util}/downloader_spec.rb +1 -1
  108. data/spec/spec_helper.rb +11 -0
  109. metadata +62 -70
  110. data/lib/limelight/dsl/production_builder.rb +0 -71
  111. data/spec/builtin/utilities_production/spec_helper.rb +0 -4
  112. data/spec/commands/freeze_command_spec.rb +0 -62
  113. 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,4 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
2
- require 'limelight/specs/spec_helper'
3
-
4
- $PRODUCTION_PATH = File.join($LIMELIGHT_LIB, 'limelight', 'builtin', 'utilities_production')
@@ -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