newgem 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/newgem +20 -7
- data/lib/newgem/version.rb +1 -1
- data/templates/Rakefile +1 -1
- data/website/index.html +10 -0
- data/website/version-raw.js +3 -0
- data/website/version.js +4 -0
- metadata +6 -3
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|
|
data/lib/newgem/version.rb
CHANGED
data/templates/Rakefile
CHANGED
data/website/index.html
ADDED
@@ -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>
|
data/website/version.js
ADDED
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.
|
7
|
-
date: 2006-10-
|
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
|
|