newgem 0.13.3 → 0.13.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.13.4 2007-09-07
2
+
3
+ * Running "newgem ." in a trunk, branches, or tags folder will look in parent folder for gem_name
4
+ * Added missing win_script.cmd for install_website generator [thx sutch]
5
+ * Upgrade rubigen == 1.0.4
6
+
1
7
  == 0.13.3 2007-09-02
2
8
 
3
9
  * Clean up newgem_gen usage statement
data/Manifest.txt CHANGED
@@ -42,6 +42,7 @@ lib/newgem/version.rb
42
42
  newgem_generators/install_website/USAGE
43
43
  newgem_generators/install_website/install_website_generator.rb
44
44
  newgem_generators/install_website/templates/script/txt2html
45
+ newgem_generators/install_website/templates/script/win_script.cmd
45
46
  newgem_generators/install_website/templates/tasks/website.rake
46
47
  newgem_generators/install_website/templates/website/index.html
47
48
  newgem_generators/install_website/templates/website/index.txt
@@ -1,6 +1,7 @@
1
1
  require 'rbconfig'
2
2
 
3
3
  class NewgemGenerator < RubiGen::Base
4
+
4
5
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
5
6
  Config::CONFIG['ruby_install_name'])
6
7
 
@@ -29,7 +30,7 @@ class NewgemGenerator < RubiGen::Base
29
30
  super
30
31
  usage if args.empty?
31
32
  @destination_root = File.expand_path(args.shift)
32
- @gem_name = File.basename(destination_root)
33
+ @gem_name = base_name
33
34
  @module_name = gem_name.camelize
34
35
  extract_options
35
36
  end
@@ -151,7 +152,6 @@ EOS
151
152
 
152
153
  @test_framework = options[:test_framework] || "test::unit"
153
154
  @is_jruby = options[:jruby]
154
- p options
155
155
  end
156
156
 
157
157
  # Installation skeleton. Intermediate directories are automatically
data/config/hoe.rb CHANGED
@@ -38,7 +38,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
38
38
  ['RedCloth','>=3.0.4'],
39
39
  ['syntax','>=1.0.0'],
40
40
  ['activesupport','>=1.4.2'],
41
- ['rubigen','>=1.0.3']
41
+ ['rubigen','>=1.0.4']
42
42
  ]
43
43
  #p.spec_extras - A hash of extra values to set in the gemspec.
44
44
  end
@@ -2,7 +2,7 @@ module Newgem #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 13
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,6 +1,7 @@
1
1
  require 'rbconfig'
2
2
 
3
3
  class InstallWebsiteGenerator < RubiGen::Base
4
+
4
5
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
5
6
  Config::CONFIG['ruby_install_name'])
6
7
 
@@ -13,7 +14,9 @@ class InstallWebsiteGenerator < RubiGen::Base
13
14
 
14
15
  def initialize(runtime_args, runtime_options = {})
15
16
  super
16
- @gem_name = File.basename(File.expand_path(destination_root))
17
+ @destination_root = File.expand_path(destination_root)
18
+ @gem_name = base_name
19
+
17
20
  @module_name = @gem_name.camelcase
18
21
  extract_options
19
22
  end
@@ -0,0 +1 @@
1
+ @ruby <%= File.join("script", filename) %> %*
@@ -1,3 +1,4 @@
1
+
1
2
  class InstallRspecGenerator < RubiGen::Base
2
3
 
3
4
  default_options :author => nil
@@ -6,7 +7,8 @@ class InstallRspecGenerator < RubiGen::Base
6
7
 
7
8
  def initialize(runtime_args, runtime_options = {})
8
9
  super
9
- @gem_name = File.basename(File.expand_path(destination_root))
10
+ @destination_root = File.expand_path(destination_root)
11
+ @gem_name = base_name
10
12
  @module_name = @gem_name.camelcase
11
13
  extract_options
12
14
  end
@@ -65,7 +65,7 @@ class TestNewgemGenerator < Test::Unit::TestCase
65
65
  end
66
66
 
67
67
  def test_newgem_with_no_website
68
- run_generator('newgem', [APP_ROOT], sources, {:no_website => true})
68
+ run_generator('newgem', [APP_ROOT], sources, {:disable_website => true})
69
69
 
70
70
  assert !File.exists?("#{APP_ROOT}/script/txt2html"), "No script/txt2html should be generated"
71
71
  assert !File.exists?("#{APP_ROOT}/website"), "No website folder should be generated"
@@ -105,6 +105,15 @@ class TestNewgemGenerator < Test::Unit::TestCase
105
105
  assert_manifest_complete
106
106
  end
107
107
 
108
+ def test_run_in_trunk_path_finds_parent_path_for_gem_name
109
+ expected_gem_name = File.basename(File.expand_path(APP_ROOT))
110
+ app_root = File.join(APP_ROOT, "trunk")
111
+ FileUtils.mkdir_p app_root
112
+
113
+ generator = run_generator('newgem', [app_root], sources)
114
+ assert_equal(expected_gem_name, generator.gem_name)
115
+ end
116
+
108
117
  private
109
118
  def sources
110
119
  [ RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path)),
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.3</a>
36
+ <a href="" class="numbers">0.13.4</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.3</a>
36
+ <a href="" class="numbers">0.13.4</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.3";
2
+ var version = "0.13.4";
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.3";
2
+ var version = "0.13.4";
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.3
7
- date: 2007-09-02 00:00:00 +02:00
6
+ version: 0.13.4
7
+ date: 2007-09-07 00:00:00 +02:00
8
8
  summary: Make your own gems at home
9
9
  require_paths:
10
10
  - lib
@@ -73,6 +73,7 @@ files:
73
73
  - newgem_generators/install_website/USAGE
74
74
  - newgem_generators/install_website/install_website_generator.rb
75
75
  - newgem_generators/install_website/templates/script/txt2html
76
+ - newgem_generators/install_website/templates/script/win_script.cmd
76
77
  - newgem_generators/install_website/templates/tasks/website.rake
77
78
  - newgem_generators/install_website/templates/website/index.html
78
79
  - newgem_generators/install_website/templates/website/index.txt
@@ -218,7 +219,7 @@ dependencies:
218
219
  requirements:
219
220
  - - ">="
220
221
  - !ruby/object:Gem::Version
221
- version: 1.0.3
222
+ version: 1.0.4
222
223
  version:
223
224
  - !ruby/object:Gem::Dependency
224
225
  name: hoe