gator-as3 0.0.2.pre

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ gem "gator", "~> 0.0.14.pre"
7
+
8
+ # Add dependencies to develop your gem here.
9
+ # Include everything needed to run rake, tests, features, etc.
10
+ group :development do
11
+ gem "rspec", "~> 2.3.0"
12
+ gem "ci_reporter", "~> 1.6.5"
13
+ gem "bundler", "~> 1.0.0"
14
+ gem "jeweler", "~> 1.6.2"
15
+ gem "rcov", ">= 0"
16
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 devboy
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = gator-as3
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to gator-as3
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2011 devboy. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,63 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "gator-as3"
18
+ gem.homepage = "http://github.com/devboy/gator-as3"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{gator-as3 - ActionScript3 & MXML generators for gator}
21
+ gem.description = %Q{gator-as3 - ActionScript3 & MXML generators for gator}
22
+ gem.email = "dominic.graefen@gmail.com"
23
+ gem.authors = ["Dominic Graefen"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ require 'ci/reporter/rake/rspec'
31
+
32
+ ENV["CI_REPORTS"] ||= File.expand_path( File.join( File.dirname(__FILE__), "test", "report" ) )
33
+ RSpec::Core::RakeTask.new(:spec) do |spec|
34
+ spec.pattern = FileList['spec/**/*_spec.rb']
35
+ end
36
+
37
+ task :spec => "ci:setup:rspec"
38
+
39
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
40
+ spec.pattern = 'spec/**/*_spec.rb'
41
+ spec.rcov = true
42
+ end
43
+
44
+ task :test => :spec
45
+ task :default => :spec
46
+
47
+ #require 'rcov/rcovtask'
48
+ #Rcov::RcovTask.new do |test|
49
+ # test.libs << 'test'
50
+ # test.pattern = 'test/**/test_*.rb'
51
+ # test.verbose = true
52
+ # test.rcov_opts << '--exclude "gems/*"'
53
+ #end
54
+
55
+ require 'rake/rdoctask'
56
+ Rake::RDocTask.new do |rdoc|
57
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
58
+
59
+ rdoc.rdoc_dir = 'rdoc'
60
+ rdoc.title = "gator-as3 #{version}"
61
+ rdoc.rdoc_files.include('README*')
62
+ rdoc.rdoc_files.include('lib/**/*.rb')
63
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2.pre
data/gator-as3.gemspec ADDED
@@ -0,0 +1,74 @@
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.2.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/collection.rb",
29
+ "lib/gator/as3/klass.as.tt",
30
+ "lib/gator/as3/klass.rb",
31
+ "lib/gator/as3/test/asunit4.rb",
32
+ "lib/gator/as3/test/asunit4/collection.rb",
33
+ "lib/gator/as3/test/asunit4/klass.as.tt",
34
+ "lib/gator/as3/test/asunit4/klass.rb",
35
+ "lib/gator/as3/test/flexunit4.rb",
36
+ "lib/gator/as3/test/flexunit4/collection.rb",
37
+ "lib/gator/as3/test/flexunit4/klass.as.tt",
38
+ "lib/gator/as3/test/flexunit4/klass.rb",
39
+ "spec/spec_helper.rb"
40
+ ]
41
+ s.homepage = %q{http://github.com/devboy/gator-as3}
42
+ s.licenses = ["MIT"]
43
+ s.require_paths = ["lib"]
44
+ s.rubygems_version = %q{1.6.2}
45
+ s.summary = %q{gator-as3 - ActionScript3 & MXML generators for gator}
46
+
47
+ if s.respond_to? :specification_version then
48
+ s.specification_version = 3
49
+
50
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
+ s.add_runtime_dependency(%q<gator>, ["~> 0.0.14.pre"])
52
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
53
+ s.add_development_dependency(%q<ci_reporter>, ["~> 1.6.5"])
54
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
55
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
56
+ s.add_development_dependency(%q<rcov>, [">= 0"])
57
+ else
58
+ s.add_dependency(%q<gator>, ["~> 0.0.14.pre"])
59
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
60
+ s.add_dependency(%q<ci_reporter>, ["~> 1.6.5"])
61
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
62
+ s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
63
+ s.add_dependency(%q<rcov>, [">= 0"])
64
+ end
65
+ else
66
+ s.add_dependency(%q<gator>, ["~> 0.0.14.pre"])
67
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
68
+ s.add_dependency(%q<ci_reporter>, ["~> 1.6.5"])
69
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
70
+ s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
71
+ s.add_dependency(%q<rcov>, [">= 0"])
72
+ end
73
+ end
74
+
data/lib/gator/as3.rb ADDED
@@ -0,0 +1,3 @@
1
+ require File.dirname(__FILE__) + '/as3/collection'
2
+
3
+ Gator::GenerateCommand.register_subcommand Gator::AS3::GeneratorCollection
@@ -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,9 @@
1
+ package <%= package_name %>
2
+ {
3
+ public class <%= class_name %>
4
+ {
5
+ public function <%= class_name %>()
6
+ {
7
+ }
8
+ }
9
+ }
@@ -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,3 @@
1
+ require File.dirname(__FILE__) + '/asunit4/collection'
2
+
3
+ Gator::AS3::GeneratorCollection.register_subcommand Gator::AS3::ASUnit4::TestGeneratorCollection
@@ -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,12 @@
1
+ package <%= package_name %>
2
+ {
3
+
4
+ public class <%= class_name %>
5
+ {
6
+ [Test]
7
+ public function testSomething():void
8
+ {
9
+ }
10
+
11
+ }
12
+ }
@@ -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,3 @@
1
+ require File.dirname(__FILE__) + '/flexunit4/collection'
2
+
3
+ Gator::AS3::GeneratorCollection.register_subcommand Gator::AS3::FlexUnit4::TestGeneratorCollection
@@ -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,12 @@
1
+ package <%= package_name %>
2
+ {
3
+
4
+ public class <%= class_name %>
5
+ {
6
+ [Test]
7
+ public function testSomething():void
8
+ {
9
+ }
10
+
11
+ }
12
+ }
@@ -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
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'gator-as3'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata ADDED
@@ -0,0 +1,138 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gator-as3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2.pre
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Dominic Graefen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-07-10 00:00:00.000000000 +02:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: gator
17
+ requirement: &2162540400 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 0.0.14.pre
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *2162540400
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: &2162539920 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 2.3.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *2162539920
37
+ - !ruby/object:Gem::Dependency
38
+ name: ci_reporter
39
+ requirement: &2162539400 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 1.6.5
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *2162539400
48
+ - !ruby/object:Gem::Dependency
49
+ name: bundler
50
+ requirement: &2162538920 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: 1.0.0
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *2162538920
59
+ - !ruby/object:Gem::Dependency
60
+ name: jeweler
61
+ requirement: &2162524100 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: 1.6.2
67
+ type: :development
68
+ prerelease: false
69
+ version_requirements: *2162524100
70
+ - !ruby/object:Gem::Dependency
71
+ name: rcov
72
+ requirement: &2162523420 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: *2162523420
81
+ description: gator-as3 - ActionScript3 & MXML generators for gator
82
+ email: dominic.graefen@gmail.com
83
+ executables: []
84
+ extensions: []
85
+ extra_rdoc_files:
86
+ - LICENSE.txt
87
+ - README.rdoc
88
+ files:
89
+ - .document
90
+ - Gemfile
91
+ - LICENSE.txt
92
+ - README.rdoc
93
+ - Rakefile
94
+ - VERSION
95
+ - gator-as3.gemspec
96
+ - lib/gator/as3.rb
97
+ - lib/gator/as3/collection.rb
98
+ - lib/gator/as3/klass.as.tt
99
+ - lib/gator/as3/klass.rb
100
+ - lib/gator/as3/test/asunit4.rb
101
+ - lib/gator/as3/test/asunit4/collection.rb
102
+ - lib/gator/as3/test/asunit4/klass.as.tt
103
+ - lib/gator/as3/test/asunit4/klass.rb
104
+ - lib/gator/as3/test/flexunit4.rb
105
+ - lib/gator/as3/test/flexunit4/collection.rb
106
+ - lib/gator/as3/test/flexunit4/klass.as.tt
107
+ - lib/gator/as3/test/flexunit4/klass.rb
108
+ - spec/spec_helper.rb
109
+ has_rdoc: true
110
+ homepage: http://github.com/devboy/gator-as3
111
+ licenses:
112
+ - MIT
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - ! '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ segments:
124
+ - 0
125
+ hash: 465686225761794217
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ! '>'
130
+ - !ruby/object:Gem::Version
131
+ version: 1.3.1
132
+ requirements: []
133
+ rubyforge_project:
134
+ rubygems_version: 1.6.2
135
+ signing_key:
136
+ specification_version: 3
137
+ summary: gator-as3 - ActionScript3 & MXML generators for gator
138
+ test_files: []