sprout 0.5.29 → 0.7.153

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

Files changed (48) hide show
  1. data/{MIT-LICENSE.txt → MIT-LICENSE} +0 -0
  2. data/TODO +12 -0
  3. data/bin/sprout +83 -140
  4. data/doc/Bundle +14 -0
  5. data/doc/Generator +35 -0
  6. data/doc/Library +63 -0
  7. data/doc/Task +21 -0
  8. data/doc/Tool +20 -0
  9. data/lib/platform.rb +2 -3
  10. data/lib/progress_bar.rb +39 -23
  11. data/lib/sprout/builder.rb +35 -0
  12. data/lib/sprout/commands/generate.rb +14 -0
  13. data/lib/sprout/general_tasks.rb +5 -0
  14. data/lib/sprout/generator/base_mixins.rb +132 -0
  15. data/lib/sprout/generator/named_base.rb +216 -0
  16. data/lib/sprout/generator.rb +6 -0
  17. data/lib/{log.rb → sprout/log.rb} +2 -2
  18. data/lib/sprout/process_runner.rb +46 -0
  19. data/lib/sprout/project_model.rb +114 -0
  20. data/lib/{remote_file_loader.rb → sprout/remote_file_loader.rb} +63 -36
  21. data/lib/sprout/remote_file_target.rb +96 -0
  22. data/lib/sprout/simple_resolver.rb +88 -0
  23. data/lib/sprout/tasks/gem_wrap_task.rb +192 -0
  24. data/lib/sprout/tasks/library_task.rb +103 -0
  25. data/lib/sprout/tasks/sftp_task.rb +245 -0
  26. data/lib/sprout/tasks/tool_task.rb +541 -0
  27. data/lib/sprout/tasks/zip_task.rb +158 -0
  28. data/lib/{template_resolver.rb → sprout/template_resolver.rb} +10 -7
  29. data/lib/{user.rb → sprout/user.rb} +84 -37
  30. data/lib/sprout/version.rb +4 -3
  31. data/lib/sprout/zip_util.rb +61 -0
  32. data/lib/sprout.rb +377 -285
  33. data/rakefile.rb +93 -119
  34. data/samples/gem_wrap/rakefile.rb +17 -0
  35. metadata +131 -96
  36. data/Manifest.txt +0 -9
  37. data/lib/command.rb +0 -29
  38. data/lib/file_target.rb +0 -8
  39. data/lib/generate.rb +0 -37
  40. data/lib/library.rb +0 -18
  41. data/lib/process_runner.rb +0 -27
  42. data/lib/project.rb +0 -10
  43. data/lib/project_model.rb +0 -59
  44. data/lib/remote_file_target.rb +0 -62
  45. data/lib/task.rb +0 -20
  46. data/lib/template.rb +0 -37
  47. data/lib/tool.rb +0 -18
  48. data/setup.rb +0 -1585
data/rakefile.rb CHANGED
@@ -7,149 +7,123 @@ require 'rake/gempackagetask'
7
7
  require 'rake/rdoctask'
8
8
  require 'rake/contrib/rubyforgepublisher'
9
9
  require 'fileutils'
10
+ require 'lib/sprout'
10
11
  require 'lib/sprout/version'
11
12
 
12
- AUTHOR = "Luke Bayes"
13
- EMAIL = "lbayes@patternpark.com"
14
- HOMEPAGE = "http://www.patternpark.com"
15
- DESCRIPTION = "Sprouts take the tedium and frustration out of creating new programming projects by automatically installing and configuring external tools, libraries and build tasks."
16
- GEM_NAME = "sprout"
17
- RUBYFORGE_PROJECT = "sprout"
18
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
19
- SUMMARY = "Sprouts is an open-source, cross-platform project generation and configuration tool."
20
- NAME = "sprout"
21
- RELEASE_TYPES = ["gem"]
22
- REV = nil
23
- VERS = (Sprout::VERSION::STRING + (REV ? ".#{REV}" : ""))
24
- CLEAN.include(['**/.*.sw?',
25
- '*.gem',
26
- 'pkg/*',
27
- 'pkg',
28
- 'test/user_home/osx/Library/Sprouts/cache/asunit3-library',
29
- 'test/user_home/osx/Library/Sprouts/cache/demo-library',
30
- 'test/user_home/osx/Library/Sprouts/cache/demo-tool',
31
- 'test/user_home/osx/Library/Sprouts/cache/demo-task',
32
- 'test/project/lib'
33
- ])
34
-
35
- RDOC_OPTS = ['--quiet', '--title', 'sprout documentation',
36
- '--opname', 'index.html',
37
- '--line-numbers',
38
- '--main', 'README',
39
- '--inline-source']
40
-
41
- Rake::TestTask.new('test') do |t|
42
- t.pattern = 'test/**/*_test.rb'
43
- t.warning = true
44
- end
45
-
46
- PKG_LIST = FileList['[a-zA-Z]*',
47
- 'bin/**/*',
48
- 'lib/**/*'
49
- ]
50
-
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
+ ]
51
29
  PKG_LIST.exclude('.svn')
30
+ PKG_LIST.exclude('artifacts')
52
31
  PKG_LIST.each do |file|
53
32
  task :package => file
54
33
  end
55
34
 
56
- task :package => [:increment_revision]
57
-
58
- spec = Gem::Specification.new do |s|
59
- s.name = NAME
60
- s.version = VERS
61
- s.summary = SUMMARY
62
- s.description = DESCRIPTION
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('rails', '>= 2.0.2') # Shared generator implementation
59
+ s.add_dependency('net-sftp', '>= 0.0.0')
60
+ end
63
61
 
64
- s.add_dependency('rake', '>= 0.7.1')
65
- s.add_dependency('rubyzip', '>= 0.9.1')
66
- s.add_dependency('archive-tar-minitar', '>= 0.5.1')
62
+ osx_spec = Gem::Specification.new do |s|
63
+ apply_shared_spec(s)
64
+ s.platform = 'darwin'
65
+ # Add osx-specific dependencies here
66
+ s.add_dependency('rb-appscript', '>= 0.5.0')
67
+ s.add_dependency('open4', '>= 0.9.6')
68
+ end
67
69
 
68
- if(RUBY_PLATFORM =~ /vista/i ||
69
- RUBY_PLATFORM =~ /mswin/i ||
70
- RUBY_PLATFORM =~ /cygwin/i ||
71
- RUBY_PLATFORM =~ /mingw/i)
72
- s.add_dependency('win32-open3', '>= 0.2.5')
73
- end
74
-
75
- s.rdoc_options << '--exclude' << '.'
76
- s.has_rdoc = false
70
+ nix_spec = Gem::Specification.new do |s|
71
+ apply_shared_spec(s)
72
+ s.platform = 'x86-linux'
73
+ # Add nix-specific dependencies here
74
+ s.add_dependency('open4', '>= 0.9.6')
75
+ end
77
76
 
78
- s.files = PKG_LIST.to_a.delete_if {|f| f.include?('.svn')}
79
- s.require_path = 'lib'
77
+ win_spec = Gem::Specification.new do |s|
78
+ apply_shared_spec(s)
79
+ s.platform = 'mswin32'
80
+ # Add win-specific dependencies here
81
+ s.add_dependency('win32-open3')
82
+ end
80
83
 
81
- s.bindir = 'bin' # Use these for applications.
82
- s.executables = ['sprout']
83
- s.default_executable = 'sprout'
84
+ ruby_spec = Gem::Specification.new do |s|
85
+ apply_shared_spec(s)
86
+ s.platform = Gem::Platform::RUBY
87
+ end
84
88
 
85
- s.author = AUTHOR
86
- s.email = EMAIL
87
- s.homepage = HOMEPAGE
88
- s.rubyforge_project = RUBYFORGE_PROJECT
89
+ Rake::GemPackageTask.new(osx_spec) do |pkg|
89
90
  end
90
91
 
91
- Rake::GemPackageTask.new(spec) do |pkg|
92
+ Rake::GemPackageTask.new(nix_spec) do |pkg|
92
93
  end
93
94
 
94
- task :release_confirmation do
95
- puts <<EOF
95
+ Rake::GemPackageTask.new(win_spec) do |pkg|
96
+ end
96
97
 
97
- You have selected the ':release' task. This task will:
98
- 1) Run test cases
99
- 2) Package the gem
100
- 3) Submit the gem to Rubyforge file releases
101
- 4) Increment the revision number
102
- 5) Commit the latest trunk to subversion
103
- 6) Create a tag and save it to subversion
98
+ Rake::GemPackageTask.new(ruby_spec) do |pkg|
99
+ end
104
100
 
105
- Are you sure you're ready to do this? [Yn]
106
- EOF
101
+ Rake::RDocTask.new do |t|
102
+ t.rdoc_files.include(['doc/*', 'lib/*.rb', 'lib/**/*.rb', 'MIT-LICENSE'])
103
+ t.title = "Project Sprouts -- Core Documentation"
104
+ t.rdoc_dir = 'rdoc'
105
+ t.main = 'Sprout::Sprout'
106
+ t.options << '--line-numbers' << '--inline-source'
107
+ t.options << '--charset' << 'utf-8'
108
+ t.options << '-i .'
109
+ end
107
110
 
108
- answer = $stdin.gets.chomp
109
- if(answer != '' && answer.downcase.index('y') != 'y')
110
- raise Exception.new("\n>> The release task has been cancelled!\n\n")
111
- end
111
+ CLEAN.add('rdoc')
112
112
 
113
- end
114
113
 
115
- desc "Publish and release files to RubyForge."
116
- task :release => [:release_confirmation, :package] do
117
- system("svn commit -m 'Created release #{VERS}'")
118
- system("svn copy -m 'Created tag for release #{VERS}' https://projectsprouts.googlecode.com/svn/trunk/ https://projectsprouts.googlecode.com/svn/tags/#{VERS}")
114
+ require File.dirname(__FILE__) + '/script/build_helpers'
119
115
 
120
- system('rubyforge login')
121
- for ext in RELEASE_TYPES
122
- release_command = "rubyforge add_release #{RUBYFORGE_PROJECT} #{NAME} 'pre-alpha #{VERS}' pkg/#{NAME}-#{VERS}.#{ext}"
123
- puts release_command
124
- system(release_command)
116
+ def fix_x86_mswin
117
+ files = Dir.glob('pkg/*x86-mswin*')
118
+ files.each do |name|
119
+ new_name = name.gsub('-x86', '')
120
+ puts "Renaming x86-mswin gem from #{name} to #{new_name}"
121
+ File.mv(name, new_name)
125
122
  end
126
123
  end
127
124
 
128
- desc "Increment the release revision"
129
- task :increment_revision do
130
- version_file = File.join('lib', NAME, 'version.rb')
131
- file = File.open(version_file, 'r+')
132
- lines = ''
133
- file.readlines.each do |line|
134
- if(line.match(/^\s+TINY/))
135
- d = line.match(/\d+/)
136
- incr = d.to_s.to_i + 1
137
- newline = line.gsub(/(\d+)/, incr.to_s)
138
- lines << newline
139
- puts "Incremented revision to #{incr.to_s}"
140
- next
141
- end
142
- lines << line
143
- end
144
-
145
- File.open(version_file, 'w') do |file|
146
- file.puts lines
147
- end
125
+ task :package do
126
+ fix_x86_mswin
148
127
  end
149
128
 
150
- desc "Package and Reinstall the latest gem"
151
- task :reinstall_gem do
152
- system("rake package")
153
- system("gem uninstall asproject")
154
- system("gem install pkg/asproject-#{VERS}.gem")
155
- end
129
+ #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 CHANGED
@@ -1,106 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
3
- specification_version: 1
4
2
  name: sprout
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.5.29
7
- date: 2007-10-13 00:00:00 -07:00
8
- summary: "Sprouts is an open-source, cross-platform project generation and configuration
9
- tool."
10
- require_paths:
11
- - lib
12
- email: lbayes@patternpark.com
13
- homepage: http://www.patternpark.com
14
- rubyforge_project: sprout
15
- description: "Sprouts take the tedium and frustration out of creating new programming projects
16
- by automatically installing and configuring external tools, libraries and build
17
- tasks."
4
+ version: 0.7.153
5
+ platform: ruby
6
+ authors:
7
+ - Luke Bayes
18
8
  autorequire:
19
- default_executable: sprout
20
9
  bindir: bin
21
- has_rdoc: false
22
- required_ruby_version: !ruby/object:Gem::Version::Requirement
23
- requirements:
24
- -
25
- - ">"
10
+ cert_chain: []
11
+
12
+ date: 2008-02-10 00:00:00 -08:00
13
+ default_executable: sprout
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rubyzip
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.9.1
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: archive-tar-minitar
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.5.1
32
+ version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: rails
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.0.2
41
+ version:
42
+ - !ruby/object:Gem::Dependency
43
+ name: net-sftp
44
+ version_requirement:
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
26
48
  - !ruby/object:Gem::Version
27
49
  version: 0.0.0
28
- version:
29
- platform: ruby
30
- signing_key:
31
- cert_chain:
32
- post_install_message:
33
- authors:
34
- - Luke Bayes
35
- files:
36
- - bin
37
- - examples
38
- - lib
39
- - Manifest.txt
40
- - MIT-LICENSE.txt
41
- - pkg
42
- - rakefile.rb
43
- - scripts
44
- - setup.rb
45
- - test
46
- - bin/sprout
47
- - lib/command.rb
48
- - lib/file_target.rb
49
- - lib/generate.rb
50
- - lib/library.rb
51
- - lib/log.rb
52
- - lib/platform.rb
53
- - lib/process_runner.rb
54
- - lib/progress_bar.rb
55
- - lib/project.rb
56
- - lib/project_model.rb
57
- - lib/remote_file_loader.rb
58
- - lib/remote_file_target.rb
59
- - lib/sprout
60
- - lib/sprout.rb
61
- - lib/task.rb
62
- - lib/template.rb
63
- - lib/template_resolver.rb
64
- - lib/tool.rb
65
- - lib/user.rb
66
- - lib/sprout/version.rb
67
- test_files: []
68
- rdoc_options:
69
- - "--exclude"
70
- - "."
71
- extra_rdoc_files: []
50
+ version:
51
+ 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.
52
+ email: projectsprouts@googlegroups.com
72
53
  executables:
73
- - sprout
54
+ - sprout
74
55
  extensions: []
56
+
57
+ extra_rdoc_files: []
58
+
59
+ files:
60
+ - bin
61
+ - doc
62
+ - lib
63
+ - MIT-LICENSE
64
+ - rakefile.rb
65
+ - samples
66
+ - script
67
+ - test
68
+ - TODO
69
+ - samples/gem_wrap
70
+ - samples/gem_wrap/rakefile.rb
71
+ - bin/sprout
72
+ - lib/platform.rb
73
+ - lib/progress_bar.rb
74
+ - lib/sprout
75
+ - lib/sprout/builder.rb
76
+ - lib/sprout/commands
77
+ - lib/sprout/commands/generate.rb
78
+ - lib/sprout/general_tasks.rb
79
+ - lib/sprout/generator
80
+ - lib/sprout/generator/base_mixins.rb
81
+ - lib/sprout/generator/named_base.rb
82
+ - lib/sprout/generator.rb
83
+ - lib/sprout/log.rb
84
+ - lib/sprout/process_runner.rb
85
+ - lib/sprout/project_model.rb
86
+ - lib/sprout/remote_file_loader.rb
87
+ - lib/sprout/remote_file_target.rb
88
+ - lib/sprout/simple_resolver.rb
89
+ - lib/sprout/tasks
90
+ - lib/sprout/tasks/gem_wrap_task.rb
91
+ - lib/sprout/tasks/library_task.rb
92
+ - lib/sprout/tasks/sftp_task.rb
93
+ - lib/sprout/tasks/tool_task.rb
94
+ - lib/sprout/tasks/zip_task.rb
95
+ - lib/sprout/template_resolver.rb
96
+ - lib/sprout/user.rb
97
+ - lib/sprout/version.rb
98
+ - lib/sprout/zip_util.rb
99
+ - lib/sprout.rb
100
+ - doc/Bundle
101
+ - doc/Generator
102
+ - doc/Library
103
+ - doc/Task
104
+ - doc/Tool
105
+ has_rdoc: true
106
+ homepage: http://www.projectsprouts.org
107
+ post_install_message:
108
+ rdoc_options:
109
+ - --title
110
+ - Project Sprouts -- Core Documentation
111
+ - --main
112
+ - Sprout::Sprout
113
+ - --line-numbers
114
+ - --inline-source
115
+ - --charset
116
+ - utf-8
117
+ - -i
118
+ - .
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: "0"
126
+ version:
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: "0"
132
+ version:
75
133
  requirements: []
76
- dependencies:
77
- - !ruby/object:Gem::Dependency
78
- name: rake
79
- version_requirement:
80
- version_requirements: !ruby/object:Gem::Version::Requirement
81
- requirements:
82
- -
83
- - ">="
84
- - !ruby/object:Gem::Version
85
- version: 0.7.1
86
- version:
87
- - !ruby/object:Gem::Dependency
88
- name: rubyzip
89
- version_requirement:
90
- version_requirements: !ruby/object:Gem::Version::Requirement
91
- requirements:
92
- -
93
- - ">="
94
- - !ruby/object:Gem::Version
95
- version: 0.9.1
96
- version:
97
- - !ruby/object:Gem::Dependency
98
- name: archive-tar-minitar
99
- version_requirement:
100
- version_requirements: !ruby/object:Gem::Version::Requirement
101
- requirements:
102
- -
103
- - ">="
104
- - !ruby/object:Gem::Version
105
- version: 0.5.1
106
- version:
134
+
135
+ rubyforge_project: sprout
136
+ rubygems_version: 1.0.1
137
+ signing_key:
138
+ specification_version: 2
139
+ summary: Sprouts is an open-source, cross-platform project generation, configuration and build tool.
140
+ test_files: []
141
+
data/Manifest.txt DELETED
@@ -1,9 +0,0 @@
1
- Manifest.txt
2
- Rakefile
3
- bin/=sprout
4
- lib/sprout.rb
5
- lib/sprout/version.rb
6
- scripts/txt2html
7
- setup.rb
8
- test/test_helper.rb
9
- test/test_sprout.rb
data/lib/command.rb DELETED
@@ -1,29 +0,0 @@
1
-
2
- module PatternPark
3
-
4
- class Command < Task
5
-
6
- def type
7
- return 'command'
8
- end
9
-
10
- def execute
11
- dependencies.each do |dep|
12
- dep.execute
13
- end
14
- # Create a project relevant pointer to this command instance
15
- if(target.project_path && target.project_path != '')
16
- to = File.join(Sprout.project_path, target.project_path)
17
- FileUtils.makedirs(File.dirname(to))
18
- File.open(to, 'w') do |file|
19
- file.puts("PatternPark::Sprout.load('#{name}')")
20
- file.puts("require 'command/#{name}'")
21
- end
22
- generate = File.join(Sprout.project_path, 'script', 'generate')
23
- if(File.exists?(generate))
24
- FileUtils.chmod(0755, generate)
25
- end
26
- end
27
- end
28
- end
29
- end
data/lib/file_target.rb DELETED
@@ -1,8 +0,0 @@
1
-
2
- module PatternPark
3
-
4
- class FileTarget
5
- attr_accessor :platform
6
-
7
- end
8
- end
data/lib/generate.rb DELETED
@@ -1,37 +0,0 @@
1
-
2
- module PatternPark
3
-
4
- class Generate
5
-
6
- def self.new(args)
7
- begin
8
- if(args.size == 0)
9
- raise UsageError.new('[ERROR] Generate requires at least one argument')
10
- end
11
- name = args.shift
12
- path = Generate.command_path(name)
13
- require path
14
- cmd = eval(name.capitalize + "Command").new(args)
15
- Log.flush
16
- return cmd
17
- rescue UsageError => e
18
- puts e.to_s
19
- end
20
- end
21
-
22
- def self.command_path(name)
23
- file = name + "_command.rb"
24
- path = File.join(Sprout.project_path, 'script', 'command', file)
25
- if(File.exists?(path))
26
- return path
27
- end
28
- path = File.join(Sprout.cache, 'command', file)
29
- puts "trying: " + path
30
- if(File.exists?(path))
31
- return path
32
- end
33
- raise UsageError.new("[ERROR] Generate could not find command named '#{file}'")
34
- end
35
-
36
- end
37
- end
data/lib/library.rb DELETED
@@ -1,18 +0,0 @@
1
-
2
- module PatternPark
3
-
4
- class Library < Sprout
5
-
6
- def type
7
- return 'library'
8
- end
9
-
10
- def execute
11
- super
12
- from = target.install_path
13
- to = File.join(Sprout.project_path, target.project_path)
14
- FileUtils.makedirs(to)
15
- TemplateResolver.instance.copy_files(from, to, render)
16
- end
17
- end
18
- end
@@ -1,27 +0,0 @@
1
-
2
- module PatternPark
3
-
4
- class ProcessRunner
5
- attr_reader :path,
6
- :r,
7
- :w,
8
- :e
9
-
10
- def initialize(*command)
11
- @command = command
12
- @w, @r, @e = Open3.popen3(*@command)
13
- end
14
-
15
- def puts(msg)
16
- @w.puts(msg)
17
- end
18
-
19
- def read
20
- return r.read
21
- end
22
-
23
- def read_err
24
- return e.read
25
- end
26
- end
27
- end
data/lib/project.rb DELETED
@@ -1,10 +0,0 @@
1
-
2
- module PatternPark
3
-
4
- class Project < Sprout
5
-
6
- def type
7
- return 'project'
8
- end
9
- end
10
- end