w2tags 0.9.3 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +340 -340
- data/LICENSE +6 -6
- data/MIT-LICENSE +18 -18
- data/Manifest.txt +28 -25
- data/README.rdoc +27 -21
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/w2tags +173 -143
- data/doc/History.rdoc +88 -0
- data/hot/erb.hot +18 -156
- data/hot/erb_base.hot +164 -0
- data/hot/html.hot +30 -31
- data/hot/rails/scaffold.hot +15 -15
- data/hot/vm.hot +8 -8
- data/hot/vm2.hot +34 -34
- data/hot/vm_crud.hot +34 -34
- data/hot/vm_popup.hot +74 -74
- data/lib/tags2w.rb +263 -0
- data/lib/w2tags/block/block_hot.rb +37 -0
- data/lib/w2tags/block/plain_text.rb +57 -57
- data/lib/w2tags/block/remark.rb +37 -37
- data/lib/w2tags/block/sass.rb +68 -66
- data/lib/w2tags/merb_hook.rb +15 -15
- data/lib/w2tags/parser.rb +17 -8
- data/lib/w2tags/rails_hook.rb +15 -15
- data/lib/w2tags/sinatra_hook.rb +74 -50
- data/lib/w2tags.rb +100 -100
- data/plugins/{/w2tags/ → w2tags}/README +2 -2
- data/plugins/{/w2tags//generators//w2scaffold/ → w2tags/generators/w2scaffold}/USAGE +29 -29
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/controller.rb +85 -85
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/functional_test.rb +45 -45
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/helper.rb +2 -2
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/helper_test.rb +4 -4
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/layout.html.erb +17 -17
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/style.css +54 -54
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_edit.html.erb +17 -17
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_edit.html.w2erb +16 -16
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_index.html.erb +23 -23
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_index.html.w2erb +13 -13
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_new.html.erb +16 -16
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_new.html.w2erb +15 -15
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_show.html.erb +9 -9
- data/plugins/{/w2tags//generators//w2scaffold//templates/ → w2tags/generators/w2scaffold/templates}/view_show.html.w2erb +8 -8
- data/plugins/{/w2tags//generators//w2scaffold/ → w2tags/generators/w2scaffold}/w2scaffold_generator.rb +106 -106
- data/plugins/{/w2tags/ → w2tags}/install.rb +0 -0
- data/tasks/ann.rake +81 -81
- data/tasks/bones.rake +21 -21
- data/tasks/gem.rake +126 -126
- data/tasks/git.rake +41 -41
- data/tasks/manifest.rake +49 -49
- data/tasks/notes.rake +28 -28
- data/tasks/post_load.rake +39 -39
- data/tasks/rdoc.rake +51 -51
- data/tasks/rubyforge.rake +57 -57
- data/tasks/setup.rb +268 -268
- data/tasks/spec.rake +55 -55
- data/tasks/svn.rake +48 -48
- data/tasks/test.rake +38 -38
- data/test/vars.hot +30 -30
- data/test/w2tags_basic_usability.rb +187 -187
- data/test/w2tags_enlightning.rb +42 -42
- data/test/w2tags_hot.rb +85 -85
- data/test/w2tags_hot_var.rb +115 -115
- metadata +28 -30
data/tasks/spec.rake
CHANGED
@@ -1,55 +1,55 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
if HAVE_SPEC_RAKE_SPECTASK
|
4
|
-
require 'spec/rake/verify_rcov'
|
5
|
-
|
6
|
-
namespace :spec do
|
7
|
-
|
8
|
-
desc 'Run all specs with basic output'
|
9
|
-
Spec::Rake::SpecTask.new(:run) do |t|
|
10
|
-
t.ruby_opts = PROJ.ruby_opts
|
11
|
-
t.spec_opts = PROJ.spec.opts
|
12
|
-
t.spec_files = PROJ.spec.files
|
13
|
-
t.libs += PROJ.libs
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'Run all specs with text output'
|
17
|
-
Spec::Rake::SpecTask.new(:specdoc) do |t|
|
18
|
-
t.ruby_opts = PROJ.ruby_opts
|
19
|
-
t.spec_opts = PROJ.spec.opts + ['--format', 'specdoc']
|
20
|
-
t.spec_files = PROJ.spec.files
|
21
|
-
t.libs += PROJ.libs
|
22
|
-
end
|
23
|
-
|
24
|
-
if HAVE_RCOV
|
25
|
-
desc 'Run all specs with RCov'
|
26
|
-
Spec::Rake::SpecTask.new(:rcov) do |t|
|
27
|
-
t.ruby_opts = PROJ.ruby_opts
|
28
|
-
t.spec_opts = PROJ.spec.opts
|
29
|
-
t.spec_files = PROJ.spec.files
|
30
|
-
t.libs += PROJ.libs
|
31
|
-
t.rcov = true
|
32
|
-
t.rcov_dir = PROJ.rcov.dir
|
33
|
-
t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
|
34
|
-
end
|
35
|
-
|
36
|
-
RCov::VerifyTask.new(:verify) do |t|
|
37
|
-
t.threshold = PROJ.rcov.threshold
|
38
|
-
t.index_html = File.join(PROJ.rcov.dir, 'index.html')
|
39
|
-
t.require_exact_threshold = PROJ.rcov.threshold_exact
|
40
|
-
end
|
41
|
-
|
42
|
-
task :verify => :rcov
|
43
|
-
remove_desc_for_task %w(spec:clobber_rcov)
|
44
|
-
end
|
45
|
-
|
46
|
-
end # namespace :spec
|
47
|
-
|
48
|
-
desc 'Alias to spec:run'
|
49
|
-
task :spec => 'spec:run'
|
50
|
-
|
51
|
-
task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
|
52
|
-
|
53
|
-
end # if HAVE_SPEC_RAKE_SPECTASK
|
54
|
-
|
55
|
-
# EOF
|
1
|
+
# $Id$
|
2
|
+
|
3
|
+
if HAVE_SPEC_RAKE_SPECTASK
|
4
|
+
require 'spec/rake/verify_rcov'
|
5
|
+
|
6
|
+
namespace :spec do
|
7
|
+
|
8
|
+
desc 'Run all specs with basic output'
|
9
|
+
Spec::Rake::SpecTask.new(:run) do |t|
|
10
|
+
t.ruby_opts = PROJ.ruby_opts
|
11
|
+
t.spec_opts = PROJ.spec.opts
|
12
|
+
t.spec_files = PROJ.spec.files
|
13
|
+
t.libs += PROJ.libs
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Run all specs with text output'
|
17
|
+
Spec::Rake::SpecTask.new(:specdoc) do |t|
|
18
|
+
t.ruby_opts = PROJ.ruby_opts
|
19
|
+
t.spec_opts = PROJ.spec.opts + ['--format', 'specdoc']
|
20
|
+
t.spec_files = PROJ.spec.files
|
21
|
+
t.libs += PROJ.libs
|
22
|
+
end
|
23
|
+
|
24
|
+
if HAVE_RCOV
|
25
|
+
desc 'Run all specs with RCov'
|
26
|
+
Spec::Rake::SpecTask.new(:rcov) do |t|
|
27
|
+
t.ruby_opts = PROJ.ruby_opts
|
28
|
+
t.spec_opts = PROJ.spec.opts
|
29
|
+
t.spec_files = PROJ.spec.files
|
30
|
+
t.libs += PROJ.libs
|
31
|
+
t.rcov = true
|
32
|
+
t.rcov_dir = PROJ.rcov.dir
|
33
|
+
t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
|
34
|
+
end
|
35
|
+
|
36
|
+
RCov::VerifyTask.new(:verify) do |t|
|
37
|
+
t.threshold = PROJ.rcov.threshold
|
38
|
+
t.index_html = File.join(PROJ.rcov.dir, 'index.html')
|
39
|
+
t.require_exact_threshold = PROJ.rcov.threshold_exact
|
40
|
+
end
|
41
|
+
|
42
|
+
task :verify => :rcov
|
43
|
+
remove_desc_for_task %w(spec:clobber_rcov)
|
44
|
+
end
|
45
|
+
|
46
|
+
end # namespace :spec
|
47
|
+
|
48
|
+
desc 'Alias to spec:run'
|
49
|
+
task :spec => 'spec:run'
|
50
|
+
|
51
|
+
task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
|
52
|
+
|
53
|
+
end # if HAVE_SPEC_RAKE_SPECTASK
|
54
|
+
|
55
|
+
# EOF
|
data/tasks/svn.rake
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
if HAVE_SVN
|
4
|
-
|
5
|
-
unless PROJ.svn.root
|
6
|
-
info = %x/svn info ./
|
7
|
-
m = %r/^Repository Root:\s+(.*)$/.match(info)
|
8
|
-
PROJ.svn.root = (m.nil? ? '' : m[1])
|
9
|
-
end
|
10
|
-
PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
|
11
|
-
|
12
|
-
namespace :svn do
|
13
|
-
|
14
|
-
# A prerequisites task that all other tasks depend upon
|
15
|
-
task :prereqs
|
16
|
-
|
17
|
-
desc 'Show tags from the SVN repository'
|
18
|
-
task :show_tags => 'svn:prereqs' do |t|
|
19
|
-
tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
|
20
|
-
tags.gsub!(%r/\/$/, '')
|
21
|
-
tags = tags.split("\n").sort {|a,b| b <=> a}
|
22
|
-
puts tags
|
23
|
-
end
|
24
|
-
|
25
|
-
desc 'Create a new tag in the SVN repository'
|
26
|
-
task :create_tag => 'svn:prereqs' do |t|
|
27
|
-
v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
|
28
|
-
abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
|
29
|
-
|
30
|
-
svn = PROJ.svn
|
31
|
-
trunk = File.join(svn.root, svn.trunk)
|
32
|
-
tag = "%s-%s" % [PROJ.name, PROJ.version]
|
33
|
-
tag = File.join(svn.root, svn.tags, tag)
|
34
|
-
msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
|
35
|
-
|
36
|
-
puts "Creating SVN tag '#{tag}'"
|
37
|
-
unless system "svn cp -m '#{msg}' #{trunk} #{tag}"
|
38
|
-
abort "Tag creation failed"
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
end # namespace :svn
|
43
|
-
|
44
|
-
task 'gem:release' => 'svn:create_tag'
|
45
|
-
|
46
|
-
end # if PROJ.svn.path
|
47
|
-
|
48
|
-
# EOF
|
1
|
+
# $Id$
|
2
|
+
|
3
|
+
if HAVE_SVN
|
4
|
+
|
5
|
+
unless PROJ.svn.root
|
6
|
+
info = %x/svn info ./
|
7
|
+
m = %r/^Repository Root:\s+(.*)$/.match(info)
|
8
|
+
PROJ.svn.root = (m.nil? ? '' : m[1])
|
9
|
+
end
|
10
|
+
PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
|
11
|
+
|
12
|
+
namespace :svn do
|
13
|
+
|
14
|
+
# A prerequisites task that all other tasks depend upon
|
15
|
+
task :prereqs
|
16
|
+
|
17
|
+
desc 'Show tags from the SVN repository'
|
18
|
+
task :show_tags => 'svn:prereqs' do |t|
|
19
|
+
tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
|
20
|
+
tags.gsub!(%r/\/$/, '')
|
21
|
+
tags = tags.split("\n").sort {|a,b| b <=> a}
|
22
|
+
puts tags
|
23
|
+
end
|
24
|
+
|
25
|
+
desc 'Create a new tag in the SVN repository'
|
26
|
+
task :create_tag => 'svn:prereqs' do |t|
|
27
|
+
v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
|
28
|
+
abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
|
29
|
+
|
30
|
+
svn = PROJ.svn
|
31
|
+
trunk = File.join(svn.root, svn.trunk)
|
32
|
+
tag = "%s-%s" % [PROJ.name, PROJ.version]
|
33
|
+
tag = File.join(svn.root, svn.tags, tag)
|
34
|
+
msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
|
35
|
+
|
36
|
+
puts "Creating SVN tag '#{tag}'"
|
37
|
+
unless system "svn cp -m '#{msg}' #{trunk} #{tag}"
|
38
|
+
abort "Tag creation failed"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end # namespace :svn
|
43
|
+
|
44
|
+
task 'gem:release' => 'svn:create_tag'
|
45
|
+
|
46
|
+
end # if PROJ.svn.path
|
47
|
+
|
48
|
+
# EOF
|
data/tasks/test.rake
CHANGED
@@ -1,38 +1,38 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
require 'rake/testtask'
|
4
|
-
|
5
|
-
namespace :test do
|
6
|
-
|
7
|
-
Rake::TestTask.new(:run) do |t|
|
8
|
-
t.libs = PROJ.libs
|
9
|
-
t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
|
10
|
-
else PROJ.test.files end
|
11
|
-
t.ruby_opts += PROJ.ruby_opts
|
12
|
-
t.ruby_opts += PROJ.test.opts
|
13
|
-
end
|
14
|
-
|
15
|
-
if HAVE_RCOV
|
16
|
-
desc 'Run rcov on the unit tests'
|
17
|
-
task :rcov => :clobber_rcov do
|
18
|
-
opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
|
19
|
-
opts = opts.join(' ')
|
20
|
-
files = if test(?f, PROJ.test.file) then [PROJ.test.file]
|
21
|
-
else PROJ.test.files end
|
22
|
-
files = files.join(' ')
|
23
|
-
sh "#{RCOV} #{files} #{opts}"
|
24
|
-
end
|
25
|
-
|
26
|
-
task :clobber_rcov do
|
27
|
-
rm_r 'coverage' rescue nil
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
end # namespace :test
|
32
|
-
|
33
|
-
desc 'Alias to test:run'
|
34
|
-
task :test => 'test:run'
|
35
|
-
|
36
|
-
task :clobber => 'test:clobber_rcov' if HAVE_RCOV
|
37
|
-
|
38
|
-
# EOF
|
1
|
+
# $Id$
|
2
|
+
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
namespace :test do
|
6
|
+
|
7
|
+
Rake::TestTask.new(:run) do |t|
|
8
|
+
t.libs = PROJ.libs
|
9
|
+
t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
|
10
|
+
else PROJ.test.files end
|
11
|
+
t.ruby_opts += PROJ.ruby_opts
|
12
|
+
t.ruby_opts += PROJ.test.opts
|
13
|
+
end
|
14
|
+
|
15
|
+
if HAVE_RCOV
|
16
|
+
desc 'Run rcov on the unit tests'
|
17
|
+
task :rcov => :clobber_rcov do
|
18
|
+
opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
|
19
|
+
opts = opts.join(' ')
|
20
|
+
files = if test(?f, PROJ.test.file) then [PROJ.test.file]
|
21
|
+
else PROJ.test.files end
|
22
|
+
files = files.join(' ')
|
23
|
+
sh "#{RCOV} #{files} #{opts}"
|
24
|
+
end
|
25
|
+
|
26
|
+
task :clobber_rcov do
|
27
|
+
rm_r 'coverage' rescue nil
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end # namespace :test
|
32
|
+
|
33
|
+
desc 'Alias to test:run'
|
34
|
+
task :test => 'test:run'
|
35
|
+
|
36
|
+
task :clobber => 'test:clobber_rcov' if HAVE_RCOV
|
37
|
+
|
38
|
+
# EOF
|
data/test/vars.hot
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
>>_vars
|
2
|
-
-!
|
3
|
-
$$
|
4
|
-
nm=$:
|
5
|
-
id=$#
|
6
|
-
cl=$.
|
7
|
-
at=$@
|
8
|
-
|
9
|
-
>>_var2
|
10
|
-
-!
|
11
|
-
$$
|
12
|
-
nm=*:
|
13
|
-
id=*#
|
14
|
-
cl=*.
|
15
|
-
at=*@
|
16
|
-
|
17
|
-
>>_var3
|
18
|
-
-!
|
19
|
-
*all*
|
20
|
-
*name*
|
21
|
-
*id*
|
22
|
-
*class*
|
23
|
-
*@
|
24
|
-
|
25
|
-
>>_var4
|
26
|
-
$me
|
27
|
-
*code*
|
28
|
-
|
29
|
-
>>_var5
|
30
|
-
$tag
|
1
|
+
>>_vars
|
2
|
+
-!
|
3
|
+
$$
|
4
|
+
nm=$:
|
5
|
+
id=$#
|
6
|
+
cl=$.
|
7
|
+
at=$@
|
8
|
+
|
9
|
+
>>_var2
|
10
|
+
-!
|
11
|
+
$$
|
12
|
+
nm=*:
|
13
|
+
id=*#
|
14
|
+
cl=*.
|
15
|
+
at=*@
|
16
|
+
|
17
|
+
>>_var3
|
18
|
+
-!
|
19
|
+
*all*
|
20
|
+
*name*
|
21
|
+
*id*
|
22
|
+
*class*
|
23
|
+
*@
|
24
|
+
|
25
|
+
>>_var4
|
26
|
+
$me
|
27
|
+
*code*
|
28
|
+
|
29
|
+
>>_var5
|
30
|
+
$tag
|