jerryvos-sprouts-extensions 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/README.markdown ADDED
@@ -0,0 +1,32 @@
1
+ sprout-extensions
2
+ =============
3
+
4
+ Purpose
5
+ ========
6
+ Sprout-extensions is a set of little extensions monkey-patched into Sprout. It adds:
7
+
8
+ * the ability to use gems/tools on github
9
+
10
+ mxmlc "app.swf" do |t|
11
+ t.gem_name = 'jerryvos-sprout-flexsystemsdk-tool'
12
+ end
13
+
14
+ * the ability to easily alias your sprout task to a simpler, namespaced version
15
+
16
+ namespace :build do
17
+ desc "Compile the main swf"
18
+ mxmlc "app.swf" do |t|
19
+ t.task_alias = 'main' # the alias
20
+ end
21
+ end
22
+
23
+ # rake -T
24
+ rake app.swf # Compile the main swf
25
+ rake build:main # Compile the main swf
26
+
27
+ * smarter tracking of when a rebuild actually has to happen when your task isn't named the same as your output file
28
+ * For the following task, sprout/rake will always rebuild the file, even if it already exists and the dependencies are up-to-date. With sprout-extension this doesn't happen
29
+
30
+ mxmlc "my_task_name" do |t|
31
+ t.output = "my_app.swf"
32
+ end
data/Rakefile ADDED
@@ -0,0 +1,33 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "sprouts-extensions"
8
+ gem.summary = %Q{Some extensions to sprout}
9
+ gem.email = "jerry.vos@gmail.com"
10
+ gem.homepage = "http://github.com/jerryvos/sprout-extensions"
11
+ gem.authors = ["Richie Vos"]
12
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
+ end
14
+
15
+ rescue LoadError
16
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
+ end
18
+
19
+ require 'rake/rdoctask'
20
+ Rake::RDocTask.new do |rdoc|
21
+ if File.exist?('VERSION.yml')
22
+ config = YAML.load(File.read('VERSION.yml'))
23
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
24
+ else
25
+ version = ""
26
+ end
27
+
28
+ rdoc.rdoc_dir = 'rdoc'
29
+ rdoc.title = "sprout-extensions #{version}"
30
+ rdoc.rdoc_files.include('README*')
31
+ rdoc.rdoc_files.include('lib/**/*.rb')
32
+ end
33
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.2
@@ -0,0 +1,47 @@
1
+ require 'sprout'
2
+ sprout 'as3'
3
+
4
+ # enable github as a source
5
+ Sprout::Sprout.gem_sources += ['http://gems.github.com']
6
+
7
+ Sprout::Sprout.class_eval do
8
+ # overriding this to allow sprout to be anywhere in the name, supporting github style aliases
9
+ # ie (jerryvos-sprout-flexsystemsdk-tool)
10
+ def self.sprout_to_gem_name(name)
11
+ if(!name.match(/sprout-/))
12
+ name = "sprout-#{name}-bundle"
13
+ end
14
+ return name
15
+ end
16
+ end
17
+
18
+ Sprout::ToolTask.class_eval do
19
+ # namespace respecting alias for this task.
20
+ # ToolTask is a file_task which generally doesn't respect namespacing.
21
+ # Since we DO want to namespace these commands, we're going to create the non-namespaced version
22
+ # and then build a task which is namespaced that just invokes the real one.
23
+ # Feels shady, but less shady than other solutions.
24
+ def task_alias=(task_alias)
25
+ desc name
26
+ task task_alias => name
27
+ end
28
+ end
29
+
30
+ # make the task a little smarter about how it determines when it needs to rebuild. Normally it bases
31
+ # this on the name of the task, but since these sprout tasks explicitly have an output file, use that
32
+ # instead.
33
+ [Sprout::COMPCTask, Sprout::MXMLCTask].each do |task_class|
34
+ task_class.class_eval do
35
+ def self.needed?()
36
+ ! File.exist?(output) || out_of_date?(timestamp)
37
+ end
38
+
39
+ def timestamp
40
+ if File.exist?(output)
41
+ File.mtime(output.to_s)
42
+ else
43
+ Rake::EARLY
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{sprouts-extensions}
5
+ s.version = "0.1.2"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Richie Vos"]
9
+ s.date = %q{2009-07-15}
10
+ s.email = %q{jerry.vos@gmail.com}
11
+ s.extra_rdoc_files = [
12
+ "README.markdown"
13
+ ]
14
+ s.files = [
15
+ ".document",
16
+ ".gitignore",
17
+ "README.markdown",
18
+ "Rakefile",
19
+ "VERSION",
20
+ "lib/sprouts-extensions.rb",
21
+ "sprouts-extensions.gemspec"
22
+ ]
23
+ s.homepage = %q{http://github.com/jerryvos/sprout-extensions}
24
+ s.rdoc_options = ["--charset=UTF-8"]
25
+ s.require_paths = ["lib"]
26
+ s.rubygems_version = %q{1.3.4}
27
+ s.summary = %q{Some extensions to sprout}
28
+
29
+ if s.respond_to? :specification_version then
30
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
31
+ s.specification_version = 3
32
+
33
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
34
+ else
35
+ end
36
+ else
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jerryvos-sprouts-extensions
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Richie Vos
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-15 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: jerry.vos@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.markdown
24
+ files:
25
+ - .document
26
+ - .gitignore
27
+ - README.markdown
28
+ - Rakefile
29
+ - VERSION
30
+ - lib/sprouts-extensions.rb
31
+ - sprouts-extensions.gemspec
32
+ has_rdoc: false
33
+ homepage: http://github.com/jerryvos/sprout-extensions
34
+ post_install_message:
35
+ rdoc_options:
36
+ - --charset=UTF-8
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ version:
51
+ requirements: []
52
+
53
+ rubyforge_project:
54
+ rubygems_version: 1.2.0
55
+ signing_key:
56
+ specification_version: 3
57
+ summary: Some extensions to sprout
58
+ test_files: []
59
+