newgem 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/History.txt +71 -64
  2. data/Manifest.txt +4 -13
  3. data/Rakefile +15 -47
  4. data/app_generators/newgem/newgem_generator.rb +2 -3
  5. data/app_generators/newgem/templates/History.txt +1 -1
  6. data/app_generators/newgem/templates/Rakefile +19 -22
  7. data/app_generators/newgem_simple/templates/Rakefile +7 -13
  8. data/features/install_cucumber.feature +5 -1
  9. data/features/install_website.feature +1 -1
  10. data/features/newgem_cli.feature +0 -12
  11. data/features/step_definitions/cli_steps.rb +0 -2
  12. data/features/step_definitions/common_steps.rb +0 -9
  13. data/features/step_definitions/rubygems_steps.rb +8 -0
  14. data/features/support/env.rb +7 -11
  15. data/lib/hoe/cucumberfeatures.rb +22 -0
  16. data/lib/hoe/manifest.rb +30 -0
  17. data/lib/hoe/newgem.rb +74 -0
  18. data/lib/hoe/website.rb +66 -0
  19. data/lib/newgem.rb +1 -3
  20. data/lib/newgem/tasks.rb +10 -2
  21. data/newgem_generators/install_website/install_website_generator.rb +0 -3
  22. data/rubygems_generators/executable/templates/bin/app.rb.erb +1 -1
  23. data/rubygems_generators/install_cucumber/templates/features/step_definitions/common_steps.rb +0 -9
  24. data/rubygems_generators/install_cucumber/templates/features/support/env.rb.erb +8 -0
  25. metadata +12 -24
  26. data/bundles/RubyGem.tmbundle/Snippets/History header trunk.tmSnippet +0 -18
  27. data/bundles/RubyGem.tmbundle/Snippets/History header.tmSnippet +0 -18
  28. data/bundles/RubyGem.tmbundle/Syntaxes/Rdoc.tmLanguage +0 -70
  29. data/bundles/RubyGem.tmbundle/info.plist +0 -16
  30. data/lib/hoe-patched.rb +0 -1029
  31. data/lib/newgem/support/tasks.rb +0 -10
  32. data/newgem_generators/install_website/templates/tasks/website.rake +0 -47
  33. data/patches/hoe/0001-readme-can-be-txt-or-rdoc.patch +0 -62
  34. data/tasks/bundles.rake +0 -12
  35. data/tasks/cucumber.rake +0 -9
  36. data/tasks/deployment.rake +0 -37
  37. data/tasks/environment.rake +0 -7
  38. data/tasks/website.rake +0 -47
@@ -1,10 +0,0 @@
1
- Rake::TaskManager.class_eval do
2
- def remove_task(task_name)
3
- @tasks.delete(task_name.to_s)
4
- end
5
- end
6
-
7
- def remove_task(task_name)
8
- Rake.application.remove_task(task_name)
9
- end
10
-
@@ -1,47 +0,0 @@
1
- require 'yaml'
2
-
3
- def website_config
4
- unless @website_config
5
- begin
6
- @website_config = YAML.load(File.read("config/website.yml"))
7
- rescue
8
- puts <<-EOS
9
- To upload your website to a host, you need to configure
10
- config/website.yml. See config/website.yml.sample for
11
- an example.
12
- EOS
13
- exit
14
- end
15
- end
16
- @website_config
17
- end
18
-
19
- desc 'Generate website files'
20
- task :website_generate => :ruby_env do
21
- (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
22
- sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
23
- end
24
- end
25
-
26
- desc 'Upload website files to rubyforge'
27
- task :website_upload do
28
- local_dir = 'website'
29
- host = website_config["host"]
30
- host = host ? "#{host}:" : ""
31
- remote_dir = website_config["remote_dir"]
32
- sh %{rsync -aCv #{local_dir}/ #{host}#{remote_dir}}
33
- end
34
-
35
- remove_task :publish_docs # recreate hoe's rubyforge specific version
36
-
37
- desc 'Publish RDoc to RubyForge.'
38
- task :publish_docs => [:clean, :docs] do
39
- local_dir = 'doc'
40
- host = website_config["host"]
41
- host = host ? "#{host}:" : ""
42
- remote_dir = File.join(website_config["remote_dir"], "doc")
43
- sh %{rsync -aCv #{local_dir}/ #{host}#{remote_dir}}
44
- end
45
-
46
- desc 'Generate and upload website files'
47
- task :website => [:website_generate, :website_upload, :publish_docs]
@@ -1,62 +0,0 @@
1
- diff --git a/lib/hoe.rb b/lib/hoe.rb
2
- index 0e44dfa..1d39815 100644
3
- --- a/lib/hoe.rb
4
- +++ b/lib/hoe.rb
5
- @@ -340,6 +340,10 @@ class Hoe
6
- warn "** #{name} is missing or in the wrong format for auto-intuiting."
7
- warn " run `sow blah` and look at its text files"
8
- end
9
- +
10
- + def readme_name
11
- + Dir['README*'].first || 'README.txt'
12
- + end
13
-
14
- def initialize(name, version) # :nodoc:
15
- self.name = name
16
- @@ -357,7 +361,7 @@ class Hoe
17
- self.multiruby_skip = []
18
- self.need_tar = true
19
- self.need_zip = false
20
- - self.rdoc_pattern = /^(lib|bin|ext)|txt$/
21
- + self.rdoc_pattern = /^(lib|bin|ext)|txt|rdoc$/
22
- self.remote_rdoc_dir = name
23
- self.rsync_args = '-av --delete'
24
- self.rubyforge_name = name.downcase
25
- @@ -371,7 +375,7 @@ class Hoe
26
-
27
- # Intuit values:
28
-
29
- - readme = File.read("README.txt").split(/^(=+ .*)$/)[1..-1] rescue ''
30
- + readme = File.read(readme_name).split(/^(=+ .*)$/)[1..-1] rescue ''
31
- unless readme.empty? then
32
- sections = readme.map { |s|
33
- s =~ /^=/ ? s.strip.downcase.chomp(':').split.last : s.strip
34
- @@ -384,7 +388,7 @@ class Hoe
35
- self.summary ||= summ
36
- self.url ||= readme[1].gsub(/^\* /, '').split(/\n/).grep(/\S+/)
37
- else
38
- - missing 'README.txt'
39
- + missing readme_name
40
- end
41
-
42
- self.changes ||= begin
43
- @@ -509,8 +513,8 @@ class Hoe
44
- dirs = Dir['{lib,ext}']
45
- s.require_paths = dirs unless dirs.empty?
46
-
47
- - s.rdoc_options = ['--main', 'README.txt']
48
- - s.extra_rdoc_files = s.files.grep(/txt$/)
49
- + s.rdoc_options = ['--main', readme_name]
50
- + s.extra_rdoc_files = s.files.grep(/(txt|rdoc)$/)
51
- s.has_rdoc = true
52
-
53
- s.post_install_message = post_install_message
54
- @@ -619,7 +623,7 @@ class Hoe
55
- # Doco
56
-
57
- Rake::RDocTask.new(:docs) do |rd|
58
- - rd.main = "README.txt"
59
- + rd.main = readme_name
60
- rd.options << '-d' if RUBY_PLATFORM !~ /win32/ and `which dot` =~ /\/dot/ and not ENV['NODOT']
61
- rd.rdoc_dir = 'doc'
62
- files = spec.files.grep(rdoc_pattern)
@@ -1,12 +0,0 @@
1
- namespace :bundles do
2
-
3
- desc 'Install TextMate bundles for RubyGems'
4
- task :tm do
5
- require 'tmpdir'
6
- bundle = "RubyGem.tmbundle"
7
- bundle_dir = File.join(File.dirname(__FILE__), 'bundles/', bundle)
8
- `cp -R #{bundle_dir} #{Dir.tmpdir}`
9
- `open "#{File.join(Dir.tmpdir, bundle)}"`
10
- end
11
- end
12
-
@@ -1,9 +0,0 @@
1
- begin
2
- gem 'cucumber'
3
- require 'cucumber/rake/task'
4
-
5
- Cucumber::Rake::Task.new(:features) do |t|
6
- t.cucumber_opts = "--format progress"
7
- end
8
- rescue LoadError
9
- end
@@ -1,37 +0,0 @@
1
- desc "Generate a #{$hoe.name}.gemspec file"
2
- task :gemspec do
3
- File.open("#{$hoe.name}.gemspec", "w") do |file|
4
- file.puts $hoe.spec.to_ruby
5
- end
6
- end
7
-
8
- task :release do
9
- puts <<-EOS.gsub(/^ /,'')
10
- Remember to create tag your release; eg for Git:
11
- git tag REL-#{$hoe.version}
12
-
13
- Announce your release on RubyForge News:
14
- rake post_news
15
- EOS
16
- end
17
-
18
- task :check_version do
19
- unless ENV['VERSION']
20
- puts 'Must pass a VERSION=x.y.z release version'
21
- exit
22
- end
23
- unless ENV['VERSION'] == $hoe.version
24
- puts "Please update your lib/#{$hoe.name}.rb to match the release version, currently #{$hoe.version}"
25
- exit
26
- end
27
- end
28
-
29
- desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
30
- task :install_gem_no_doc => [:clean, :package] do
31
- sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
32
- end
33
-
34
- desc 'Recreate Manifest.txt to include ALL files'
35
- task :manifest do
36
- `rake check_manifest | patch -p0 > Manifest.txt`
37
- end
@@ -1,7 +0,0 @@
1
- task :ruby_env do
2
- RUBY_APP = if RUBY_PLATFORM =~ /java/
3
- "jruby"
4
- else
5
- "ruby"
6
- end unless defined? RUBY_APP
7
- end
@@ -1,47 +0,0 @@
1
- require 'yaml'
2
-
3
- def website_config
4
- unless @website_config
5
- begin
6
- @website_config = YAML.load(File.read("config/website.yml"))
7
- rescue
8
- puts <<-EOS
9
- To upload your website to a host, you need to configure
10
- config/website.yml. See config/website.yml.sample for
11
- an example.
12
- EOS
13
- exit
14
- end
15
- end
16
- @website_config
17
- end
18
-
19
- desc 'Generate website files'
20
- task :website_generate => :ruby_env do
21
- (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
22
- sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
23
- end
24
- end
25
-
26
- desc 'Upload website files to rubyforge'
27
- task :website_upload do
28
- local_dir = 'website'
29
- host = website_config["host"]
30
- host = host ? "#{host}:" : ""
31
- remote_dir = website_config["remote_dir"]
32
- sh %{rsync -aCv #{local_dir}/ #{host}#{remote_dir}}
33
- end
34
-
35
- remove_task :publish_docs # recreate hoe's rubyforge specific version
36
-
37
- desc 'Publish RDoc to RubyForge.'
38
- task :publish_docs => [:clean, :docs] do
39
- local_dir = 'doc'
40
- host = website_config["host"]
41
- host = host ? "#{host}:" : ""
42
- remote_dir = File.join(website_config["remote_dir"], "rdoc")
43
- sh %{rsync -aCv #{local_dir}/ #{host}#{remote_dir}}
44
- end
45
-
46
- desc 'Generate and upload website files'
47
- task :website => [:website_generate, :website_upload, :publish_docs]