lib/flashsdk/generators/flash_helper.rb in flashsdk-1.0.5.pre vs lib/flashsdk/generators/flash_helper.rb in flashsdk-1.0.12.pre
- old
+ new
@@ -10,31 +10,31 @@
return File.join test, *parts
end
return test
end
- # Glob that is used to search for test cases and build
+ # Glob that is used to search for test cases and build
# up the test suites
def test_glob
return @test_glob ||= File.join(path, test, '**', '?*Test.as')
end
-
+
def test_glob= glob
@test_glob = glob
end
# Collection of all test case files either assigned or found
# using the test_glob as provided.
def test_cases
@test_cases ||= Dir.glob(test_glob)
end
-
+
def test_cases= collection
@test_cases = collection
end
-
- # Get the list of test_cases (which are files) as a
+
+ # Get the list of test_cases (which are files) as a
# list of fully qualified class names
def test_case_classes
classes = self.test_cases.dup
classes.collect do |file|
actionscript_file_to_class_name(file)
@@ -50,11 +50,11 @@
name.gsub!(/^#{src}\//, '')
name.gsub!(/.as$/, '')
name.gsub!(/#{File::SEPARATOR}/, '.')
return name
end
-
+
def class_directory
parts = input_in_parts
if parts.size > 1
parts.pop
return File.join src, *parts
@@ -86,10 +86,14 @@
return "#{source}Test"
end
source
end
+ def project_name
+ input.camel_case
+ end
+
def instance_name
# TODO: should uncapitalize class_name
# (not the same as lowercase)
# If the name is > 12 character, just
# use 'instance' instead.
@@ -111,8 +115,24 @@
end
def fully_qualified_class_name
input
end
+
+ def deploy_swf_name
+ "#{class_name}.swf"
+ end
+
+ def debug_swf_name
+ "#{class_name}-debug.swf"
+ end
+
+ def test_swf_name
+ "#{class_name}-test.swf"
+ end
+
+ def test_runner_name
+ "#{class_name}Runner"
+ end
+
end
end
-