newgem 0.13.5 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -0
- data/app_generators/newgem/newgem_generator.rb +5 -5
- data/app_generators/newgem/templates/config/hoe.rb +1 -0
- data/config/hoe.rb +1 -0
- data/lib/newgem/version.rb +2 -2
- data/newgem_generators/install_website/templates/tasks/website.rake +1 -1
- data/rubygems_generators/application_generator/application_generator_generator.rb +1 -0
- data/rubygems_generators/application_generator/templates/generator.rb +8 -1
- data/website/index.html +59 -31
- data/website/index.txt +56 -29
- data/website/rubyforge.html +1 -1
- data/website/version-raw.js +1 -1
- data/website/version.js +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 0.14.0 2007-10-14
|
2
|
+
|
3
|
+
* application_generator includes the install_rubigen_scripts generator
|
4
|
+
* if website included, no "overwrite tasks/website.rake" questions
|
5
|
+
* Update to docco for rubigen-based output [thx Noah Gibbs]
|
6
|
+
* Fixed website dir location if gem name + project name differ [thx Noah Gibbs]
|
7
|
+
|
1
8
|
== 0.13.5 2007-09-07
|
2
9
|
|
3
10
|
* rake tasks use rubyforge_username instead of RUBYFORGE_USERNAME constant
|
@@ -71,22 +71,22 @@ class NewgemGenerator < RubiGen::Base
|
|
71
71
|
m.template "test_helper.rb", "test/test_helper.rb"
|
72
72
|
m.template "test.rb", "test/test_#{gem_name}.rb"
|
73
73
|
when "rspec"
|
74
|
-
m.dependency "install_rspec", [gem_name], :destination => destination_root
|
74
|
+
m.dependency "install_rspec", [gem_name], :destination => destination_root, :collision => :force
|
75
75
|
end
|
76
76
|
|
77
77
|
# Website
|
78
78
|
m.dependency "install_website", [gem_name],
|
79
|
-
:author => author, :email => email, :destination => destination_root unless disable_website
|
79
|
+
:author => author, :email => email, :destination => destination_root, :collision => :force unless disable_website
|
80
80
|
|
81
81
|
# JRuby
|
82
|
-
m.dependency "install_jruby", [gem_name], :destination => destination_root if is_jruby
|
82
|
+
m.dependency "install_jruby", [gem_name], :destination => destination_root, :collision => :force if is_jruby
|
83
83
|
|
84
84
|
# Executables
|
85
85
|
for bin_name in bin_names_list
|
86
|
-
m.dependency "executable", [bin_name], :destination => destination_root
|
86
|
+
m.dependency "executable", [bin_name], :destination => destination_root, :collision => :force
|
87
87
|
end
|
88
88
|
|
89
|
-
m.dependency "install_rubigen_scripts", [destination_root, "rubygems", "newgem", "newgem_theme"], :shebang => options[:shebang]
|
89
|
+
m.dependency "install_rubigen_scripts", [destination_root, "rubygems", "newgem", "newgem_theme"], :shebang => options[:shebang], :collision => :force
|
90
90
|
|
91
91
|
m.write_manifest "Manifest.txt"
|
92
92
|
|
@@ -71,3 +71,4 @@ end
|
|
71
71
|
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
72
72
|
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
73
73
|
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
74
|
+
hoe.rsync_args = '-av --delete --ignore-errors'
|
data/config/hoe.rb
CHANGED
@@ -60,3 +60,4 @@ end
|
|
60
60
|
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n")
|
61
61
|
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "\#{RUBYFORGE_PROJECT}/\#{GEM_NAME}"
|
62
62
|
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
63
|
+
hoe.rsync_args = '-av --delete --ignore-errors'
|
data/lib/newgem/version.rb
CHANGED
@@ -8,7 +8,7 @@ end
|
|
8
8
|
desc 'Upload website files to rubyforge'
|
9
9
|
task :website_upload do
|
10
10
|
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
-
remote_dir = "/var/www/gforge-projects/#{
|
11
|
+
remote_dir = "/var/www/gforge-projects/#{PATH}/"
|
12
12
|
local_dir = 'website'
|
13
13
|
sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
14
|
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
class <%= class_name %> < RubiGen::Base
|
2
2
|
|
3
|
+
DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
|
4
|
+
Config::CONFIG['ruby_install_name'])
|
5
|
+
|
3
6
|
default_options :author => nil
|
4
7
|
|
5
8
|
attr_reader :name
|
@@ -7,7 +10,8 @@ class <%= class_name %> < RubiGen::Base
|
|
7
10
|
def initialize(runtime_args, runtime_options = {})
|
8
11
|
super
|
9
12
|
usage if args.empty?
|
10
|
-
@
|
13
|
+
@destination_root = File.expand_path(args.shift)
|
14
|
+
@name = base_name
|
11
15
|
extract_options
|
12
16
|
end
|
13
17
|
|
@@ -20,6 +24,9 @@ class <%= class_name %> < RubiGen::Base
|
|
20
24
|
# Create stubs
|
21
25
|
# m.template "template.rb", "some_file_after_erb.rb"
|
22
26
|
# m.file "file", "some_file_copied"
|
27
|
+
|
28
|
+
m.dependency "install_rubigen_scripts", [destination_root, "<%= name %>"],
|
29
|
+
:shebang => options[:shebang], :collision => :force
|
23
30
|
end
|
24
31
|
end
|
25
32
|
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>New Gem Generator</h1>
|
34
34
|
<div id="version"> <!-- class="clickable" onclick='document.location = ""; return true' -->
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="" class="numbers">0.
|
36
|
+
<a href="" class="numbers">0.14.0</a>
|
37
37
|
<p>Featured in</p>
|
38
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>
|
@@ -72,35 +72,63 @@
|
|
72
72
|
|
73
73
|
<pre>$ cd ~/ruby_projects
|
74
74
|
$ newgem wizzo
|
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
|
-
|
75
|
+
create
|
76
|
+
create config
|
77
|
+
create doc
|
78
|
+
create lib
|
79
|
+
create log
|
80
|
+
create script
|
81
|
+
create tasks
|
82
|
+
create test
|
83
|
+
create tmp
|
84
|
+
create lib/wizzo
|
85
|
+
create History.txt
|
86
|
+
create License.txt
|
87
|
+
create Rakefile
|
88
|
+
create README.txt
|
89
|
+
create setup.rb
|
90
|
+
create lib/wizzo.rb
|
91
|
+
create lib/wizzo/version.rb
|
92
|
+
create config/hoe.rb
|
93
|
+
create config/requirements.rb
|
94
|
+
create log/debug.log
|
95
|
+
create tasks/deployment.rake
|
96
|
+
create tasks/environment.rake
|
97
|
+
create tasks/website.rake
|
98
|
+
create test/test_helper.rb
|
99
|
+
create test/test_wizzo.rb
|
100
|
+
dependency install_website
|
101
|
+
create website/javascripts
|
102
|
+
create website/stylesheets
|
103
|
+
exists script
|
104
|
+
exists tasks
|
105
|
+
create website/index.txt
|
106
|
+
create website/index.html
|
107
|
+
create script/txt2html
|
108
|
+
overwrite tasks/website.rake? [Ynaqd]
|
109
|
+
force tasks/website.rake
|
110
|
+
dependency plain_theme
|
111
|
+
exists website/javascripts
|
112
|
+
exists website/stylesheets
|
113
|
+
create website/template.rhtml
|
114
|
+
create website/stylesheets/screen.css
|
115
|
+
create website/javascripts/rounded_corners_lite.inc.js
|
116
|
+
dependency install_rubigen_scripts
|
117
|
+
exists script
|
118
|
+
create script/generate
|
119
|
+
create script/destroy
|
120
|
+
create Manifest.txt
|
121
|
+
readme readme
|
122
|
+
Important
|
123
|
+
=========
|
124
|
+
|
125
|
+
* Open config/hoe.rb
|
126
|
+
* Update missing details (gem description, dependent gems, etc.)
|
102
127
|
</pre>
|
103
128
|
|
129
|
+
<p><strong>tasks/website.rake</strong> will be written twice in newgem version 0.13.5. Simply hit enter to accept the default option (overwrite).</p>
|
130
|
+
|
131
|
+
|
104
132
|
<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
133
|
|
106
134
|
|
@@ -110,13 +138,13 @@ NOW - update wizzo/Rakefile with gem description, etc
|
|
110
138
|
<h3>Setup</h3>
|
111
139
|
|
112
140
|
|
113
|
-
<p>Now modify the constants at the top of <strong>
|
141
|
+
<p>Now modify the constants at the top of <strong>config/hoe.rb</strong>, with your name, email and the location where you’ll host your website for the gem. The defaults are tied to RubyForge for uploading the gems and the website (see below).</p>
|
114
142
|
|
115
143
|
|
116
144
|
<h3>Create code and tests</h3>
|
117
145
|
|
118
146
|
|
119
|
-
<p>Then create your libraries (files in <code>lib</code>) and your tests (files in <code>test</code> that look like <code>test_TESTNAME.rb</code>).
|
147
|
+
<p>Then create your libraries (files in <code>lib</code>) and your tests (files in <code>test</code> that look like <code>test_TESTNAME.rb</code>). <a href="http://blog.grayproductions.net/">James Edward Gray II</a> did a <a href="http://macromates.com/screencasts">nice video</a> on test-driven design, that’s worth watching if <span class="caps">TDD</span> is new to you.</p>
|
120
148
|
|
121
149
|
|
122
150
|
<p>If you create any new files, you need to manually add them to the Manifest.txt. Alphabetical order is optional, but it will make the results of <code>rake check_manifest</code> look clean if you keep them ordered. If a file is not in the Manifest.txt it will not be included in the gem when you package and release it.</p>
|
@@ -315,7 +343,7 @@ other stories and things.</p>
|
|
315
343
|
|
316
344
|
<p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p>
|
317
345
|
<p class="coda">
|
318
|
-
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>,
|
346
|
+
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 14th October 2007<br>
|
319
347
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
320
348
|
</p>
|
321
349
|
</div>
|
data/website/index.txt
CHANGED
@@ -24,46 +24,73 @@ Go to the folder where you want to create your new gem folder structure, and run
|
|
24
24
|
|
25
25
|
<pre>$ cd ~/ruby_projects
|
26
26
|
$ newgem wizzo
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
27
|
+
create
|
28
|
+
create config
|
29
|
+
create doc
|
30
|
+
create lib
|
31
|
+
create log
|
32
|
+
create script
|
33
|
+
create tasks
|
34
|
+
create test
|
35
|
+
create tmp
|
36
|
+
create lib/wizzo
|
37
|
+
create History.txt
|
38
|
+
create License.txt
|
39
|
+
create Rakefile
|
40
|
+
create README.txt
|
41
|
+
create setup.rb
|
42
|
+
create lib/wizzo.rb
|
43
|
+
create lib/wizzo/version.rb
|
44
|
+
create config/hoe.rb
|
45
|
+
create config/requirements.rb
|
46
|
+
create log/debug.log
|
47
|
+
create tasks/deployment.rake
|
48
|
+
create tasks/environment.rake
|
49
|
+
create tasks/website.rake
|
50
|
+
create test/test_helper.rb
|
51
|
+
create test/test_wizzo.rb
|
52
|
+
dependency install_website
|
53
|
+
create website/javascripts
|
54
|
+
create website/stylesheets
|
55
|
+
exists script
|
56
|
+
exists tasks
|
57
|
+
create website/index.txt
|
58
|
+
create website/index.html
|
59
|
+
create script/txt2html
|
60
|
+
overwrite tasks/website.rake? [Ynaqd]
|
61
|
+
force tasks/website.rake
|
62
|
+
dependency plain_theme
|
63
|
+
exists website/javascripts
|
64
|
+
exists website/stylesheets
|
65
|
+
create website/template.rhtml
|
66
|
+
create website/stylesheets/screen.css
|
67
|
+
create website/javascripts/rounded_corners_lite.inc.js
|
68
|
+
dependency install_rubigen_scripts
|
69
|
+
exists script
|
70
|
+
create script/generate
|
71
|
+
create script/destroy
|
72
|
+
create Manifest.txt
|
73
|
+
readme readme
|
74
|
+
Important
|
75
|
+
=========
|
76
|
+
|
77
|
+
* Open config/hoe.rb
|
78
|
+
* Update missing details (gem description, dependent gems, etc.)
|
54
79
|
</pre>
|
55
80
|
|
81
|
+
*tasks/website.rake* will be written twice in newgem version 0.13.5. Simply hit enter to accept the default option (overwrite).
|
82
|
+
|
56
83
|
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
84
|
|
58
85
|
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>
|
59
86
|
|
60
87
|
h3. Setup
|
61
88
|
|
62
|
-
Now modify the constants at the top of *
|
89
|
+
Now modify the constants at the top of *config/hoe.rb*, with your name, email and the location where you'll host your website for the gem. The defaults are tied to RubyForge for uploading the gems and the website (see below).
|
63
90
|
|
64
91
|
h3. Create code and tests
|
65
92
|
|
66
|
-
Then create your libraries (files in <code>lib</code>) and your tests (files in <code>test</code> that look like <code>test_TESTNAME.rb</code>).
|
93
|
+
Then create your libraries (files in <code>lib</code>) and your tests (files in <code>test</code> that look like <code>test_TESTNAME.rb</code>). "James Edward Gray II":http://blog.grayproductions.net/ did a "nice video":http://macromates.com/screencasts on test-driven design, that's worth watching if TDD is new to you.
|
67
94
|
|
68
95
|
If you create any new files, you need to manually add them to the Manifest.txt. Alphabetical order is optional, but it will make the results of <code>rake check_manifest</code> look clean if you keep them ordered. If a file is not in the Manifest.txt it will not be included in the gem when you package and release it.
|
69
96
|
|
data/website/rubyforge.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>New Gem Generator</h1>
|
34
34
|
<div id="version"> <!-- class="clickable" onclick='document.location = ""; return true' -->
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="" class="numbers">0.
|
36
|
+
<a href="" class="numbers">0.14.0</a>
|
37
37
|
<p>Featured in</p>
|
38
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>
|
data/website/version-raw.js
CHANGED
data/website/version.js
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4.3
|
|
3
3
|
specification_version: 1
|
4
4
|
name: newgem
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.14.0
|
7
|
+
date: 2007-10-17 00:00:00 +10:00
|
8
8
|
summary: Make your own gems at home
|
9
9
|
require_paths:
|
10
10
|
- lib
|