flashsdk 1.0.25.pre → 1.0.26.pre

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'sprout', '>= 1.1.8.pre'
3
+ gem 'sprout', '>= 1.1.11.pre'
4
4
 
5
5
  group :development do
6
6
  gem "shoulda"
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GEM
8
8
  rake (0.8.7)
9
9
  rubyzip (0.9.4)
10
10
  shoulda (2.11.3)
11
- sprout (1.1.10.pre)
11
+ sprout (1.1.11.pre)
12
12
  archive-tar-minitar (= 0.5.2)
13
13
  bundler (>= 0.9.19)
14
14
  open4 (>= 0.9.6)
@@ -21,4 +21,4 @@ PLATFORMS
21
21
  DEPENDENCIES
22
22
  mocha
23
23
  shoulda
24
- sprout (>= 1.1.8.pre)
24
+ sprout (>= 1.1.11.pre)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.25.pre
1
+ 1.0.26.pre
@@ -1,3 +1,4 @@
1
+ require 'socket'
1
2
 
2
3
  module FlashSDK
3
4
 
data/lib/flashsdk/fdb.rb CHANGED
@@ -14,6 +14,43 @@ module FlashSDK
14
14
  #
15
15
  class FDB < Sprout::Executable::Session
16
16
 
17
+ ##
18
+ # Path to the file where test results should be written.
19
+ #
20
+ # @default 'TestResults.xml'
21
+ # @see :test_result_prefix
22
+ # @see :test_result_suffix
23
+ attr_accessor :test_result_file
24
+
25
+ ##
26
+ # Regular expression that will match the preamble that is sent
27
+ # by your test framework to indicate the beginning of structured
28
+ # test output.
29
+ #
30
+ # @default /<TestResults>/
31
+ # @see :test_result_file
32
+ # @see :test_result_suffix
33
+ attr_accessor :test_result_prefix
34
+
35
+ ##
36
+ # Regular expression that will match the suffix that is sent
37
+ # by your test framework to indicate the end of structured
38
+ # test output.
39
+ #
40
+ # @default /<\/TestResults>/
41
+ # @see :test_result_file
42
+ # @see :test_result_prefix
43
+ attr_accessor :test_result_suffix
44
+
45
+ def initialize
46
+ super
47
+ @test_result = ''
48
+ @inside_test_result = false
49
+ @test_result_file = 'TestResults.xml'
50
+ @test_result_prefix = /<TestResults>/
51
+ @test_result_suffix = /<\/TestResults>/
52
+ end
53
+
17
54
  set :default_prefix, '-'
18
55
 
19
56
  ##
@@ -746,6 +783,30 @@ module FlashSDK
746
783
  add_action :what
747
784
  add_action_alias :wh, :what
748
785
 
786
+ def system_execute binary, params
787
+ super do |message|
788
+ if message.match test_result_suffix
789
+ write_test_result
790
+ end
791
+ if @inside_test_result
792
+ @test_result << message
793
+ end
794
+ if message.match test_result_prefix
795
+ @inside_test_result = true
796
+ end
797
+ end
798
+ end
799
+
800
+ private
801
+
802
+ def write_test_result
803
+ File.open test_result_file, 'w+' do |f|
804
+ f.write @test_result
805
+ end
806
+ @test_result = ''
807
+ @inside_test_result = false
808
+ end
809
+
749
810
  end
750
811
  end
751
812
 
@@ -22,7 +22,6 @@ library :asunit4
22
22
  # Compile the test swf
23
23
  mxmlc "<%= bin %>/<%= test_swf_name %>" => :asunit4 do |t|
24
24
  t.input = "<%= src %>/<%= test_runner_name %>.mxml"
25
- t.library_path << "lib/asunit4/AsUnit-4.2.2.pre.swc"
26
25
  t.source_path << "test"
27
26
  t.default_size = "900,550"
28
27
  t.debug = true
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem "flashsdk", ">= 1.0.0.pre"
4
- gem "asunit4", ">= 4.2.2.pre"
4
+ gem "asunit4", ">= 4.2.3.pre"
5
5
 
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 25
8
+ - 26
9
9
  - pre
10
- version: 1.0.25.pre
10
+ version: 1.0.26.pre
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luke Bayes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-03 00:00:00 -08:00
18
+ date: 2011-03-26 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -28,9 +28,9 @@ dependencies:
28
28
  segments:
29
29
  - 1
30
30
  - 1
31
- - 8
31
+ - 11
32
32
  - pre
33
- version: 1.1.8.pre
33
+ version: 1.1.11.pre
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: *id001