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 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'
@@ -1,8 +1,8 @@
1
1
  module Newgem #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 13
5
- TINY = 5
4
+ MINOR = 14
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -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/#{RUBYFORGE_PROJECT}/"
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,4 +1,5 @@
1
1
  class ApplicationGeneratorGenerator < RubiGen::Base
2
+
2
3
  default_options
3
4
 
4
5
  attr_reader :name, :class_name, :generator_path
@@ -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
- @name = args.shift
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.13.5</a>
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
- creating: wizzo
76
- creating: wizzo/README.txt
77
- creating: wizzo/lib
78
- creating: wizzo/script
79
- creating: wizzo/website
80
- creating: wizzo/website/javascripts
81
- creating: wizzo/website/stylesheets
82
- creating: wizzo/lib/wizzo
83
- creating: wizzo/lib/wizzo.rb
84
- creating: wizzo/lib/wizzo/version.rb
85
- creating: wizzo/bin
86
- creating: wizzo/test
87
- creating: wizzo/test/test_helper.rb
88
- creating: wizzo/test/test_wizzo.rb
89
- creating: wizzo/examples
90
- creating: wizzo/setup.rb
91
- creating: wizzo/Rakefile
92
- creating: wizzo/History.txt
93
- creating: wizzo/License.txt
94
- creating: wizzo/Manifest.txt
95
- creating: wizzo/script/txt2html
96
- creating: wizzo/website/index.txt
97
- creating: wizzo/website/index.html
98
- creating: wizzo/website/template.rhtml
99
- copying: wizzo/website/javascripts/rounded_corners_lite.inc.js
100
- copying: wizzo/website/stylesheets/screen.css
101
- NOW - update wizzo/Rakefile with gem description, etc
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 &#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
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>Rakefile</strong>, with your name, email and the location where you&#8217;ll host your website for the gem. The defaults are tied to RubyForge for uploading the gems and the website (see below).</p>
141
+ <p>Now modify the constants at the top of <strong>config/hoe.rb</strong>, with your name, email and the location where you&#8217;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>). John Grey <span class="caps">III</span> did a nice video on test-driven design, that&#8217;s worth watching if <span class="caps">TDD</span> is new to you.</p>
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&#8217;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>, 18th August 2007<br>
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
- creating: wizzo
28
- creating: wizzo/README.txt
29
- creating: wizzo/lib
30
- creating: wizzo/script
31
- creating: wizzo/website
32
- creating: wizzo/website/javascripts
33
- creating: wizzo/website/stylesheets
34
- creating: wizzo/lib/wizzo
35
- creating: wizzo/lib/wizzo.rb
36
- creating: wizzo/lib/wizzo/version.rb
37
- creating: wizzo/bin
38
- creating: wizzo/test
39
- creating: wizzo/test/test_helper.rb
40
- creating: wizzo/test/test_wizzo.rb
41
- creating: wizzo/examples
42
- creating: wizzo/setup.rb
43
- creating: wizzo/Rakefile
44
- creating: wizzo/History.txt
45
- creating: wizzo/License.txt
46
- creating: wizzo/Manifest.txt
47
- creating: wizzo/script/txt2html
48
- creating: wizzo/website/index.txt
49
- creating: wizzo/website/index.html
50
- creating: wizzo/website/template.rhtml
51
- copying: wizzo/website/javascripts/rounded_corners_lite.inc.js
52
- copying: wizzo/website/stylesheets/screen.css
53
- NOW - update wizzo/Rakefile with gem description, etc
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 *Rakefile*, 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).
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>). John Grey III did a nice video on test-driven design, that's worth watching if TDD is new to you.
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
 
@@ -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.13.5</a>
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>
@@ -1,3 +1,3 @@
1
1
  // Announcement JS file
2
- var version = "0.13.5";
2
+ var version = "0.14.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.13.5";
2
+ var version = "0.14.0";
3
3
 
4
4
  document.write(" - " + version);
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.13.5
7
- date: 2007-09-07 00:00:00 +02:00
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