newgem 0.10.4 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,18 @@
1
+ == 0.11.0
2
+
3
+ * 1 major enhancement
4
+ * Create trunk/branches/tags subfolders using -s/--svn option
5
+ * 6 minor enhancements
6
+ * Added dependency to activesupport gem
7
+ * Modified spec.rb template for new rpec syntax (describe "..." { it "..." }) [thx Aslak Hellesøy]
8
+ * Added 'email.txt' to the CLEAN list to be removed on 'rake clean'
9
+ * Added --delete-excluded to the rsync command [thx Jeroen Janssen]
10
+ * On template: "Version" is in <p>'s
11
+ * Specified CLEAN is added/or'd with default Hoe clean_globs (via |=)
12
+ * 1 website enhancement
13
+ * Refreshed the example output as its a big old (CHANGELOG -> History.txt)
14
+ * Removed the "click anywhere" javascript in version box - it was playing up with the link to the book
15
+
1
16
  == 0.10.4 2007-06-02
2
17
 
3
18
  * 2 minor enhancement
data/Rakefile CHANGED
@@ -41,14 +41,15 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
41
41
  p.url = HOMEPATH
42
42
  p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
43
43
  p.test_globs = ["test/**/test*.rb"]
44
- p.clean_globs = CLEAN #An array of file patterns to delete on clean.
44
+ p.clean_globs |= CLEAN #An array of file patterns to delete on clean.
45
45
 
46
46
  # == Optional
47
47
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
48
48
  p.extra_deps = [
49
49
  ['hoe', '>=1.2.1'],
50
50
  ['RedCloth','>=3.0.4'],
51
- ['syntax','>=1.0.0']
51
+ ['syntax','>=1.0.0'],
52
+ ['activesupport','>=1.4.2']
52
53
  ]
53
54
  #p.spec_extras - A hash of extra values to set in the gemspec.
54
55
  end
@@ -76,7 +77,7 @@ task :website_upload do
76
77
  end
77
78
 
78
79
  desc 'Generate and upload website files'
79
- task :website => [:website_generate, :website_upload]
80
+ task :website => [:website_generate, :website_upload, :publish_docs]
80
81
 
81
82
  task :load_consts do
82
83
  ENV['AUTHOR'] = AUTHOR
@@ -89,7 +90,7 @@ task :load_consts do
89
90
  end
90
91
 
91
92
  desc 'Release the website and new gem version'
92
- task :deploy => [:check_version, :website, :publish_docs, :release] do
93
+ task :deploy => [:check_version, :website, :release] do
93
94
  puts "Remember to create SVN tag:"
94
95
  puts "svn copy svn+ssh://#{RUBYFORGE_USERNAME}@rubyforge.org/var/svn/#{PATH}/trunk " +
95
96
  "svn+ssh://#{RUBYFORGE_USERNAME}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
data/Todo.txt CHANGED
@@ -1,2 +1,4 @@
1
- + can generate rspec default tests (or still test::unit tests) using --with-test=rspec [thx Robby Russell]
2
- + website components are now optional (-w/--no-website)
1
+ == Todo list
2
+ * can generate rspec default tests (or still test::unit tests) using --with-test=rspec [thx Robby Russell]
3
+ * website components are now optional (-w/--no-website)
4
+ * provide option to generate <gemname>/trunk,branches,tags structure and insert files into trunk [-s/--svn]
data/bin/newgem CHANGED
@@ -1,262 +1,276 @@
1
- #!/usr/bin/env ruby
2
-
3
- begin
4
- require 'rubygems'
5
- rescue LoadError
6
- # no rubygems to load, so we fail silently
7
- end
8
-
9
- require 'fileutils'
10
- require 'active_support'
11
- require 'optparse'
12
-
13
- require 'newgem'
14
-
15
- templates = File.dirname(__FILE__) + '/../templates/'
16
-
17
- OPTIONS = {
18
- :import_path => nil,
19
- :version => '0.0.1',
20
- :full_name => nil,
21
- :email => nil,
22
- :bin_name => nil,
23
- :test_framework => 'test::unit'
24
- }
25
- parser = OptionParser.new do |opts|
26
- opts.banner = <<BANNER
27
- Take any library or Rails plugin or command line application,
28
- gemify it, and easily share it with the Ruby world.
29
-
30
- Usage: #{File.basename($0)} [options] <name of gem>
31
-
32
- Options are:
33
- BANNER
34
- opts.separator ""
35
- opts.on("-b", "--bin-name=BIN_NAME[,BIN_NAME2]", String,
36
- "Sets up executable scripts in the bin folder.",
37
- "Default: none") { |OPTIONS[:bin_name]| }
38
- opts.on("-i", "--import_path=PATH", String,
39
- "Path where your files could be copied from.",
40
- "Default: none") { |OPTIONS[:import_path]| }
41
- opts.on("-n", "--full_name=PATH", String,
42
- "Your name to be inserted into generated files.",
43
- "Default: ~/.rubyforge/user-config.yml[user_name]") { |OPTIONS[:full_name]| }
44
- opts.on("-e", "--email=PATH", String,
45
- "Your email to be inserted into generated files.",
46
- "Default: ~/.rubyforge/user-config.yml[email]") { |OPTIONS[:email]| }
47
- opts.on("-t", "--test-with=TEST_FRAMEWORK", String,
48
- "Your preferred testing framework: Options: test::unit (default), rspec.",
49
- "Default: test::unit") { |OPTIONS[:test_framework]| }
50
- opts.on("-v", "--version=YOUR_VERSION", String,
51
- "Version of the gem you are creating.",
52
- "Default: 0.0.1") { |OPTIONS[:version]| }
53
- opts.on("-h", "--help",
54
- "Show this help message.") { puts opts; exit }
55
- opts.parse!(ARGV)
56
- end
57
- OPTIONS[:version] = OPTIONS[:version].to_s.split(/\./)
58
- version_str = OPTIONS[:version].join('.')
59
- author = OPTIONS[:full_name]
60
- email = OPTIONS[:email]
61
- unless author && email
62
- rubyforge_config = Newgem::Rubyforge.new
63
- author ||= rubyforge_config.full_name
64
- email ||= rubyforge_config.email
65
- end
66
- test_framework = OPTIONS[:test_framework]
67
-
68
- gem_name = project_name = ARGV[0]
69
- parser.parse!(["-h"]) unless gem_name
70
-
71
- module_name = project_name.classify
72
- lib = project_name + '/lib'
73
- lib_project_name = project_name + '/lib/' + project_name
74
- version = project_name + "/lib/" + project_name + "/version.rb"
75
- readme, setup = %w(README.txt setup.rb).
76
- collect {|f| project_name + '/' + f}
77
- template_files = %w(Rakefile History.txt License.txt Manifest.txt scripts/txt2html website/index.txt website/index.html website/template.rhtml)
78
- copy_files = %w(website/javascripts/rounded_corners_lite.inc.js website/stylesheets/screen.css)
79
-
80
- main = project_name + "/lib/" + project_name + ".rb"
81
-
82
- examples = project_name + '/examples'
83
- bin = project_name + '/bin'
84
- folders = %w( scripts website website/javascripts website/stylesheets)
85
-
86
- FileUtils.rm_rf project_name
87
-
88
- puts "creating: " + project_name
89
- Dir.mkdir project_name
90
-
91
- puts "creating: " + readme
92
- File.open(readme, 'w') do |file|
93
- file << <<-eos
94
- README for #{project_name}
95
- ===========#{'=' * project_name.length}
96
-
97
- eos
98
- end
99
-
100
-
101
- puts "creating: " + lib
102
- FileUtils.mkdir_p lib
103
-
104
- folders.each do |folder|
105
- new_folder = project_name + '/' + folder
106
- puts "creating: " + new_folder
107
- FileUtils.mkdir_p new_folder
108
- end
109
-
110
- if OPTIONS[:import_path]
111
- require 'fileutils'
112
- OPTIONS[:import_path].chomp! if OPTIONS[:import_path][-1] == 47 # /
113
- FileUtils.cp_r OPTIONS[:import_path] + '/.', lib, :preserve => true
114
- end
115
-
116
- puts "creating: " + lib_project_name
117
- FileUtils.mkdir_p lib_project_name
118
-
119
- puts "creating: " + main
120
- File.open(main, 'w') do |file|
121
- file << <<-EOS
122
- module #{module_name}
123
- end
124
-
125
- require '#{project_name}/version'
126
- EOS
127
- end
128
-
129
- puts "creating: " + version
130
- File.open(version, 'w') do |file|
131
- file << <<-EOS
132
- module #{module_name} #:nodoc:
133
- module VERSION #:nodoc:
134
- MAJOR = #{OPTIONS[:version][0] || '0'}
135
- MINOR = #{OPTIONS[:version][1] || '0'}
136
- TINY = #{OPTIONS[:version][2] || '0'}
137
-
138
- STRING = [MAJOR, MINOR, TINY].join('.')
139
- end
140
- end
141
- EOS
142
- end
143
-
144
- puts "creating: " + bin
145
- Dir.mkdir bin
146
-
147
- if OPTIONS[:bin_name]
148
- bin_names_list = OPTIONS[:bin_name].split(',')
149
- template = File.open(templates + 'app.rb','r') {|f| f.readlines.join}
150
- bin_names_list.each do |bin_name|
151
- puts "creating: " + bin + '/' + bin_name
152
- File.open(bin + '/' + bin_name, 'w') do |file|
153
- file << eval('"' + template.gsub(/"/, '\"') + '"')
154
- end
155
- end
156
- bin_names = bin_names_list.join(' ')
157
- else
158
- bin_names = ''
159
- bin_names_list = []
160
- end
161
-
162
- # Setup spec/test::unit environments
163
- # Would like to refactor this...
164
- if test_framework == 'rspec'
165
- test = project_name + "/spec"
166
- test_helper = test + "/spec_helper.rb"
167
- test_template = 'spec.rb'
168
- unit_test = test + "/" + project_name + "_spec.rb"
169
- test_file_prefix = 'spec/NAME_spec'
170
- spec_opts = 'spec.opts'
171
- unit_test_template = <<-eos
172
- require 'spec'
173
- eos
174
- requirements = <<-eos
175
- begin
176
- require 'spec/rake/spectask'
177
- rescue LoadError
178
- puts 'To use rspec for testing you must install rspec gem:'
179
- puts '$ sudo gem install rspec'
180
- exit
181
- end
182
- eos
183
- test_task = <<-eos
184
- desc "Run the specs under spec/models"
185
- Spec::Rake::SpecTask.new do |t|
186
- t.spec_opts = ['--options', "spec/spec.opts"]
187
- t.spec_files = FileList['spec/*_spec.rb']
188
- end
189
-
190
- desc "Default task is to run specs"
191
- task :default => :spec
192
- eos
193
- else
194
- test = project_name + "/test"
195
- test_helper = test + "/test_helper.rb"
196
- test_template = 'test.rb'
197
- unit_test = test + "/test_" + project_name + ".rb"
198
- test_file_prefix = 'test/test_NAME'
199
- unit_test_template = <<-eos
200
- require 'test/unit'
201
- require File.dirname(__FILE__) + '/../lib/#{project_name}'
202
- eos
203
- requirements = ''
204
- test_task = ''
205
- end
206
-
207
- puts "creating: " + test
208
- Dir.mkdir test
209
-
210
- puts "creating: " + test_helper
211
- File.open(test_helper, 'w') do |file|
212
- file << unit_test_template
213
- end
214
-
215
- puts "creating: " + unit_test
216
-
217
- template = File.open(templates + test_template,'r') {|f| f.readlines.join}
218
- File.open(unit_test, 'w') do |file|
219
- file << eval('"' + template.gsub(/"/, '\"') + '"')
220
- end
221
-
222
- if test_framework == 'rspec'
223
- spec_opts_file = test + "/" + spec_opts
224
- puts "creating: " + spec_opts_file
225
- template = File.open(templates + spec_opts, 'r') { |f| f.readlines.join }
226
- File.open(spec_opts_file, 'w') do |file|
227
- file << eval('"' + template.gsub(/"/, '\""') + '"')
228
- end
229
- end
230
-
231
- puts "creating: " + examples
232
- Dir.mkdir examples
233
-
234
- puts "creating: " + setup
235
- template = File.open(templates + 'setup.rb','r') {|f| f.readlines.join}
236
- File.open(setup, 'w') do |file|
237
- file << template
238
- end
239
-
240
- bin_names_list = bin_names_list.collect {|name| 'bin/' + name }.join("\n")
241
- bin_names_list += "\n" if bin_names_list.size > 0
242
- test_names_list = ['helper.rb',"#{project_name}.rb"].sort.collect {|name| test_file_prefix.gsub('NAME', name) }.join("\n")
243
-
244
- template_files.each do |template_file|
245
- puts "creating: " + project_name + '/' + template_file
246
- template = File.open(templates + template_file,'r') {|f| f.readlines.join}
247
- File.open(project_name + '/' + template_file, 'w') do |file|
248
- file << eval('"' + template.gsub(/"/, '\"') + '"')
249
- end
250
- end
251
-
252
- copy_files.each do |file|
253
- puts "copying: " + project_name + '/' + file
254
- template = File.open(templates + file,'r') {|f| f.readlines.join}
255
- File.open(project_name + '/' + file, 'w') do |file|
256
- file << template
257
- end
258
- end
259
-
260
-
261
-
1
+ #!/usr/bin/env ruby
2
+
3
+ begin
4
+ require 'rubygems'
5
+ rescue LoadError
6
+ # no rubygems to load, so we fail silently
7
+ end
8
+
9
+ require 'fileutils'
10
+ require 'active_support'
11
+ require 'optparse'
12
+
13
+ require 'newgem'
14
+
15
+ templates = File.dirname(__FILE__) + '/../templates/'
16
+
17
+ OPTIONS = {
18
+ :import_path => nil,
19
+ :version => '0.0.1',
20
+ :full_name => nil,
21
+ :email => nil,
22
+ :bin_name => nil,
23
+ :svn_struct => nil,
24
+ :test_framework => 'test::unit'
25
+ }
26
+ parser = OptionParser.new do |opts|
27
+ opts.banner = <<BANNER
28
+ Take any library or Rails plugin or command line application,
29
+ gemify it, and easily share it with the Ruby world.
30
+
31
+ Usage: #{File.basename($0)} [options] <gemname>
32
+
33
+ Options are:
34
+ BANNER
35
+ opts.separator ""
36
+ opts.on("-b", "--bin-name=BIN_NAME[,BIN_NAME2]", String,
37
+ "Sets up executable scripts in the bin folder.",
38
+ "Default: none") { |OPTIONS[:bin_name]| }
39
+ opts.on("-i", "--import_path=PATH", String,
40
+ "Path where your files could be copied from.",
41
+ "Default: none") { |OPTIONS[:import_path]| }
42
+ opts.on("-n", "--full_name=PATH", String,
43
+ "Your name to be inserted into generated files.",
44
+ "Default: ~/.rubyforge/user-config.yml[user_name]") { |OPTIONS[:full_name]| }
45
+ opts.on("-e", "--email=PATH", String,
46
+ "Your email to be inserted into generated files.",
47
+ "Default: ~/.rubyforge/user-config.yml[email]") { |OPTIONS[:email]| }
48
+ opts.on("-s", "--svn",
49
+ "Creates trunk/branches/tags folders beneath <gemname> folder.",
50
+ "Generated gem placed in trunk folder.") { |OPTIONS[:svn_struct]| }
51
+ opts.on("-t", "--test-with=TEST_FRAMEWORK", String,
52
+ "Select your preferred testing framework.",
53
+ "Options: test::unit (default), rspec.") { |OPTIONS[:test_framework]| }
54
+ opts.on("-v", "--version=YOUR_VERSION", String,
55
+ "Version of the gem you are creating.",
56
+ "Default: 0.0.1") { |OPTIONS[:version]| }
57
+ opts.on("-h", "--help",
58
+ "Show this help message.") { puts opts; exit }
59
+ opts.parse!(ARGV)
60
+ end
61
+ OPTIONS[:version] = OPTIONS[:version].to_s.split(/\./)
62
+ version_str = OPTIONS[:version].join('.')
63
+ author = OPTIONS[:full_name]
64
+ email = OPTIONS[:email]
65
+ svn_struct = OPTIONS[:svn_struct]
66
+ unless author && email
67
+ rubyforge_config = Newgem::Rubyforge.new
68
+ author ||= rubyforge_config.full_name
69
+ email ||= rubyforge_config.email
70
+ end
71
+ test_framework = OPTIONS[:test_framework]
72
+
73
+ gem_name = project_name = ARGV[0]
74
+ parser.parse!(["-h"]) unless gem_name
75
+
76
+ module_name = project_name.classify
77
+ root = project_name + (svn_struct ? '/trunk' : '')
78
+ lib = root + '/lib'
79
+ lib_project_name = root + '/lib/' + project_name
80
+ version = root + "/lib/" + project_name + "/version.rb"
81
+ readme, setup = %w(README.txt setup.rb).
82
+ collect {|f| root + '/' + f}
83
+ template_files = %w(Rakefile History.txt License.txt Manifest.txt scripts/txt2html website/index.txt website/index.html website/template.rhtml)
84
+ copy_files = %w(website/javascripts/rounded_corners_lite.inc.js website/stylesheets/screen.css)
85
+
86
+ main = root + "/lib/" + project_name + ".rb"
87
+
88
+ examples = root + '/examples'
89
+ bin = root + '/bin'
90
+ folders = %w( scripts website website/javascripts website/stylesheets)
91
+
92
+ FileUtils.rm_rf project_name
93
+
94
+ puts "creating: " + project_name
95
+ Dir.mkdir project_name
96
+
97
+ if svn_struct
98
+ %w[trunk branches tags].each do |folder|
99
+ folder_path = File.join(project_name, folder)
100
+ puts "creating: " + folder_path
101
+ Dir.mkdir folder_path
102
+ end
103
+ end
104
+
105
+ puts "creating: " + readme
106
+ File.open(readme, 'w') do |file|
107
+ file << <<-eos
108
+ README for #{project_name}
109
+ ===========#{'=' * project_name.length}
110
+
111
+ eos
112
+ end
113
+
114
+
115
+ puts "creating: " + lib
116
+ FileUtils.mkdir_p lib
117
+
118
+ folders.each do |folder|
119
+ new_folder = root + '/' + folder
120
+ puts "creating: " + new_folder
121
+ FileUtils.mkdir_p new_folder
122
+ end
123
+
124
+ if OPTIONS[:import_path]
125
+ require 'fileutils'
126
+ OPTIONS[:import_path].chomp! if OPTIONS[:import_path][-1] == 47 # /
127
+ FileUtils.cp_r OPTIONS[:import_path] + '/.', lib, :preserve => true
128
+ end
129
+
130
+ puts "creating: " + lib_project_name
131
+ FileUtils.mkdir_p lib_project_name
132
+
133
+ puts "creating: " + main
134
+ File.open(main, 'w') do |file|
135
+ file << <<-EOS
136
+ module #{module_name}
137
+ end
138
+
139
+ require '#{project_name}/version'
140
+ EOS
141
+ end
142
+
143
+ puts "creating: " + version
144
+ File.open(version, 'w') do |file|
145
+ file << <<-EOS
146
+ module #{module_name} #:nodoc:
147
+ module VERSION #:nodoc:
148
+ MAJOR = #{OPTIONS[:version][0] || '0'}
149
+ MINOR = #{OPTIONS[:version][1] || '0'}
150
+ TINY = #{OPTIONS[:version][2] || '0'}
151
+
152
+ STRING = [MAJOR, MINOR, TINY].join('.')
153
+ end
154
+ end
155
+ EOS
156
+ end
157
+
158
+ puts "creating: " + bin
159
+ Dir.mkdir bin
160
+
161
+ if OPTIONS[:bin_name]
162
+ bin_names_list = OPTIONS[:bin_name].split(',')
163
+ template = File.open(templates + 'app.rb','r') {|f| f.readlines.join}
164
+ bin_names_list.each do |bin_name|
165
+ puts "creating: " + bin + '/' + bin_name
166
+ File.open(bin + '/' + bin_name, 'w') do |file|
167
+ file << eval('"' + template.gsub(/"/, '\"') + '"')
168
+ end
169
+ end
170
+ bin_names = bin_names_list.join(' ')
171
+ else
172
+ bin_names = ''
173
+ bin_names_list = []
174
+ end
175
+
176
+ # Setup spec/test::unit environments
177
+ # Would like to refactor this...
178
+ if test_framework == 'rspec'
179
+ test = root + "/spec"
180
+ test_helper = test + "/spec_helper.rb"
181
+ test_template = 'spec.rb'
182
+ unit_test = test + "/" + project_name + "_spec.rb"
183
+ test_file_prefix = 'spec/NAME_spec'
184
+ spec_opts = 'spec.opts'
185
+ unit_test_template = <<-eos
186
+ require 'spec'
187
+ eos
188
+ requirements = <<-eos
189
+ begin
190
+ require 'spec/rake/spectask'
191
+ rescue LoadError
192
+ puts 'To use rspec for testing you must install rspec gem:'
193
+ puts '$ sudo gem install rspec'
194
+ exit
195
+ end
196
+ eos
197
+ test_task = <<-eos
198
+ desc "Run the specs under spec/models"
199
+ Spec::Rake::SpecTask.new do |t|
200
+ t.spec_opts = ['--options', "spec/spec.opts"]
201
+ t.spec_files = FileList['spec/*_spec.rb']
202
+ end
203
+
204
+ desc "Default task is to run specs"
205
+ task :default => :spec
206
+ eos
207
+ else
208
+ test = root + "/test"
209
+ test_helper = test + "/test_helper.rb"
210
+ test_template = 'test.rb'
211
+ unit_test = test + "/test_" + project_name + ".rb"
212
+ test_file_prefix = 'test/test_NAME'
213
+ unit_test_template = <<-eos
214
+ require 'test/unit'
215
+ require File.dirname(__FILE__) + '/../lib/#{project_name}'
216
+ eos
217
+ requirements = ''
218
+ test_task = ''
219
+ end
220
+
221
+ puts "creating: " + test
222
+ Dir.mkdir test
223
+
224
+ puts "creating: " + test_helper
225
+ File.open(test_helper, 'w') do |file|
226
+ file << unit_test_template
227
+ end
228
+
229
+ puts "creating: " + unit_test
230
+
231
+ template = File.open(templates + test_template,'r') {|f| f.readlines.join}
232
+ File.open(unit_test, 'w') do |file|
233
+ file << eval('"' + template.gsub(/"/, '\"') + '"')
234
+ end
235
+
236
+ if test_framework == 'rspec'
237
+ spec_opts_file = test + "/" + spec_opts
238
+ puts "creating: " + spec_opts_file
239
+ template = File.open(templates + spec_opts, 'r') { |f| f.readlines.join }
240
+ File.open(spec_opts_file, 'w') do |file|
241
+ file << eval('"' + template.gsub(/"/, '\""') + '"')
242
+ end
243
+ end
244
+
245
+ puts "creating: " + examples
246
+ Dir.mkdir examples
247
+
248
+ puts "creating: " + setup
249
+ template = File.open(templates + 'setup.rb','r') {|f| f.readlines.join}
250
+ File.open(setup, 'w') do |file|
251
+ file << template
252
+ end
253
+
254
+ bin_names_list = bin_names_list.collect {|name| 'bin/' + name }.join("\n")
255
+ bin_names_list += "\n" if bin_names_list.size > 0
256
+ test_names_list = ['helper.rb',"#{project_name}.rb"].sort.collect {|name| test_file_prefix.gsub('NAME', name) }.join("\n")
257
+
258
+ template_files.each do |template_file|
259
+ puts "creating: " + root + '/' + template_file
260
+ template = File.open(templates + template_file,'r') {|f| f.readlines.join}
261
+ File.open(root + '/' + template_file, 'w') do |file|
262
+ file << eval('"' + template.gsub(/"/, '\"') + '"')
263
+ end
264
+ end
265
+
266
+ copy_files.each do |file|
267
+ puts "copying: " + root + '/' + file
268
+ template = File.open(templates + file,'r') {|f| f.readlines.join}
269
+ File.open(root + '/' + file, 'w') do |file|
270
+ file << template
271
+ end
272
+ end
273
+
274
+
275
+
262
276
  puts "NOW - update #{gem_name}/Rakefile with gem description, etc"
@@ -1,8 +1,8 @@
1
1
  module Newgem #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 10
5
- TINY = 4
4
+ MINOR = 11
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/templates/Rakefile CHANGED
@@ -67,7 +67,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
67
67
  p.url = HOMEPATH
68
68
  p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
69
69
  p.test_globs = ["test/**/test_*.rb"]
70
- p.clean_globs = CLEAN #An array of file patterns to delete on clean.
70
+ p.clean_globs |= CLEAN #An array of file patterns to delete on clean.
71
71
 
72
72
  # == Optional
73
73
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\\n\\n")
@@ -95,7 +95,7 @@ task :website_upload do
95
95
  end
96
96
 
97
97
  desc 'Generate and upload website files'
98
- task :website => [:website_generate, :website_upload]
98
+ task :website => [:website_generate, :website_upload, :publish_docs]
99
99
 
100
100
  desc 'Release the website and new gem version'
101
101
  task :deploy => [:check_version, :website, :release] do
data/templates/spec.rb CHANGED
@@ -2,10 +2,10 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
3
  # Time to add your specs!
4
4
  # http://rspec.rubyforge.org/
5
- context "Place your specs here" do
5
+ describe "Place your specs here" do
6
6
 
7
- specify "find this spec in spec directory" do
8
- violate "Be sure to write your specs"
7
+ it "find this spec in spec directory" do
8
+ violated "Be sure to write your specs"
9
9
  end
10
10
 
11
11
  end
@@ -114,6 +114,15 @@ pre, code {
114
114
  font-size: 4em;
115
115
  line-height: 0.8em;
116
116
  letter-spacing: -0.1ex;
117
+ margin-bottom: 15px;
118
+ }
119
+
120
+ #version p {
121
+ text-decoration: none;
122
+ color: #141331;
123
+ background-color: #B3ABFF;
124
+ margin: 0;
125
+ padding: 0;
117
126
  }
118
127
 
119
128
  #version a {
@@ -32,7 +32,7 @@
32
32
 
33
33
  <h1><%= title %></h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "<%= download %>"; return false'>
35
- Get Version
35
+ <p>Get Version</p>
36
36
  <a href="<%= download %>" class="numbers"><%= version %></a>
37
37
  </div>
38
38
  <%= body %>
data/website/index.html CHANGED
@@ -31,11 +31,11 @@
31
31
  <div id="main">
32
32
 
33
33
  <h1>New Gem Generator</h1>
34
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return false'>
34
+ <div id="version"> <!-- class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return true' -->
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/newgem" class="numbers">0.10.4</a>
36
+ <a href="http://rubyforge.org/projects/newgem" class="numbers">0.11.0</a>
37
37
  <p>Featured in</p>
38
- <a target="_blank" href="http://www.amazon.com/Beginning-Ruby-Novice-Professional-Experts/dp/1590597664/ref=pd_bbs_sr_1/002-1314108-4008061?ie=UTF8&s=books&qid=1180763252&sr=8-1" class="book"><img src="images/beginning-ruby.jpg" /></a>
38
+ <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FBeginning-Ruby-Novice-Professional-Experts%2Fdp%2F1590597664%2F&tag=drnic-20&linkCode=ur2&camp=1789&creative=9325" class="book"><img src="images/beginning-ruby.jpg" /></a>
39
39
  </div>
40
40
  <h1>&#x2192; &#8216;newgem&#8217;</h1>
41
41
 
@@ -73,7 +73,6 @@
73
73
  <pre>$ cd ~/ruby_projects
74
74
  $ newgem wizzo
75
75
  creating: wizzo
76
- creating: wizzo/CHANGELOG.txt
77
76
  creating: wizzo/README.txt
78
77
  creating: wizzo/lib
79
78
  creating: wizzo/scripts
@@ -90,17 +89,22 @@ creating: wizzo/test/test_wizzo.rb
90
89
  creating: wizzo/examples
91
90
  creating: wizzo/setup.rb
92
91
  creating: wizzo/Rakefile
93
- creating: wizzo/Manifest.txt
94
92
  creating: wizzo/History.txt
93
+ creating: wizzo/License.txt
94
+ creating: wizzo/Manifest.txt
95
95
  creating: wizzo/scripts/txt2html
96
96
  creating: wizzo/website/index.txt
97
+ creating: wizzo/website/index.html
97
98
  creating: wizzo/website/template.rhtml
98
99
  copying: wizzo/website/javascripts/rounded_corners_lite.inc.js
99
100
  copying: wizzo/website/stylesheets/screen.css
100
101
  NOW - update wizzo/Rakefile with gem description, etc
101
102
  </pre>
102
103
 
103
- <p>As of 0.10.0 &#8211; you can generate test::unit or rspec test stubs via the -t,&#8212;test-with options</p>
104
+ <p>As of 0.10.0 &#8211; you can generate test::unit or rspec test stubs via the <code>-t</code> or <code>--test-with</code> options. For example, <code>-t rspec</code> generates a <code>spec</code> folder with some test stubs.</p>
105
+
106
+
107
+ <p>As of 0.11.0 &#8211; you can generate <code>wizzo/trunk|branches|tags</code> subfolders using the <code>-s</code> or <code>--svn</code> options. If used, the generated files will be populated within <code>&lt;gemname&gt;/trunk</code></p>
104
108
 
105
109
 
106
110
  <h3>Setup</h3>
@@ -309,7 +313,7 @@ other stories and things.</p>
309
313
 
310
314
  <p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p>
311
315
  <p class="coda">
312
- <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 1st June 2007<br>
316
+ <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 6th June 2007<br>
313
317
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
314
318
  </p>
315
319
  </div>
data/website/index.txt CHANGED
@@ -25,7 +25,6 @@ Go to the folder where you want to create your new gem folder structure, and run
25
25
  <pre>$ cd ~/ruby_projects
26
26
  $ newgem wizzo
27
27
  creating: wizzo
28
- creating: wizzo/CHANGELOG.txt
29
28
  creating: wizzo/README.txt
30
29
  creating: wizzo/lib
31
30
  creating: wizzo/scripts
@@ -42,17 +41,21 @@ creating: wizzo/test/test_wizzo.rb
42
41
  creating: wizzo/examples
43
42
  creating: wizzo/setup.rb
44
43
  creating: wizzo/Rakefile
45
- creating: wizzo/Manifest.txt
46
44
  creating: wizzo/History.txt
45
+ creating: wizzo/License.txt
46
+ creating: wizzo/Manifest.txt
47
47
  creating: wizzo/scripts/txt2html
48
48
  creating: wizzo/website/index.txt
49
+ creating: wizzo/website/index.html
49
50
  creating: wizzo/website/template.rhtml
50
51
  copying: wizzo/website/javascripts/rounded_corners_lite.inc.js
51
52
  copying: wizzo/website/stylesheets/screen.css
52
53
  NOW - update wizzo/Rakefile with gem description, etc
53
54
  </pre>
54
55
 
55
- As of 0.10.0 - you can generate test::unit or rspec test stubs via the -t, --test-with options
56
+ As of 0.10.0 - you can generate test::unit or rspec test stubs via the <code>-t</code> or <code>--test-with</code> options. For example, <code>-t rspec</code> generates a <code>spec</code> folder with some test stubs.
57
+
58
+ As of 0.11.0 - you can generate <code>wizzo/trunk|branches|tags</code> subfolders using the <code>-s</code> or <code>--svn</code> options. If used, the generated files will be populated within <code><gemname>/trunk</code>
56
59
 
57
60
  h3. Setup
58
61
 
@@ -31,11 +31,11 @@
31
31
  <div id="main">
32
32
 
33
33
  <h1>New Gem Generator</h1>
34
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return false'>
34
+ <div id="version"> <!-- class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return true' -->
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/newgem" class="numbers">0.10.4</a>
36
+ <a href="http://rubyforge.org/projects/newgem" class="numbers">0.11.0</a>
37
37
  <p>Featured in</p>
38
- <a target="_blank" href="http://www.amazon.com/Beginning-Ruby-Novice-Professional-Experts/dp/1590597664/ref=pd_bbs_sr_1/002-1314108-4008061?ie=UTF8&s=books&qid=1180763252&sr=8-1" class="book"><img src="images/beginning-ruby.jpg" /></a>
38
+ <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FBeginning-Ruby-Novice-Professional-Experts%2Fdp%2F1590597664%2F&tag=drnic-20&linkCode=ur2&camp=1789&creative=9325" class="book"><img src="images/beginning-ruby.jpg" /></a>
39
39
  </div>
40
40
  <h1>&#x2192; using &#8216;rubyforge&#8217;</h1>
41
41
 
@@ -31,11 +31,11 @@
31
31
  <div id="main">
32
32
 
33
33
  <h1><%= title %></h1>
34
- <div id="version" class="clickable" onclick='document.location = "<%= download %>"; return false'>
34
+ <div id="version"> <!-- class="clickable" onclick='document.location = "<%= download %>"; return true' -->
35
35
  <p>Get Version</p>
36
36
  <a href="<%= download %>" class="numbers"><%= version %></a>
37
37
  <p>Featured in</p>
38
- <a target="_blank" href="http://www.amazon.com/Beginning-Ruby-Novice-Professional-Experts/dp/1590597664/ref=pd_bbs_sr_1/002-1314108-4008061?ie=UTF8&s=books&qid=1180763252&sr=8-1" class="book"><img src="images/beginning-ruby.jpg" /></a>
38
+ <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FBeginning-Ruby-Novice-Professional-Experts%2Fdp%2F1590597664%2F&tag=drnic-20&linkCode=ur2&camp=1789&creative=9325" class="book"><img src="images/beginning-ruby.jpg" /></a>
39
39
  </div>
40
40
  <%= body %>
41
41
  <p class="coda">
@@ -1,3 +1,3 @@
1
1
  // Announcement JS file
2
- var version = "0.10.4";
2
+ var version = "0.11.0";
3
3
  MagicAnnouncement.show('compositekeys', version);
data/website/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Version JS file
2
- var version = "0.10.4";
2
+ var version = "0.11.0";
3
3
 
4
4
  document.write(" - " + version);
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4.1
3
3
  specification_version: 1
4
4
  name: newgem
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.10.4
7
- date: 2007-06-02 00:00:00 +02:00
6
+ version: 0.11.0
7
+ date: 2007-06-07 00:00:00 +02:00
8
8
  summary: Make your own gems at home
9
9
  require_paths:
10
10
  - lib
@@ -127,6 +127,15 @@ dependencies:
127
127
  - !ruby/object:Gem::Version
128
128
  version: 1.0.0
129
129
  version:
130
+ - !ruby/object:Gem::Dependency
131
+ name: activesupport
132
+ version_requirement:
133
+ version_requirements: !ruby/object:Gem::Version::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: 1.4.2
138
+ version:
130
139
  - !ruby/object:Gem::Dependency
131
140
  name: hoe
132
141
  version_requirement: