newgem 0.13.2 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 0.13.3 2007-09-02
2
+
3
+ * Clean up newgem_gen usage statement
4
+ * website generated by default, -W to turn off, -w is no longer an option
5
+
1
6
  == 0.13.2 2007-08-22
2
7
 
3
8
  * Upgrade rubigen dependency to 1.0.3 to pushout upgrade
@@ -10,9 +10,9 @@ class NewgemGenerator < RubiGen::Base
10
10
  :author => nil,
11
11
  :import_path => nil,
12
12
  :jruby => nil,
13
- :test_framework => 'test::unit',
14
- :version => '0.0.1',
15
- :website => false
13
+ :disable_website => nil,
14
+ :test_framework => 'test::unit',
15
+ :version => '0.0.1'
16
16
 
17
17
 
18
18
  attr_reader :gem_name, :module_name
@@ -21,7 +21,7 @@ class NewgemGenerator < RubiGen::Base
21
21
  # extensions/option
22
22
  attr_reader :test_framework
23
23
  attr_reader :bin_names_list
24
- attr_reader :website
24
+ attr_reader :disable_website
25
25
  attr_reader :manifest
26
26
  attr_reader :is_jruby
27
27
 
@@ -36,8 +36,8 @@ class NewgemGenerator < RubiGen::Base
36
36
 
37
37
  def manifest
38
38
  # Use /usr/bin/env if no special shebang was specified
39
- script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
40
- windows = (RUBY_PLATFORM =~ /dos|win32|cygwin/i) || (RUBY_PLATFORM =~ /(:?mswin|mingw)/)
39
+ script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
40
+ windows = (RUBY_PLATFORM =~ /dos|win32|cygwin/i) || (RUBY_PLATFORM =~ /(:?mswin|mingw)/)
41
41
 
42
42
  record do |m|
43
43
  # Root directory and all subdirectories.
@@ -75,7 +75,7 @@ class NewgemGenerator < RubiGen::Base
75
75
 
76
76
  # Website
77
77
  m.dependency "install_website", [gem_name],
78
- :author => author, :email => email, :destination => destination_root if website
78
+ :author => author, :email => email, :destination => destination_root unless disable_website
79
79
 
80
80
  # JRuby
81
81
  m.dependency "install_jruby", [gem_name], :destination => destination_root if is_jruby
@@ -99,7 +99,7 @@ class NewgemGenerator < RubiGen::Base
99
99
  Take any library or Rails plugin or command line application,
100
100
  gemify it, and easily share it with the Ruby world.
101
101
 
102
- Usage: #{File.basename $0} /path/to/your/app [options]"
102
+ Usage: #{File.basename $0} /path/to/your/app [options]
103
103
  EOS
104
104
  end
105
105
 
@@ -131,8 +131,8 @@ EOS
131
131
  opts.on("-V", "--set-version=YOUR_VERSION", String,
132
132
  "Version of the gem you are creating.",
133
133
  "Default: 0.0.1") { |options[:version]| }
134
- opts.on("-w", "--website",
135
- "Includes a website for your RubyGem.") { |options[:website]| }
134
+ opts.on("-W", "--website-disable",
135
+ "Disables the generation of the website for your RubyGem.") { |options[:disable_website]| }
136
136
  end
137
137
 
138
138
  def extract_options
@@ -147,10 +147,11 @@ EOS
147
147
  @email ||= rubyforge_config.email
148
148
  end
149
149
  @bin_names_list = (options[:bin_name] || "").split(',')
150
- @website = options[:website]
150
+ @disable_website = options[:disable_website]
151
151
 
152
152
  @test_framework = options[:test_framework] || "test::unit"
153
153
  @is_jruby = options[:jruby]
154
+ p options
154
155
  end
155
156
 
156
157
  # Installation skeleton. Intermediate directories are automatically
@@ -2,7 +2,7 @@ module Newgem #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 13
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,5 +0,0 @@
1
- Description:
2
-
3
-
4
- Usage:
5
-
@@ -50,8 +50,8 @@ class TestNewgemGenerator < Test::Unit::TestCase
50
50
  assert_manifest_complete
51
51
  end
52
52
 
53
- def test_newgem_with_website
54
- run_generator('newgem', [APP_ROOT], sources, {:website => true})
53
+ def test_newgem_with_website_by_default
54
+ run_generator('newgem', [APP_ROOT], sources)
55
55
 
56
56
  %w[txt2html].each do |file|
57
57
  assert_generated_file("script/#{file}")
@@ -64,6 +64,15 @@ class TestNewgemGenerator < Test::Unit::TestCase
64
64
  assert_manifest_complete
65
65
  end
66
66
 
67
+ def test_newgem_with_no_website
68
+ run_generator('newgem', [APP_ROOT], sources, {:no_website => true})
69
+
70
+ assert !File.exists?("#{APP_ROOT}/script/txt2html"), "No script/txt2html should be generated"
71
+ assert !File.exists?("#{APP_ROOT}/website"), "No website folder should be generated"
72
+
73
+ assert_manifest_complete
74
+ end
75
+
67
76
  def test_newgem_with_executable
68
77
  @executables = ["some_executable", "another"]
69
78
  run_generator('newgem', [APP_ROOT], sources, {:bin_name => @executables.join(',')})
@@ -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.2</a>
36
+ <a href="" class="numbers">0.13.3</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>
@@ -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.2</a>
36
+ <a href="" class="numbers">0.13.3</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.2";
2
+ var version = "0.13.3";
3
3
  MagicAnnouncement.show('compositekeys', version);
@@ -1,4 +1,4 @@
1
1
  // Version JS file
2
- var version = "0.13.2";
2
+ var version = "0.13.3";
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.2
7
- date: 2007-08-22 00:00:00 +02:00
6
+ version: 0.13.3
7
+ date: 2007-09-02 00:00:00 +02:00
8
8
  summary: Make your own gems at home
9
9
  require_paths:
10
10
  - lib