w2tags 0.9.51 → 0.9.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/COPYING +0 -0
  2. data/LICENSE +0 -0
  3. data/MIT-LICENSE +0 -0
  4. data/Manifest.txt +2 -0
  5. data/README.rdoc +0 -0
  6. data/Rakefile +0 -0
  7. data/VERSION +0 -0
  8. data/bin/w2tags +0 -0
  9. data/doc/ERB.HOT.rdoc +0 -0
  10. data/doc/FAQ.rdoc +0 -0
  11. data/doc/HAML.rdoc +0 -0
  12. data/doc/HOT.rdoc +0 -0
  13. data/doc/History.rdoc +18 -0
  14. data/doc/W2TAGS.rdoc +0 -0
  15. data/example/common.hot +0 -0
  16. data/example/from_readme.erb +0 -0
  17. data/example/from_readme.w2erb +0 -0
  18. data/example/from_w2tags.erb +0 -0
  19. data/example/from_w2tags.w2erb +0 -0
  20. data/example/rails_basic.hot +0 -0
  21. data/hot/erb.hot +0 -12
  22. data/hot/erb_base.hot +4 -50
  23. data/hot/erb_form.hot +0 -0
  24. data/hot/erb_head.hot +0 -0
  25. data/hot/erb_jquery.hot +0 -0
  26. data/hot/erb_merb.hot +0 -0
  27. data/hot/erb_rails.hot +17 -0
  28. data/hot/erb_table.hot +0 -0
  29. data/hot/html.hot +41 -0
  30. data/hot/jquery.hot +0 -0
  31. data/hot/nvelocity.hot +0 -0
  32. data/hot/rails.hot +7 -0
  33. data/hot/rails/sc_zebra.hot +0 -0
  34. data/hot/rails/scaffold.hot +0 -0
  35. data/hot/vm.hot +0 -0
  36. data/hot/vm2.hot +0 -0
  37. data/hot/vm_crud.hot +0 -0
  38. data/hot/vm_popup.hot +0 -0
  39. data/hot/xul.hot +0 -0
  40. data/lib/tags2w.rb +0 -0
  41. data/lib/w2tags.rb +0 -0
  42. data/lib/w2tags/block/block_hot.rb +0 -0
  43. data/lib/w2tags/block/plain_text.rb +0 -0
  44. data/lib/w2tags/block/remark.rb +0 -0
  45. data/lib/w2tags/block/sass.rb +0 -0
  46. data/lib/w2tags/merb_hook.rb +0 -0
  47. data/lib/w2tags/parser.rb +7 -6
  48. data/lib/w2tags/rails_hook.rb +1 -1
  49. data/lib/w2tags/sinatra_hook.rb +0 -0
  50. data/plugins/w2tags/README +0 -0
  51. data/plugins/w2tags/generators/w2scaffold/USAGE +0 -0
  52. data/plugins/w2tags/generators/w2scaffold/templates/controller.rb +0 -0
  53. data/plugins/w2tags/generators/w2scaffold/templates/functional_test.rb +0 -0
  54. data/plugins/w2tags/generators/w2scaffold/templates/helper.rb +0 -0
  55. data/plugins/w2tags/generators/w2scaffold/templates/helper_test.rb +0 -0
  56. data/plugins/w2tags/generators/w2scaffold/templates/layout.html.erb +0 -0
  57. data/plugins/w2tags/generators/w2scaffold/templates/style.css +0 -0
  58. data/plugins/w2tags/generators/w2scaffold/templates/view_edit.html.erb +0 -0
  59. data/plugins/w2tags/generators/w2scaffold/templates/view_edit.html.w2erb +0 -0
  60. data/plugins/w2tags/generators/w2scaffold/templates/view_index.html.erb +0 -0
  61. data/plugins/w2tags/generators/w2scaffold/templates/view_index.html.w2erb +0 -0
  62. data/plugins/w2tags/generators/w2scaffold/templates/view_new.html.erb +0 -0
  63. data/plugins/w2tags/generators/w2scaffold/templates/view_new.html.w2erb +0 -0
  64. data/plugins/w2tags/generators/w2scaffold/templates/view_show.html.erb +0 -0
  65. data/plugins/w2tags/generators/w2scaffold/templates/view_show.html.w2erb +0 -0
  66. data/plugins/w2tags/generators/w2scaffold/w2scaffold_generator.rb +0 -0
  67. data/plugins/w2tags/install.rb +0 -0
  68. data/spec/spec_helper.rb +0 -0
  69. data/spec/w2tags_spec.rb +0 -0
  70. data/tasks/ann.rake +0 -0
  71. data/tasks/bones.rake +0 -0
  72. data/tasks/gem.rake +0 -0
  73. data/tasks/git.rake +0 -0
  74. data/tasks/manifest.rake +0 -0
  75. data/tasks/notes.rake +0 -0
  76. data/tasks/post_load.rake +0 -0
  77. data/tasks/rdoc.rake +0 -0
  78. data/tasks/rubyforge.rake +0 -0
  79. data/tasks/setup.rb +1 -1
  80. data/tasks/spec.rake +0 -0
  81. data/tasks/svn.rake +0 -0
  82. data/tasks/test.rake +0 -0
  83. data/test/enlightning.hot +0 -0
  84. data/test/feature.hot +0 -0
  85. data/test/parser_test.rb +0 -0
  86. data/test/tricky.hot +0 -0
  87. data/test/vars.hot +0 -0
  88. data/test/w2tags_basic_usability.rb +0 -0
  89. data/test/w2tags_enlightning.rb +0 -0
  90. data/test/w2tags_form.rb +0 -0
  91. data/test/w2tags_hot.rb +0 -0
  92. data/test/w2tags_hot_var.rb +0 -0
  93. data/test/w2tags_no_parsing.rb +0 -0
  94. metadata +4 -2
data/COPYING CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/MIT-LICENSE CHANGED
File without changes
data/Manifest.txt CHANGED
@@ -28,10 +28,12 @@ hot/erb_form.hot
28
28
  hot/erb_head.hot
29
29
  hot/erb_jquery.hot
30
30
  hot/erb_merb.hot
31
+ hot/erb_rails.hot
31
32
  hot/erb_table.hot
32
33
  hot/html.hot
33
34
  hot/jquery.hot
34
35
  hot/nvelocity.hot
36
+ hot/rails.hot
35
37
  hot/vm2.hot
36
38
  hot/vm.hot
37
39
  hot/vm_crud.hot
data/README.rdoc CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/VERSION CHANGED
File without changes
data/bin/w2tags CHANGED
File without changes
data/doc/ERB.HOT.rdoc CHANGED
File without changes
data/doc/FAQ.rdoc CHANGED
File without changes
data/doc/HAML.rdoc CHANGED
File without changes
data/doc/HOT.rdoc CHANGED
File without changes
data/doc/History.rdoc CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  Below is a complete listing of changes for each revision of W2TAGS.
4
4
 
5
+ == 0.9.52
6
+
7
+ === Parser
8
+
9
+ Change for auto include hot, if w2tags instance without params run as
10
+ usual, but if supply with params (hot file name without ext), it will
11
+ overwrite auto-hot from params
12
+
13
+ === Rails Hook
14
+
15
+ It will auto-hot 'rails.hot' (inside will include html,erb_base), but
16
+ remember when your source include hot (ex: !hot!dodol), loading sequence
17
+ are: dodol.hot, html.hot, erb_base.hot
18
+
19
+ === HOT
20
+
21
+ consolidate HOT to simplify the loading
22
+
5
23
  == 0.9.5
6
24
 
7
25
  === Command line
data/doc/W2TAGS.rdoc CHANGED
File without changes
data/example/common.hot CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/hot/erb.hot CHANGED
@@ -4,15 +4,3 @@
4
4
 
5
5
  >>finallize
6
6
  ,/
7
-
8
- >>_merb_table
9
- !hot!erb_merb
10
- !hot!erb_table
11
- !hot!erb_jquery
12
-
13
- >>_merb_form
14
- !hot!erb_merb
15
- !hot!erb_form
16
- !hot!erb_jquery
17
-
18
-
data/hot/erb_base.hot CHANGED
@@ -1,15 +1,3 @@
1
- >>_js
2
- %js /javascripts/$0
3
-
4
- >>_css
5
- %css /stylesheets/$0
6
-
7
- >>comment
8
- -!!
9
- <!--
10
- <</
11
- \-->
12
-
13
1
  >>_if
14
2
  - if $0
15
3
  -end
@@ -79,25 +67,18 @@
79
67
  >>_a2
80
68
  %a$${href="=$1"} $0
81
69
 
82
- >>br
70
+ >>_br
83
71
  <br *all**@/>
84
72
 
85
- >>hr
73
+ >>_hr
86
74
  <hr *all**@/>
87
75
 
88
- >>img
76
+ >>_img
89
77
  <img *all*src="$0" ~alt="$1"~ />
90
78
 
91
- >>img=
79
+ >>_img=
92
80
  <img *all*src="=$0" ~alt="$1"~ />
93
81
 
94
- >>html_title
95
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
96
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" >
97
- <head>
98
- <title>$0</title>
99
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
100
-
101
82
  >>p_a
102
83
  %p
103
84
  %a $*
@@ -135,30 +116,3 @@
135
116
  <</
136
117
  %>
137
118
 
138
- >>script
139
- <script *all**@type="text/javascript" charset="utf-8">
140
- %script_end
141
-
142
- >>script_end
143
- <</
144
- </script>
145
-
146
- >>input
147
- <input *all*~value="$0"~/>
148
-
149
- >>text
150
- <input *all*type="text"~value="$0"~/>
151
-
152
- >>submit
153
- <input *all*type="submit"~value="$0"~/>
154
-
155
- >>post
156
- %form$:$#.lelouch.*.{*@method="post"~action="$0"~}
157
-
158
- >>_form_tag
159
- <% form_tag($0) do |$1| %>
160
- -end
161
-
162
- >>_form_for
163
- <% form_for($0) do |$1| %>
164
- -end
data/hot/erb_form.hot CHANGED
File without changes
data/hot/erb_head.hot CHANGED
File without changes
data/hot/erb_jquery.hot CHANGED
File without changes
data/hot/erb_merb.hot CHANGED
File without changes
data/hot/erb_rails.hot ADDED
@@ -0,0 +1,17 @@
1
+ >>_js
2
+ %js /javascripts/$0
3
+
4
+ >>_css
5
+ %css /stylesheets/$0
6
+
7
+ >>_form_tag
8
+ <% form_tag($0) do |$1| %>
9
+ -end
10
+
11
+ >>_form_for
12
+ <% form_for($0) do |$1| %>
13
+ -end
14
+
15
+ >>_content_for
16
+ - content_for $* do
17
+ -end
data/hot/erb_table.hot CHANGED
File without changes
data/hot/html.hot CHANGED
@@ -8,6 +8,13 @@
8
8
  >>finallize
9
9
  ,/
10
10
 
11
+ >>html_title
12
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
13
+ %html{xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"}
14
+ %head
15
+ %title $0
16
+ -utf-8
17
+
11
18
  >>_utf-8
12
19
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
13
20
 
@@ -26,5 +33,39 @@
26
33
  >>_css
27
34
  %css $0
28
35
 
36
+ >>script
37
+ <script *all**@type="text/javascript" charset="utf-8">
38
+ %script_end
39
+ -!
40
+
41
+ >>script_end
42
+ <</
43
+ </script>
44
+
45
+ >>style
46
+ <style>
47
+ %style_end
48
+ -!
49
+
50
+ >>comment
51
+ -!!
52
+ <!--
53
+ <</
54
+ \-->
55
+
56
+ >>style_end
57
+ <</
58
+ </style>
59
+
29
60
  >>input
30
61
  <input *all*~value="$0"~/>
62
+
63
+ >>text
64
+ <input *all*type="text"~value="$0"~/>
65
+
66
+ >>submit
67
+ <input *all*type="submit"~value="$0"~/>
68
+
69
+ >>post
70
+ %form$:$#.lelouch.*.{*@method="post"~action="$0"~}
71
+
data/hot/jquery.hot CHANGED
File without changes
data/hot/nvelocity.hot CHANGED
File without changes
data/hot/rails.hot ADDED
@@ -0,0 +1,7 @@
1
+ >>initialize
2
+ !hot!html
3
+ !hot!erb_base
4
+ !hot!erb_rails
5
+
6
+ >>finallize
7
+ ,/
File without changes
File without changes
data/hot/vm.hot CHANGED
File without changes
data/hot/vm2.hot CHANGED
File without changes
data/hot/vm_crud.hot CHANGED
File without changes
data/hot/vm_popup.hot CHANGED
File without changes
data/hot/xul.hot CHANGED
File without changes
data/lib/tags2w.rb CHANGED
File without changes
data/lib/w2tags.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/w2tags/parser.rb CHANGED
@@ -12,7 +12,7 @@ module W2Tags
12
12
  include *(block.collect{|m|eval("::W2Tags::Block::#{m.to_s}")})
13
13
  #initiall create instance object, default if no arguments will be
14
14
  #target for html
15
- def initialize(ext = 'erb')
15
+ def initialize(mrg = nil)
16
16
  @dbg={
17
17
  :hot =>nil,
18
18
  :stack =>nil,
@@ -30,7 +30,8 @@ module W2Tags
30
30
  /(%)([!]?[ \t\$\w\-&\/:#.%=]+\{.*\}[=]*)~([^\n]*)\n/,
31
31
  /(%)([!]?[ \t\$\w\-&\/:#.%=]+)~([^\n]*)\n/ ]
32
32
  @rgx = nil #current regular expression
33
- @ext = ext #target extension
33
+ @mrg = mrg #another hot to include
34
+ @ext = 'erb' #target extension
34
35
  @hot = 'hot' #source of file hot
35
36
  @src_path= '' #path for source file
36
37
  @silent = false #for test
@@ -155,7 +156,7 @@ module W2Tags
155
156
  @doc_src = []
156
157
  @doc_out = []
157
158
  @tg_hot = {}
158
- merge_tags
159
+ merge_tags @mrg ? @mrg : @ext
159
160
  end
160
161
 
161
162
  #to test parsing on source line and return will be the result,
@@ -281,9 +282,9 @@ module W2Tags
281
282
  # !hot!erb
282
283
  #it will search HOT files in current folder, if it not found
283
284
  #it will search in gem/hot and merging the HOT
284
- def merge_tags
285
- hot1 = "#{@src_path}/#{@ext}.#{@hot}"
286
- hot2 = "#{W2Tags::Dir}/../hot/#{@ext}.#{@hot}"
285
+ def merge_tags(ext)
286
+ hot1 = "#{@src_path}/#{ext}.#{@hot}"
287
+ hot2 = "#{W2Tags::Dir}/../hot/#{ext}.#{@hot}"
287
288
  filehot = hot1 if File.exist?(hot1)
288
289
  filehot = hot2 if File.exist?(hot2)
289
290
  if filehot
@@ -4,7 +4,7 @@ module ActionView
4
4
  else
5
5
  puts 'W2Tags Hooked on Rails 2.3.2 & Up!'
6
6
  class ReloadableTemplate < Template
7
- W2TAGS = W2Tags::Parser.new
7
+ W2TAGS = W2Tags::Parser.new('rails')
8
8
  def mtime
9
9
  src = filename.gsub(/\.erb$/,'.w2erb')
10
10
  W2TAGS.parse_file(src,true,true)
File without changes
File without changes
File without changes
File without changes
data/spec/spec_helper.rb CHANGED
File without changes
data/spec/w2tags_spec.rb CHANGED
File without changes
data/tasks/ann.rake CHANGED
File without changes
data/tasks/bones.rake CHANGED
File without changes
data/tasks/gem.rake CHANGED
File without changes
data/tasks/git.rake CHANGED
File without changes
data/tasks/manifest.rake CHANGED
File without changes
data/tasks/notes.rake CHANGED
File without changes
data/tasks/post_load.rake CHANGED
File without changes
data/tasks/rdoc.rake CHANGED
File without changes
data/tasks/rubyforge.rake CHANGED
File without changes
data/tasks/setup.rb CHANGED
@@ -17,7 +17,7 @@ PROJ = OpenStruct.new(
17
17
  :authors => 'Widi Harsojo',
18
18
  :email => 'wharsojo@gmail.com',
19
19
  :url => "\000",
20
- :version => ENV['VERSION'] || '0.9.51',
20
+ :version => ENV['VERSION'] || '0.9.52',
21
21
  :exclude => %w(tmp$ bak$ ~$ CVS \.svn/ \.git/ ^pkg/),
22
22
  :release_name => ENV['RELEASE'],
23
23
 
data/tasks/spec.rake CHANGED
File without changes
data/tasks/svn.rake CHANGED
File without changes
data/tasks/test.rake CHANGED
File without changes
data/test/enlightning.hot CHANGED
File without changes
data/test/feature.hot CHANGED
File without changes
data/test/parser_test.rb CHANGED
File without changes
data/test/tricky.hot CHANGED
File without changes
data/test/vars.hot CHANGED
File without changes
File without changes
File without changes
data/test/w2tags_form.rb CHANGED
File without changes
data/test/w2tags_hot.rb CHANGED
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w2tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.51
4
+ version: 0.9.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - widi harsojo
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-30 00:00:00 +07:00
12
+ date: 2009-09-30 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -61,10 +61,12 @@ files:
61
61
  - hot/erb_head.hot
62
62
  - hot/erb_jquery.hot
63
63
  - hot/erb_merb.hot
64
+ - hot/erb_rails.hot
64
65
  - hot/erb_table.hot
65
66
  - hot/html.hot
66
67
  - hot/jquery.hot
67
68
  - hot/nvelocity.hot
69
+ - hot/rails.hot
68
70
  - hot/vm2.hot
69
71
  - hot/vm.hot
70
72
  - hot/vm_crud.hot