zucker 8 → 9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. data/CHANGELOG +14 -0
  2. data/MIT-LICENSE +1 -1
  3. data/README +1 -1
  4. data/Rakefile +33 -40
  5. data/desc/alias_for.yaml +17 -0
  6. data/desc/aliases.yaml +18 -0
  7. data/desc/array.yaml +13 -0
  8. data/desc/array_to_proc.yaml +16 -0
  9. data/desc/binding.yaml +22 -0
  10. data/desc/blank.yaml +9 -0
  11. data/desc/cc.yaml +10 -0
  12. data/desc/class_to_proc.yaml +11 -0
  13. data/desc/dd.yaml +23 -0
  14. data/desc/egonil.yaml +15 -0
  15. data/desc/engine.yaml +15 -0
  16. data/desc/enumerable.yaml +10 -0
  17. data/desc/file.yaml +15 -0
  18. data/desc/hash.yaml +14 -0
  19. data/desc/hash_to_proc.yaml +10 -0
  20. data/desc/info.yaml +20 -0
  21. data/desc/iterate.yaml +16 -0
  22. data/desc/ivars.yaml +19 -0
  23. data/desc/kernel.yaml +14 -0
  24. data/desc/mcopy.yaml +11 -0
  25. data/desc/mm.yaml +15 -0
  26. data/desc/not.yaml +11 -0
  27. data/desc/oo.yaml +10 -0
  28. data/desc/os.yaml +19 -0
  29. data/desc/qq.yaml +11 -0
  30. data/desc/regexp_to_proc.yaml +12 -0
  31. data/desc/regexp_visualize.yaml +23 -0
  32. data/desc/sandbox.yaml +12 -0
  33. data/desc/square_brackets_for.yaml +22 -0
  34. data/desc/string.yaml +23 -0
  35. data/desc/tap.yaml +17 -0
  36. data/desc/unary.yaml +15 -0
  37. data/desc/union.yaml +10 -0
  38. data/desc/version.yaml +28 -0
  39. data/doc/zucker_doc.html +2688 -0
  40. data/doc/zucker_doc.rb +553 -0
  41. data/lib/zucker.rb +10 -9
  42. data/lib/zucker/array2proc.rb +2 -18
  43. data/lib/zucker/{2/array2proc.rb → array_to_proc.rb} +0 -0
  44. data/lib/zucker/binding.rb +4 -5
  45. data/lib/zucker/cc.rb +7 -2
  46. data/lib/zucker/class2proc.rb +2 -12
  47. data/lib/zucker/{1/class2proc.rb → class_to_proc.rb} +0 -0
  48. data/lib/zucker/file.rb +22 -0
  49. data/lib/zucker/hash2proc.rb +2 -16
  50. data/lib/zucker/{1/hash2proc.rb → hash_to_proc.rb} +0 -0
  51. data/lib/zucker/kernel.rb +4 -2
  52. data/lib/zucker/mm.rb +14 -8
  53. data/lib/zucker/regexp2proc.rb +2 -12
  54. data/lib/zucker/{1/regexp2proc.rb → regexp_to_proc.rb} +0 -0
  55. data/lib/zucker/regexp_visualize.rb +26 -0
  56. data/lib/zucker/sandbox.rb +1 -11
  57. data/spec/alias_for_spec.rb +117 -0
  58. data/spec/aliases_spec.rb +13 -0
  59. data/spec/array_spec.rb +23 -0
  60. data/spec/array_to_proc_spec.rb +12 -0
  61. data/spec/binding_spec.rb +6 -0
  62. data/spec/blank_spec.rb +20 -0
  63. data/spec/cc_spec.rb +6 -0
  64. data/spec/class_to_proc_spec.rb +9 -0
  65. data/spec/dd_spec.rb +37 -0
  66. data/spec/egonil_spec.rb +32 -0
  67. data/spec/engine_spec.rb +11 -0
  68. data/spec/enumerable_spec.rb +8 -0
  69. data/spec/file_spec.rb +30 -0
  70. data/spec/hash_spec.rb +25 -0
  71. data/spec/hash_to_proc_spec.rb +12 -0
  72. data/spec/info_spec.rb +8 -0
  73. data/spec/iterate_spec.rb +59 -0
  74. data/spec/ivars_spec.rb +20 -0
  75. data/spec/kernel_spec.rb +37 -0
  76. data/spec/mcopy_spec.rb +13 -0
  77. data/spec/mm_spec.rb +6 -0
  78. data/spec/not_spec.rb +12 -0
  79. data/spec/oo_spec.rb +6 -0
  80. data/spec/os_spec.rb +37 -0
  81. data/spec/qq_spec.rb +19 -0
  82. data/spec/regexp_to_proc_spec.rb +9 -0
  83. data/spec/regexp_visualize_spec.rb +38 -0
  84. data/spec/sandbox_spec.rb +12 -0
  85. data/spec/spec_helper.rb +18 -0
  86. data/spec/square_brackets_for_spec.rb +59 -0
  87. data/spec/string_spec.rb +65 -0
  88. data/spec/tap_spec.rb +18 -0
  89. data/spec/unary_spec.rb +26 -0
  90. data/spec/union_spec.rb +17 -0
  91. data/spec/version_spec.rb +55 -0
  92. data/zucker.gemspec +21 -0
  93. metadata +139 -323
  94. data/lib/zucker/1/D.rb +0 -21
  95. data/lib/zucker/1/aliases.rb +0 -30
  96. data/lib/zucker/1/all.rb +0 -8
  97. data/lib/zucker/1/array.rb +0 -19
  98. data/lib/zucker/1/array2proc.rb +0 -12
  99. data/lib/zucker/1/binding.rb +0 -27
  100. data/lib/zucker/1/blank.rb +0 -28
  101. data/lib/zucker/1/debug.rb +0 -6
  102. data/lib/zucker/1/default.rb +0 -27
  103. data/lib/zucker/1/egonil.rb +0 -16
  104. data/lib/zucker/1/enumerable.rb +0 -14
  105. data/lib/zucker/1/hash.rb +0 -21
  106. data/lib/zucker/1/iterate.rb +0 -25
  107. data/lib/zucker/1/ivars.rb +0 -28
  108. data/lib/zucker/1/kernel.rb +0 -22
  109. data/lib/zucker/1/mcopy.rb +0 -11
  110. data/lib/zucker/1/mm.rb +0 -33
  111. data/lib/zucker/1/sandbox.rb +0 -17
  112. data/lib/zucker/1/square_brackets_for.rb +0 -22
  113. data/lib/zucker/1/string.rb +0 -27
  114. data/lib/zucker/1/unary.rb +0 -24
  115. data/lib/zucker/1/union.rb +0 -16
  116. data/lib/zucker/2/D.rb +0 -21
  117. data/lib/zucker/2/aliases.rb +0 -30
  118. data/lib/zucker/2/all.rb +0 -8
  119. data/lib/zucker/2/array.rb +0 -19
  120. data/lib/zucker/2/binding.rb +0 -27
  121. data/lib/zucker/2/blank.rb +0 -28
  122. data/lib/zucker/2/class2proc.rb +0 -12
  123. data/lib/zucker/2/debug.rb +0 -6
  124. data/lib/zucker/2/default.rb +0 -27
  125. data/lib/zucker/2/egonil.rb +0 -16
  126. data/lib/zucker/2/enumerable.rb +0 -14
  127. data/lib/zucker/2/hash.rb +0 -21
  128. data/lib/zucker/2/hash2proc.rb +0 -16
  129. data/lib/zucker/2/info.rb +0 -166
  130. data/lib/zucker/2/iterate.rb +0 -25
  131. data/lib/zucker/2/ivars.rb +0 -28
  132. data/lib/zucker/2/kernel.rb +0 -20
  133. data/lib/zucker/2/mcopy.rb +0 -11
  134. data/lib/zucker/2/mm.rb +0 -33
  135. data/lib/zucker/2/regexp2proc.rb +0 -12
  136. data/lib/zucker/2/sandbox.rb +0 -21
  137. data/lib/zucker/2/square_brackets_for.rb +0 -22
  138. data/lib/zucker/2/string.rb +0 -27
  139. data/lib/zucker/2/unary.rb +0 -24
  140. data/lib/zucker/2/union.rb +0 -16
  141. data/lib/zucker/3/D.rb +0 -21
  142. data/lib/zucker/3/alias_for.rb +0 -21
  143. data/lib/zucker/3/aliases.rb +0 -30
  144. data/lib/zucker/3/all.rb +0 -8
  145. data/lib/zucker/3/array.rb +0 -25
  146. data/lib/zucker/3/array2proc.rb +0 -18
  147. data/lib/zucker/3/binding.rb +0 -27
  148. data/lib/zucker/3/blank.rb +0 -28
  149. data/lib/zucker/3/class2proc.rb +0 -12
  150. data/lib/zucker/3/debug.rb +0 -8
  151. data/lib/zucker/3/default.rb +0 -37
  152. data/lib/zucker/3/egonil.rb +0 -16
  153. data/lib/zucker/3/enumerable.rb +0 -14
  154. data/lib/zucker/3/hash.rb +0 -21
  155. data/lib/zucker/3/hash2proc.rb +0 -16
  156. data/lib/zucker/3/info.rb +0 -169
  157. data/lib/zucker/3/iterate.rb +0 -25
  158. data/lib/zucker/3/ivars.rb +0 -28
  159. data/lib/zucker/3/kernel.rb +0 -50
  160. data/lib/zucker/3/mcopy.rb +0 -10
  161. data/lib/zucker/3/mm.rb +0 -33
  162. data/lib/zucker/3/not.rb +0 -19
  163. data/lib/zucker/3/regexp2proc.rb +0 -12
  164. data/lib/zucker/3/sandbox.rb +0 -21
  165. data/lib/zucker/3/square_brackets_for.rb +0 -22
  166. data/lib/zucker/3/string.rb +0 -49
  167. data/lib/zucker/3/tap.rb +0 -11
  168. data/lib/zucker/3/unary.rb +0 -24
  169. data/lib/zucker/3/union.rb +0 -16
  170. data/lib/zucker/4/D.rb +0 -21
  171. data/lib/zucker/4/alias_for.rb +0 -21
  172. data/lib/zucker/4/aliases.rb +0 -35
  173. data/lib/zucker/4/all.rb +0 -8
  174. data/lib/zucker/4/array.rb +0 -25
  175. data/lib/zucker/4/array2proc.rb +0 -18
  176. data/lib/zucker/4/binding.rb +0 -27
  177. data/lib/zucker/4/blank.rb +0 -28
  178. data/lib/zucker/4/class2proc.rb +0 -12
  179. data/lib/zucker/4/debug.rb +0 -8
  180. data/lib/zucker/4/default.rb +0 -40
  181. data/lib/zucker/4/egonil.rb +0 -16
  182. data/lib/zucker/4/engine.rb +0 -69
  183. data/lib/zucker/4/enumerable.rb +0 -14
  184. data/lib/zucker/4/hash.rb +0 -21
  185. data/lib/zucker/4/hash2proc.rb +0 -16
  186. data/lib/zucker/4/info.rb +0 -173
  187. data/lib/zucker/4/iterate.rb +0 -25
  188. data/lib/zucker/4/ivars.rb +0 -28
  189. data/lib/zucker/4/kernel.rb +0 -27
  190. data/lib/zucker/4/mcopy.rb +0 -10
  191. data/lib/zucker/4/mm.rb +0 -33
  192. data/lib/zucker/4/not.rb +0 -19
  193. data/lib/zucker/4/os.rb +0 -50
  194. data/lib/zucker/4/q.rb +0 -7
  195. data/lib/zucker/4/regexp2proc.rb +0 -12
  196. data/lib/zucker/4/sandbox.rb +0 -23
  197. data/lib/zucker/4/square_brackets_for.rb +0 -22
  198. data/lib/zucker/4/string.rb +0 -54
  199. data/lib/zucker/4/tap.rb +0 -11
  200. data/lib/zucker/4/unary.rb +0 -24
  201. data/lib/zucker/4/union.rb +0 -16
  202. data/lib/zucker/4/version.rb +0 -115
  203. data/lib/zucker/5/alias_for.rb +0 -21
  204. data/lib/zucker/5/aliases.rb +0 -51
  205. data/lib/zucker/5/all.rb +0 -4
  206. data/lib/zucker/5/array.rb +0 -25
  207. data/lib/zucker/5/array2proc.rb +0 -18
  208. data/lib/zucker/5/binding.rb +0 -34
  209. data/lib/zucker/5/blank.rb +0 -28
  210. data/lib/zucker/5/cc.rb +0 -25
  211. data/lib/zucker/5/class2proc.rb +0 -12
  212. data/lib/zucker/5/control.rb +0 -4
  213. data/lib/zucker/5/dd.rb +0 -24
  214. data/lib/zucker/5/debug.rb +0 -4
  215. data/lib/zucker/5/default.rb +0 -4
  216. data/lib/zucker/5/egonil.rb +0 -16
  217. data/lib/zucker/5/engine.rb +0 -69
  218. data/lib/zucker/5/enumerable.rb +0 -14
  219. data/lib/zucker/5/env.rb +0 -4
  220. data/lib/zucker/5/extensions.rb +0 -4
  221. data/lib/zucker/5/hash.rb +0 -27
  222. data/lib/zucker/5/hash2proc.rb +0 -16
  223. data/lib/zucker/5/info.rb +0 -177
  224. data/lib/zucker/5/iterate.rb +0 -26
  225. data/lib/zucker/5/ivars.rb +0 -28
  226. data/lib/zucker/5/kernel.rb +0 -34
  227. data/lib/zucker/5/mcopy.rb +0 -10
  228. data/lib/zucker/5/mm.rb +0 -34
  229. data/lib/zucker/5/not.rb +0 -19
  230. data/lib/zucker/5/object.rb +0 -4
  231. data/lib/zucker/5/oo.rb +0 -17
  232. data/lib/zucker/5/os.rb +0 -49
  233. data/lib/zucker/5/qq.rb +0 -12
  234. data/lib/zucker/5/regexp2proc.rb +0 -12
  235. data/lib/zucker/5/sandbox.rb +0 -25
  236. data/lib/zucker/5/shortcuts.rb +0 -4
  237. data/lib/zucker/5/square_brackets_for.rb +0 -21
  238. data/lib/zucker/5/string.rb +0 -54
  239. data/lib/zucker/5/tap.rb +0 -11
  240. data/lib/zucker/5/to_proc.rb +0 -4
  241. data/lib/zucker/5/unary.rb +0 -24
  242. data/lib/zucker/5/union.rb +0 -16
  243. data/lib/zucker/5/version.rb +0 -118
  244. data/lib/zucker/6/alias_for.rb +0 -21
  245. data/lib/zucker/6/aliases.rb +0 -51
  246. data/lib/zucker/6/all.rb +0 -4
  247. data/lib/zucker/6/array.rb +0 -25
  248. data/lib/zucker/6/array2proc.rb +0 -18
  249. data/lib/zucker/6/binding.rb +0 -34
  250. data/lib/zucker/6/blank.rb +0 -28
  251. data/lib/zucker/6/cc.rb +0 -25
  252. data/lib/zucker/6/class2proc.rb +0 -12
  253. data/lib/zucker/6/control.rb +0 -4
  254. data/lib/zucker/6/dd.rb +0 -23
  255. data/lib/zucker/6/debug.rb +0 -4
  256. data/lib/zucker/6/default.rb +0 -4
  257. data/lib/zucker/6/egonil.rb +0 -27
  258. data/lib/zucker/6/engine.rb +0 -68
  259. data/lib/zucker/6/enumerable.rb +0 -14
  260. data/lib/zucker/6/env.rb +0 -4
  261. data/lib/zucker/6/extensions.rb +0 -4
  262. data/lib/zucker/6/hash.rb +0 -27
  263. data/lib/zucker/6/hash2proc.rb +0 -16
  264. data/lib/zucker/6/info.rb +0 -192
  265. data/lib/zucker/6/iterate.rb +0 -27
  266. data/lib/zucker/6/ivars.rb +0 -28
  267. data/lib/zucker/6/kernel.rb +0 -34
  268. data/lib/zucker/6/mcopy.rb +0 -10
  269. data/lib/zucker/6/mm.rb +0 -34
  270. data/lib/zucker/6/not.rb +0 -19
  271. data/lib/zucker/6/object.rb +0 -4
  272. data/lib/zucker/6/oo.rb +0 -17
  273. data/lib/zucker/6/os.rb +0 -54
  274. data/lib/zucker/6/qq.rb +0 -12
  275. data/lib/zucker/6/regexp2proc.rb +0 -12
  276. data/lib/zucker/6/sandbox.rb +0 -25
  277. data/lib/zucker/6/shortcuts.rb +0 -4
  278. data/lib/zucker/6/square_brackets_for.rb +0 -21
  279. data/lib/zucker/6/string.rb +0 -54
  280. data/lib/zucker/6/tap.rb +0 -11
  281. data/lib/zucker/6/to_proc.rb +0 -4
  282. data/lib/zucker/6/unary.rb +0 -24
  283. data/lib/zucker/6/union.rb +0 -16
  284. data/lib/zucker/6/version.rb +0 -118
  285. data/lib/zucker/7/alias_for.rb +0 -21
  286. data/lib/zucker/7/aliases.rb +0 -51
  287. data/lib/zucker/7/all.rb +0 -4
  288. data/lib/zucker/7/array.rb +0 -25
  289. data/lib/zucker/7/array2proc.rb +0 -18
  290. data/lib/zucker/7/binding.rb +0 -34
  291. data/lib/zucker/7/blank.rb +0 -28
  292. data/lib/zucker/7/cc.rb +0 -25
  293. data/lib/zucker/7/class2proc.rb +0 -12
  294. data/lib/zucker/7/control.rb +0 -4
  295. data/lib/zucker/7/dd.rb +0 -23
  296. data/lib/zucker/7/debug.rb +0 -4
  297. data/lib/zucker/7/default.rb +0 -4
  298. data/lib/zucker/7/egonil.rb +0 -27
  299. data/lib/zucker/7/engine.rb +0 -68
  300. data/lib/zucker/7/enumerable.rb +0 -14
  301. data/lib/zucker/7/env.rb +0 -4
  302. data/lib/zucker/7/extensions.rb +0 -4
  303. data/lib/zucker/7/hash.rb +0 -27
  304. data/lib/zucker/7/hash2proc.rb +0 -16
  305. data/lib/zucker/7/info.rb +0 -192
  306. data/lib/zucker/7/iterate.rb +0 -27
  307. data/lib/zucker/7/ivars.rb +0 -28
  308. data/lib/zucker/7/kernel.rb +0 -34
  309. data/lib/zucker/7/mcopy.rb +0 -10
  310. data/lib/zucker/7/mm.rb +0 -34
  311. data/lib/zucker/7/not.rb +0 -19
  312. data/lib/zucker/7/object.rb +0 -4
  313. data/lib/zucker/7/oo.rb +0 -17
  314. data/lib/zucker/7/os.rb +0 -54
  315. data/lib/zucker/7/qq.rb +0 -12
  316. data/lib/zucker/7/regexp2proc.rb +0 -12
  317. data/lib/zucker/7/sandbox.rb +0 -25
  318. data/lib/zucker/7/shortcuts.rb +0 -4
  319. data/lib/zucker/7/square_brackets_for.rb +0 -21
  320. data/lib/zucker/7/string.rb +0 -54
  321. data/lib/zucker/7/tap.rb +0 -11
  322. data/lib/zucker/7/to_proc.rb +0 -4
  323. data/lib/zucker/7/unary.rb +0 -24
  324. data/lib/zucker/7/union.rb +0 -16
  325. data/lib/zucker/7/version.rb +0 -118
  326. data/lib/zucker/8/alias_for.rb +0 -21
  327. data/lib/zucker/8/aliases.rb +0 -51
  328. data/lib/zucker/8/all.rb +0 -4
  329. data/lib/zucker/8/array.rb +0 -25
  330. data/lib/zucker/8/array2proc.rb +0 -18
  331. data/lib/zucker/8/binding.rb +0 -33
  332. data/lib/zucker/8/blank.rb +0 -28
  333. data/lib/zucker/8/cc.rb +0 -25
  334. data/lib/zucker/8/class2proc.rb +0 -12
  335. data/lib/zucker/8/control.rb +0 -4
  336. data/lib/zucker/8/dd.rb +0 -23
  337. data/lib/zucker/8/debug.rb +0 -4
  338. data/lib/zucker/8/default.rb +0 -4
  339. data/lib/zucker/8/egonil.rb +0 -27
  340. data/lib/zucker/8/engine.rb +0 -68
  341. data/lib/zucker/8/enumerable.rb +0 -14
  342. data/lib/zucker/8/env.rb +0 -4
  343. data/lib/zucker/8/extensions.rb +0 -4
  344. data/lib/zucker/8/hash.rb +0 -27
  345. data/lib/zucker/8/hash2proc.rb +0 -16
  346. data/lib/zucker/8/info.rb +0 -192
  347. data/lib/zucker/8/iterate.rb +0 -27
  348. data/lib/zucker/8/ivars.rb +0 -28
  349. data/lib/zucker/8/kernel.rb +0 -34
  350. data/lib/zucker/8/mcopy.rb +0 -10
  351. data/lib/zucker/8/mm.rb +0 -34
  352. data/lib/zucker/8/not.rb +0 -19
  353. data/lib/zucker/8/object.rb +0 -4
  354. data/lib/zucker/8/oo.rb +0 -17
  355. data/lib/zucker/8/os.rb +0 -54
  356. data/lib/zucker/8/qq.rb +0 -12
  357. data/lib/zucker/8/regexp2proc.rb +0 -12
  358. data/lib/zucker/8/sandbox.rb +0 -25
  359. data/lib/zucker/8/shortcuts.rb +0 -4
  360. data/lib/zucker/8/square_brackets_for.rb +0 -21
  361. data/lib/zucker/8/string.rb +0 -54
  362. data/lib/zucker/8/tap.rb +0 -11
  363. data/lib/zucker/8/to_proc.rb +0 -4
  364. data/lib/zucker/8/unary.rb +0 -24
  365. data/lib/zucker/8/union.rb +0 -16
  366. data/lib/zucker/8/version.rb +0 -118
@@ -0,0 +1,553 @@
1
+ # Ruby 1.9, encoding: utf-8
2
+ # creates the documentation for Zucker
3
+
4
+ require 'yaml'
5
+ require 'coderay'
6
+
7
+ class ZuckerDoc
8
+ ORDER = %w|summary why methods info spec source versions discussion|
9
+ DESCRIPTIONS = {
10
+ 'summary' => 'Summary',
11
+ 'why' => 'Why?',
12
+ 'methods' => 'Methods/Usage',
13
+ 'info' => 'Information',
14
+ 'spec' => 'Specification',
15
+ 'source' => 'Source',
16
+ 'versions' => 'Compatibility',
17
+ 'authors' => 'Authors',
18
+ 'discussion' => 'Discussion',
19
+ }
20
+
21
+
22
+ class << self
23
+ def generate(path = '../')
24
+ @path = path
25
+
26
+ # get version / date
27
+ require File.join( @path, 'lib/zucker' )
28
+ @version = Zucker::VERSION
29
+ @date = Zucker::DATE
30
+
31
+ # include + format changelog
32
+ @changelog = replace_html_special_chars File.read File.join( @path, 'CHANGELOG' )
33
+ @changelog.gsub! /\| Zucker (?<version>\d+)/ do
34
+ version = $~[:version].to_i
35
+ if version && version > 0
36
+ %{| <a href="http://rubyzucker.info/#{version}/">Zucker #{version}</a>}
37
+ elsif version && version == 0
38
+ %{| <a href="http://rubyzucker.info/rubyzucker.pdf">Zucker 0</a>}
39
+ else
40
+ $& # no changes
41
+ end
42
+ end
43
+
44
+ # build package list
45
+ @packages = Zucker::PACKAGES.map{ |pkg, _|
46
+ descriptions = {
47
+ :env => 'Cubes for collecting information.',
48
+ :to_proc => 'Adds some ⇧to_proc⇧ extensions to use with ⇧&amp;⇧.',
49
+ :object => 'Extensions for ⇧Object⇧.',
50
+ :debug => 'Print debugging tools.',
51
+ :extensions => 'More extensions for Ruby base classes.',
52
+ :control => 'Cubes that change program behaviour.',
53
+ :shortcuts => 'Cubes that save you keystrokes or disambiguate things.',
54
+ }
55
+ %{ <li><a href="##{pkg}" style="text-decoration:none;font-weight:bold;">#{pkg}</a>: #{ descriptions[pkg] }</li> }
56
+ }.join "\n"
57
+
58
+
59
+ # collect description files and turn them to html
60
+ cubes = Dir[ File.join(path, 'desc', '*.yaml') ].inject({}) do |res, cube_file; a|
61
+ begin
62
+ a = YAML.load_file cube_file
63
+ rescue
64
+ warn "Could not load the yaml file for #{ cube_file }"
65
+ end
66
+ if a.instance_of? Hash
67
+ res.merge a
68
+ else
69
+ res
70
+ end
71
+ end
72
+
73
+ output_path = File.join(path, 'doc', 'zucker_doc.html')
74
+
75
+ @cubes = Zucker::PACKAGES.map{ |pkg_name, cube_names|
76
+ package pkg_name, cubes.select{|name, _| cube_names.include?( name ) }
77
+ }.join
78
+
79
+ result = DATA.read
80
+
81
+ # substitute vars
82
+ result.gsub! /\.\.([a-z]+)\.\./i do eval "@#$1" end
83
+ # code needs to be codish ;)
84
+ result.gsub! /⇧(.+?)⇧/, '<code>\1</code>'
85
+ # strong
86
+ result.gsub! /●(.+?)●/, '<strong>\1</strong>'
87
+ # hyper→links
88
+ result.gsub! /→(.+?)→(.+?)→/, '<a href="\2">\1</a>'
89
+
90
+ File.open output_path, 'w' do |file|
91
+ file.puts result
92
+ end
93
+
94
+ puts "created Zucker documentation at #{File.expand_path(output_path)}"
95
+ end
96
+
97
+ protected
98
+
99
+ def package(name, cubes)
100
+ cube_html = cubes.sort.map{ |name, hash|
101
+ cube name, hash
102
+ }.join
103
+
104
+ %{
105
+ <h2 title="require 'zucker/#{name}'" id="#{name}">Cubes[#{name}]</h2>
106
+ #{ %q|<p class="text">(not included by <code>require 'zucker/default'</code>)</p>| if name == :debug }
107
+ <div class="cubes">
108
+ #{cube_html}
109
+ </div> }
110
+ end
111
+
112
+ def cube(name, hash)
113
+ @cube_name = name
114
+ %{ <h3 title="require 'zucker/#{name}'" id="#{name}">#{name}</h3>
115
+ <table class="cube_table"
116
+ id="#{ name }_cube"
117
+ title="require 'zucker/#{name}'"> } +
118
+
119
+ ORDER.map{ |th|
120
+ if %w|spec source discussion|.include?(th) || td = hash[th]
121
+ "<tr><th>#{ DESCRIPTIONS[th] }</th>" +
122
+ " <td>#{ send th, td }</td></tr>"
123
+ end
124
+ }.join +
125
+ '</table>'
126
+ end
127
+
128
+ def methods(m)
129
+ m.map{ |name, usage|
130
+ "<h5>#{replace_html_special_chars name}</h5>" +
131
+ "<pre class=\"usage source\" style=\"display:block\">#{ syntax_highlight usage }</pre>"
132
+ }.join
133
+ end
134
+
135
+ def info(i)
136
+ i.map{|e|convert_html_chars e}.join '<br/>'
137
+ end
138
+
139
+ def authors(a)
140
+ a.map{ |author|
141
+ author +
142
+ ( (tmp = @meta[author]) ? " | #{ tmp }" : '' )
143
+ }.join '<br/>'
144
+ end
145
+
146
+ def why(w)
147
+ if w.is_a? Array
148
+ w.map{|e| "<p>#{convert_html_chars e}</p>"}.join
149
+ else
150
+ convert_html_chars w
151
+ end
152
+ end
153
+
154
+ def summary(s)
155
+ convert_html_chars s
156
+ end
157
+
158
+ def versions(v)
159
+ v.join ', '
160
+ end
161
+
162
+ def discussion(_)
163
+ "→github wiki→http://wiki.github.com/janlelis/zucker/#{@cube_name}→"
164
+ end
165
+
166
+ def spec(_)
167
+ source_helper(:spec, File.join( @path, 'spec/' ), '_spec')
168
+ end
169
+
170
+ def source(_)
171
+ source_helper(:source, File.join( @path, 'lib/zucker') )
172
+ end
173
+
174
+ def source_helper(kind, file_prefix, suffix='')
175
+ %{ <span id="show_#{@cube_name}_#{kind}">(<a href="javascript:show('#{@cube_name}_#{kind}')">show</a>)</span>
176
+ <pre class="source" id="#{@cube_name}_#{kind}">#{
177
+ get_source_file( File.join file_prefix, ( @cube_name + suffix + '.rb' ) )
178
+ }</pre> }
179
+ end
180
+
181
+ def get_source_file(filename)
182
+ if File.file? filename
183
+ syntax_highlight( File.read(filename).strip )
184
+ else
185
+ '<em>FIXME: missing (please create a <a href="http://github.com/janlelis/zucker/issues">github issue</a>)</em>'
186
+ end
187
+ end
188
+
189
+ def syntax_highlight(string)
190
+ #convert_html_chars
191
+ CodeRay.scan(string, :ruby).html
192
+ end
193
+
194
+ def replace_html_special_chars(string)
195
+ # remove html special chars
196
+ string.gsub( /&/, '&amp;' ).
197
+ gsub( /</, '&lt;' ).
198
+ gsub( />/, '&gt;' )
199
+ end
200
+
201
+ def convert_html_chars(string, protect_spaces = false)
202
+ string = replace_html_special_chars( string )
203
+ string = string.to_s.gsub( "\n", '<br/>' )
204
+
205
+ if protect_spaces
206
+ string.gsub(' ',' ')
207
+ else
208
+ string
209
+ end
210
+ end
211
+ end
212
+ end
213
+
214
+ ZuckerDoc.generate *ARGV
215
+
216
+ __END__
217
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
218
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
219
+
220
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
221
+ <head>
222
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
223
+
224
+ <title>Ruby Zucker ..version..</title>
225
+ <script type="text/javascript">
226
+ var show = function(snippet){
227
+ document.getElementById( snippet ).style.display = 'block'
228
+ if( document.getElementById( 'show_'+snippet ) ){
229
+ document.getElementById( 'show_'+snippet ).style.display = 'none'
230
+ }
231
+ }
232
+ </script>
233
+ <style type="text/css">
234
+ body{
235
+ background-color:#aaa;
236
+ color:#111;
237
+ font-family:sans-serif;
238
+ }
239
+
240
+ #world{
241
+ background:#fff;
242
+ }
243
+
244
+ h1, h2, h3, h4, h5, h6{
245
+ margin:0px;
246
+ padding:0px;
247
+ }
248
+
249
+ h1{
250
+ color:#222;
251
+ text-align:left;
252
+ padding:0.5em;
253
+ }
254
+ h2{
255
+ margin-left:0.5em;
256
+ margin-top:0.8em;
257
+ margin-bottom:0.5em;
258
+ }
259
+
260
+ th{
261
+ width:200px;
262
+ color:#444;
263
+ }
264
+
265
+ p{
266
+ margin:0px;
267
+ margin-bottom:0.5em;
268
+ }
269
+
270
+ p.text{
271
+ margin-left:1.5em;
272
+ margin-right:1em;
273
+ }
274
+
275
+ code{
276
+ }
277
+
278
+ .scode{
279
+ display:block;
280
+ margin:0.8em;
281
+ # margin-right:1.8em;
282
+ padding:0.5em;
283
+ border:1px solid black;
284
+ background:#eee;
285
+ }
286
+
287
+ #.cube_table{
288
+ # display:none;
289
+ #}
290
+ .cubes{
291
+ margin:0px;
292
+ margin-left:1.5em;
293
+ margin-right:1em;
294
+ }
295
+
296
+ a{
297
+ color:#111;
298
+ }
299
+
300
+ table{
301
+ margin:0.8em;
302
+ margin-top:0.2em;
303
+ padding:0.2em;
304
+ border:1px solid #111;
305
+ background:#eee;
306
+ overflow:auto;
307
+ display:block;
308
+ }
309
+
310
+ ul{
311
+ margin:5px 0px !important;
312
+ padding:none;
313
+ }
314
+
315
+ th{
316
+ text-align:left;
317
+ vertical-align:top;
318
+ padding-right:3em;
319
+ }
320
+
321
+ td{
322
+ width:100%;
323
+ }
324
+
325
+ li{
326
+ list-style:none;
327
+ }
328
+
329
+
330
+ #foot{
331
+ text-align:left;
332
+ padding:0.3em;
333
+ font-size:70%
334
+ }
335
+ #foot, #foot a{
336
+ color:#444;
337
+ }
338
+ #smile{
339
+ font-size:150%;
340
+ float:right;
341
+ }
342
+ #smile a{
343
+ text-decoration:none;
344
+ }
345
+
346
+ .small{
347
+ font-size:70%;
348
+ }
349
+
350
+ code, pre{
351
+ font-face:mono;
352
+ margin:0px;
353
+ padding:0px;
354
+ }
355
+
356
+ .source{
357
+ display:none;
358
+ width:98%;
359
+ padding: 3px 5px;
360
+ overflow: auto;
361
+ font-size: 12px;
362
+ background-color: #f8f8f8;
363
+ border:1px solid #005;
364
+ border: 1px solid silver;
365
+ font-family: 'Courier New', 'Terminal', monospace;
366
+ color: #000;
367
+ }
368
+
369
+ # http://coderay.rubychan.de/
370
+ .source pre { margin: 0px; }
371
+
372
+ span.source { white-space: pre; border: 0px; padding: 2px; }
373
+
374
+ table.source { border-collapse: collapse; width: 100%; padding: 2px; }
375
+ table.source td { padding: 2px 4px; vertical-align: top; }
376
+
377
+ .source .line_numbers, .source .no {
378
+ background-color: #def;
379
+ color: gray;
380
+ text-align: right;
381
+ }
382
+ .source .line_numbers a:target, .source .no a:target { color: blue; }
383
+ .source .line_numbers .highlighted, .source .no .highlighted { color: red; }
384
+ .source .no { padding: 0px 4px; }
385
+ .source .code { width: 100%; }
386
+ .source .code pre { overflow: auto; }
387
+
388
+ .source .debug { color:white ! important; background:blue ! important; }
389
+
390
+ .source .an { color:#007 }
391
+ .source .at { color:#f08 }
392
+ .source .av { color:#700 }
393
+ .source .bi { color:#509; font-weight:bold }
394
+ .source .c { color:#888; }
395
+ .source .c .dl { color:#444; }
396
+ .source .c .ch { color:#444; }
397
+
398
+ .source .ch { color:#04D }
399
+ .source .ch .k { color:#04D }
400
+ .source .ch .dl { color:#039 }
401
+
402
+ .source .cl { color:#B06; font-weight:bold }
403
+ .source .cm { color:#A08; font-weight:bold }
404
+ .source .co { color:#036; font-weight:bold }
405
+ .source .cr { color:#0A0 }
406
+ .source .cv { color:#369 }
407
+ .source .de { color:#B0B; }
408
+ .source .df { color:#099; font-weight:bold }
409
+ .source .di { color:#088; font-weight:bold }
410
+ .source .dl { color:black }
411
+ .source .do { color:#970 }
412
+ .source .dt { color:#34b }
413
+ .source .ds { color:#D42; font-weight:bold }
414
+ .source .e { color:#666; font-weight:bold }
415
+ .source .en { color:#800; font-weight:bold }
416
+ .source .er { color:#F00; background-color:#FAA }
417
+ .source .ex { color:#C00; font-weight:bold }
418
+ .source .fl { color:#60E; font-weight:bold }
419
+ .source .fu { color:#06B; font-weight:bold }
420
+ .source .gv { color:#d70; font-weight:bold }
421
+ .source .hx { color:#058; font-weight:bold }
422
+ .source .i { color:#00D; font-weight:bold }
423
+ .source .ic { color:#B44; font-weight:bold }
424
+
425
+ .source .il { background-color: hsla(0,0%,0%,0.1); color: black }
426
+ .source .il .idl { font-weight: bold; color: #666 }
427
+ .source .idl { font-weight: bold; background-color: hsla(0,0%,0%,0.1); color: #666; }
428
+
429
+ .source .im { color:#f00; }
430
+ .source .in { color:#B2B; font-weight:bold }
431
+ .source .iv { color:#33B }
432
+ .source .la { color:#970; font-weight:bold }
433
+ .source .lv { color:#963 }
434
+ .source .ns { color:#707; font-weight:bold }
435
+ .source .oc { color:#40E; font-weight:bold }
436
+ .source .op { }
437
+ .source .pc { color:#058; font-weight:bold }
438
+ .source .pd { color:#369; font-weight:bold }
439
+ .source .pp { color:#579; }
440
+ .source .ps { color:#00C; font-weight:bold }
441
+ .source .pt { color:#074; font-weight:bold }
442
+ .source .r, .kw { color:#080; font-weight:bold }
443
+
444
+ .source .ke { color: #808; }
445
+ .source .ke .dl { color: #606; }
446
+ .source .ke .ch { color: #80f; }
447
+ .source .vl { color: #088; }
448
+
449
+ .source .rx { background-color:hsla(300,100%,50%,0.1); }
450
+ .source .rx .k { color:#808 }
451
+ .source .rx .dl { color:#404 }
452
+ .source .rx .mod { color:#C2C }
453
+ .source .rx .fu { color:#404; font-weight: bold }
454
+
455
+ .source .s { background-color:hsla(0,100%,50%,0.1); }
456
+ .source .s .k { color: #D20; }
457
+ .source .s .ch { color: #b0b; }
458
+ .source .s .dl { color: #710; }
459
+
460
+ .source .sh { background-color:hsla(120,100%,50%,0.1); }
461
+ .source .sh .k { color:#2B2 }
462
+ .source .sh .dl { color:#161 }
463
+
464
+ .source .sy { color:#A60 }
465
+ .source .sy .k { color:#A60 }
466
+ .source .sy .dl { color:#630 }
467
+
468
+ .source .ta { color:#070 }
469
+ .source .ts { color:#D70; font-weight:bold }
470
+ .source .ty { color:#339; font-weight:bold }
471
+ .source .v { color:#036 }
472
+ .source .xt { color:#444 }
473
+
474
+ .source .ins { background: hsla(120,100%,50%,0.2) }
475
+ .source .del { background: hsla(0,100%,50%,0.2) }
476
+ .source .chg { color: #aaf; background: #007; }
477
+ .source .head { color: #f8f; background: #505 }
478
+ .source .head .filename { color: white; }
479
+
480
+ .source .ins .eye { background-color: hsla(120,100%,50%,0.2) }
481
+ .source .del .eye { background-color: hsla(0,100%,50%,0.2) }
482
+
483
+ .source .ins .ins { color: #080; background:transparent; font-weight:bold }
484
+ .source .del .del { color: #800; background:transparent; font-weight:bold }
485
+ .source .chg .chg { color: #66f; }
486
+ .source .head .head { color: #f4f; }
487
+
488
+ .rubylogo{
489
+ margin-left:20px;
490
+ margin-top:10px;
491
+ margin-right:15px;
492
+ float:left;
493
+ }
494
+
495
+ </style>
496
+ </head>
497
+ <body>
498
+ <div id="world">
499
+ <img class="rubylogo" alt="ruby" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAADAVgAAwFYBgeEOVwAAAAd0SU1FB9oIHxY1C2ozXR0AABglSURBVGjevZt/sGVVdec/a+9z7q/3o1830N00DQiCQkoQiPgj0UiG8UcyMZNSC82PkdIEqYlaISkTMTPlVEw5IdHRqKEURQ2JSZwaiYijJimnxohMVH42Aml+2dD9ul//fP1+9Lv3nnP23mv+2Puce25DTOI4dtepe+5+7913vnut9V1rfdd+wo/wn/cea+3UWlBFIFfVDOdCsbi/Gj7+CMWePRQH9lEsLlItLjLav0h1fAX1ivqKUDq08njnkNKzYZXDsyb86qoH4KNzXd6xXjztGbIfBdAQAsYYjDFT66q6E7gQeJWIBDXmmKpfN1k2kl4P040X3S6m08FYIyH4TBEQASMYhGGOGWY4CSx+fC5fqZD971gv9gH8wVyHd6+XPxrAJwMVEVR1AFwBnFsdWrrKrSy/TIcbSJ6Tb9tBftpWqiNHML0uptfH9vqYfh/b7+OzHPUBSZ9Ziae0gaGBwggKKBBU7vvAfOfDTuW+69eLBwDes9DjvStj5P8n0JOs+VzgZzcevP9la//wjZ8qnnjslHLP41QH9irjITbLpXP6TmZf+BJmf+Z1VBtjhg/uojx4kGJxkWJxL+X+RdzKKq5yjIoNxtWYEaqViJQqWolIpUZLRBxQij7shPf8l9XyVoDfme/8cAGrKiKTj6zKcpDl+U8A7167+1vP3vvhG7aNdj/UC8cOEdbWMYoai1gBAyoByXoZg4svZ+t7P0i1NuTEvXdTHDigxYH94pYO6OqeJ2Rt9RhOHUHRUkQqIsgK0VKNVBDBo1RC4eGX3rda/PUP1aVDCA1Y59yCMea/icjri4M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izM4hivknWSgAbwImZjU1rSPO9JlnctlhcRbhgYTunzm7iiwcewIXAmi/W8tn5tSaGP7G5z7XHx8si3ORh5OJBTLygTkM87ImwatCRq6QqKi2LUp0LGuq+vonf5M46LefU3VIQyLKMhZkeric8ZUYsmYKjUrJCyQn1lKJURnGiOIFKFIfiUYLRqHyaCLxjLF2b07U5eadL3u9CJ9Ptc1v4xfNfQifLOV6O1piZW52uZoG/ODXPV6v8fU75ba2rVGkOzUgQ6JdeTx15PCDZrGK7ErQSL46gHi+OgMPjpyorL0KwBnILJvKAikzYfbJVqGpsKDCSiSFDyEwkr44YcolAOyajI5aOzehkGXmWkWU53Syn2+nR73TZ8CW7jjx555b+/Btf+eAji41Lf2Khxy8fHVcf35S9TxDv0OtrsAGadLPWMZwy8ipiRaRDSB7QWDlNEppzW5nBpRaN1pRSRJrTc4a6AZaUS9NWCzj1VJL0+jCp3NLw7JCiB71yyAoHBzY/ONvpL83nvY3Ngzl/6sy8O212i7/49HOXrvnmnUeeZuEb5/u8bW3EJxf6vTXPC7yRLwV0QacUfmGu8n77EKvdzSGok4CXoA5PRRBPYQNlZmL8Szrkrc80cdSYN+EYsFeERZB9Jt7vG6s/DuriX+Roc25FwVkRZ0QKIzLOxIy7WTae6wzGb3jyUPlPnb96/2kZv33ETT/Hn8z3efvaCIA/2tSfVfQFCq9T5OeAs1SQTNGz1jOv+SAvpaKUSivjjnqjh73RIwqHgSMicgg4AqwIsiawboQ1i1nvYlaPhaLITdQB4iVqjYQuJsxl3XCwOqEztsfFM9u4/MlH/3V/YfOW/4T59Pue8Wv/F9jGEQFesRfqAAAAAElFTkSuQmCC" />
500
+ <h1>Ruby Zucker ..version..</h1>
501
+ <h2 style="clear:both">What is it?</h2>
502
+ <p class="text">Zucker (<a href="http://www.forvo.com/word/zucker/">pronunciation</a>) is the German word for sugar. It adds syntactic sugar in the form of independent, small scripts that make Ruby even more sweet. It adds a lot of useful helper methods for an improved readability and usage. Everything is documented on this page.</p>
503
+ <p class="text">See the <a href="http://github.com/janlelis/zucker">github page</a> and wiki for issues, discussion and information about contributing.</p>
504
+
505
+ <h2>Install</h2>
506
+ <p class="text">
507
+ <code class="scode">gem install zucker --no-rdoc --no-ri # might need sudo</code>
508
+ </p>
509
+ <h3 style="padding-left:1.3em">Quickstart</h3>
510
+ <p class="text">
511
+ <code class="scode">require 'zucker/all'</code>
512
+ </p>
513
+ <h2>Usage / organisation</h2>
514
+ <p class="text">The gem consists of many small snippets, called <em>cubes</em>, which are bundled in <em>packs</em>. Since there aren't any dependencies within the gem, you can easily require only the packs or cubes you want:
515
+ <code class="scode">require 'zucker/cube_or_pack_name'</code>
516
+ </p>
517
+ <h3 style="padding-left:1.3em">Packages</h3>
518
+ <ul class="text">
519
+ ..packages..
520
+ </ul>
521
+ <p class="text">
522
+ Furthermore, there are two meta packs available: <strong>all</strong> simply requires all cubes and <strong>default</strong> requires all cubes except <strong>debug</strong>.</p>
523
+
524
+ <h3 style="padding-left:1.3em">Which methods and constants are added directly to the global namespace by the <em>default</em> pack?</h3>
525
+ <p class="text">
526
+
527
+ <code class="scode">Info, RubyVersion, RubyEngine, OS, Infinity, NaN, alias_for, aliases_for, egonil, nn, iterate, instance_variables_from, ivars, activate_warnings!, deactivate_warnings!, executed_directly?, standalone?, library?, ignore_sigint!, sandbox, tap_on, make_new, (blank?, present?, mcopy)</code>
528
+ </p>
529
+
530
+ ..cubes..
531
+ <h2>Extras</h2>
532
+ <p class="text">
533
+ You can activate some additional aliases for Zucker functionality by executing:
534
+ <code class="scode">Zucker.more_aliases! # => [:copy, :n, :init, :returning, :lib?, :RV, :RE]</code>
535
+ </p>
536
+
537
+ <h2>Changelog</h2>
538
+ <div class="cubes">
539
+ <pre class="scode">..changelog..</pre>
540
+ </div>
541
+ <br/>
542
+ </div>
543
+ <div id="foot">
544
+ <div id="smile"><a href="http://rbjl.net">J-_-L</a></div>
545
+ This is the Ruby Zucker ..version.. documentation (..date..).
546
+ The current version is always available at <a href="http://rubyzucker.info">rubyzucker.info</a>.
547
+ Source at <a href="http://github.com/janlelis/zucker">github</a>.
548
+ Ruby Logo CC-BY-SA Yukihiro Matsumoto.
549
+ </div>
550
+
551
+ </body>
552
+ </html>
553
+