flexunit 0.0.6.pre → 0.0.7.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 'flashsdk', '>= 1.0.2.pre'
3
+ gem 'flashsdk', '>= 1.0.27.pre'
4
4
 
5
5
  group :development do
6
6
  gem "shoulda"
data/Gemfile.lock CHANGED
@@ -20,6 +20,6 @@ PLATFORMS
20
20
  ruby
21
21
 
22
22
  DEPENDENCIES
23
- flashsdk (>= 1.0.2.pre)
23
+ flashsdk (>= 1.0.27.pre)
24
24
  mocha
25
25
  shoulda
data/README.md CHANGED
@@ -18,6 +18,8 @@ below.
18
18
 
19
19
  gem install flexunit --pre
20
20
 
21
+ jruby users will have to install manually until issue #1 is resolved.
22
+
21
23
  ## Usage
22
24
 
23
25
  Generate a project with
@@ -26,7 +28,7 @@ Generate a project with
26
28
 
27
29
  Or edit your Gemfile to include
28
30
 
29
- gem "flexunit", ">= 0.0.6.pre"
31
+ gem "flexunit", ">= 0.0.7.pre"
30
32
 
31
33
  This will mean that when you generate a class using:
32
34
 
@@ -44,7 +46,6 @@ needed:
44
46
  ## TODO
45
47
 
46
48
  * SWC library linkage
47
- * Project Templates for AS3, Flex, & AIR
48
49
  * Runner Templates for AS3, Flex, & AIR
49
50
  * Rake examples
50
51
 
data/lib/flexunit.rb CHANGED
@@ -1,16 +1,12 @@
1
1
  require 'flashsdk'
2
2
 
3
- module FlexUnit
4
- NAME = 'flexunit'
5
- VERSION = '0.0.6.pre'
6
- end
7
-
8
3
  require 'flexunit4/generators/air_project_generator'
9
4
  require 'flexunit4/generators/flex_project_generator'
10
5
  require 'flexunit4/generators/project_generator'
11
6
  require 'flexunit4/generators/runner_generator'
12
7
  require 'flexunit4/generators/suite_class_generator'
13
8
  require 'flexunit4/generators/test_class_generator'
9
+ require 'flexunit4/module'
14
10
 
15
11
  Sprout::Specification.new do |s|
16
12
  s.name = FlexUnit::NAME
@@ -19,13 +15,14 @@ Sprout::Specification.new do |s|
19
15
  s.add_remote_file_target do |t|
20
16
  t.platform = :universal
21
17
  t.archive_type = :zip
22
- t.url = "http://flexunit.org/releases/flexunit-4.1.0-8-4.1.0.16076.zip"
23
- t.md5 = "11b355d269be39c03e24aa1143ef4c1c"
18
+ t.url = FlexUnit::ZIP
19
+ t.md5 = FlexUnit::MD5
24
20
 
25
- # Picks the full contents of the zip up and moves it to the lib...
21
+ # Picks the full contents of the zip up and moves it to the lib... causes
22
+ # further problems as FlexUnit docs etc are in there.
26
23
  # t.add_library :swc, ['flexunit/']
27
24
 
28
- # Only moves the first ??
25
+ # According to sprout doc's and examples this level of granularity should work.
29
26
  t.add_library :flexunit_as3, "flexunit/flexunit-4.1.0-8-as3_4.1.0.16076.swc"
30
27
  t.add_library :flexunit_flex, "flexunit/flexunit-4.1.0-8-flex_4.1.0.16076.swc"
31
28
  t.add_library :flexunit_aircilistener, "flexunit/flexunit-aircilistener-4.1.0-8-4.1.0.16076.swc"
@@ -34,4 +31,4 @@ Sprout::Specification.new do |s|
34
31
  t.add_library :flexunit_uilistener, "flexunit/flexunit-uilistener-4.1.0-8-4.1.0.16076.swc"
35
32
  t.add_library :flexunit_extensions, "flexunit/fluint-extensions-4.1.0-8-4.1.0.16076.swc"
36
33
  end
37
- end
34
+ end
@@ -18,7 +18,11 @@ module FlexUnit4
18
18
  directory images
19
19
  directory fonts
20
20
  end
21
-
21
+ end
22
+
23
+ directory 'cert' do
24
+ file 'password'
25
+ file 'dev-cert.p12'
22
26
  end
23
27
 
24
28
  # Create empty directories:
@@ -6,24 +6,28 @@ Bundler.require
6
6
  # Debug
7
7
 
8
8
  # Compile the debug swf
9
- mxmlc "<%= bin %>/<%= debug_swf_name %>" do |t|
9
+ amxmlc "<%= bin %>/<%= debug_swf_name %>" do |t|
10
10
  t.input = "<%= src %>/<%= class_name %>.mxml"
11
11
  t.debug = true
12
12
  end
13
13
 
14
- desc "Compile and run the debug swf"
15
- flashplayer :debug => "<%= bin %>/<%= debug_swf_name %>"
14
+ # Run the debug swf using adl
15
+ adl "<%= bin %>/<%= debug_swf_name %>" do |t|
16
+ app_desc = "<%= src %>/<%= class_name %>-app.xml"
17
+ end
18
+
19
+ task :debug => "<%= bin %>/<%= debug_swf_name %>"
16
20
 
17
21
  ##############################
18
22
  # Test
19
23
 
20
- library :flexunit_flex
21
- library :flexunit_aircilistener
24
+ library :flexunit, :flexunit_flex
25
+ library :flexunit, :flexunit_aircilistener
22
26
 
23
27
  # Compile the test swf
24
- mxmlc "<%= bin %>/<%= test_swf_name %>" => [:flexunit_flex,
25
- :flexunit_aircilistener] do |t|
28
+ amxmlc "<%= bin %>/<%= test_swf_name %>" do |t|
26
29
  t.input = "<%= src %>/<%= test_runner_name %>.mxml"
30
+ t.library_path << "lib/flexunit/"
27
31
  t.source_path << "test"
28
32
  t.debug = true
29
33
  end
@@ -31,5 +35,32 @@ end
31
35
  desc "Compile and run the test swf"
32
36
  flashplayer :test => "<%= bin %>/<%= test_swf_name %>"
33
37
 
38
+ ##############################
39
+ # Package
40
+
41
+ desc "Create AIR installer"
42
+
43
+ adt 'bin/<%= class_name %>.air' => 'bin/<%= class_name %>.swf' do |t|
44
+ t.package = true
45
+ t.package_input = '<%= class_name %>-app.xml'
46
+ t.package_output = 'bin/<%= class_name %>.air'
47
+ t.storetype = 'PKCS12'
48
+ t.keystore = 'cert/dev-cert.p12'
49
+ t.storepass = File.read('cert/password')
50
+ t.included_files << 'bin/<%= class_name %>.swf'
51
+ end
52
+
53
+ desc "Compile, certify and package the AIR application"
54
+ task package => 'bin/<%= class_name %>.air'
55
+
56
+ ##############################
57
+ # ASDoc
58
+
59
+ desc "Generate documentation at <%= doc %>/"
60
+ asdoc '<%= doc %>' do |t|
61
+ t.doc_sources << "<%= src %>"
62
+ t.exclude_sources << "<%= src %>/<%= test_runner_name %>.as"
63
+ end
64
+
34
65
  task :default => :debug
35
66
 
@@ -17,12 +17,15 @@ flashplayer :debug => "<%= bin %>/<%= debug_swf_name %>"
17
17
  ##############################
18
18
  # Test
19
19
 
20
- library :flexunit_flex
20
+ library :flexunit, :flexunit_flex
21
+ library :flexunit, :flexunit_uilistener
21
22
 
22
23
  # Compile the test swf
23
- mxmlc "<%= bin %>/<%= test_swf_name %>" => :flexunit_flex do |t|
24
+ mxmlc "<%= bin %>/<%= test_swf_name %>" do |t|
24
25
  t.input = "<%= src %>/<%= test_runner_name %>.mxml"
26
+ t.library_path << "lib/flexunit/"
25
27
  t.source_path << "test"
28
+ t.default_size = "900,550"
26
29
  t.debug = true
27
30
  end
28
31
 
@@ -1,4 +1,4 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "flashsdk", ">= 1.0.0.pre"
4
- gem "flexunit", ">= 0.0.6.pre"
3
+ gem "flashsdk", ">= 1.0.27.pre"
4
+ gem "flexunit", ">= 0.0.7.pre"
@@ -38,12 +38,15 @@ flashplayer :run => "<%= bin %>/<%= debug_swf_name %>"
38
38
  ##############################
39
39
  # Test
40
40
 
41
- library :flexunit_as3
41
+ library :flexunit, :flexunit_as3
42
+ library :flexunit, :flexunit_uilistener
42
43
 
43
44
  # Compile the test swf
44
- mxmlc "<%= bin %>/<%= test_swf_name %>" => :flexunit_as3 do |t|
45
+ mxmlc "<%= bin %>/<%= test_swf_name %>" do |t|
45
46
  t.input = "<%= src %>/<%= test_runner_name %>.as"
47
+ t.library_path << "lib/flexunit/"
46
48
  t.source_path << 'test'
49
+ t.default_size = "100,100"
47
50
  t.debug = true
48
51
  end
49
52
 
@@ -0,0 +1 @@
1
+ qwerty12
@@ -0,0 +1,11 @@
1
+ module FlexUnit
2
+ NAME = 'flexunit'
3
+ # The Gem version will not relate to the FlexUnit library version it contains.
4
+ # This will change once the gem moves out of it's Alpha state, at which point
5
+ # the intention is to have the Gem release match FlexUnit's Major Minor and
6
+ # Patch release numbers.
7
+ #
8
+ VERSION = '0.0.7.pre'
9
+ ZIP = 'http://flexunit.org/releases/flexunit-4.1.0-8-4.1.0.16076.zip'
10
+ MD5 = '11b355d269be39c03e24aa1143ef4c1c'
11
+ end
@@ -39,6 +39,10 @@ class AIRProjectGeneratorTest < Test::Unit::TestCase
39
39
  assert_file File.join(project, 'src', 'SomeProjectRunner.mxml') do |content|
40
40
  assert_matches /org.flexunit.runner.FlexUnitCore\b/, content
41
41
  end
42
+ assert_directory File.join(project, 'cert')
43
+ assert_file File.join(project, 'cert', 'password')
44
+ assert_file File.join(project, 'cert', 'dev-cert.p12')
45
+
42
46
  assert_directory File.join(project, 'lib')
43
47
  assert_directory File.join(project, 'bin')
44
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexunit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.pre
4
+ version: 0.0.7.pre
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,23 +9,23 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-05-15 00:00:00.000000000 +01:00
12
+ date: 2011-05-16 00:00:00.000000000 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: flashsdk
17
- requirement: &2155321700 !ruby/object:Gem::Requirement
17
+ requirement: &2161245600 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.0.2.pre
22
+ version: 1.0.27.pre
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2155321700
25
+ version_requirements: *2161245600
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: shoulda
28
- requirement: &2155321000 !ruby/object:Gem::Requirement
28
+ requirement: &2161204380 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2155321000
36
+ version_requirements: *2161204380
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: mocha
39
- requirement: &2155320320 !ruby/object:Gem::Requirement
39
+ requirement: &2161201140 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2155320320
47
+ version_requirements: *2161201140
48
48
  description: Project Sprouts support for the FlexUnit unit testing framework.
49
49
  email:
50
50
  - projectsprouts@googlegroups.com
@@ -75,6 +75,7 @@ files:
75
75
  - lib/flexunit4/generators/templates/AIRApplication.mxml
76
76
  - lib/flexunit4/generators/templates/AIRRakefile.rb
77
77
  - lib/flexunit4/generators/templates/AIRRunner.mxml
78
+ - lib/flexunit4/generators/templates/dev-cert.p12
78
79
  - lib/flexunit4/generators/templates/Flex4Application.mxml
79
80
  - lib/flexunit4/generators/templates/Flex4Main.css
80
81
  - lib/flexunit4/generators/templates/Flex4Rakefile.rb
@@ -82,8 +83,10 @@ files:
82
83
  - lib/flexunit4/generators/templates/FlexUnit4SuiteClass.as
83
84
  - lib/flexunit4/generators/templates/FlexUnit4TestClass.as
84
85
  - lib/flexunit4/generators/templates/Gemfile
86
+ - lib/flexunit4/generators/templates/password
85
87
  - lib/flexunit4/generators/templates/Rakefile
86
88
  - lib/flexunit4/generators/test_class_generator.rb
89
+ - lib/flexunit4/module.rb
87
90
  - POSTINSTALL.rdoc
88
91
  - Rakefile
89
92
  - README.md