w2tags 0.9.63 → 0.9.64

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.
Files changed (80) hide show
  1. data/Manifest.txt +83 -82
  2. data/README.rdoc +6 -1
  3. data/VERSION +1 -1
  4. data/bin/w2tags +0 -0
  5. data/lib/w2tags/parser.rb +28 -6
  6. data/lib/w2tags/{rails_hook.rb → rails_hook-2.x.rb} +0 -0
  7. data/lib/w2tags/rails_hook-3.x.rb +29 -0
  8. data/lib/{/w2tags//try//public//css/ → w2tags/try/public/css}/csscolors.css +0 -0
  9. data/lib/{/w2tags//try//public//css/ → w2tags/try/public/css}/jscolors.css +0 -0
  10. data/lib/{/w2tags//try//public//css/ → w2tags/try/public/css}/rubycolors.css +0 -0
  11. data/lib/{/w2tags//try//public//css/ → w2tags/try/public/css}/xmlcolors.css +0 -0
  12. data/lib/{/w2tags//try//public//img/ → w2tags/try/public/img}/loading.gif +0 -0
  13. data/lib/{/w2tags//try//public//javascripts/ → w2tags/try/public/javascripts}/jquery.cluetip.js +0 -0
  14. data/lib/{/w2tags//try//public//javascripts/ → w2tags/try/public/javascripts}/jquery.js +0 -0
  15. data/lib/{/w2tags//try//public//javascripts/ → w2tags/try/public/javascripts}/jquery.live.accordion.js +0 -0
  16. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/codemirror.js +0 -0
  17. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/editor.js +0 -0
  18. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/highlight.js +0 -0
  19. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/mirrorframe.js +0 -0
  20. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/parsecss.js +0 -0
  21. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/parsehtmlmixed.js +0 -0
  22. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/parsejavascript.js +0 -0
  23. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/parsew2tags.js +0 -0
  24. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/parsexml.js +0 -0
  25. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/select.js +0 -0
  26. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/stringstream.js +0 -0
  27. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/tokenize.js +0 -0
  28. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/tokenizejavascript.js +0 -0
  29. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/undo.js +0 -0
  30. data/lib/{/w2tags//try//public//js/ → w2tags/try/public/js}/util.js +0 -0
  31. data/lib/{/w2tags//try//public/ → w2tags/try/public}/skyeight.jpeg +0 -0
  32. data/lib/{/w2tags//try//public//stylesheets//back/ → w2tags/try/public/stylesheets/back}/back_menu.gif +0 -0
  33. data/lib/{/w2tags//try//public//stylesheets//icons/ → w2tags/try/public/stylesheets/icons}/folder-closed.gif +0 -0
  34. data/lib/{/w2tags//try//public//stylesheets//icons/ → w2tags/try/public/stylesheets/icons}/folder-open.gif +0 -0
  35. data/lib/{/w2tags//try//public//stylesheets//icons/ → w2tags/try/public/stylesheets/icons}/leaf.gif +0 -0
  36. data/lib/{/w2tags//try//public//stylesheets/ → w2tags/try/public/stylesheets}/jquery.cluetip.css +0 -0
  37. data/lib/{/w2tags//try//public//stylesheets/ → w2tags/try/public/stylesheets}/jquery.live.accordion.css +0 -0
  38. data/lib/{/w2tags//try//public//w2//basic.w2erb → w2tags/try/public/w2/basic.w2erb.htm} +0 -0
  39. data/lib/{/w2tags//try//public//w2//basic1.w2erb → w2tags/try/public/w2/basic1.w2erb.htm} +0 -0
  40. data/lib/{/w2tags//try//public//w2//basic2.w2erb → w2tags/try/public/w2/basic2.w2erb.htm} +0 -0
  41. data/lib/{/w2tags//try//public//w2//basic3.w2erb → w2tags/try/public/w2/basic3.w2erb.htm} +0 -0
  42. data/lib/{/w2tags//try//public//w2//basic4.w2erb → w2tags/try/public/w2/basic4.w2erb.htm} +0 -0
  43. data/lib/{/w2tags//try//public//w2//check_onhot.w2erb → w2tags/try/public/w2/check_onhot.w2erb.htm} +0 -0
  44. data/lib/{/w2tags//try//public//w2//checkbox.w2erb → w2tags/try/public/w2/checkbox.w2erb.htm} +0 -0
  45. data/lib/{/w2tags//try//public//w2//combo_onhot.w2erb → w2tags/try/public/w2/combo_onhot.w2erb.htm} +0 -0
  46. data/lib/{/w2tags//try//public//w2//combobox.w2erb → w2tags/try/public/w2/combobox.w2erb.htm} +0 -0
  47. data/lib/{/w2tags//try//public//w2//css01.w2erb → w2tags/try/public/w2/css01.w2erb.htm} +0 -0
  48. data/lib/{/w2tags//try//public//w2/ → w2tags/try/public/w2}/demo.hot.html +0 -0
  49. data/lib/{/w2tags//try//public//w2//diet.w2erb → w2tags/try/public/w2/diet.w2erb.htm} +0 -0
  50. data/lib/{/w2tags//try//public//w2//diet1.w2erb → w2tags/try/public/w2/diet1.w2erb.htm} +0 -0
  51. data/lib/{/w2tags//try//public//w2//each.w2erb → w2tags/try/public/w2/each.w2erb.htm} +0 -0
  52. data/lib/{/w2tags//try//public//w2//each2.w2erb → w2tags/try/public/w2/each2.w2erb.htm} +0 -0
  53. data/lib/{/w2tags//try//public//w2/ → w2tags/try/public/w2}/erb_base.hot.html +0 -0
  54. data/lib/{/w2tags//try//public//w2/ → w2tags/try/public/w2}/erb_rails.hot.html +0 -0
  55. data/lib/{/w2tags//try//public//w2/ → w2tags/try/public/w2}/html.hot.html +0 -0
  56. data/lib/{/w2tags//try//public//w2//if.w2erb → w2tags/try/public/w2/if.w2erb.htm} +0 -0
  57. data/lib/{/w2tags//try//public//w2//input.w2erb → w2tags/try/public/w2/input.w2erb.htm} +0 -0
  58. data/lib/{/w2tags//try//public//w2//input_inhot.w2erb → w2tags/try/public/w2/input_inhot.w2erb.htm} +0 -0
  59. data/lib/{/w2tags//try//public//w2//layout.w2erb → w2tags/try/public/w2/layout.w2erb.htm} +0 -0
  60. data/lib/{/w2tags//try//public//w2//layout1.w2erb → w2tags/try/public/w2/layout1.w2erb.htm} +0 -0
  61. data/lib/{/w2tags//try//public//w2//layout2.w2erb → w2tags/try/public/w2/layout2.w2erb.htm} +0 -0
  62. data/lib/{/w2tags//try//public//w2//navigation.w2erb → w2tags/try/public/w2/navigation.w2erb.htm} +0 -0
  63. data/lib/{/w2tags//try//public//w2//nestli.w2erb → w2tags/try/public/w2/nestli.w2erb.htm} +0 -0
  64. data/lib/{/w2tags//try//public//w2//params.erb → w2tags/try/public/w2/params.erb.htm} +0 -0
  65. data/lib/{/w2tags//try//public//w2//params.w2erb → w2tags/try/public/w2/params.w2erb.htm} +0 -0
  66. data/lib/{/w2tags//try//public//w2//popup.w2erb → w2tags/try/public/w2/popup.w2erb.htm} +0 -0
  67. data/lib/{/w2tags//try//public//w2//popup2.w2erb → w2tags/try/public/w2/popup2.w2erb.htm} +0 -0
  68. data/lib/{/w2tags//try//public//w2/ → w2tags/try/public/w2}/rails.hot.html +0 -0
  69. data/lib/{/w2tags//try//public//w2//table_each2.w2erb → w2tags/try/public/w2/table_each2.w2erb.htm} +0 -0
  70. data/lib/{/w2tags//try//public//w2//table_onhot.w2erb → w2tags/try/public/w2/table_onhot.w2erb.htm} +0 -0
  71. data/lib/{/w2tags//try//public//w2//table_simple.w2erb → w2tags/try/public/w2/table_simple.w2erb.htm} +0 -0
  72. data/lib/{/w2tags//try//public//w2/ → w2tags/try/public/w2}/try.rb.hot.html +0 -0
  73. data/lib/{/w2tags//try//public//w2//upload.w2erb → w2tags/try/public/w2/upload.w2erb.htm} +0 -0
  74. data/lib/{/w2tags//try//public//w2//vcard.w2erb → w2tags/try/public/w2/vcard.w2erb.htm} +0 -0
  75. data/lib/{/w2tags//try/ → w2tags/try}/try.rb +0 -0
  76. data/lib/{/w2tags//try//views/ → w2tags/try/views}/index.erb +1 -1
  77. data/lib/{/w2tags//try//views/ → w2tags/try/views}/layout.erb +0 -0
  78. data/lib/{/w2tags//try//views/ → w2tags/try/views}/parse.erb +0 -0
  79. data/tasks/setup.rb +1 -1
  80. metadata +160 -77
@@ -14,94 +14,95 @@ lib/tags2w.rb
14
14
  lib/w2tags.rb
15
15
  lib/w2tags/parser.rb
16
16
  lib/w2tags/merb_hook.rb
17
- lib/w2tags/rails_hook.rb
17
+ lib/w2tags/rails_hook-2.x.rb
18
+ lib/w2tags/rails_hook-3.x.rb
18
19
  lib/w2tags/sinatra_hook.rb
19
20
  lib/w2tags/block/block_hot.rb
20
21
  lib/w2tags/block/plain_text.rb
21
22
  lib/w2tags/block/remark.rb
22
23
  lib/w2tags/block/sass.rb
23
24
  lib/w2tags/try
24
- lib\w2tags\try\public
25
- lib\w2tags\try\try.rb
26
- lib\w2tags\try\views
27
- lib\w2tags\try\public\css
28
- lib\w2tags\try\public\img
29
- lib\w2tags\try\public\javascripts
30
- lib\w2tags\try\public\js
31
- lib\w2tags\try\public\skyeight.jpeg
32
- lib\w2tags\try\public\stylesheets
33
- lib\w2tags\try\public\w2
34
- lib\w2tags\try\public\css\csscolors.css
35
- lib\w2tags\try\public\css\jscolors.css
36
- lib\w2tags\try\public\css\rubycolors.css
37
- lib\w2tags\try\public\css\xmlcolors.css
38
- lib\w2tags\try\public\img\loading.gif
39
- lib\w2tags\try\public\javascripts\jquery.cluetip.js
40
- lib\w2tags\try\public\javascripts\jquery.js
41
- lib\w2tags\try\public\javascripts\jquery.live.accordion.js
42
- lib\w2tags\try\public\js\codemirror.js
43
- lib\w2tags\try\public\js\editor.js
44
- lib\w2tags\try\public\js\highlight.js
45
- lib\w2tags\try\public\js\mirrorframe.js
46
- lib\w2tags\try\public\js\parsecss.js
47
- lib\w2tags\try\public\js\parsehtmlmixed.js
48
- lib\w2tags\try\public\js\parsejavascript.js
49
- lib\w2tags\try\public\js\parsew2tags.js
50
- lib\w2tags\try\public\js\parsexml.js
51
- lib\w2tags\try\public\js\select.js
52
- lib\w2tags\try\public\js\stringstream.js
53
- lib\w2tags\try\public\js\tokenize.js
54
- lib\w2tags\try\public\js\tokenizejavascript.js
55
- lib\w2tags\try\public\js\undo.js
56
- lib\w2tags\try\public\js\util.js
57
- lib\w2tags\try\public\stylesheets\back
58
- lib\w2tags\try\public\stylesheets\icons
59
- lib\w2tags\try\public\stylesheets\jquery.cluetip.css
60
- lib\w2tags\try\public\stylesheets\jquery.live.accordion.css
61
- lib\w2tags\try\public\stylesheets\back\back_menu.gif
62
- lib\w2tags\try\public\stylesheets\icons\folder-closed.gif
63
- lib\w2tags\try\public\stylesheets\icons\folder-open.gif
64
- lib\w2tags\try\public\stylesheets\icons\leaf.gif
65
- lib\w2tags\try\public\w2\basic.w2erb
66
- lib\w2tags\try\public\w2\basic1.w2erb
67
- lib\w2tags\try\public\w2\basic2.w2erb
68
- lib\w2tags\try\public\w2\basic3.w2erb
69
- lib\w2tags\try\public\w2\basic4.w2erb
70
- lib\w2tags\try\public\w2\checkbox.w2erb
71
- lib\w2tags\try\public\w2\check_onhot.w2erb
72
- lib\w2tags\try\public\w2\combobox.w2erb
73
- lib\w2tags\try\public\w2\combo_onhot.w2erb
74
- lib\w2tags\try\public\w2\css01.w2erb
75
- lib\w2tags\try\public\w2\demo.hot.html
76
- lib\w2tags\try\public\w2\diet.w2erb
77
- lib\w2tags\try\public\w2\diet1.w2erb
78
- lib\w2tags\try\public\w2\each.w2erb
79
- lib\w2tags\try\public\w2\each2.w2erb
80
- lib\w2tags\try\public\w2\erb_base.hot.html
81
- lib\w2tags\try\public\w2\erb_rails.hot.html
82
- lib\w2tags\try\public\w2\html.hot.html
83
- lib\w2tags\try\public\w2\if.w2erb
84
- lib\w2tags\try\public\w2\input.w2erb
85
- lib\w2tags\try\public\w2\input_inhot.w2erb
86
- lib\w2tags\try\public\w2\layout.w2erb
87
- lib\w2tags\try\public\w2\layout1.w2erb
88
- lib\w2tags\try\public\w2\layout2.w2erb
89
- lib\w2tags\try\public\w2\navigation.w2erb
90
- lib\w2tags\try\public\w2\nestli.w2erb
91
- lib\w2tags\try\public\w2\params.erb
92
- lib\w2tags\try\public\w2\params.w2erb
93
- lib\w2tags\try\public\w2\popup.w2erb
94
- lib\w2tags\try\public\w2\popup2.w2erb
95
- lib\w2tags\try\public\w2\rails.hot.html
96
- lib\w2tags\try\public\w2\table_each2.w2erb
97
- lib\w2tags\try\public\w2\table_onhot.w2erb
98
- lib\w2tags\try\public\w2\table_simple.w2erb
99
- lib\w2tags\try\public\w2\try.rb.hot.html
100
- lib\w2tags\try\public\w2\upload.w2erb
101
- lib\w2tags\try\public\w2\vcard.w2erb
102
- lib\w2tags\try\views\index.erb
103
- lib\w2tags\try\views\layout.erb
104
- lib\w2tags\try\views\parse.erb
25
+ lib/w2tags/try/public
26
+ lib/w2tags/try/try.rb
27
+ lib/w2tags/try/views
28
+ lib/w2tags/try/public/css
29
+ lib/w2tags/try/public/img
30
+ lib/w2tags/try/public/javascripts
31
+ lib/w2tags/try/public/js
32
+ lib/w2tags/try/public/skyeight.jpeg
33
+ lib/w2tags/try/public/stylesheets
34
+ lib/w2tags/try/public/w2
35
+ lib/w2tags/try/public/css/csscolors.css
36
+ lib/w2tags/try/public/css/jscolors.css
37
+ lib/w2tags/try/public/css/rubycolors.css
38
+ lib/w2tags/try/public/css/xmlcolors.css
39
+ lib/w2tags/try/public/img/loading.gif
40
+ lib/w2tags/try/public/javascripts/jquery.cluetip.js
41
+ lib/w2tags/try/public/javascripts/jquery.js
42
+ lib/w2tags/try/public/javascripts/jquery.live.accordion.js
43
+ lib/w2tags/try/public/js/codemirror.js
44
+ lib/w2tags/try/public/js/editor.js
45
+ lib/w2tags/try/public/js/highlight.js
46
+ lib/w2tags/try/public/js/mirrorframe.js
47
+ lib/w2tags/try/public/js/parsecss.js
48
+ lib/w2tags/try/public/js/parsehtmlmixed.js
49
+ lib/w2tags/try/public/js/parsejavascript.js
50
+ lib/w2tags/try/public/js/parsew2tags.js
51
+ lib/w2tags/try/public/js/parsexml.js
52
+ lib/w2tags/try/public/js/select.js
53
+ lib/w2tags/try/public/js/stringstream.js
54
+ lib/w2tags/try/public/js/tokenize.js
55
+ lib/w2tags/try/public/js/tokenizejavascript.js
56
+ lib/w2tags/try/public/js/undo.js
57
+ lib/w2tags/try/public/js/util.js
58
+ lib/w2tags/try/public/stylesheets/back
59
+ lib/w2tags/try/public/stylesheets/icons
60
+ lib/w2tags/try/public/stylesheets/jquery.cluetip.css
61
+ lib/w2tags/try/public/stylesheets/jquery.live.accordion.css
62
+ lib/w2tags/try/public/stylesheets/back/back_menu.gif
63
+ lib/w2tags/try/public/stylesheets/icons/folder-closed.gif
64
+ lib/w2tags/try/public/stylesheets/icons/folder-open.gif
65
+ lib/w2tags/try/public/stylesheets/icons/leaf.gif
66
+ lib/w2tags/try/public/w2/basic.w2erb.htm
67
+ lib/w2tags/try/public/w2/basic1.w2erb.htm
68
+ lib/w2tags/try/public/w2/basic2.w2erb.htm
69
+ lib/w2tags/try/public/w2/basic3.w2erb.htm
70
+ lib/w2tags/try/public/w2/basic4.w2erb.htm
71
+ lib/w2tags/try/public/w2/checkbox.w2erb.htm
72
+ lib/w2tags/try/public/w2/check_onhot.w2erb.htm
73
+ lib/w2tags/try/public/w2/combobox.w2erb.htm
74
+ lib/w2tags/try/public/w2/combo_onhot.w2erb.htm
75
+ lib/w2tags/try/public/w2/css01.w2erb.htm
76
+ lib/w2tags/try/public/w2/demo.hot.html
77
+ lib/w2tags/try/public/w2/diet.w2erb.htm
78
+ lib/w2tags/try/public/w2/diet1.w2erb.htm
79
+ lib/w2tags/try/public/w2/each.w2erb.htm
80
+ lib/w2tags/try/public/w2/each2.w2erb.htm
81
+ lib/w2tags/try/public/w2/erb_base.hot.html
82
+ lib/w2tags/try/public/w2/erb_rails.hot.html
83
+ lib/w2tags/try/public/w2/html.hot.html
84
+ lib/w2tags/try/public/w2/if.w2erb.htm
85
+ lib/w2tags/try/public/w2/input.w2erb.htm
86
+ lib/w2tags/try/public/w2/input_inhot.w2erb.htm
87
+ lib/w2tags/try/public/w2/layout.w2erb.htm
88
+ lib/w2tags/try/public/w2/layout1.w2erb.htm
89
+ lib/w2tags/try/public/w2/layout2.w2erb.htm
90
+ lib/w2tags/try/public/w2/navigation.w2erb.htm
91
+ lib/w2tags/try/public/w2/nestli.w2erb.htm
92
+ lib/w2tags/try/public/w2/params.erb.htm
93
+ lib/w2tags/try/public/w2/params.w2erb.htm
94
+ lib/w2tags/try/public/w2/popup.w2erb.htm
95
+ lib/w2tags/try/public/w2/popup2.w2erb.htm
96
+ lib/w2tags/try/public/w2/rails.hot.html
97
+ lib/w2tags/try/public/w2/table_each2.w2erb.htm
98
+ lib/w2tags/try/public/w2/table_onhot.w2erb.htm
99
+ lib/w2tags/try/public/w2/table_simple.w2erb.htm
100
+ lib/w2tags/try/public/w2/try.rb.hot.html
101
+ lib/w2tags/try/public/w2/upload.w2erb.htm
102
+ lib/w2tags/try/public/w2/vcard.w2erb.htm
103
+ lib/w2tags/try/views/index.erb
104
+ lib/w2tags/try/views/layout.erb
105
+ lib/w2tags/try/views/parse.erb
105
106
  hot/demo.hot
106
107
  hot/erb.hot
107
108
  hot/erb_base.hot
@@ -244,8 +244,13 @@ get it from commandline "w2tags"
244
244
 
245
245
  add inside file "config/environment.rb" in the bottom:
246
246
 
247
+ # if using rails 2.x
247
248
  require 'w2tags'
248
- require 'w2tags/rails_hook'
249
+ require 'w2tags/rails_hook-2.x'
250
+
251
+ # if using rails 3.x
252
+ require 'w2tags'
253
+ require 'w2tags/rails_hook-3.x'
249
254
 
250
255
  You can automatically add by using commandline "w2tags -rails"
251
256
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.51
1
+ 0.9.64
data/bin/w2tags CHANGED
File without changes
@@ -328,7 +328,7 @@ module W2Tags
328
328
  #in gem/hot and merging the HOT, this command can have multiple
329
329
  #file HOT separate with ";"
330
330
  def merge_hot
331
- if(/!hot! *([\w;]+)([\n])/ =~ @row;@rgx = $~)
331
+ if(/!hot! *([\w;.\/]+)([\n])/ =~ @row;@rgx = $~)
332
332
  hots= @rgx[1].split(';').collect {|x|x+'.'+@hot}
333
333
  rpl = ['']
334
334
  hots.each do |hot|
@@ -475,7 +475,7 @@ module W2Tags
475
475
  rpl = prms[i] ? eval(evl).to_s : ""
476
476
  @new.gsub!(src,rpl)
477
477
  end
478
-
478
+
479
479
  opt_v = Regexp.new('~([^$]*)\\' +x+'([^~]*)~')
480
480
  def_v = Regexp.new('~([^~]+)~\\'+x)
481
481
  if opt_v =~ @new #;p $1
@@ -720,10 +720,7 @@ module W2Tags
720
720
  @new.gsub!(/\n/,"\n#{@spc}")
721
721
  get_dollar(prms,hots[1])
722
722
  @new.gsub!(/\^~\^~\^/,setvar) if setvar #restore SetMem
723
- srcs = @rgx.to_s
724
- @doc_src = @row.gsub(srcs,@new).split("\n")+@doc_src
725
- @row = @doc_src.shift+"\n"
726
- parse_spc
723
+ re_indent(@rgx.to_s)
727
724
  end
728
725
  p "Func>> #{@new}" if @dbg[:parse]
729
726
  else
@@ -738,6 +735,31 @@ module W2Tags
738
735
  @rgx!=nil
739
736
  end
740
737
 
738
+ def re_indent(srcs)
739
+ new_rows = @row.gsub(srcs,@new).split("\n").select {|x|!(/^ *$/=~x)}
740
+ while @doc_src[0] && /^ *$/ =~ @doc_src[0] #remove empty/space line
741
+ @doc_src.shift
742
+ end
743
+ spc_row1 = (/[^ ]/ =~ new_rows[ 0]).to_i
744
+ spc_last = (/[^ ]/ =~ new_rows[-1]).to_i
745
+ spc_adds = spc_last - spc_row1
746
+ #p "SPACE ADD #{spc_row1} #{spc_last} #{(/[^ ]/ =~ @doc_src[0]).to_i}"
747
+ #p new_rows
748
+ #p [@doc_src[0]]
749
+ if spc_adds > 0
750
+ idx = 0
751
+ spc = ' '*spc_adds
752
+ while @doc_src[idx] && (/[^ ]/ =~ @doc_src[idx]).to_i > spc_row1
753
+ @doc_src[idx] = spc + @doc_src[idx]
754
+ idx += 1
755
+ end
756
+ end
757
+ #@doc_src = @row.gsub(srcs,@new).split("\n")+@doc_src
758
+ @doc_src = new_rows + @doc_src
759
+ @row = @doc_src.shift+"\n"
760
+ parse_spc
761
+ end
762
+
741
763
  #internal use call from
742
764
  # get_div
743
765
  # get_input
@@ -0,0 +1,29 @@
1
+ module ActionView
2
+ if Object::RAILS_ENV != "development"
3
+ puts 'W2Tags Only RUN on (RAILS_ENV == "development")'
4
+ else
5
+ puts 'W2Tags Hooked on Rails 3.x !'
6
+ class PathResolver
7
+ W2TAGS = W2Tags::Parser.new('rails')
8
+ def query(path, exts, formats)
9
+ query = File.join(@path, path)
10
+
11
+ exts.each do |ext|
12
+ query << '{' << ext.map {|e| e && ".#{e}" }.join(',') << ',}'
13
+ end
14
+
15
+ query.gsub!(/\{\.html,/, "{.html,.text.html,")
16
+ query.gsub!(/\{\.text,/, "{.text,.text.plain,")
17
+
18
+ Dir[query].reject { |p| File.directory?(p) }.map do |p|
19
+ handler, format = extract_handler_and_format(p, formats)
20
+ W2TAGS.parse_file(p.gsub(/\.erb$/,'.w2erb'),true,true)
21
+ contents = File.open(p, "rb") {|io| io.read }
22
+
23
+ Template.new(contents, File.expand_path(p), handler,
24
+ :virtual_path => path, :format => format)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
File without changes
@@ -180,7 +180,7 @@ $(function(){
180
180
 
181
181
  $('a.load').live('click',function(){
182
182
  $('#load').show();
183
- var loc= "/w2/"+$(this).attr('loc')+".w2erb";
183
+ var loc= "/w2/"+$(this).attr('loc')+".w2erb.htm";
184
184
  $.get(loc, function(data){
185
185
  editor1.setCode(data);
186
186
  $('#load').hide();
@@ -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.63',
20
+ :version => ENV['VERSION'] || '0.9.64',
21
21
  :exclude => %w(tmp$ bak$ ~$ CVS \.svn/ \.git/ ^pkg/),
22
22
  :release_name => ENV['RELEASE'],
23
23
 
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w2tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.63
4
+ hash: 187
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 64
10
+ version: 0.9.64
5
11
  platform: ruby
6
12
  authors:
7
13
  - widi harsojo
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-03 00:00:00 +07:00
18
+ date: 2010-12-15 00:00:00 +07:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -28,6 +34,76 @@ extra_rdoc_files:
28
34
  - doc/History.rdoc
29
35
  - doc/HOT.rdoc
30
36
  - bin/w2tags
37
+ - lib/w2tags/try/public/skyeight.jpeg
38
+ - lib/w2tags/try/public/css/csscolors.css
39
+ - lib/w2tags/try/public/css/jscolors.css
40
+ - lib/w2tags/try/public/css/rubycolors.css
41
+ - lib/w2tags/try/public/css/xmlcolors.css
42
+ - lib/w2tags/try/public/img/loading.gif
43
+ - lib/w2tags/try/public/javascripts/jquery.cluetip.js
44
+ - lib/w2tags/try/public/javascripts/jquery.js
45
+ - lib/w2tags/try/public/javascripts/jquery.live.accordion.js
46
+ - lib/w2tags/try/public/js/codemirror.js
47
+ - lib/w2tags/try/public/js/editor.js
48
+ - lib/w2tags/try/public/js/highlight.js
49
+ - lib/w2tags/try/public/js/mirrorframe.js
50
+ - lib/w2tags/try/public/js/parsecss.js
51
+ - lib/w2tags/try/public/js/parsehtmlmixed.js
52
+ - lib/w2tags/try/public/js/parsejavascript.js
53
+ - lib/w2tags/try/public/js/parsew2tags.js
54
+ - lib/w2tags/try/public/js/parsexml.js
55
+ - lib/w2tags/try/public/js/select.js
56
+ - lib/w2tags/try/public/js/stringstream.js
57
+ - lib/w2tags/try/public/js/tokenize.js
58
+ - lib/w2tags/try/public/js/tokenizejavascript.js
59
+ - lib/w2tags/try/public/js/undo.js
60
+ - lib/w2tags/try/public/js/util.js
61
+ - lib/w2tags/try/public/stylesheets/jquery.cluetip.css
62
+ - lib/w2tags/try/public/stylesheets/jquery.live.accordion.css
63
+ - lib/w2tags/try/public/stylesheets/back/back_menu.gif
64
+ - lib/w2tags/try/public/stylesheets/icons/folder-closed.gif
65
+ - lib/w2tags/try/public/stylesheets/icons/folder-open.gif
66
+ - lib/w2tags/try/public/stylesheets/icons/leaf.gif
67
+ - lib/w2tags/try/public/w2/basic.w2erb.htm
68
+ - lib/w2tags/try/public/w2/basic1.w2erb.htm
69
+ - lib/w2tags/try/public/w2/basic2.w2erb.htm
70
+ - lib/w2tags/try/public/w2/basic3.w2erb.htm
71
+ - lib/w2tags/try/public/w2/basic4.w2erb.htm
72
+ - lib/w2tags/try/public/w2/checkbox.w2erb.htm
73
+ - lib/w2tags/try/public/w2/check_onhot.w2erb.htm
74
+ - lib/w2tags/try/public/w2/combobox.w2erb.htm
75
+ - lib/w2tags/try/public/w2/combo_onhot.w2erb.htm
76
+ - lib/w2tags/try/public/w2/css01.w2erb.htm
77
+ - lib/w2tags/try/public/w2/demo.hot.html
78
+ - lib/w2tags/try/public/w2/diet.w2erb.htm
79
+ - lib/w2tags/try/public/w2/diet1.w2erb.htm
80
+ - lib/w2tags/try/public/w2/each.w2erb.htm
81
+ - lib/w2tags/try/public/w2/each2.w2erb.htm
82
+ - lib/w2tags/try/public/w2/erb_base.hot.html
83
+ - lib/w2tags/try/public/w2/erb_rails.hot.html
84
+ - lib/w2tags/try/public/w2/html.hot.html
85
+ - lib/w2tags/try/public/w2/if.w2erb.htm
86
+ - lib/w2tags/try/public/w2/input.w2erb.htm
87
+ - lib/w2tags/try/public/w2/input_inhot.w2erb.htm
88
+ - lib/w2tags/try/public/w2/layout.w2erb.htm
89
+ - lib/w2tags/try/public/w2/layout1.w2erb.htm
90
+ - lib/w2tags/try/public/w2/layout2.w2erb.htm
91
+ - lib/w2tags/try/public/w2/navigation.w2erb.htm
92
+ - lib/w2tags/try/public/w2/nestli.w2erb.htm
93
+ - lib/w2tags/try/public/w2/params.erb.htm
94
+ - lib/w2tags/try/public/w2/params.w2erb.htm
95
+ - lib/w2tags/try/public/w2/popup.w2erb.htm
96
+ - lib/w2tags/try/public/w2/popup2.w2erb.htm
97
+ - lib/w2tags/try/public/w2/rails.hot.html
98
+ - lib/w2tags/try/public/w2/table_each2.w2erb.htm
99
+ - lib/w2tags/try/public/w2/table_onhot.w2erb.htm
100
+ - lib/w2tags/try/public/w2/table_simple.w2erb.htm
101
+ - lib/w2tags/try/public/w2/try.rb.hot.html
102
+ - lib/w2tags/try/public/w2/upload.w2erb.htm
103
+ - lib/w2tags/try/public/w2/vcard.w2erb.htm
104
+ - lib/w2tags/try/views/index.erb
105
+ - lib/w2tags/try/views/layout.erb
106
+ - lib/w2tags/try/views/parse.erb
31
107
  files:
32
108
  - Manifest.txt
33
109
  - README.rdoc
@@ -45,83 +121,84 @@ files:
45
121
  - lib/w2tags.rb
46
122
  - lib/w2tags/parser.rb
47
123
  - lib/w2tags/merb_hook.rb
48
- - lib/w2tags/rails_hook.rb
124
+ - lib/w2tags/rails_hook-2.x.rb
125
+ - lib/w2tags/rails_hook-3.x.rb
49
126
  - lib/w2tags/sinatra_hook.rb
50
127
  - lib/w2tags/block/block_hot.rb
51
128
  - lib/w2tags/block/plain_text.rb
52
129
  - lib/w2tags/block/remark.rb
53
130
  - lib/w2tags/block/sass.rb
54
- - lib\w2tags\try\try.rb
55
- - lib\w2tags\try\public\skyeight.jpeg
56
- - lib\w2tags\try\public\css\csscolors.css
57
- - lib\w2tags\try\public\css\jscolors.css
58
- - lib\w2tags\try\public\css\rubycolors.css
59
- - lib\w2tags\try\public\css\xmlcolors.css
60
- - lib\w2tags\try\public\img\loading.gif
61
- - lib\w2tags\try\public\javascripts\jquery.cluetip.js
62
- - lib\w2tags\try\public\javascripts\jquery.js
63
- - lib\w2tags\try\public\javascripts\jquery.live.accordion.js
64
- - lib\w2tags\try\public\js\codemirror.js
65
- - lib\w2tags\try\public\js\editor.js
66
- - lib\w2tags\try\public\js\highlight.js
67
- - lib\w2tags\try\public\js\mirrorframe.js
68
- - lib\w2tags\try\public\js\parsecss.js
69
- - lib\w2tags\try\public\js\parsehtmlmixed.js
70
- - lib\w2tags\try\public\js\parsejavascript.js
71
- - lib\w2tags\try\public\js\parsew2tags.js
72
- - lib\w2tags\try\public\js\parsexml.js
73
- - lib\w2tags\try\public\js\select.js
74
- - lib\w2tags\try\public\js\stringstream.js
75
- - lib\w2tags\try\public\js\tokenize.js
76
- - lib\w2tags\try\public\js\tokenizejavascript.js
77
- - lib\w2tags\try\public\js\undo.js
78
- - lib\w2tags\try\public\js\util.js
79
- - lib\w2tags\try\public\stylesheets\jquery.cluetip.css
80
- - lib\w2tags\try\public\stylesheets\jquery.live.accordion.css
81
- - lib\w2tags\try\public\stylesheets\back\back_menu.gif
82
- - lib\w2tags\try\public\stylesheets\icons\folder-closed.gif
83
- - lib\w2tags\try\public\stylesheets\icons\folder-open.gif
84
- - lib\w2tags\try\public\stylesheets\icons\leaf.gif
85
- - lib\w2tags\try\public\w2\basic.w2erb
86
- - lib\w2tags\try\public\w2\basic1.w2erb
87
- - lib\w2tags\try\public\w2\basic2.w2erb
88
- - lib\w2tags\try\public\w2\basic3.w2erb
89
- - lib\w2tags\try\public\w2\basic4.w2erb
90
- - lib\w2tags\try\public\w2\checkbox.w2erb
91
- - lib\w2tags\try\public\w2\check_onhot.w2erb
92
- - lib\w2tags\try\public\w2\combobox.w2erb
93
- - lib\w2tags\try\public\w2\combo_onhot.w2erb
94
- - lib\w2tags\try\public\w2\css01.w2erb
95
- - lib\w2tags\try\public\w2\demo.hot.html
96
- - lib\w2tags\try\public\w2\diet.w2erb
97
- - lib\w2tags\try\public\w2\diet1.w2erb
98
- - lib\w2tags\try\public\w2\each.w2erb
99
- - lib\w2tags\try\public\w2\each2.w2erb
100
- - lib\w2tags\try\public\w2\erb_base.hot.html
101
- - lib\w2tags\try\public\w2\erb_rails.hot.html
102
- - lib\w2tags\try\public\w2\html.hot.html
103
- - lib\w2tags\try\public\w2\if.w2erb
104
- - lib\w2tags\try\public\w2\input.w2erb
105
- - lib\w2tags\try\public\w2\input_inhot.w2erb
106
- - lib\w2tags\try\public\w2\layout.w2erb
107
- - lib\w2tags\try\public\w2\layout1.w2erb
108
- - lib\w2tags\try\public\w2\layout2.w2erb
109
- - lib\w2tags\try\public\w2\navigation.w2erb
110
- - lib\w2tags\try\public\w2\nestli.w2erb
111
- - lib\w2tags\try\public\w2\params.erb
112
- - lib\w2tags\try\public\w2\params.w2erb
113
- - lib\w2tags\try\public\w2\popup.w2erb
114
- - lib\w2tags\try\public\w2\popup2.w2erb
115
- - lib\w2tags\try\public\w2\rails.hot.html
116
- - lib\w2tags\try\public\w2\table_each2.w2erb
117
- - lib\w2tags\try\public\w2\table_onhot.w2erb
118
- - lib\w2tags\try\public\w2\table_simple.w2erb
119
- - lib\w2tags\try\public\w2\try.rb.hot.html
120
- - lib\w2tags\try\public\w2\upload.w2erb
121
- - lib\w2tags\try\public\w2\vcard.w2erb
122
- - lib\w2tags\try\views\index.erb
123
- - lib\w2tags\try\views\layout.erb
124
- - lib\w2tags\try\views\parse.erb
131
+ - lib/w2tags/try/try.rb
132
+ - lib/w2tags/try/public/skyeight.jpeg
133
+ - lib/w2tags/try/public/css/csscolors.css
134
+ - lib/w2tags/try/public/css/jscolors.css
135
+ - lib/w2tags/try/public/css/rubycolors.css
136
+ - lib/w2tags/try/public/css/xmlcolors.css
137
+ - lib/w2tags/try/public/img/loading.gif
138
+ - lib/w2tags/try/public/javascripts/jquery.cluetip.js
139
+ - lib/w2tags/try/public/javascripts/jquery.js
140
+ - lib/w2tags/try/public/javascripts/jquery.live.accordion.js
141
+ - lib/w2tags/try/public/js/codemirror.js
142
+ - lib/w2tags/try/public/js/editor.js
143
+ - lib/w2tags/try/public/js/highlight.js
144
+ - lib/w2tags/try/public/js/mirrorframe.js
145
+ - lib/w2tags/try/public/js/parsecss.js
146
+ - lib/w2tags/try/public/js/parsehtmlmixed.js
147
+ - lib/w2tags/try/public/js/parsejavascript.js
148
+ - lib/w2tags/try/public/js/parsew2tags.js
149
+ - lib/w2tags/try/public/js/parsexml.js
150
+ - lib/w2tags/try/public/js/select.js
151
+ - lib/w2tags/try/public/js/stringstream.js
152
+ - lib/w2tags/try/public/js/tokenize.js
153
+ - lib/w2tags/try/public/js/tokenizejavascript.js
154
+ - lib/w2tags/try/public/js/undo.js
155
+ - lib/w2tags/try/public/js/util.js
156
+ - lib/w2tags/try/public/stylesheets/jquery.cluetip.css
157
+ - lib/w2tags/try/public/stylesheets/jquery.live.accordion.css
158
+ - lib/w2tags/try/public/stylesheets/back/back_menu.gif
159
+ - lib/w2tags/try/public/stylesheets/icons/folder-closed.gif
160
+ - lib/w2tags/try/public/stylesheets/icons/folder-open.gif
161
+ - lib/w2tags/try/public/stylesheets/icons/leaf.gif
162
+ - lib/w2tags/try/public/w2/basic.w2erb.htm
163
+ - lib/w2tags/try/public/w2/basic1.w2erb.htm
164
+ - lib/w2tags/try/public/w2/basic2.w2erb.htm
165
+ - lib/w2tags/try/public/w2/basic3.w2erb.htm
166
+ - lib/w2tags/try/public/w2/basic4.w2erb.htm
167
+ - lib/w2tags/try/public/w2/checkbox.w2erb.htm
168
+ - lib/w2tags/try/public/w2/check_onhot.w2erb.htm
169
+ - lib/w2tags/try/public/w2/combobox.w2erb.htm
170
+ - lib/w2tags/try/public/w2/combo_onhot.w2erb.htm
171
+ - lib/w2tags/try/public/w2/css01.w2erb.htm
172
+ - lib/w2tags/try/public/w2/demo.hot.html
173
+ - lib/w2tags/try/public/w2/diet.w2erb.htm
174
+ - lib/w2tags/try/public/w2/diet1.w2erb.htm
175
+ - lib/w2tags/try/public/w2/each.w2erb.htm
176
+ - lib/w2tags/try/public/w2/each2.w2erb.htm
177
+ - lib/w2tags/try/public/w2/erb_base.hot.html
178
+ - lib/w2tags/try/public/w2/erb_rails.hot.html
179
+ - lib/w2tags/try/public/w2/html.hot.html
180
+ - lib/w2tags/try/public/w2/if.w2erb.htm
181
+ - lib/w2tags/try/public/w2/input.w2erb.htm
182
+ - lib/w2tags/try/public/w2/input_inhot.w2erb.htm
183
+ - lib/w2tags/try/public/w2/layout.w2erb.htm
184
+ - lib/w2tags/try/public/w2/layout1.w2erb.htm
185
+ - lib/w2tags/try/public/w2/layout2.w2erb.htm
186
+ - lib/w2tags/try/public/w2/navigation.w2erb.htm
187
+ - lib/w2tags/try/public/w2/nestli.w2erb.htm
188
+ - lib/w2tags/try/public/w2/params.erb.htm
189
+ - lib/w2tags/try/public/w2/params.w2erb.htm
190
+ - lib/w2tags/try/public/w2/popup.w2erb.htm
191
+ - lib/w2tags/try/public/w2/popup2.w2erb.htm
192
+ - lib/w2tags/try/public/w2/rails.hot.html
193
+ - lib/w2tags/try/public/w2/table_each2.w2erb.htm
194
+ - lib/w2tags/try/public/w2/table_onhot.w2erb.htm
195
+ - lib/w2tags/try/public/w2/table_simple.w2erb.htm
196
+ - lib/w2tags/try/public/w2/try.rb.hot.html
197
+ - lib/w2tags/try/public/w2/upload.w2erb.htm
198
+ - lib/w2tags/try/public/w2/vcard.w2erb.htm
199
+ - lib/w2tags/try/views/index.erb
200
+ - lib/w2tags/try/views/layout.erb
201
+ - lib/w2tags/try/views/parse.erb
125
202
  - hot/demo.hot
126
203
  - hot/erb.hot
127
204
  - hot/erb_base.hot
@@ -197,21 +274,27 @@ rdoc_options:
197
274
  require_paths:
198
275
  - lib
199
276
  required_ruby_version: !ruby/object:Gem::Requirement
277
+ none: false
200
278
  requirements:
201
279
  - - ">="
202
280
  - !ruby/object:Gem::Version
281
+ hash: 3
282
+ segments:
283
+ - 0
203
284
  version: "0"
204
- version:
205
285
  required_rubygems_version: !ruby/object:Gem::Requirement
286
+ none: false
206
287
  requirements:
207
288
  - - ">="
208
289
  - !ruby/object:Gem::Version
290
+ hash: 3
291
+ segments:
292
+ - 0
209
293
  version: "0"
210
- version:
211
294
  requirements: []
212
295
 
213
296
  rubyforge_project: w2tags
214
- rubygems_version: 1.3.5
297
+ rubygems_version: 1.3.7
215
298
  signing_key:
216
299
  specification_version: 3
217
300
  summary: Its Way to Tags