gator-as3 0.0.4.pre → 0.0.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gator-as3.gemspec +75 -0
- data/lib/gator/as3/generators.rb +3 -0
- data/lib/gator/as3/generators/collection.rb +16 -0
- data/lib/gator/as3/generators/klass.as.tt +9 -0
- data/lib/gator/as3/generators/klass.rb +52 -0
- data/lib/gator/as3/generators/test/asunit4.rb +3 -0
- data/lib/gator/as3/generators/test/asunit4/collection.rb +17 -0
- data/lib/gator/as3/generators/test/asunit4/klass.as.tt +12 -0
- data/lib/gator/as3/generators/test/asunit4/klass.rb +57 -0
- data/lib/gator/as3/generators/test/flexunit4.rb +3 -0
- data/lib/gator/as3/generators/test/flexunit4/collection.rb +17 -0
- data/lib/gator/as3/generators/test/flexunit4/klass.as.tt +12 -0
- data/lib/gator/as3/generators/test/flexunit4/klass.rb +57 -0
- metadata +27 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5.pre
|
data/gator-as3.gemspec
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{gator-as3}
|
8
|
+
s.version = "0.0.5.pre"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Dominic Graefen"]
|
12
|
+
s.date = %q{2011-07-10}
|
13
|
+
s.description = %q{gator-as3 - ActionScript3 & MXML generators for gator}
|
14
|
+
s.email = %q{dominic.graefen@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"LICENSE.txt",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"gator-as3.gemspec",
|
27
|
+
"lib/gator/as3.rb",
|
28
|
+
"lib/gator/as3/generators.rb",
|
29
|
+
"lib/gator/as3/generators/collection.rb",
|
30
|
+
"lib/gator/as3/generators/klass.as.tt",
|
31
|
+
"lib/gator/as3/generators/klass.rb",
|
32
|
+
"lib/gator/as3/generators/test/asunit4.rb",
|
33
|
+
"lib/gator/as3/generators/test/asunit4/collection.rb",
|
34
|
+
"lib/gator/as3/generators/test/asunit4/klass.as.tt",
|
35
|
+
"lib/gator/as3/generators/test/asunit4/klass.rb",
|
36
|
+
"lib/gator/as3/generators/test/flexunit4.rb",
|
37
|
+
"lib/gator/as3/generators/test/flexunit4/collection.rb",
|
38
|
+
"lib/gator/as3/generators/test/flexunit4/klass.as.tt",
|
39
|
+
"lib/gator/as3/generators/test/flexunit4/klass.rb",
|
40
|
+
"spec/spec_helper.rb"
|
41
|
+
]
|
42
|
+
s.homepage = %q{http://github.com/devboy/gator-as3}
|
43
|
+
s.licenses = ["MIT"]
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
s.rubygems_version = %q{1.6.2}
|
46
|
+
s.summary = %q{gator-as3 - ActionScript3 & MXML generators for gator}
|
47
|
+
|
48
|
+
if s.respond_to? :specification_version then
|
49
|
+
s.specification_version = 3
|
50
|
+
|
51
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
52
|
+
s.add_runtime_dependency(%q<gator>, ["~> 0.0.14.pre"])
|
53
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
54
|
+
s.add_development_dependency(%q<ci_reporter>, ["~> 1.6.5"])
|
55
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
56
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
57
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
58
|
+
else
|
59
|
+
s.add_dependency(%q<gator>, ["~> 0.0.14.pre"])
|
60
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
61
|
+
s.add_dependency(%q<ci_reporter>, ["~> 1.6.5"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
64
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
65
|
+
end
|
66
|
+
else
|
67
|
+
s.add_dependency(%q<gator>, ["~> 0.0.14.pre"])
|
68
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
69
|
+
s.add_dependency(%q<ci_reporter>, ["~> 1.6.5"])
|
70
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
71
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
72
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/klass'
|
2
|
+
|
3
|
+
module Gator
|
4
|
+
module AS3
|
5
|
+
|
6
|
+
class GeneratorCollection < Gator::Command
|
7
|
+
|
8
|
+
define :command => "as3",
|
9
|
+
:usage => "generate as3 GENERATOR", :description => "Generators for AS3."
|
10
|
+
|
11
|
+
register_subcommand Gator::AS3::ClassGenerator
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Gator
|
2
|
+
module AS3
|
3
|
+
class ClassGenerator < Task
|
4
|
+
include Gator::Project
|
5
|
+
|
6
|
+
define :command => "klass",
|
7
|
+
:usage => "generate as3 klass CLASS_NAME", :description => "Creates AS3 class."
|
8
|
+
|
9
|
+
argument :classname
|
10
|
+
|
11
|
+
class_option :test, :default => false
|
12
|
+
|
13
|
+
def self.source_root
|
14
|
+
File.dirname __FILE__
|
15
|
+
end
|
16
|
+
|
17
|
+
def generate
|
18
|
+
src = project.path(:source, :main, :as3)
|
19
|
+
@package_name, @class_name = split_class_name(classname)
|
20
|
+
src = File.join(src, @package_name.split(".").join(File::SEPARATOR)) unless @package_name == ""
|
21
|
+
template "klass.as.tt", File.join(src, "#{@class_name}.as")
|
22
|
+
end
|
23
|
+
|
24
|
+
def generate_test
|
25
|
+
return unless options[:test]
|
26
|
+
invoke parent.get_subcommand("test", "klass")
|
27
|
+
end
|
28
|
+
|
29
|
+
no_tasks {
|
30
|
+
|
31
|
+
def package_name
|
32
|
+
@package_name
|
33
|
+
end
|
34
|
+
|
35
|
+
def class_name
|
36
|
+
@class_name
|
37
|
+
end
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
protected
|
42
|
+
|
43
|
+
def split_class_name(class_name)
|
44
|
+
pieces = class_name.split "."
|
45
|
+
class_name = pieces.pop
|
46
|
+
package_name = pieces.join "."
|
47
|
+
return package_name, class_name
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/klass'
|
2
|
+
|
3
|
+
module Gator
|
4
|
+
module AS3
|
5
|
+
module ASUnit4
|
6
|
+
|
7
|
+
class TestGeneratorCollection < Gator::Command
|
8
|
+
|
9
|
+
define :command => "test",
|
10
|
+
:usage => "generate as3 test GENERATOR", :description => "TestGenerators for ASUnit4"
|
11
|
+
|
12
|
+
register_subcommand ClassTestGenerator
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Gator
|
2
|
+
module AS3
|
3
|
+
module ASUnit4
|
4
|
+
|
5
|
+
class ClassTestGenerator < Task
|
6
|
+
include Gator::Project
|
7
|
+
|
8
|
+
define :command => "klass",
|
9
|
+
:usage => "generate as3 test klass CLASS_NAME", :description => "Creates ASUnit4 class test."
|
10
|
+
|
11
|
+
argument :classname
|
12
|
+
|
13
|
+
class_option :impl, :default => false
|
14
|
+
|
15
|
+
def self.source_root
|
16
|
+
File.dirname __FILE__
|
17
|
+
end
|
18
|
+
|
19
|
+
def generate
|
20
|
+
src = project.path(:source, :test, :as3)
|
21
|
+
@package_name, @class_name = split_class_name(classname)
|
22
|
+
@class_name += "Test"
|
23
|
+
src = File.join(src, @package_name.split(".").join(File::SEPARATOR)) unless @package_name == ""
|
24
|
+
template "klass.as.tt", File.join(src, "#{@class_name}.as")
|
25
|
+
end
|
26
|
+
|
27
|
+
def generate_implementation
|
28
|
+
return unless options[:impl]
|
29
|
+
invoke parent.parent.get_subcommand("klass")
|
30
|
+
end
|
31
|
+
|
32
|
+
no_tasks {
|
33
|
+
|
34
|
+
def package_name
|
35
|
+
@package_name
|
36
|
+
end
|
37
|
+
|
38
|
+
def class_name
|
39
|
+
@class_name
|
40
|
+
end
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
protected
|
45
|
+
|
46
|
+
def split_class_name(class_name)
|
47
|
+
pieces = class_name.split "."
|
48
|
+
class_name = pieces.pop
|
49
|
+
package_name = pieces.join "."
|
50
|
+
return package_name, class_name
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/klass'
|
2
|
+
|
3
|
+
module Gator
|
4
|
+
module AS3
|
5
|
+
module FlexUnit4
|
6
|
+
|
7
|
+
class TestGeneratorCollection < Gator::Command
|
8
|
+
|
9
|
+
define :command => "test",
|
10
|
+
:usage => "generate as3 test GENERATOR", :description => "TestGenerators for FlexUnit4"
|
11
|
+
|
12
|
+
register_subcommand ClassTestGenerator
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Gator
|
2
|
+
module AS3
|
3
|
+
module FlexUnit4
|
4
|
+
|
5
|
+
class ClassTestGenerator < Task
|
6
|
+
include Gator::Project
|
7
|
+
|
8
|
+
define :command => "klass",
|
9
|
+
:usage => "generate as3 test klass CLASS_NAME", :description => "Creates ASUnit4 class test."
|
10
|
+
|
11
|
+
argument :classname
|
12
|
+
|
13
|
+
class_option :impl, :default => false
|
14
|
+
|
15
|
+
def self.source_root
|
16
|
+
File.dirname __FILE__
|
17
|
+
end
|
18
|
+
|
19
|
+
def generate
|
20
|
+
src = project.path(:source, :test, :as3)
|
21
|
+
@package_name, @class_name = split_class_name(classname)
|
22
|
+
@class_name += "Test"
|
23
|
+
src = File.join(src, @package_name.split(".").join(File::SEPARATOR)) unless @package_name == ""
|
24
|
+
template "klass.as.tt", File.join(src, "#{@class_name}.as")
|
25
|
+
end
|
26
|
+
|
27
|
+
def generate_implementation
|
28
|
+
return unless options[:impl]
|
29
|
+
invoke parent.parent.get_subcommand("klass")
|
30
|
+
end
|
31
|
+
|
32
|
+
no_tasks {
|
33
|
+
|
34
|
+
def package_name
|
35
|
+
@package_name
|
36
|
+
end
|
37
|
+
|
38
|
+
def class_name
|
39
|
+
@class_name
|
40
|
+
end
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
protected
|
45
|
+
|
46
|
+
def split_class_name(class_name)
|
47
|
+
pieces = class_name.split "."
|
48
|
+
class_name = pieces.pop
|
49
|
+
package_name = pieces.join "."
|
50
|
+
return package_name, class_name
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gator-as3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gator
|
17
|
-
requirement: &
|
17
|
+
requirement: &2156217120 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.0.14.pre
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2156217120
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &2156214280 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 2.3.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2156214280
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: ci_reporter
|
39
|
-
requirement: &
|
39
|
+
requirement: &2156212020 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 1.6.5
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2156212020
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: bundler
|
50
|
-
requirement: &
|
50
|
+
requirement: &2156207740 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 1.0.0
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2156207740
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: jeweler
|
61
|
-
requirement: &
|
61
|
+
requirement: &2156204400 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 1.6.2
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2156204400
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rcov
|
72
|
-
requirement: &
|
72
|
+
requirement: &2156202620 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2156202620
|
81
81
|
description: gator-as3 - ActionScript3 & MXML generators for gator
|
82
82
|
email: dominic.graefen@gmail.com
|
83
83
|
executables: []
|
@@ -92,7 +92,20 @@ files:
|
|
92
92
|
- README.rdoc
|
93
93
|
- Rakefile
|
94
94
|
- VERSION
|
95
|
+
- gator-as3.gemspec
|
95
96
|
- lib/gator/as3.rb
|
97
|
+
- lib/gator/as3/generators.rb
|
98
|
+
- lib/gator/as3/generators/collection.rb
|
99
|
+
- lib/gator/as3/generators/klass.as.tt
|
100
|
+
- lib/gator/as3/generators/klass.rb
|
101
|
+
- lib/gator/as3/generators/test/asunit4.rb
|
102
|
+
- lib/gator/as3/generators/test/asunit4/collection.rb
|
103
|
+
- lib/gator/as3/generators/test/asunit4/klass.as.tt
|
104
|
+
- lib/gator/as3/generators/test/asunit4/klass.rb
|
105
|
+
- lib/gator/as3/generators/test/flexunit4.rb
|
106
|
+
- lib/gator/as3/generators/test/flexunit4/collection.rb
|
107
|
+
- lib/gator/as3/generators/test/flexunit4/klass.as.tt
|
108
|
+
- lib/gator/as3/generators/test/flexunit4/klass.rb
|
96
109
|
- spec/spec_helper.rb
|
97
110
|
has_rdoc: true
|
98
111
|
homepage: http://github.com/devboy/gator-as3
|
@@ -110,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
123
|
version: '0'
|
111
124
|
segments:
|
112
125
|
- 0
|
113
|
-
hash:
|
126
|
+
hash: -1471554125132173578
|
114
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
128
|
none: false
|
116
129
|
requirements:
|