newgem 0.23.1 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/History.txt +10 -0
  2. data/Manifest.txt +7 -8
  3. data/README.txt +7 -0
  4. data/Rakefile +0 -1
  5. data/app_generators/newgem/newgem_generator.rb +3 -6
  6. data/app_generators/newgem/templates/{module.rb → lib/module.rb} +0 -0
  7. data/app_generators/newgem/templates/{version.rb → lib/version.rb} +1 -1
  8. data/app_generators/newgem_simple/newgem_simple_generator.rb +3 -2
  9. data/app_generators/newgem_simple/templates/LICENSE +1 -1
  10. data/app_generators/newgem_simple/templates/README +3 -3
  11. data/app_generators/newgem_simple/templates/Rakefile +14 -4
  12. data/config/hoe.rb +1 -1
  13. data/lib/newgem/version.rb +3 -3
  14. data/rubygems_generators/executable/executable_generator.rb +4 -4
  15. data/rubygems_generators/extconf/USAGE +1 -1
  16. data/rubygems_generators/extconf/templates/README.txt +1 -1
  17. data/rubygems_generators/install_test_unit/USAGE +5 -0
  18. data/rubygems_generators/install_test_unit/install_test_unit_generator.rb +51 -0
  19. data/{app_generators/newgem/templates → rubygems_generators/install_test_unit/templates/test}/test.rb +0 -0
  20. data/{app_generators/newgem/templates → rubygems_generators/install_test_unit/templates/test}/test_helper.rb +0 -0
  21. data/script/txt2html +21 -7
  22. data/tasks/deployment.rake +2 -5
  23. data/test/test_generator_helper.rb +10 -1
  24. data/test/test_install_test_unit_generator.rb +46 -0
  25. data/test/test_newgem_generator.rb +0 -1
  26. data/website/index.html +22 -5
  27. data/website/index.txt +14 -3
  28. data/website/rubyforge.html +3 -3
  29. data/website/version-raw.js +1 -1
  30. data/website/version.js +1 -1
  31. metadata +12 -12
  32. data/app_generators/newgem/templates/app.rb +0 -44
  33. data/app_generators/newgem/templates/spec.opts +0 -1
  34. data/app_generators/newgem/templates/spec.rb +0 -11
  35. data/config/svn_branch.rb +0 -15
@@ -1,3 +1,13 @@
1
+ == 0.24.0 2008-06-17
2
+
3
+ * Refactored generated tests into install_test_unit, so rspec users don't get test folder
4
+ * Cleaned up --simple and added task for generating gemspec file (for github) [Yehuda Katz]
5
+
6
+ == 0.23.2 2008-05-06
7
+
8
+ * removed :nodoc: from version.rb's module [Steven Parkes]
9
+ * upgraded rubigen dependency to 1.3.0
10
+
1
11
  == 0.23.1 2008-04-17
2
12
 
3
13
  * Added explicit instruction to edit ~/.rubyforge/user-config.yml in PostInstall.txt
@@ -11,22 +11,17 @@ app_generators/newgem/templates/License.txt
11
11
  app_generators/newgem/templates/PostInstall.txt
12
12
  app_generators/newgem/templates/README.txt
13
13
  app_generators/newgem/templates/Rakefile
14
- app_generators/newgem/templates/app.rb
15
14
  app_generators/newgem/templates/config/hoe.rb
16
15
  app_generators/newgem/templates/config/requirements.rb
17
- app_generators/newgem/templates/module.rb
16
+ app_generators/newgem/templates/lib/module.rb
17
+ app_generators/newgem/templates/lib/version.rb
18
18
  app_generators/newgem/templates/readme
19
19
  app_generators/newgem/templates/script/console.erb
20
20
  app_generators/newgem/templates/script/win_script.cmd
21
21
  app_generators/newgem/templates/setup.rb
22
- app_generators/newgem/templates/spec.opts
23
- app_generators/newgem/templates/spec.rb
24
22
  app_generators/newgem/templates/tasks/deployment.rake
25
23
  app_generators/newgem/templates/tasks/environment.rake
26
24
  app_generators/newgem/templates/tasks/website.rake
27
- app_generators/newgem/templates/test.rb
28
- app_generators/newgem/templates/test_helper.rb
29
- app_generators/newgem/templates/version.rb
30
25
  app_generators/newgem_simple/USAGE
31
26
  app_generators/newgem_simple/newgem_simple_generator.rb
32
27
  app_generators/newgem_simple/templates/LICENSE
@@ -42,7 +37,6 @@ bundles/RubyGem.tmbundle/Snippets/History header.tmSnippet
42
37
  bundles/RubyGem.tmbundle/Syntaxes/Rdoc.tmLanguage
43
38
  bundles/RubyGem.tmbundle/info.plist
44
39
  config/hoe.rb
45
- config/svn_branch.rb
46
40
  lib/newgem.rb
47
41
  lib/newgem/quick_template.rb
48
42
  lib/newgem/rubyforge.rb
@@ -92,6 +86,10 @@ rubygems_generators/install_rspec_stories/install_rspec_stories_generator.rb
92
86
  rubygems_generators/install_rspec_stories/templates/all.rb
93
87
  rubygems_generators/install_rspec_stories/templates/steps.rb
94
88
  rubygems_generators/install_rspec_stories/templates/story.story
89
+ rubygems_generators/install_test_unit/USAGE
90
+ rubygems_generators/install_test_unit/install_test_unit_generator.rb
91
+ rubygems_generators/install_test_unit/templates/test/test.rb
92
+ rubygems_generators/install_test_unit/templates/test/test_helper.rb
95
93
  script/destroy
96
94
  script/generate
97
95
  script/txt2html
@@ -110,6 +108,7 @@ test/test_helper.rb
110
108
  test/test_install_jruby_generator.rb
111
109
  test/test_install_rspec_generator.rb
112
110
  test/test_install_rspec_stories_generator.rb
111
+ test/test_install_test_unit_generator.rb
113
112
  test/test_install_website_generator.rb
114
113
  test/test_newgem_generator.rb
115
114
  test/test_newgem_simple_generator.rb
data/README.txt CHANGED
@@ -64,6 +64,13 @@ The <code>newgem</code> application is distributed itself as a RubyGem and is av
64
64
 
65
65
  Alternately, download the gem and install manually.
66
66
 
67
+ == TUTORIALS:
68
+
69
+ * Original blog article and tutorial - http://drnicwilliams.com/2006/10/11/generating-new-gems/
70
+ * Tutorial: Publishing RubyGems with Hoe - http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe by Geoffrey Grosenbach
71
+ * Using New Gem Generator in Windows - http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html by Jorge Cangas
72
+ * Building a Ruby Gem - http://bogojoker.com/blog/2008/05/building-a-ruby-gem/ by Joseph Pecoraro (includes a Problems/Troubleshooting section!!)
73
+
67
74
  == LICENSE:
68
75
 
69
76
  (The MIT License)
data/Rakefile CHANGED
@@ -6,6 +6,5 @@ include FileUtils
6
6
 
7
7
  $:.unshift 'lib'
8
8
  require 'config/hoe' # setup Hoe + all gem configuration
9
- require 'config/svn_branch' # install svn_branch tasks if gem available
10
9
  require 'newgem/tasks' # load /tasks/*.rake
11
10
 
@@ -52,8 +52,8 @@ class NewgemGenerator < RubiGen::Base
52
52
  m.file_copy_each %w( setup.rb )
53
53
 
54
54
  # Default module for app
55
- m.template "module.rb", "lib/#{gem_name}.rb"
56
- m.template "version.rb", "lib/#{gem_name}/version.rb"
55
+ m.template "lib/module.rb", "lib/#{gem_name}.rb"
56
+ m.template "lib/version.rb", "lib/#{gem_name}/version.rb"
57
57
 
58
58
  # Config
59
59
  m.template_copy_each %w( hoe.rb requirements.rb ), "config"
@@ -64,8 +64,7 @@ class NewgemGenerator < RubiGen::Base
64
64
  # Selecting a test framework
65
65
  case test_framework
66
66
  when "test::unit"
67
- m.template "test_helper.rb", "test/test_helper.rb"
68
- m.template "test.rb", "test/test_#{gem_name}.rb"
67
+ m.dependency "install_test_unit", [gem_name], :destination => destination_root, :collision => :force
69
68
  when "rspec"
70
69
  m.dependency "install_rspec", [gem_name], :destination => destination_root, :collision => :force
71
70
  end
@@ -166,7 +165,5 @@ EOS
166
165
  lib
167
166
  script
168
167
  tasks
169
- test
170
- tmp
171
168
  )
172
169
  end
@@ -1,4 +1,4 @@
1
- module <%= module_name %> #:nodoc:
1
+ module <%= module_name %>
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = <%= version[0] || '0' %>
4
4
  MINOR = <%= version[1] || '0' %>
@@ -25,8 +25,9 @@ class NewgemSimpleGenerator < RubiGen::Base
25
25
  # m.template "template.rb", "some_file_after_erb.rb"
26
26
  m.file "lib/templates.rb", "lib/#{name}.rb"
27
27
  m.template "spec/templates_spec.rb.erb", "spec/#{name}_spec.rb"
28
-
29
- %w[ LICENSE Rakefile README TODO spec/spec_helper.rb ].each {|file| m.file file, file }
28
+
29
+ %w[ LICENSE Rakefile README ].each {|file| m.template file, file}
30
+ %w[ TODO spec/spec_helper.rb ].each {|file| m.file file, file }
30
31
 
31
32
  m.dependency "install_rubigen_scripts", [destination_root, 'newgem_simple'],
32
33
  :shebang => options[:shebang], :collision => :force
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007 YOUR NAME
1
+ Copyright (c) <%= Time.now.year %> YOUR NAME
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- templates
2
- =================
1
+ <%= name %>
2
+ <%= "=" * name.size %>
3
3
 
4
- A plugin for the Merb framework that provides ....
4
+ A gem that provides...
@@ -1,8 +1,10 @@
1
1
  require 'rubygems'
2
2
  require 'rake/gempackagetask'
3
+ require 'rubygems/specification'
4
+ require 'date'
3
5
 
4
- GEM = "new_gem"
5
- VERSION = "0.0.1"
6
+ GEM = "<%= name %>"
7
+ GEM_VERSION = "0.0.1"
6
8
  AUTHOR = "Your Name"
7
9
  EMAIL = "Your Email"
8
10
  HOMEPAGE = "http://example.com"
@@ -10,7 +12,7 @@ SUMMARY = "A gem that provides..."
10
12
 
11
13
  spec = Gem::Specification.new do |s|
12
14
  s.name = GEM
13
- s.version = VERSION
15
+ s.version = GEM_VERSION
14
16
  s.platform = Gem::Platform::RUBY
15
17
  s.has_rdoc = true
16
18
  s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
@@ -32,6 +34,14 @@ Rake::GemPackageTask.new(spec) do |pkg|
32
34
  pkg.gem_spec = spec
33
35
  end
34
36
 
37
+ desc "install the gem locally"
35
38
  task :install => [:package] do
36
- sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
39
+ sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
40
+ end
41
+
42
+ desc "create a gemspec file"
43
+ task :make_spec do
44
+ File.open("#{GEM}.gemspec", "w") do |file|
45
+ file.puts spec.to_ruby
46
+ end
37
47
  end
@@ -50,7 +50,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
50
50
  ['RedCloth','>=3.0.4'],
51
51
  ['syntax','>=1.0.0'],
52
52
  ['activesupport','>=2.0.2'],
53
- ['rubigen','>=1.1.1']
53
+ ['rubigen','>=1.3.0']
54
54
  ]
55
55
  #p.spec_extras - A hash of extra values to set in the gemspec.
56
56
  end
@@ -1,8 +1,8 @@
1
- module Newgem #:nodoc:
1
+ module Newgem
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 23
5
- TINY = 1
4
+ MINOR = 24
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,12 +1,12 @@
1
1
  class ExecutableGenerator < RubiGen::Base
2
2
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
3
3
  Config::CONFIG['ruby_install_name'])
4
-
4
+
5
5
  default_options :shebang => DEFAULT_SHEBANG,
6
6
  :author => nil
7
-
7
+
8
8
  attr_reader :bin_name, :author
9
-
9
+
10
10
  def initialize(runtime_args, runtime_options = {})
11
11
  super
12
12
  usage if args.empty?
@@ -46,7 +46,7 @@ EOS
46
46
  "Generated app file will include your name.",
47
47
  "Default: none") { |x| options[:author] = x }
48
48
  end
49
-
49
+
50
50
  def extract_options
51
51
  @author = options[:author]
52
52
  end
@@ -24,4 +24,4 @@ Important:
24
24
  .DS_Store
25
25
 
26
26
  Also, in your ~/.hoerc file ADD the following exclusions:
27
- exclude: !ruby/regexp /tmp$|CVS|\.svn|_darcs|\.git|local/.*\.rb$|Makefile|.*\.o$|.*\.bundle$|.*\.so$|.*\.dll$/
27
+ exclude: !ruby/regexp /tmp$|CVS|\.svn|_darcs|\.git|log$|local/.*\.rb$|Makefile|.*\.o$|.*\.bundle$|.*\.so$|.*\.dll$/
@@ -12,4 +12,4 @@ Important:
12
12
  .DS_Store
13
13
 
14
14
  Also, in your ~/.hoerc file ADD the following exclusions:
15
- exclude: !ruby/regexp /tmp$|CVS|\.svn|_darcs|\.git|local/.*\.rb$|Makefile|.*\.o$|.*\.bundle$|.*\.so$|.*\.dll$/
15
+ exclude: !ruby/regexp /tmp$|CVS|\.svn|_darcs|\.git|log$|local/.*\.rb$|Makefile|.*\.o$|.*\.bundle$|.*\.so$|.*\.dll$/
@@ -0,0 +1,5 @@
1
+ Description:
2
+
3
+
4
+ Usage:
5
+
@@ -0,0 +1,51 @@
1
+ class InstallTestUnitGenerator < RubiGen::Base
2
+
3
+ default_options :author => nil
4
+
5
+ attr_reader :gem_name, :module_name
6
+
7
+ def initialize(runtime_args, runtime_options = {})
8
+ super
9
+ @destination_root = File.expand_path(destination_root)
10
+ @gem_name = base_name
11
+ @module_name = @gem_name.camelcase
12
+ extract_options
13
+ end
14
+
15
+ def manifest
16
+ record do |m|
17
+ # Ensure appropriate folder(s) exists
18
+ m.directory 'test'
19
+
20
+ m.template "test/test_helper.rb", "test/test_helper.rb"
21
+ m.template "test/test.rb", "test/test_#{gem_name}.rb"
22
+ end
23
+ end
24
+
25
+ protected
26
+ def banner
27
+ <<-EOS
28
+ Creates a ...
29
+
30
+ USAGE: #{$0} #{spec.name} name
31
+ EOS
32
+ end
33
+
34
+ def add_options!(opts)
35
+ # opts.separator ''
36
+ # opts.separator 'Options:'
37
+ # For each option below, place the default
38
+ # at the top of the file next to "default_options"
39
+ # opts.on("-a", "--author=\"Your Name\"", String,
40
+ # "Some comment about this option",
41
+ # "Default: none") { |options[:author]| }
42
+ # opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
43
+ end
44
+
45
+ def extract_options
46
+ # for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
47
+ # Templates can access these value via the attr_reader-generated methods, but not the
48
+ # raw instance variable value.
49
+ # @author = options[:author]
50
+ end
51
+ end
@@ -1,9 +1,28 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ GEM_NAME = 'newgem' # what ppl will type to install your gem
4
+ RUBYFORGE_PROJECT = 'newgem'
5
+
3
6
  require 'rubygems'
7
+ begin
8
+ require 'newgem'
9
+ require 'rubyforge'
10
+ rescue LoadError
11
+ puts "\n\nGenerating the website requires the newgem RubyGem"
12
+ puts "Install: gem install newgem\n\n"
13
+ exit(1)
14
+ end
4
15
  require 'redcloth'
5
16
  require 'syntax/convertors/html'
6
17
  require 'erb'
18
+ require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
19
+
20
+ version = Newgem::VERSION::STRING
21
+ download = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
22
+
23
+ def rubyforge_project_id
24
+ RubyForge.new.autoconfig["group_ids"][RUBYFORGE_PROJECT]
25
+ end
7
26
 
8
27
  class Fixnum
9
28
  def ordinal
@@ -29,15 +48,9 @@ def convert_syntax(syntax, source)
29
48
  return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
30
49
  end
31
50
 
32
- require File.join(File.dirname(__FILE__), '/../lib/newgem/version.rb')
33
-
34
- version = Newgem::VERSION::STRING
35
- download = ENV['DOWNLOAD_PATH']
36
-
37
51
  if ARGV.length >= 1
38
52
  src, template = ARGV
39
53
  template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
40
-
41
54
  else
42
55
  puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
43
56
  exit!
@@ -49,7 +62,8 @@ title = nil
49
62
  body = nil
50
63
  File.open(src) do |fsrc|
51
64
  title_text = fsrc.readline
52
- body_text = fsrc.read
65
+ body_text_template = fsrc.read
66
+ body_text = ERB.new(body_text_template).result(binding)
53
67
  syntax_items = []
54
68
  body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
55
69
  ident = syntax_items.length
@@ -1,10 +1,7 @@
1
1
  desc 'Release the website and new gem version'
2
2
  task :deploy => [:check_version, :generator_report, :website, :release] do
3
- puts "Remember to create SVN tag:"
4
- puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
- "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
- puts "Suggested comment:"
7
- puts "Tagging release #{CHANGES}"
3
+ puts "Remember to create Git tag:"
4
+ puts " git tag REL-#{VERS}"
8
5
  end
9
6
 
10
7
  desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
@@ -1,4 +1,8 @@
1
- require File.dirname(__FILE__) + '/test_helper'
1
+ begin
2
+ require File.dirname(__FILE__) + '/test_helper'
3
+ rescue LoadError
4
+ require 'test/unit'
5
+ end
2
6
  require 'fileutils'
3
7
 
4
8
  # Must set before requiring generator libs.
@@ -10,6 +14,11 @@ if defined?(APP_ROOT)
10
14
  else
11
15
  APP_ROOT = app_root
12
16
  end
17
+ if defined?(RAILS_ROOT)
18
+ RAILS_ROOT.replace(app_root)
19
+ else
20
+ RAILS_ROOT = app_root
21
+ end
13
22
 
14
23
  begin
15
24
  require 'rubigen'
@@ -0,0 +1,46 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+
4
+ class TestInstallTestUnitGenerator < Test::Unit::TestCase
5
+ include RubiGen::GeneratorTestHelper
6
+
7
+ def setup
8
+ bare_setup
9
+ end
10
+
11
+ def teardown
12
+ bare_teardown
13
+ end
14
+
15
+ # Some generator-related assertions:
16
+ # assert_generated_file(name, &block) # block passed the file contents
17
+ # assert_directory_exists(name)
18
+ # assert_generated_class(name, &block)
19
+ # assert_generated_module(name, &block)
20
+ # assert_generated_test_for(name, &block)
21
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
22
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
23
+ #
24
+ # Other helper methods are:
25
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
26
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
27
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
28
+
29
+ def test_generator_without_options
30
+ name = "myapp"
31
+ run_generator('install_test_unit', [name], sources)
32
+ assert_directory_exists "test"
33
+ assert_generated_file "test/test_helper.rb"
34
+ assert_generated_file "test/test_myproject.rb"
35
+ end
36
+
37
+ private
38
+ def sources
39
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
40
+ ]
41
+ end
42
+
43
+ def generator_path
44
+ "rubygems_generators"
45
+ end
46
+ end
@@ -18,7 +18,6 @@ class TestNewgemGenerator < Test::Unit::TestCase
18
18
 
19
19
  assert_directory_exists "config"
20
20
  assert_directory_exists "lib"
21
- assert_directory_exists "log"
22
21
  assert_directory_exists "tasks"
23
22
  assert_directory_exists "test"
24
23
 
@@ -31,9 +31,9 @@
31
31
  <div id="main">
32
32
 
33
33
  <h1>New Gem Generator</h1>
34
- <div id="version"> <!-- class="clickable" onclick='document.location = ""; return true' -->
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="" class="numbers">0.23.1</a>
36
+ <a href="http://rubyforge.org/projects/newgem" class="numbers">0.24.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>
@@ -300,6 +300,7 @@ Important
300
300
  <li><a href="http://drnicwilliams.com/2006/10/11/generating-new-gems/">Original blog article and tutorial</a></li>
301
301
  <li><a href="http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe">Tutorial: Publishing RubyGems with Hoe</a> by <a href="http://geoffreygrosenbach.com/">Geoffrey Grosenbach</a> </li>
302
302
  <li><a href="http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html">Using New Gem Generator in Windows</a> by <a href="http://codeconversations.blogspot.com/">Jorge Cangas</a></li>
303
+ <li><a href="http://bogojoker.com/blog/2008/05/building-a-ruby-gem/">Building a Ruby Gem</a> by <a href="http://bogojoker.com/">Joseph Pecoraro</a> (includes a Problems/Troubleshooting section!!)</li>
303
304
  </ul>
304
305
 
305
306
 
@@ -322,13 +323,29 @@ other stories and things.</p>
322
323
  <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
323
324
 
324
325
 
325
- <p>The source for this project is available via git. You can <a href="http://github.com/drnic/newgem/tree/master">browse and/or fork the source</a>, or to clone the project locally:</p>
326
+ <p>You can fetch the source from either:</p>
327
+
328
+
329
+ <ul>
330
+ <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id">http://rubyforge.org/scm/?group_id=</a>=</li>
331
+ </ul>
332
+
333
+
334
+ <pre>git clone git://rubyforge.org/newgem.git</pre>
335
+
336
+ <ul>
337
+ <li>github: <a href="http://github.com/drnic/newgem/tree/master">http://github.com/drnic/newgem/tree/master</a></li>
338
+ </ul>
326
339
 
327
340
 
328
341
  <pre>git clone git://github.com/drnic/newgem.git</pre>
329
342
 
330
- <p>The original Subversion repository is <code>svn://rubyforge.org/var/svn/newgem/trunk</code> for anonymous access.</p>
343
+ <h3>Build and test instructions</h3>
344
+
331
345
 
346
+ <pre>cd newgem
347
+ rake test
348
+ rake install_gem</pre>
332
349
 
333
350
  <h2>License</h2>
334
351
 
@@ -341,7 +358,7 @@ other stories and things.</p>
341
358
 
342
359
  <p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p>
343
360
  <p class="coda">
344
- <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 5th April 2008<br>
361
+ <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 17th June 2008<br>
345
362
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
346
363
  </p>
347
364
  </div>
@@ -200,6 +200,7 @@ h2. Related articles
200
200
  * "Original blog article and tutorial":http://drnicwilliams.com/2006/10/11/generating-new-gems/
201
201
  * "Tutorial: Publishing RubyGems with Hoe":http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe by "Geoffrey Grosenbach":http://geoffreygrosenbach.com/
202
202
  * "Using New Gem Generator in Windows":http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html by "Jorge Cangas":http://codeconversations.blogspot.com/
203
+ * "Building a Ruby Gem":http://bogojoker.com/blog/2008/05/building-a-ruby-gem/ by "Joseph Pecoraro":http://bogojoker.com/ (includes a Problems/Troubleshooting section!!)
203
204
 
204
205
  h2. Dr Nic's Blog
205
206
 
@@ -214,11 +215,21 @@ h2. How to submit patches
214
215
 
215
216
  Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
216
217
 
217
- The source for this project is available via git. You can "browse and/or fork the source":http://github.com/drnic/newgem/tree/master, or to clone the project locally:
218
-
218
+ You can fetch the source from either:
219
+
220
+ * rubyforge: "http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>":http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>
221
+
222
+ <pre>git clone git://rubyforge.org/newgem.git</pre>
223
+
224
+ * github: "http://github.com/drnic/newgem/tree/master":http://github.com/drnic/newgem/tree/master
225
+
219
226
  <pre>git clone git://github.com/drnic/newgem.git</pre>
220
227
 
221
- The original Subversion repository is <code>svn://rubyforge.org/var/svn/newgem/trunk</code> for anonymous access.
228
+ h3. Build and test instructions
229
+
230
+ <pre>cd newgem
231
+ rake test
232
+ rake install_gem</pre>
222
233
 
223
234
  h2. License
224
235
 
@@ -31,9 +31,9 @@
31
31
  <div id="main">
32
32
 
33
33
  <h1>New Gem Generator</h1>
34
- <div id="version"> <!-- class="clickable" onclick='document.location = ""; return true' -->
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="" class="numbers">0.23.1</a>
36
+ <a href="http://rubyforge.org/projects/newgem" class="numbers">0.24.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>
@@ -263,7 +263,7 @@ OPTIONS
263
263
  specify whether release_notes/changes are preformatted
264
264
  </pre>
265
265
  <p class="coda">
266
- <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 5th March 2008<br>
266
+ <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 17th June 2008<br>
267
267
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
268
268
  </p>
269
269
  </div>
@@ -1,3 +1,3 @@
1
1
  // Announcement JS file
2
- var version = "0.23.1";
2
+ var version = "0.24.0";
3
3
  MagicAnnouncement.show('compositekeys', version);
@@ -1,4 +1,4 @@
1
1
  // Version JS file
2
- var version = "0.23.1";
2
+ var version = "0.24.0";
3
3
 
4
4
  document.write(" - " + version);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr Nic Williams
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-17 00:00:00 +10:00
12
+ date: 2008-06-17 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 1.1.1
49
+ version: 1.3.0
50
50
  version:
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: hoe
@@ -55,7 +55,7 @@ dependencies:
55
55
  requirements:
56
56
  - - ">="
57
57
  - !ruby/object:Gem::Version
58
- version: 1.5.1
58
+ version: 1.5.3
59
59
  version:
60
60
  description: Make your own gems at home
61
61
  email:
@@ -96,22 +96,17 @@ files:
96
96
  - app_generators/newgem/templates/PostInstall.txt
97
97
  - app_generators/newgem/templates/README.txt
98
98
  - app_generators/newgem/templates/Rakefile
99
- - app_generators/newgem/templates/app.rb
100
99
  - app_generators/newgem/templates/config/hoe.rb
101
100
  - app_generators/newgem/templates/config/requirements.rb
102
- - app_generators/newgem/templates/module.rb
101
+ - app_generators/newgem/templates/lib/module.rb
102
+ - app_generators/newgem/templates/lib/version.rb
103
103
  - app_generators/newgem/templates/readme
104
104
  - app_generators/newgem/templates/script/console.erb
105
105
  - app_generators/newgem/templates/script/win_script.cmd
106
106
  - app_generators/newgem/templates/setup.rb
107
- - app_generators/newgem/templates/spec.opts
108
- - app_generators/newgem/templates/spec.rb
109
107
  - app_generators/newgem/templates/tasks/deployment.rake
110
108
  - app_generators/newgem/templates/tasks/environment.rake
111
109
  - app_generators/newgem/templates/tasks/website.rake
112
- - app_generators/newgem/templates/test.rb
113
- - app_generators/newgem/templates/test_helper.rb
114
- - app_generators/newgem/templates/version.rb
115
110
  - app_generators/newgem_simple/USAGE
116
111
  - app_generators/newgem_simple/newgem_simple_generator.rb
117
112
  - app_generators/newgem_simple/templates/LICENSE
@@ -127,7 +122,6 @@ files:
127
122
  - bundles/RubyGem.tmbundle/Syntaxes/Rdoc.tmLanguage
128
123
  - bundles/RubyGem.tmbundle/info.plist
129
124
  - config/hoe.rb
130
- - config/svn_branch.rb
131
125
  - lib/newgem.rb
132
126
  - lib/newgem/quick_template.rb
133
127
  - lib/newgem/rubyforge.rb
@@ -177,6 +171,10 @@ files:
177
171
  - rubygems_generators/install_rspec_stories/templates/all.rb
178
172
  - rubygems_generators/install_rspec_stories/templates/steps.rb
179
173
  - rubygems_generators/install_rspec_stories/templates/story.story
174
+ - rubygems_generators/install_test_unit/USAGE
175
+ - rubygems_generators/install_test_unit/install_test_unit_generator.rb
176
+ - rubygems_generators/install_test_unit/templates/test/test.rb
177
+ - rubygems_generators/install_test_unit/templates/test/test_helper.rb
180
178
  - script/destroy
181
179
  - script/generate
182
180
  - script/txt2html
@@ -195,6 +193,7 @@ files:
195
193
  - test/test_install_jruby_generator.rb
196
194
  - test/test_install_rspec_generator.rb
197
195
  - test/test_install_rspec_stories_generator.rb
196
+ - test/test_install_test_unit_generator.rb
198
197
  - test/test_install_website_generator.rb
199
198
  - test/test_newgem_generator.rb
200
199
  - test/test_newgem_simple_generator.rb
@@ -275,6 +274,7 @@ test_files:
275
274
  - test/test_install_jruby_generator.rb
276
275
  - test/test_install_rspec_generator.rb
277
276
  - test/test_install_rspec_stories_generator.rb
277
+ - test/test_install_test_unit_generator.rb
278
278
  - test/test_install_website_generator.rb
279
279
  - test/test_newgem_generator.rb
280
280
  - test/test_newgem_simple_generator.rb
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Created by <%= author %> on <%= (now = Time.now).year %>-<%= now.month %>-<%= now.day %>.
4
- # Copyright (c) <%= now.year %>. All rights reserved.
5
-
6
- begin
7
- require 'rubygems'
8
- rescue LoadError
9
- # no rubygems to load, so we fail silently
10
- end
11
-
12
- require 'optparse'
13
-
14
- # NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.
15
-
16
- OPTIONS = {
17
- :path => '~'
18
- }
19
- MANDATORY_OPTIONS = %w( path )
20
-
21
- parser = OptionParser.new do |opts|
22
- opts.banner = <<BANNER
23
- This application is wonderful because...
24
-
25
- Usage: #{File.basename($0)} [options]
26
-
27
- Options are:
28
- BANNER
29
- opts.separator ""
30
- opts.on("-p", "--path=PATH", String,
31
- "The root path for selecting files",
32
- "Default: ~") { |OPTIONS[:path]| }
33
- opts.on("-h", "--help",
34
- "Show this help message.") { puts opts; exit }
35
- opts.parse!(ARGV)
36
-
37
- if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
38
- puts opts; exit
39
- end
40
- end
41
-
42
- path = OPTIONS[:path]
43
-
44
- # do stuff
@@ -1 +0,0 @@
1
- --colour
@@ -1,11 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
2
-
3
- # Time to add your specs!
4
- # http://rspec.info/
5
- describe "Place your specs here" do
6
-
7
- it "find this spec in spec directory" do
8
- violated "Be sure to write your specs"
9
- end
10
-
11
- end
@@ -1,15 +0,0 @@
1
- # Use svn_branch gem for branch/merge support
2
- begin
3
- Gem.manage_gems
4
- gem = Gem.cache.search('svn_branch').sort_by { |g| g.version }.last
5
- if gem.nil?
6
- puts <<-EOS
7
- You can install RubyGem 'svn_branch' to get helper tasks for svn branch management
8
- gem install svn_branch
9
- EOS
10
- else
11
- path = gem.full_gem_path
12
- Dir[File.join(path, "/**/tasks/**/*.rake")].sort.each { |ext| load ext }
13
- end
14
- rescue LoadError
15
- end