rubigen 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Rakefile +1 -1
- data/lib/rubigen/lookup.rb +2 -0
- data/lib/rubigen/version.rb +1 -1
- data/test/test_lookup.rb +7 -7
- data/website/index.html +2 -2
- data/website/index.txt +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -87,7 +87,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
|
87
87
|
p.clean_globs |= CLEAN #An array of file patterns to delete on clean.
|
88
88
|
|
89
89
|
# == Optional
|
90
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("
|
90
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
91
91
|
# An array of rubygem dependencies [name, version], e.g. [ ['activesupport', '>= 1.3.1'] ]
|
92
92
|
p.extra_deps = [['activesupport', '>= 1.3.1']]
|
93
93
|
|
data/lib/rubigen/lookup.rb
CHANGED
@@ -244,6 +244,7 @@ module RubiGen
|
|
244
244
|
@filters = filters.first.is_a?(Array) ? filters.first : filters
|
245
245
|
return "" if @filters.blank?
|
246
246
|
filter_str = @filters.map {|filter| "#{filter}_"}.join(",")
|
247
|
+
filter_str += ","
|
247
248
|
"{#{filter_str}}"
|
248
249
|
end
|
249
250
|
|
@@ -298,6 +299,7 @@ module RubiGen
|
|
298
299
|
@filters = filters.first.is_a?(Array) ? filters.first : filters
|
299
300
|
return "" if filters.blank?
|
300
301
|
filter_str = filters.map {|filter| "#{filter}_"}.join(",")
|
302
|
+
filter_str += ","
|
301
303
|
"{#{filter_str}}"
|
302
304
|
end
|
303
305
|
end
|
data/lib/rubigen/version.rb
CHANGED
data/test/test_lookup.rb
CHANGED
@@ -55,17 +55,17 @@ class TestLookup < Test::Unit::TestCase
|
|
55
55
|
|
56
56
|
def test_scoped_gem_path
|
57
57
|
source = GemPathSource.new("rubygems")
|
58
|
-
assert_equal("{rubygems_}", source.send(:filter_str))
|
58
|
+
assert_equal("{rubygems_,}", source.send(:filter_str))
|
59
59
|
end
|
60
60
|
|
61
61
|
def test_alternate_scoped_gem_path
|
62
62
|
source = GemPathSource.new(:rubygems, :ruby)
|
63
|
-
assert_equal("{rubygems_,ruby_}", source.send(:filter_str))
|
63
|
+
assert_equal("{rubygems_,ruby_,}", source.send(:filter_str))
|
64
64
|
end
|
65
65
|
|
66
66
|
def test_scoped_gem_path_using_array
|
67
67
|
source = GemPathSource.new([:rubygems, :ruby])
|
68
|
-
assert_equal("{rubygems_,ruby_}", source.send(:filter_str))
|
68
|
+
assert_equal("{rubygems_,ruby_,}", source.send(:filter_str))
|
69
69
|
end
|
70
70
|
|
71
71
|
def test_use_component_sources_without_scope
|
@@ -79,10 +79,10 @@ class TestLookup < Test::Unit::TestCase
|
|
79
79
|
Base.use_component_sources! :rubygems, :ruby
|
80
80
|
gem_path_source = Base.sources.find { |source| source.is_a?(GemPathSource) }
|
81
81
|
assert_not_nil(gem_path_source, "Where is the GemPathSource?")
|
82
|
-
assert_equal("{rubygems_,ruby_}", gem_path_source.send(:filter_str))
|
82
|
+
assert_equal("{rubygems_,ruby_,}", gem_path_source.send(:filter_str))
|
83
83
|
user_path_source = Base.sources.find { |source| source.is_a?(PathFilteredSource) }
|
84
84
|
assert_not_nil(user_path_source, "Where is the PathFilteredSource?")
|
85
|
-
assert_match(/\.rubigen\/\{rubygems_,ruby_
|
85
|
+
assert_match(/\.rubigen\/\{rubygems_,ruby_,\}generators/, user_path_source.path)
|
86
86
|
end
|
87
87
|
|
88
88
|
def test_use_application_sources
|
@@ -99,9 +99,9 @@ class TestLookup < Test::Unit::TestCase
|
|
99
99
|
Base.use_application_sources! :rubygems, :newgem
|
100
100
|
gem_path_source = Base.sources.find { |source| source.is_a?(GemPathSource) }
|
101
101
|
assert_not_nil(gem_path_source, "Where is the GemPathSource?")
|
102
|
-
assert_equal("{app_,rubygems_,newgem_}", gem_path_source.send(:filter_str))
|
102
|
+
assert_equal("{app_,rubygems_,newgem_,}", gem_path_source.send(:filter_str))
|
103
103
|
user_path_source = Base.sources.find { |source| source.is_a?(PathFilteredSource) }
|
104
104
|
assert_not_nil(user_path_source, "Where is the PathFilteredSource?")
|
105
|
-
assert_match(/\.rubigen\/\{app_,rubygems_,newgem_
|
105
|
+
assert_match(/\.rubigen\/\{app_,rubygems_,newgem_,\}generators/, user_path_source.path)
|
106
106
|
end
|
107
107
|
end
|
data/website/index.html
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
<h1>rubigen</h1>
|
32
32
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rubigen"; return false'>
|
33
33
|
<p>Get Version</p>
|
34
|
-
<a href="http://rubyforge.org/projects/rubigen" class="numbers">1.0.
|
34
|
+
<a href="http://rubyforge.org/projects/rubigen" class="numbers">1.0.3</a>
|
35
35
|
</div>
|
36
36
|
<h1>Ruby Generator Framework</h1>
|
37
37
|
|
@@ -335,7 +335,7 @@ The trunk repository is <code>svn://rubyforge.org/var/svn/rubigen/trunk</code> f
|
|
335
335
|
<h2>Thanks go to…</h2>
|
336
336
|
|
337
337
|
|
338
|
-
<p>Jeremy Kemper (bitsweat) who wrote the original <a href="http://dev.rubyonrails.org">Rails Generator</a>.</p>
|
338
|
+
<p><a href="http://bitsweat.net/">Jeremy Kemper</a> (bitsweat) who wrote the original <a href="http://dev.rubyonrails.org">Rails Generator</a>.</p>
|
339
339
|
|
340
340
|
|
341
341
|
<h2>License</h2>
|
data/website/index.txt
CHANGED
@@ -245,7 +245,7 @@ The trunk repository is <code>svn://rubyforge.org/var/svn/rubigen/trunk</code> f
|
|
245
245
|
|
246
246
|
h2. Thanks go to...
|
247
247
|
|
248
|
-
Jeremy Kemper (bitsweat) who wrote the original "Rails Generator":http://dev.rubyonrails.org.
|
248
|
+
"Jeremy Kemper":http://bitsweat.net/ (bitsweat) who wrote the original "Rails Generator":http://dev.rubyonrails.org.
|
249
249
|
|
250
250
|
h2. License
|
251
251
|
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4.3
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rubigen
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
6
|
+
version: 1.0.3
|
7
7
|
date: 2007-08-22 00:00:00 +02:00
|
8
8
|
summary: "A framework to allow Ruby applications to generate file/folder stubs (like the rails command does for Ruby on Rails, and the \xE2\x80\x98script/generate\xE2\x80\x99 command within a Rails application during development)."
|
9
9
|
require_paths:
|