sprout 0.7.191-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/TODO +12 -0
- data/bin/sprout +128 -0
- data/doc/Bundle +14 -0
- data/doc/Generator +35 -0
- data/doc/Library +63 -0
- data/doc/Task +21 -0
- data/doc/Tool +20 -0
- data/lib/corelib.swc +0 -0
- data/lib/platform.rb +109 -0
- data/lib/progress_bar.rb +330 -0
- data/lib/sprout.rb +466 -0
- data/lib/sprout/builder.rb +35 -0
- data/lib/sprout/commands/generate.rb +9 -0
- data/lib/sprout/general_tasks.rb +6 -0
- data/lib/sprout/generator.rb +6 -0
- data/lib/sprout/generator/base_mixins.rb +126 -0
- data/lib/sprout/generator/named_base.rb +227 -0
- data/lib/sprout/log.rb +46 -0
- data/lib/sprout/process_runner.rb +82 -0
- data/lib/sprout/project_model.rb +270 -0
- data/lib/sprout/remote_file_loader.rb +247 -0
- data/lib/sprout/remote_file_target.rb +96 -0
- data/lib/sprout/simple_resolver.rb +88 -0
- data/lib/sprout/tasks/gem_wrap_task.rb +192 -0
- data/lib/sprout/tasks/library_task.rb +113 -0
- data/lib/sprout/tasks/sftp_task.rb +248 -0
- data/lib/sprout/tasks/ssh_task.rb +153 -0
- data/lib/sprout/tasks/tool_task.rb +569 -0
- data/lib/sprout/tasks/zip_task.rb +158 -0
- data/lib/sprout/template_resolver.rb +207 -0
- data/lib/sprout/user.rb +370 -0
- data/lib/sprout/version.rb +10 -0
- data/lib/sprout/zip_util.rb +61 -0
- data/rakefile.rb +133 -0
- data/samples/gem_wrap/rakefile.rb +17 -0
- metadata +168 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
|
2
|
+
module Sprout
|
3
|
+
class ZipUtil #:nodoc:
|
4
|
+
|
5
|
+
# Pack up an archive from a directory on disk
|
6
|
+
def self.pack(input, archive, excludes)
|
7
|
+
Zip::ZipFile.open(archive, Zip::ZipFile::CREATE) do |zip|
|
8
|
+
add_file_to_zip(zip, input, excludes)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Unpack an archive to a directory on disk
|
13
|
+
def self.unpack(archive, destination)
|
14
|
+
Zip::ZipFile.open(archive) do |zip|
|
15
|
+
unpack_file(zip, destination)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.unpack_file(zip, destination, path='')
|
20
|
+
if(zip.file.file?(path))
|
21
|
+
File.open(File.join(destination, path), 'w') do |dest|
|
22
|
+
zip.file.open(path) do |src|
|
23
|
+
dest.write src.read
|
24
|
+
end
|
25
|
+
end
|
26
|
+
else
|
27
|
+
Dir.mkdir(File.join(destination, path))
|
28
|
+
zip.dir.foreach(path) do |dir|
|
29
|
+
unpack_file(zip, destination, File.join(path, dir))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.add_file_to_zip(zip, path, excludes)
|
35
|
+
if(File.directory?(path))
|
36
|
+
zip.dir.mkdir(path)
|
37
|
+
Dir.open(path).each do |child|
|
38
|
+
if(!excluded?(child, excludes))
|
39
|
+
add_file_to_zip(zip, File.join(path, child), excludes)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
else
|
43
|
+
File.open(path) do |src|
|
44
|
+
zip.file.open(path, 'w') do |dest|
|
45
|
+
dest.write src.read
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.excluded?(str, excludes)
|
52
|
+
excludes.each do |exc|
|
53
|
+
if(str == exc)
|
54
|
+
return true
|
55
|
+
end
|
56
|
+
end
|
57
|
+
return false
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
data/rakefile.rb
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/clean'
|
4
|
+
require 'rake/testtask'
|
5
|
+
require 'rake/packagetask'
|
6
|
+
require 'rake/gempackagetask'
|
7
|
+
require 'rake/rdoctask'
|
8
|
+
require 'rake/contrib/rubyforgepublisher'
|
9
|
+
require 'fileutils'
|
10
|
+
require 'lib/sprout'
|
11
|
+
require 'lib/sprout/version'
|
12
|
+
|
13
|
+
PROJECT = "sprout"
|
14
|
+
NAME = "sprout"
|
15
|
+
SUMMARY = "Sprouts is an open-source, cross-platform project generation, configuration and build tool."
|
16
|
+
GEM_VERSION = Sprout::VERSION::STRING
|
17
|
+
AUTHOR = "Luke Bayes"
|
18
|
+
EMAIL = "projectsprouts@googlegroups.com"
|
19
|
+
HOMEPAGE = "http://www.projectsprouts.org"
|
20
|
+
DESCRIPTION = "Sprouts take the tedium and frustration out of creating new programming projects by automatically installing and configuring external tools, libraries, commands and build tasks."
|
21
|
+
HOMEPATH = "http://#{PROJECT}.rubyforge.org"
|
22
|
+
RELEASE_TYPES = ["gem"]
|
23
|
+
PKG_LIST = FileList['[a-zA-Z]*',
|
24
|
+
'samples/**/*',
|
25
|
+
'bin/**/*',
|
26
|
+
'lib/**/*',
|
27
|
+
'doc/*'
|
28
|
+
]
|
29
|
+
PKG_LIST.exclude('.svn')
|
30
|
+
PKG_LIST.exclude('artifacts')
|
31
|
+
PKG_LIST.each do |file|
|
32
|
+
task :package => file
|
33
|
+
end
|
34
|
+
|
35
|
+
def apply_shared_spec(s)
|
36
|
+
s.summary = SUMMARY
|
37
|
+
s.description = DESCRIPTION
|
38
|
+
s.name = NAME
|
39
|
+
s.version = GEM_VERSION
|
40
|
+
s.author = AUTHOR
|
41
|
+
s.email = EMAIL
|
42
|
+
s.homepage = HOMEPAGE
|
43
|
+
s.rubyforge_project = PROJECT
|
44
|
+
s.require_path = 'lib'
|
45
|
+
s.bindir = 'bin'
|
46
|
+
s.has_rdoc = true
|
47
|
+
s.rdoc_options << '--title' << 'Project Sprouts -- Core Documentation'
|
48
|
+
s.rdoc_options << '--main' << 'Sprout::Sprout'
|
49
|
+
s.rdoc_options << '--line-numbers' << '--inline-source'
|
50
|
+
s.rdoc_options << '--charset' << 'utf-8'
|
51
|
+
s.rdoc_options << '-i' << '.'
|
52
|
+
s.files = PKG_LIST.to_a
|
53
|
+
s.executables = ['sprout']
|
54
|
+
s.default_executable = 'sprout'
|
55
|
+
|
56
|
+
s.add_dependency('rubyzip', '>= 0.9.1')
|
57
|
+
s.add_dependency('archive-tar-minitar', '>= 0.5.1')
|
58
|
+
s.add_dependency('rubigen', '>= 1.3.2')
|
59
|
+
s.add_dependency('net-sftp')
|
60
|
+
s.add_dependency('net-ssh')
|
61
|
+
end
|
62
|
+
|
63
|
+
osx_spec = Gem::Specification.new do |s|
|
64
|
+
apply_shared_spec(s)
|
65
|
+
s.platform = 'darwin'
|
66
|
+
# Add osx-specific dependencies here
|
67
|
+
|
68
|
+
# Can't really depend on rb-appscript b/c this requires OS X dev-tool disk
|
69
|
+
#s.add_dependency('rb-appscript', '>= 0.5.0')
|
70
|
+
s.add_dependency('open4', '>= 0.9.6')
|
71
|
+
end
|
72
|
+
|
73
|
+
nix_spec = Gem::Specification.new do |s|
|
74
|
+
apply_shared_spec(s)
|
75
|
+
s.platform = 'x86-linux'
|
76
|
+
# Add nix-specific dependencies here
|
77
|
+
s.add_dependency('open4', '>= 0.9.6')
|
78
|
+
end
|
79
|
+
|
80
|
+
win_spec = Gem::Specification.new do |s|
|
81
|
+
apply_shared_spec(s)
|
82
|
+
s.platform = 'mswin32'
|
83
|
+
# Add win-specific dependencies here
|
84
|
+
s.add_dependency('win32-open3', '0.2.5')
|
85
|
+
end
|
86
|
+
|
87
|
+
ruby_spec = Gem::Specification.new do |s|
|
88
|
+
apply_shared_spec(s)
|
89
|
+
s.platform = Gem::Platform::RUBY
|
90
|
+
s.add_dependency('open4', '>= 0.9.6')
|
91
|
+
end
|
92
|
+
|
93
|
+
Rake::GemPackageTask.new(osx_spec) do |pkg|
|
94
|
+
end
|
95
|
+
|
96
|
+
Rake::GemPackageTask.new(nix_spec) do |pkg|
|
97
|
+
end
|
98
|
+
|
99
|
+
Rake::GemPackageTask.new(win_spec) do |pkg|
|
100
|
+
end
|
101
|
+
|
102
|
+
Rake::GemPackageTask.new(ruby_spec) do |pkg|
|
103
|
+
end
|
104
|
+
|
105
|
+
Rake::RDocTask.new do |t|
|
106
|
+
t.rdoc_files.include(['doc/*', 'lib/*.rb', 'lib/**/*.rb', 'MIT-LICENSE'])
|
107
|
+
t.title = "Project Sprouts -- Core Documentation"
|
108
|
+
t.rdoc_dir = 'rdoc'
|
109
|
+
t.main = 'Sprout::Sprout'
|
110
|
+
t.options << '--line-numbers' << '--inline-source'
|
111
|
+
t.options << '--charset' << 'utf-8'
|
112
|
+
t.options << '-i .'
|
113
|
+
end
|
114
|
+
|
115
|
+
CLEAN.add('rdoc')
|
116
|
+
|
117
|
+
|
118
|
+
require File.dirname(__FILE__) + '/script/build_helpers'
|
119
|
+
|
120
|
+
def fix_x86_mswin
|
121
|
+
files = Dir.glob('pkg/*x86-mswin*')
|
122
|
+
files.each do |name|
|
123
|
+
new_name = name.gsub('-x86', '')
|
124
|
+
puts "Renaming x86-mswin gem from #{name} to #{new_name}"
|
125
|
+
File.mv(name, new_name)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
task :package do
|
130
|
+
fix_x86_mswin
|
131
|
+
end
|
132
|
+
|
133
|
+
#task :release => :release_rubyforge
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'sprout'
|
2
|
+
|
3
|
+
desc "Wrap the asunit3 library in a rubygem"
|
4
|
+
gem_wrap :asunit3 do |t|
|
5
|
+
t.version = '3.2.0'
|
6
|
+
t.summary = "AsUnit3 is an ActionScript unit test framework for AIR, Flex 2/3 and ActionScript 3 projects"
|
7
|
+
t.author = "Luke Bayes and Ali Mills"
|
8
|
+
t.email = "projectsprouts@googlegroups.com"
|
9
|
+
t.homepage = "http://www.asunit.org"
|
10
|
+
t.sprout_spec =<<EOF
|
11
|
+
- !ruby/object:Sprout::RemoteFileTarget
|
12
|
+
platform: universal
|
13
|
+
url: http://projectsprouts.googlecode.com/files/asunit3-1.1.zip
|
14
|
+
source_path: ''
|
15
|
+
EOF
|
16
|
+
end
|
17
|
+
|
metadata
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sprout
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.191
|
5
|
+
platform: mswin32
|
6
|
+
authors:
|
7
|
+
- Luke Bayes
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-07-19 00:00:00 -07:00
|
13
|
+
default_executable: sprout
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rubyzip
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.9.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: archive-tar-minitar
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.1
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rubigen
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.3.2
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: net-sftp
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: net-ssh
|
57
|
+
type: :runtime
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: win32-open3
|
67
|
+
type: :runtime
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 0.2.5
|
74
|
+
version:
|
75
|
+
description: Sprouts take the tedium and frustration out of creating new programming projects by automatically installing and configuring external tools, libraries, commands and build tasks.
|
76
|
+
email: projectsprouts@googlegroups.com
|
77
|
+
executables:
|
78
|
+
- sprout
|
79
|
+
extensions: []
|
80
|
+
|
81
|
+
extra_rdoc_files: []
|
82
|
+
|
83
|
+
files:
|
84
|
+
- bin
|
85
|
+
- doc
|
86
|
+
- lib
|
87
|
+
- MIT-LICENSE
|
88
|
+
- pkg
|
89
|
+
- rakefile.rb
|
90
|
+
- samples
|
91
|
+
- script
|
92
|
+
- test
|
93
|
+
- TODO
|
94
|
+
- samples/gem_wrap
|
95
|
+
- samples/gem_wrap/rakefile.rb
|
96
|
+
- bin/sprout
|
97
|
+
- lib/corelib.swc
|
98
|
+
- lib/platform.rb
|
99
|
+
- lib/progress_bar.rb
|
100
|
+
- lib/sprout
|
101
|
+
- lib/sprout/builder.rb
|
102
|
+
- lib/sprout/commands
|
103
|
+
- lib/sprout/commands/generate.rb
|
104
|
+
- lib/sprout/general_tasks.rb
|
105
|
+
- lib/sprout/generator
|
106
|
+
- lib/sprout/generator/base_mixins.rb
|
107
|
+
- lib/sprout/generator/named_base.rb
|
108
|
+
- lib/sprout/generator.rb
|
109
|
+
- lib/sprout/log.rb
|
110
|
+
- lib/sprout/process_runner.rb
|
111
|
+
- lib/sprout/project_model.rb
|
112
|
+
- lib/sprout/remote_file_loader.rb
|
113
|
+
- lib/sprout/remote_file_target.rb
|
114
|
+
- lib/sprout/simple_resolver.rb
|
115
|
+
- lib/sprout/tasks
|
116
|
+
- lib/sprout/tasks/gem_wrap_task.rb
|
117
|
+
- lib/sprout/tasks/library_task.rb
|
118
|
+
- lib/sprout/tasks/sftp_task.rb
|
119
|
+
- lib/sprout/tasks/ssh_task.rb
|
120
|
+
- lib/sprout/tasks/tool_task.rb
|
121
|
+
- lib/sprout/tasks/zip_task.rb
|
122
|
+
- lib/sprout/template_resolver.rb
|
123
|
+
- lib/sprout/user.rb
|
124
|
+
- lib/sprout/version.rb
|
125
|
+
- lib/sprout/zip_util.rb
|
126
|
+
- lib/sprout.rb
|
127
|
+
- doc/Bundle
|
128
|
+
- doc/Generator
|
129
|
+
- doc/Library
|
130
|
+
- doc/Task
|
131
|
+
- doc/Tool
|
132
|
+
has_rdoc: true
|
133
|
+
homepage: http://www.projectsprouts.org
|
134
|
+
post_install_message:
|
135
|
+
rdoc_options:
|
136
|
+
- --title
|
137
|
+
- Project Sprouts -- Core Documentation
|
138
|
+
- --main
|
139
|
+
- Sprout::Sprout
|
140
|
+
- --line-numbers
|
141
|
+
- --inline-source
|
142
|
+
- --charset
|
143
|
+
- utf-8
|
144
|
+
- -i
|
145
|
+
- .
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: "0"
|
153
|
+
version:
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: "0"
|
159
|
+
version:
|
160
|
+
requirements: []
|
161
|
+
|
162
|
+
rubyforge_project: sprout
|
163
|
+
rubygems_version: 1.2.0
|
164
|
+
signing_key:
|
165
|
+
specification_version: 2
|
166
|
+
summary: Sprouts is an open-source, cross-platform project generation, configuration and build tool.
|
167
|
+
test_files: []
|
168
|
+
|