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 +15 -0
- data/Rakefile +5 -4
- data/Todo.txt +4 -2
- data/bin/newgem +275 -261
- data/lib/newgem/version.rb +2 -2
- data/templates/Rakefile +2 -2
- data/templates/spec.rb +3 -3
- data/templates/website/stylesheets/screen.css +9 -0
- data/templates/website/template.rhtml +1 -1
- data/website/index.html +11 -7
- data/website/index.txt +6 -3
- data/website/rubyforge.html +3 -3
- data/website/template.rhtml +2 -2
- data/website/version-raw.js +1 -1
- data/website/version.js +1 -1
- metadata +11 -2
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
|
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, :
|
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
|
-
|
2
|
-
|
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
|
-
:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
opts.
|
36
|
-
|
37
|
-
"
|
38
|
-
|
39
|
-
|
40
|
-
"
|
41
|
-
|
42
|
-
|
43
|
-
"
|
44
|
-
|
45
|
-
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
"
|
50
|
-
|
51
|
-
|
52
|
-
"
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
require '
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
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"
|
data/lib/newgem/version.rb
CHANGED
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
|
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
|
-
|
5
|
+
describe "Place your specs here" do
|
6
6
|
|
7
|
-
|
8
|
-
|
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 {
|
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
|
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.
|
36
|
+
<a href="http://rubyforge.org/projects/newgem" class="numbers">0.11.0</a>
|
37
37
|
<p>Featured in</p>
|
38
|
-
<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>→ ‘newgem’</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 – you can generate test::unit or rspec test stubs via the
|
104
|
+
<p>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.</p>
|
105
|
+
|
106
|
+
|
107
|
+
<p>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></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>,
|
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
|
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
|
|
data/website/rubyforge.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
|
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.
|
36
|
+
<a href="http://rubyforge.org/projects/newgem" class="numbers">0.11.0</a>
|
37
37
|
<p>Featured in</p>
|
38
|
-
<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>→ using ‘rubyforge’</h1>
|
41
41
|
|
data/website/template.rhtml
CHANGED
@@ -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
|
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
|
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">
|
data/website/version-raw.js
CHANGED
data/website/version.js
CHANGED
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.
|
7
|
-
date: 2007-06-
|
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:
|