flex-source-inspector 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -10,7 +10,6 @@ module FlexSourceInspector
|
|
10
10
|
desc "inspect path_to_flex_src, path_to_link_reports [, ... path_to_link_report]", "pass in the path to the flex src, and 1..* paths to link-report xml files"
|
11
11
|
def inspect( src_folder, *link_reports)
|
12
12
|
puts FlexSourceInspector::Inspector.inspect( src_folder, *link_reports )
|
13
|
-
puts "----"
|
14
13
|
end
|
15
14
|
end
|
16
15
|
end
|
@@ -33,9 +33,9 @@ module FlexSourceInspector
|
|
33
33
|
}
|
34
34
|
}
|
35
35
|
puts ""
|
36
|
-
puts ""
|
37
36
|
unused = project_files - used
|
38
|
-
unused.join
|
37
|
+
lines = unused.join("\n")
|
38
|
+
"result:\n#{lines}\nend"
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.add_to_used(used, project_files, class_declaration, src_folder)
|
@@ -49,7 +49,7 @@ module FlexSourceInspector
|
|
49
49
|
# A declaration can either be:
|
50
50
|
# "/Path/to/file/com/MyClass.as"
|
51
51
|
# or
|
52
|
-
# "/Path/to/My.swc(com
|
52
|
+
# "/Path/to/My.swc(com:MyClass)"
|
53
53
|
# We check to see if either declaration matches the given file.
|
54
54
|
###
|
55
55
|
def self.is_declared?( file_name, declaration )
|
@@ -6,7 +6,7 @@ describe FlexSourceInspector::Inspector do
|
|
6
6
|
link_report = "spec/data/ApplicationOne_link-report.xml"
|
7
7
|
src = "spec/data/LinkReportTestProject/flex-src"
|
8
8
|
result = FlexSourceInspector::Inspector.inspect(src, link_report)
|
9
|
-
puts "
|
9
|
+
puts "#{result}"
|
10
10
|
result.should( include "NotUsedOne.as")
|
11
11
|
end
|
12
12
|
|
@@ -15,7 +15,7 @@ describe FlexSourceInspector::Inspector do
|
|
15
15
|
link_report_two = "spec/data/ApplicationTwo_link-report.xml"
|
16
16
|
src = "spec/data/LinkReportTestProject/flex-src"
|
17
17
|
result = FlexSourceInspector::Inspector.inspect(src, link_report, link_report_two)
|
18
|
-
puts "
|
18
|
+
puts "#{result}"
|
19
19
|
result.should( include "NotUsedOne.as" )
|
20
20
|
result.should_not( include "ModelOne.as")
|
21
21
|
end
|
@@ -24,7 +24,7 @@ describe FlexSourceInspector::Inspector do
|
|
24
24
|
link_report = "spec/data/swc_link_report.xml"
|
25
25
|
src = "spec/data/LinkReportTestProject/flex-src"
|
26
26
|
result = FlexSourceInspector::Inspector.inspect(src, link_report)
|
27
|
-
puts "
|
27
|
+
puts "#{result}"
|
28
28
|
result.should( include "NotUsedOne.as" )
|
29
29
|
result.should_not( include "ModelOne.as")
|
30
30
|
end
|