newgem 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/bin/newgem CHANGED
@@ -9,6 +9,7 @@ templates = File.dirname(__FILE__) + '/../templates/'
9
9
  OPTIONS = {
10
10
  :import_path => nil,
11
11
  :version => '0.0.1',
12
+ :bin_name => nil
12
13
  }
13
14
  parser = OptionParser.new do |opts|
14
15
  opts.banner = <<BANNER
@@ -20,14 +21,15 @@ Usage: #{File.basename($0)} [options] <name of gem>
20
21
  Options are:
21
22
  BANNER
22
23
  opts.separator ""
24
+ opts.on("-b", "--bin-name=BIN_NAME[,BIN_NAME2]", String,
25
+ "Sets up executable scripts in the bin folder.",
26
+ "Default: none") { |OPTIONS[:bin_name]| }
23
27
  opts.on("-i", "--import_path=PATH", String,
24
- "Path where your files could be copied from",
28
+ "Path where your files could be copied from.",
25
29
  "Default: none") { |OPTIONS[:import_path]| }
26
- opts.separator ""
27
30
  opts.on("-v", "--version=YOUR_VERSION", String,
28
- "Version of the gem you are creating",
31
+ "Version of the gem you are creating.",
29
32
  "Default: 0.0.1") { |OPTIONS[:version]| }
30
- opts.separator ""
31
33
  opts.on("-h", "--help",
32
34
  "Show this help message.") { puts opts; exit }
33
35
  opts.parse!(ARGV)
@@ -103,6 +105,20 @@ end
103
105
  eos
104
106
  end
105
107
 
108
+ puts "creating: " + bin
109
+ Dir.mkdir bin
110
+
111
+ if OPTIONS[:bin_name]
112
+ bin_names = OPTIONS[:bin_name].split(',')
113
+ bin_names.each do |bin_name|
114
+ puts "creating: " + bin + '/' + bin_name
115
+ FileUtils.touch bin + '/' + bin_name
116
+ end
117
+ bin_names = bin_names.join(' ')
118
+ else
119
+ bin_names = ''
120
+ end
121
+
106
122
  puts "creating: " + rakefile
107
123
  template = File.open(templates + 'Rakefile','r') {|f| f.readlines.join}
108
124
  File.open(rakefile, 'w') do |file|
@@ -135,9 +151,6 @@ end
135
151
  puts "creating: " + examples
136
152
  Dir.mkdir examples
137
153
 
138
- puts "creating: " + bin
139
- Dir.mkdir bin
140
-
141
154
  puts "creating: " + setup
142
155
  template = File.open(templates + 'setup.rb','r') {|f| f.readlines.join}
143
156
  File.open(setup, 'w') do |file|
@@ -1,7 +1,7 @@
1
1
  module Newgem #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 4
4
+ MINOR = 5
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
data/templates/Rakefile CHANGED
@@ -13,7 +13,7 @@ AUTHOR = "you"
13
13
  EMAIL = "your contact email for bug fixes and info"
14
14
  DESCRIPTION = "description of gem"
15
15
  HOMEPATH = 'http://#{gem_name}.rubyforge.org'
16
- BIN_FILES = %w( )
16
+ BIN_FILES = %w( #{bin_names} )
17
17
 
18
18
 
19
19
  NAME = "#{gem_name}"
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <head>
3
+ <META HTTP-EQUIV="Refresh"
4
+ CONTENT="5; URL=http://drnicwilliams.com/2006/10/11/generating-new-gems/">
5
+ </head>
6
+ <body>
7
+ <p><strong>New Gem Generator</strong> information is currently from Dr Nic's initial article.
8
+ You're being <a href="http://drnicwilliams.com/2006/10/11/generating-new-gems/">redirected</a> there now...
9
+ </body>
10
+ </html>
@@ -0,0 +1,3 @@
1
+ // Announcement JS file
2
+ var version = "0.4.0";
3
+ MagicAnnouncement.show('newgem', version);
@@ -0,0 +1,4 @@
1
+ // Version JS file
2
+ var version = "0.4.0";
3
+
4
+ document.write(" - " + version);
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: newgem
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.0
7
- date: 2006-10-12 00:00:00 +02:00
6
+ version: 0.5.0
7
+ date: 2006-10-16 00:00:00 +02:00
8
8
  summary: Make your own gems at home
9
9
  require_paths:
10
10
  - lib
@@ -37,8 +37,11 @@ files:
37
37
  - lib/newgem.rb
38
38
  - lib/newgem/version.rb
39
39
  - templates/Rakefile
40
- - templates/setup.rb
41
40
  - templates/test.rb
41
+ - templates/setup.rb
42
+ - website/index.html
43
+ - website/version.js
44
+ - website/version-raw.js
42
45
  - CHANGELOG
43
46
  test_files: []
44
47