newgem 0.13.2 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/app_generators/newgem/newgem_generator.rb +12 -11
- data/lib/newgem/version.rb +1 -1
- data/newgem_theme_generators/plain_theme/USAGE +0 -5
- data/test/test_newgem_generator.rb +11 -2
- data/website/index.html +1 -1
- data/website/rubyforge.html +1 -1
- data/website/version-raw.js +1 -1
- data/website/version.js +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -10,9 +10,9 @@ class NewgemGenerator < RubiGen::Base
|
|
10
10
|
:author => nil,
|
11
11
|
:import_path => nil,
|
12
12
|
:jruby => nil,
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
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 :
|
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
|
40
|
-
windows
|
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
|
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("-
|
135
|
-
"
|
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
|
-
@
|
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
|
data/lib/newgem/version.rb
CHANGED
@@ -50,8 +50,8 @@ class TestNewgemGenerator < Test::Unit::TestCase
|
|
50
50
|
assert_manifest_complete
|
51
51
|
end
|
52
52
|
|
53
|
-
def
|
54
|
-
run_generator('newgem', [APP_ROOT], sources
|
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(',')})
|
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.
|
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>
|
data/website/rubyforge.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.
|
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>
|
data/website/version-raw.js
CHANGED
data/website/version.js
CHANGED
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.
|
7
|
-
date: 2007-
|
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
|