sprout 1.0.23.pre → 1.0.24.pre

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.

data/bin/sprout-ruby ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'sprout'
5
+ require 'sprout/generators/ruby/ruby_generator'
6
+
7
+ generator = Sprout::RubyGenerator.new
8
+ generator.parse! ARGV
9
+ generator.execute
10
+
@@ -35,7 +35,9 @@ module Sprout
35
35
  snake = input.snake_case
36
36
 
37
37
  directory snake do
38
- file 'Gemfile', 'ruby_gemfile'
38
+ template 'Gemfile', 'ruby_gemfile'
39
+ template 'Rakefile', 'ruby_rakefile'
40
+ template "#{input.snake_case}.gemspec", 'ruby_gemspec'
39
41
 
40
42
  directory lib do
41
43
  template "#{snake}.rb", 'ruby_input.rb'
@@ -46,7 +48,10 @@ module Sprout
46
48
 
47
49
  directory test do
48
50
  directory fixtures
49
- directory unit
51
+ directory unit do
52
+ template "#{input.snake_case}_test.rb", 'ruby_test_case.rb'
53
+ end
54
+ template 'test_helper.rb', 'ruby_test_helper.rb'
50
55
  end
51
56
 
52
57
  directory bin do
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require '<%= input.snake_case %>'
2
3
 
3
4
  <%= input.snake_case %> = <%= input.camel_case %>::Base.new
@@ -1,4 +1,10 @@
1
1
  source :rubygems
2
2
 
3
- gem 'sprout', '>= 1.0.pre'
3
+ gem 'sprout', '>= 1.0.0.pre'
4
+
5
+ group :development do
6
+ gem 'rake'
7
+ gem "shoulda"
8
+ gem "mocha"
9
+ end
4
10
 
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path File.join(File.dirname(__FILE__), 'lib')
3
+ $:.unshift lib unless $:.include?(lib)
4
+
5
+ require 'bundler'
6
+ require 'rake'
7
+ require '<%= input.snake_case %>'
8
+
9
+ Gem::Specification.new do |s|
10
+ s.name = <%= input.camel_case %>::NAME
11
+ s.version = <%= input.camel_case %>::VERSION
12
+ s.platform = Gem::Platform::RUBY
13
+ s.authors = ["Your Name Here"]
14
+ s.email = "projectsprouts@googlegroups.com"
15
+ s.homepage = "http://projectsprouts.org"
16
+ s.summary = "Software development - evolved"
17
+ s.description = "Project Sprouts gives you access to beautiful generators and easily customized templates, automated build scripts, distributed libraries and simple system configuration"
18
+ s.required_rubygems_version = ">= 1.3.6"
19
+ s.rubyforge_project = "sprout"
20
+ s.require_path = ['lib']
21
+ s.files = FileList['**/**/*'].exclude /.git|.svn|.DS_Store/
22
+ s.executables = ['<%= input.dash_case %>']
23
+ s.add_bundler_dependencies
24
+ end
25
+
@@ -0,0 +1,16 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ Bundler.require
4
+
5
+ require 'rake/testtask'
6
+
7
+ namespace :test do
8
+ Rake::TestTask.new(:units) do |t|
9
+ t.libs << "test"
10
+ t.test_files = FileList["test/unit/*_test.rb"]
11
+ t.verbose = true
12
+ end
13
+ end
14
+
15
+ task :test => 'test:units'
16
+
@@ -0,0 +1,23 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'test_helper')
2
+
3
+ class <%= input.camel_case %>Test < Test::Unit::TestCase
4
+ include SproutTestCase
5
+
6
+ context "A <%= input.camel_case %>" do
7
+
8
+ setup do
9
+ @fixture = File.join fixtures, '<%= input.snake_case %>', 'tmp'
10
+ FileUtils.makedirs @fixture
11
+ end
12
+
13
+ teardown do
14
+ remove_file @fixture
15
+ end
16
+
17
+ should "do something" do
18
+ assert_file @fixture
19
+ assert false, 'Force test failure'
20
+ end
21
+ end
22
+ end
23
+
@@ -0,0 +1,10 @@
1
+ require "rubygems"
2
+ require "bundler"
3
+ Bundler.require :default, :development
4
+
5
+ lib = File.join(File.dirname(__FILE__), '..', 'lib')
6
+ $:.unshift lib unless $:.include? lib
7
+
8
+ require '<%= input.snake_case %>'
9
+ require 'sprout/test/sprout_test_case'
10
+
@@ -62,9 +62,9 @@ module Sprout::System
62
62
  # Determine if we should call +repair_executable+
63
63
  # for the file at the provided +path+ String.
64
64
  #
65
- # Will this corrupt binaries?
65
+ # Will this corrupt binaries? Yes... Yes. it. will.
66
66
  def should_repair_executable path
67
- return (File.exists?(path) && !File.directory?(path) && File.read(path).match(/^\#\!/))
67
+ return (File.exists?(path) && !File.directory?(path) && File.read(path).match(/^\#\!\/bin\/sh/))
68
68
  end
69
69
 
70
70
  end
@@ -6,7 +6,7 @@ module Sprout
6
6
  module VERSION #:nodoc:
7
7
  MAJOR = 1
8
8
  MINOR = 0
9
- TINY = 23
9
+ TINY = 24
10
10
  RELEASE = 'pre'
11
11
 
12
12
  STRING = [MAJOR, MINOR, TINY, RELEASE].join('.')
data/sprout.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.rubyforge_project = "sprout"
20
20
  s.require_path = ['lib']
21
21
  s.files = FileList['**/**/*'].exclude /.git|.svn|.DS_Store/
22
- s.executables = ['sprout', 'sprout-library', 'sprout-tool', 'sprout-generator', 'sprout-class', 'sprout-test', 'sprout-suite']
22
+ s.executables = ['sprout', 'sprout-generator', 'sprout-class', 'sprout-test', 'sprout-suite', 'sprout-ruby']
23
23
  s.add_bundler_dependencies
24
24
  end
25
25
 
@@ -31,6 +31,12 @@ class RubyGeneratorTest < Test::Unit::TestCase
31
31
  gem_file = File.join project_dir, 'Gemfile'
32
32
  assert_file gem_file
33
33
 
34
+ rake_file = File.join project_dir, 'Rakefile'
35
+ assert_file rake_file
36
+
37
+ gem_spec = File.join project_dir, 'some_project.gemspec'
38
+ assert_file gem_spec
39
+
34
40
  lib_dir = File.join project_dir, 'libs'
35
41
  assert_file lib_dir
36
42
 
@@ -49,9 +55,19 @@ class RubyGeneratorTest < Test::Unit::TestCase
49
55
  test_dir = File.join project_dir, 'test'
50
56
  assert_file test_dir
51
57
 
58
+ test_helper = File.join test_dir, 'test_helper.rb'
59
+ assert_file test_helper do |content|
60
+ assert_matches /require 'some_project'/, content
61
+ end
62
+
52
63
  unit_dir = File.join test_dir, 'unit'
53
64
  assert_file unit_dir
54
65
 
66
+ test_case = File.join unit_dir, 'some_project_test.rb'
67
+ assert_file test_case do |content|
68
+ assert_matches /class SomeProjectTest/, content
69
+ end
70
+
55
71
  fixtures_dir = File.join test_dir, 'fixtures'
56
72
  assert_file fixtures_dir
57
73
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprout
3
3
  version: !ruby/object:Gem::Version
4
+ hash: -878182139
4
5
  prerelease: true
5
6
  segments:
6
7
  - 1
7
8
  - 0
8
- - 23
9
+ - 24
9
10
  - pre
10
- version: 1.0.23.pre
11
+ version: 1.0.24.pre
11
12
  platform: ruby
12
13
  authors:
13
14
  - Luke Bayes
@@ -15,15 +16,17 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-07-08 00:00:00 -07:00
19
+ date: 2010-07-09 00:00:00 -07:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: bundler
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 29
27
30
  segments:
28
31
  - 0
29
32
  - 9
@@ -35,9 +38,11 @@ dependencies:
35
38
  - !ruby/object:Gem::Dependency
36
39
  name: rake
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 49
41
46
  segments:
42
47
  - 0
43
48
  - 8
@@ -49,9 +54,11 @@ dependencies:
49
54
  - !ruby/object:Gem::Dependency
50
55
  name: rdoc
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
61
+ hash: 11
55
62
  segments:
56
63
  - 2
57
64
  - 5
@@ -63,9 +70,11 @@ dependencies:
63
70
  - !ruby/object:Gem::Dependency
64
71
  name: rubyzip
65
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
66
74
  requirements:
67
75
  - - "="
68
76
  - !ruby/object:Gem::Version
77
+ hash: 51
69
78
  segments:
70
79
  - 0
71
80
  - 9
@@ -77,9 +86,11 @@ dependencies:
77
86
  - !ruby/object:Gem::Dependency
78
87
  name: archive-tar-minitar
79
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
80
90
  requirements:
81
91
  - - "="
82
92
  - !ruby/object:Gem::Version
93
+ hash: 15
83
94
  segments:
84
95
  - 0
85
96
  - 5
@@ -91,9 +102,11 @@ dependencies:
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: open4
93
104
  requirement: &id006 !ruby/object:Gem::Requirement
105
+ none: false
94
106
  requirements:
95
107
  - - ">="
96
108
  - !ruby/object:Gem::Version
109
+ hash: 55
97
110
  segments:
98
111
  - 0
99
112
  - 9
@@ -105,9 +118,11 @@ dependencies:
105
118
  - !ruby/object:Gem::Dependency
106
119
  name: shoulda
107
120
  requirement: &id007 !ruby/object:Gem::Requirement
121
+ none: false
108
122
  requirements:
109
123
  - - ">="
110
124
  - !ruby/object:Gem::Version
125
+ hash: 3
111
126
  segments:
112
127
  - 0
113
128
  version: "0"
@@ -117,9 +132,11 @@ dependencies:
117
132
  - !ruby/object:Gem::Dependency
118
133
  name: mocha
119
134
  requirement: &id008 !ruby/object:Gem::Requirement
135
+ none: false
120
136
  requirements:
121
137
  - - ">="
122
138
  - !ruby/object:Gem::Version
139
+ hash: 3
123
140
  segments:
124
141
  - 0
125
142
  version: "0"
@@ -129,9 +146,11 @@ dependencies:
129
146
  - !ruby/object:Gem::Dependency
130
147
  name: flay
131
148
  requirement: &id009 !ruby/object:Gem::Requirement
149
+ none: false
132
150
  requirements:
133
151
  - - ">="
134
152
  - !ruby/object:Gem::Version
153
+ hash: 3
135
154
  segments:
136
155
  - 0
137
156
  version: "0"
@@ -141,9 +160,11 @@ dependencies:
141
160
  - !ruby/object:Gem::Dependency
142
161
  name: flog
143
162
  requirement: &id010 !ruby/object:Gem::Requirement
163
+ none: false
144
164
  requirements:
145
165
  - - ">="
146
166
  - !ruby/object:Gem::Version
167
+ hash: 3
147
168
  segments:
148
169
  - 0
149
170
  version: "0"
@@ -153,9 +174,11 @@ dependencies:
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: heckle
155
176
  requirement: &id011 !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
179
  - - ">="
158
180
  - !ruby/object:Gem::Version
181
+ hash: 3
159
182
  segments:
160
183
  - 0
161
184
  version: "0"
@@ -165,9 +188,11 @@ dependencies:
165
188
  - !ruby/object:Gem::Dependency
166
189
  name: rcov
167
190
  requirement: &id012 !ruby/object:Gem::Requirement
191
+ none: false
168
192
  requirements:
169
193
  - - ">="
170
194
  - !ruby/object:Gem::Version
195
+ hash: 3
171
196
  segments:
172
197
  - 0
173
198
  version: "0"
@@ -178,12 +203,11 @@ description: Project Sprouts gives you access to beautiful generators and easily
178
203
  email: projectsprouts@googlegroups.com
179
204
  executables:
180
205
  - sprout
181
- - sprout-library
182
- - sprout-tool
183
206
  - sprout-generator
184
207
  - sprout-class
185
208
  - sprout-test
186
209
  - sprout-suite
210
+ - sprout-ruby
187
211
  extensions: []
188
212
 
189
213
  extra_rdoc_files: []
@@ -193,6 +217,7 @@ files:
193
217
  - bin/sprout-class
194
218
  - bin/sprout-generator
195
219
  - bin/sprout-library
220
+ - bin/sprout-ruby
196
221
  - bin/sprout-suite
197
222
  - bin/sprout-test
198
223
  - bin/sprout-tool
@@ -236,7 +261,11 @@ files:
236
261
  - lib/sprout/generators/ruby/templates/ruby_base.rb
237
262
  - lib/sprout/generators/ruby/templates/ruby_executable
238
263
  - lib/sprout/generators/ruby/templates/ruby_gemfile
264
+ - lib/sprout/generators/ruby/templates/ruby_gemspec
239
265
  - lib/sprout/generators/ruby/templates/ruby_input.rb
266
+ - lib/sprout/generators/ruby/templates/ruby_rakefile
267
+ - lib/sprout/generators/ruby/templates/ruby_test_case.rb
268
+ - lib/sprout/generators/ruby/templates/ruby_test_helper.rb
240
269
  - lib/sprout/generators/tool/templates/Gemfile
241
270
  - lib/sprout/generators/tool/templates/tool.gemspec
242
271
  - lib/sprout/generators/tool/templates/tool.rb
@@ -383,16 +412,20 @@ rdoc_options: []
383
412
  require_paths:
384
413
  - - lib
385
414
  required_ruby_version: !ruby/object:Gem::Requirement
415
+ none: false
386
416
  requirements:
387
417
  - - ">="
388
418
  - !ruby/object:Gem::Version
419
+ hash: 3
389
420
  segments:
390
421
  - 0
391
422
  version: "0"
392
423
  required_rubygems_version: !ruby/object:Gem::Requirement
424
+ none: false
393
425
  requirements:
394
426
  - - ">="
395
427
  - !ruby/object:Gem::Version
428
+ hash: 23
396
429
  segments:
397
430
  - 1
398
431
  - 3
@@ -401,7 +434,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
401
434
  requirements: []
402
435
 
403
436
  rubyforge_project: sprout
404
- rubygems_version: 1.3.6
437
+ rubygems_version: 1.3.7
405
438
  signing_key:
406
439
  specification_version: 3
407
440
  summary: Software development - evolved