rails 4.2.0.beta4 → 4.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/guides/Rakefile +3 -1
  3. data/guides/bug_report_templates/action_controller_gem.rb +2 -2
  4. data/guides/bug_report_templates/action_controller_master.rb +2 -2
  5. data/guides/source/3_0_release_notes.md +2 -2
  6. data/guides/source/4_1_release_notes.md +1 -1
  7. data/guides/source/4_2_release_notes.md +250 -225
  8. data/guides/source/_welcome.html.erb +1 -1
  9. data/guides/source/action_controller_overview.md +6 -6
  10. data/guides/source/action_mailer_basics.md +26 -11
  11. data/guides/source/action_view_overview.md +0 -1
  12. data/guides/source/active_job_basics.md +29 -23
  13. data/guides/source/active_record_postgresql.md +2 -7
  14. data/guides/source/active_record_validations.md +1 -0
  15. data/guides/source/active_support_core_extensions.md +1 -1
  16. data/guides/source/active_support_instrumentation.md +5 -5
  17. data/guides/source/asset_pipeline.md +2 -2
  18. data/guides/source/association_basics.md +0 -2
  19. data/guides/source/command_line.md +6 -15
  20. data/guides/source/configuring.md +4 -4
  21. data/guides/source/documents.yaml +0 -1
  22. data/guides/source/engines.md +26 -15
  23. data/guides/source/form_helpers.md +10 -2
  24. data/guides/source/getting_started.md +9 -9
  25. data/guides/source/rails_on_rack.md +2 -2
  26. data/guides/source/ruby_on_rails_guides_guidelines.md +1 -0
  27. data/guides/source/security.md +1 -1
  28. data/guides/source/testing.md +80 -13
  29. data/guides/source/upgrading_ruby_on_rails.md +23 -20
  30. metadata +29 -229
  31. data/guides/output/2_2_release_notes.html +0 -724
  32. data/guides/output/2_3_release_notes.html +0 -870
  33. data/guides/output/3_0_release_notes.html +0 -773
  34. data/guides/output/3_1_release_notes.html +0 -740
  35. data/guides/output/3_2_release_notes.html +0 -797
  36. data/guides/output/4_0_release_notes.html +0 -523
  37. data/guides/output/4_1_release_notes.html +0 -806
  38. data/guides/output/4_2_release_notes.html +0 -728
  39. data/guides/output/Gemfile +0 -6
  40. data/guides/output/_license.html +0 -226
  41. data/guides/output/_welcome.html +0 -233
  42. data/guides/output/action_controller_overview.html +0 -1335
  43. data/guides/output/action_mailer_basics.html +0 -928
  44. data/guides/output/action_view_overview.html +0 -1509
  45. data/guides/output/active_job_basics.html +0 -546
  46. data/guides/output/active_model_basics.html +0 -438
  47. data/guides/output/active_record_basics.html +0 -594
  48. data/guides/output/active_record_callbacks.html +0 -592
  49. data/guides/output/active_record_migrations.html +0 -1123
  50. data/guides/output/active_record_postgresql.html +0 -675
  51. data/guides/output/active_record_querying.html +0 -1796
  52. data/guides/output/active_record_validations.html +0 -1301
  53. data/guides/output/active_support_core_extensions.html +0 -3450
  54. data/guides/output/active_support_instrumentation.html +0 -1121
  55. data/guides/output/api_documentation_guidelines.html +0 -498
  56. data/guides/output/asset_pipeline.html +0 -1167
  57. data/guides/output/association_basics.html +0 -2086
  58. data/guides/output/caching_with_rails.html +0 -553
  59. data/guides/output/command_line.html +0 -791
  60. data/guides/output/configuring.html +0 -1055
  61. data/guides/output/contributing_to_ruby_on_rails.html +0 -657
  62. data/guides/output/credits.html +0 -284
  63. data/guides/output/debugging_rails_applications.html +0 -1014
  64. data/guides/output/development_dependencies_install.html +0 -478
  65. data/guides/output/engines.html +0 -1438
  66. data/guides/output/form_helpers.html +0 -1074
  67. data/guides/output/generators.html +0 -838
  68. data/guides/output/getting_started.html +0 -2092
  69. data/guides/output/i18n.html +0 -1198
  70. data/guides/output/images/akshaysurve.jpg +0 -0
  71. data/guides/output/images/belongs_to.png +0 -0
  72. data/guides/output/images/book_icon.gif +0 -0
  73. data/guides/output/images/bullet.gif +0 -0
  74. data/guides/output/images/chapters_icon.gif +0 -0
  75. data/guides/output/images/check_bullet.gif +0 -0
  76. data/guides/output/images/credits_pic_blank.gif +0 -0
  77. data/guides/output/images/csrf.png +0 -0
  78. data/guides/output/images/edge_badge.png +0 -0
  79. data/guides/output/images/favicon.ico +0 -0
  80. data/guides/output/images/feature_tile.gif +0 -0
  81. data/guides/output/images/footer_tile.gif +0 -0
  82. data/guides/output/images/fxn.png +0 -0
  83. data/guides/output/images/getting_started/article_with_comments.png +0 -0
  84. data/guides/output/images/getting_started/challenge.png +0 -0
  85. data/guides/output/images/getting_started/confirm_dialog.png +0 -0
  86. data/guides/output/images/getting_started/forbidden_attributes_for_new_article.png +0 -0
  87. data/guides/output/images/getting_started/forbidden_attributes_for_new_post.png +0 -0
  88. data/guides/output/images/getting_started/form_with_errors.png +0 -0
  89. data/guides/output/images/getting_started/index_action_with_edit_link.png +0 -0
  90. data/guides/output/images/getting_started/new_article.png +0 -0
  91. data/guides/output/images/getting_started/new_post.png +0 -0
  92. data/guides/output/images/getting_started/post_with_comments.png +0 -0
  93. data/guides/output/images/getting_started/rails_welcome.png +0 -0
  94. data/guides/output/images/getting_started/routing_error_no_controller.png +0 -0
  95. data/guides/output/images/getting_started/routing_error_no_route_matches.png +0 -0
  96. data/guides/output/images/getting_started/show_action_for_articles.png +0 -0
  97. data/guides/output/images/getting_started/show_action_for_posts.png +0 -0
  98. data/guides/output/images/getting_started/template_is_missing_articles_new.png +0 -0
  99. data/guides/output/images/getting_started/template_is_missing_posts_new.png +0 -0
  100. data/guides/output/images/getting_started/undefined_method_post_path.png +0 -0
  101. data/guides/output/images/getting_started/unknown_action_create_for_articles.png +0 -0
  102. data/guides/output/images/getting_started/unknown_action_create_for_posts.png +0 -0
  103. data/guides/output/images/getting_started/unknown_action_new_for_articles.png +0 -0
  104. data/guides/output/images/getting_started/unknown_action_new_for_posts.png +0 -0
  105. data/guides/output/images/grey_bullet.gif +0 -0
  106. data/guides/output/images/habtm.png +0 -0
  107. data/guides/output/images/has_many.png +0 -0
  108. data/guides/output/images/has_many_through.png +0 -0
  109. data/guides/output/images/has_one.png +0 -0
  110. data/guides/output/images/has_one_through.png +0 -0
  111. data/guides/output/images/header_backdrop.png +0 -0
  112. data/guides/output/images/header_tile.gif +0 -0
  113. data/guides/output/images/i18n/demo_html_safe.png +0 -0
  114. data/guides/output/images/i18n/demo_localized_pirate.png +0 -0
  115. data/guides/output/images/i18n/demo_translated_en.png +0 -0
  116. data/guides/output/images/i18n/demo_translated_pirate.png +0 -0
  117. data/guides/output/images/i18n/demo_translation_missing.png +0 -0
  118. data/guides/output/images/i18n/demo_untranslated.png +0 -0
  119. data/guides/output/images/icons/README +0 -5
  120. data/guides/output/images/icons/callouts/1.png +0 -0
  121. data/guides/output/images/icons/callouts/10.png +0 -0
  122. data/guides/output/images/icons/callouts/11.png +0 -0
  123. data/guides/output/images/icons/callouts/12.png +0 -0
  124. data/guides/output/images/icons/callouts/13.png +0 -0
  125. data/guides/output/images/icons/callouts/14.png +0 -0
  126. data/guides/output/images/icons/callouts/15.png +0 -0
  127. data/guides/output/images/icons/callouts/2.png +0 -0
  128. data/guides/output/images/icons/callouts/3.png +0 -0
  129. data/guides/output/images/icons/callouts/4.png +0 -0
  130. data/guides/output/images/icons/callouts/5.png +0 -0
  131. data/guides/output/images/icons/callouts/6.png +0 -0
  132. data/guides/output/images/icons/callouts/7.png +0 -0
  133. data/guides/output/images/icons/callouts/8.png +0 -0
  134. data/guides/output/images/icons/callouts/9.png +0 -0
  135. data/guides/output/images/icons/caution.png +0 -0
  136. data/guides/output/images/icons/example.png +0 -0
  137. data/guides/output/images/icons/home.png +0 -0
  138. data/guides/output/images/icons/important.png +0 -0
  139. data/guides/output/images/icons/next.png +0 -0
  140. data/guides/output/images/icons/note.png +0 -0
  141. data/guides/output/images/icons/prev.png +0 -0
  142. data/guides/output/images/icons/tip.png +0 -0
  143. data/guides/output/images/icons/up.png +0 -0
  144. data/guides/output/images/icons/warning.png +0 -0
  145. data/guides/output/images/nav_arrow.gif +0 -0
  146. data/guides/output/images/oscardelben.jpg +0 -0
  147. data/guides/output/images/polymorphic.png +0 -0
  148. data/guides/output/images/radar.png +0 -0
  149. data/guides/output/images/rails4_features.png +0 -0
  150. data/guides/output/images/rails_guides_kindle_cover.jpg +0 -0
  151. data/guides/output/images/rails_guides_logo.gif +0 -0
  152. data/guides/output/images/rails_logo_remix.gif +0 -0
  153. data/guides/output/images/session_fixation.png +0 -0
  154. data/guides/output/images/tab_grey.gif +0 -0
  155. data/guides/output/images/tab_info.gif +0 -0
  156. data/guides/output/images/tab_note.gif +0 -0
  157. data/guides/output/images/tab_red.gif +0 -0
  158. data/guides/output/images/tab_yellow.gif +0 -0
  159. data/guides/output/images/tab_yellow.png +0 -0
  160. data/guides/output/images/vijaydev.jpg +0 -0
  161. data/guides/output/index.html +0 -354
  162. data/guides/output/initialization.html +0 -876
  163. data/guides/output/javascripts/guides.js +0 -59
  164. data/guides/output/javascripts/jquery.min.js +0 -4
  165. data/guides/output/javascripts/responsive-tables.js +0 -43
  166. data/guides/output/javascripts/syntaxhighlighter/shBrushAS3.js +0 -59
  167. data/guides/output/javascripts/syntaxhighlighter/shBrushAppleScript.js +0 -75
  168. data/guides/output/javascripts/syntaxhighlighter/shBrushBash.js +0 -59
  169. data/guides/output/javascripts/syntaxhighlighter/shBrushCSharp.js +0 -65
  170. data/guides/output/javascripts/syntaxhighlighter/shBrushColdFusion.js +0 -100
  171. data/guides/output/javascripts/syntaxhighlighter/shBrushCpp.js +0 -97
  172. data/guides/output/javascripts/syntaxhighlighter/shBrushCss.js +0 -91
  173. data/guides/output/javascripts/syntaxhighlighter/shBrushDelphi.js +0 -55
  174. data/guides/output/javascripts/syntaxhighlighter/shBrushDiff.js +0 -41
  175. data/guides/output/javascripts/syntaxhighlighter/shBrushErlang.js +0 -52
  176. data/guides/output/javascripts/syntaxhighlighter/shBrushGroovy.js +0 -67
  177. data/guides/output/javascripts/syntaxhighlighter/shBrushJScript.js +0 -52
  178. data/guides/output/javascripts/syntaxhighlighter/shBrushJava.js +0 -57
  179. data/guides/output/javascripts/syntaxhighlighter/shBrushJavaFX.js +0 -58
  180. data/guides/output/javascripts/syntaxhighlighter/shBrushPerl.js +0 -72
  181. data/guides/output/javascripts/syntaxhighlighter/shBrushPhp.js +0 -88
  182. data/guides/output/javascripts/syntaxhighlighter/shBrushPlain.js +0 -33
  183. data/guides/output/javascripts/syntaxhighlighter/shBrushPowerShell.js +0 -74
  184. data/guides/output/javascripts/syntaxhighlighter/shBrushPython.js +0 -64
  185. data/guides/output/javascripts/syntaxhighlighter/shBrushRuby.js +0 -55
  186. data/guides/output/javascripts/syntaxhighlighter/shBrushSass.js +0 -94
  187. data/guides/output/javascripts/syntaxhighlighter/shBrushScala.js +0 -51
  188. data/guides/output/javascripts/syntaxhighlighter/shBrushSql.js +0 -66
  189. data/guides/output/javascripts/syntaxhighlighter/shBrushVb.js +0 -56
  190. data/guides/output/javascripts/syntaxhighlighter/shBrushXml.js +0 -69
  191. data/guides/output/javascripts/syntaxhighlighter/shCore.js +0 -17
  192. data/guides/output/layout.html +0 -448
  193. data/guides/output/layouts_and_rendering.html +0 -1541
  194. data/guides/output/maintenance_policy.html +0 -257
  195. data/guides/output/migrations.html +0 -1360
  196. data/guides/output/nested_model_forms.html +0 -412
  197. data/guides/output/plugins.html +0 -644
  198. data/guides/output/rails_application_templates.html +0 -450
  199. data/guides/output/rails_on_rack.html +0 -547
  200. data/guides/output/routing.html +0 -1631
  201. data/guides/output/ruby_on_rails_guides_guidelines.html +0 -329
  202. data/guides/output/security.html +0 -935
  203. data/guides/output/stylesheets/fixes.css +0 -16
  204. data/guides/output/stylesheets/kindle.css +0 -11
  205. data/guides/output/stylesheets/main.css +0 -713
  206. data/guides/output/stylesheets/print.css +0 -52
  207. data/guides/output/stylesheets/reset.css +0 -43
  208. data/guides/output/stylesheets/responsive-tables.css +0 -50
  209. data/guides/output/stylesheets/style.css +0 -13
  210. data/guides/output/stylesheets/syntaxhighlighter/shCore.css +0 -226
  211. data/guides/output/stylesheets/syntaxhighlighter/shCoreDefault.css +0 -328
  212. data/guides/output/stylesheets/syntaxhighlighter/shCoreDjango.css +0 -331
  213. data/guides/output/stylesheets/syntaxhighlighter/shCoreEclipse.css +0 -339
  214. data/guides/output/stylesheets/syntaxhighlighter/shCoreEmacs.css +0 -324
  215. data/guides/output/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
  216. data/guides/output/stylesheets/syntaxhighlighter/shCoreMDUltra.css +0 -324
  217. data/guides/output/stylesheets/syntaxhighlighter/shCoreMidnight.css +0 -324
  218. data/guides/output/stylesheets/syntaxhighlighter/shCoreRDark.css +0 -324
  219. data/guides/output/stylesheets/syntaxhighlighter/shThemeDefault.css +0 -117
  220. data/guides/output/stylesheets/syntaxhighlighter/shThemeDjango.css +0 -120
  221. data/guides/output/stylesheets/syntaxhighlighter/shThemeEclipse.css +0 -128
  222. data/guides/output/stylesheets/syntaxhighlighter/shThemeEmacs.css +0 -113
  223. data/guides/output/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
  224. data/guides/output/stylesheets/syntaxhighlighter/shThemeMDUltra.css +0 -113
  225. data/guides/output/stylesheets/syntaxhighlighter/shThemeMidnight.css +0 -113
  226. data/guides/output/stylesheets/syntaxhighlighter/shThemeRDark.css +0 -113
  227. data/guides/output/stylesheets/syntaxhighlighter/shThemeRailsGuides.css +0 -116
  228. data/guides/output/testing.html +0 -1350
  229. data/guides/output/upgrading_ruby_on_rails.html +0 -1135
  230. data/guides/output/working_with_javascript_in_rails.html +0 -587
@@ -1,97 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- // Copyright 2006 Shin, YoungJin
25
-
26
- var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
27
- 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
28
- 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
29
- 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
30
- 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
31
- 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
32
- 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
33
- 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
34
- 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
35
- 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
36
- 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
37
- 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
38
- 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
39
- 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
40
- 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
41
- 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
42
- 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
43
- 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
44
- 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
45
- '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
46
- 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
47
- 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
48
- 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
49
- 'va_list wchar_t wctrans_t wctype_t wint_t signed';
50
-
51
- var keywords = 'break case catch class const __finally __exception __try ' +
52
- 'const_cast continue private public protected __declspec ' +
53
- 'default delete deprecated dllexport dllimport do dynamic_cast ' +
54
- 'else enum explicit extern if for friend goto inline ' +
55
- 'mutable naked namespace new noinline noreturn nothrow ' +
56
- 'register reinterpret_cast return selectany ' +
57
- 'sizeof static static_cast struct switch template this ' +
58
- 'thread throw true false try typedef typeid typename union ' +
59
- 'using uuid virtual void volatile whcar_t while';
60
-
61
- var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
62
- 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
63
- 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
64
- 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
65
- 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
66
- 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
67
- 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
68
- 'fwrite getc getchar gets perror printf putc putchar puts remove ' +
69
- 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
70
- 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
71
- 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
72
- 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
73
- 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
74
- 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
75
- 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
76
- 'clock ctime difftime gmtime localtime mktime strftime time';
77
-
78
- this.regexList = [
79
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
80
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
81
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
82
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
83
- { regex: /^ *#.*/gm, css: 'preprocessor' },
84
- { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
85
- { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
86
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
87
- ];
88
- };
89
-
90
- Brush.prototype = new SyntaxHighlighter.Highlighter();
91
- Brush.aliases = ['cpp', 'c'];
92
-
93
- SyntaxHighlighter.brushes.Cpp = Brush;
94
-
95
- // CommonJS
96
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
97
- })();
@@ -1,91 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- function getKeywordsCSS(str)
25
- {
26
- return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
27
- };
28
-
29
- function getValuesCSS(str)
30
- {
31
- return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
32
- };
33
-
34
- var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
35
- 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
36
- 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
37
- 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
38
- 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
39
- 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
40
- 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
41
- 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
42
- 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
43
- 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
44
- 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
45
- 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
46
- 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
47
- 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
48
-
49
- var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
50
- 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
51
- 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
52
- 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
53
- 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
54
- 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
55
- 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
56
- 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
57
- 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
58
- 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
59
- 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
60
- 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
61
- 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
62
- 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
63
-
64
- var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
65
-
66
- this.regexList = [
67
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
68
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
69
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
70
- { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
71
- { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
72
- { regex: /!important/g, css: 'color3' }, // !important
73
- { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
74
- { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
75
- { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
76
- ];
77
-
78
- this.forHtmlScript({
79
- left: /(&lt;|<)\s*style.*?(&gt;|>)/gi,
80
- right: /(&lt;|<)\/\s*style\s*(&gt;|>)/gi
81
- });
82
- };
83
-
84
- Brush.prototype = new SyntaxHighlighter.Highlighter();
85
- Brush.aliases = ['css'];
86
-
87
- SyntaxHighlighter.brushes.CSS = Brush;
88
-
89
- // CommonJS
90
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
91
- })();
@@ -1,55 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
25
- 'case char class comp const constructor currency destructor div do double ' +
26
- 'downto else end except exports extended false file finalization finally ' +
27
- 'for function goto if implementation in inherited int64 initialization ' +
28
- 'integer interface is label library longint longword mod nil not object ' +
29
- 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
30
- 'pint64 pointer private procedure program property pshortstring pstring ' +
31
- 'pvariant pwidechar pwidestring protected public published raise real real48 ' +
32
- 'record repeat set shl shortint shortstring shr single smallint string then ' +
33
- 'threadvar to true try type unit until uses val var varirnt while widechar ' +
34
- 'widestring with word write writeln xor';
35
-
36
- this.regexList = [
37
- { regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
38
- { regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
39
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
40
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
41
- { regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
42
- { regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
43
- { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
44
- { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
45
- ];
46
- };
47
-
48
- Brush.prototype = new SyntaxHighlighter.Highlighter();
49
- Brush.aliases = ['delphi', 'pascal', 'pas'];
50
-
51
- SyntaxHighlighter.brushes.Delphi = Brush;
52
-
53
- // CommonJS
54
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
55
- })();
@@ -1,41 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- this.regexList = [
25
- { regex: /^\+\+\+.*$/gm, css: 'color2' },
26
- { regex: /^\-\-\-.*$/gm, css: 'color2' },
27
- { regex: /^\s.*$/gm, css: 'color1' },
28
- { regex: /^@@.*@@$/gm, css: 'variable' },
29
- { regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
30
- { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
31
- ];
32
- };
33
-
34
- Brush.prototype = new SyntaxHighlighter.Highlighter();
35
- Brush.aliases = ['diff', 'patch'];
36
-
37
- SyntaxHighlighter.brushes.Diff = Brush;
38
-
39
- // CommonJS
40
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
41
- })();
@@ -1,52 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- // Contributed by Jean-Lou Dupont
25
- // http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
26
-
27
- // According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
28
- var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
29
- 'case catch cond div end fun if let not of or orelse '+
30
- 'query receive rem try when xor'+
31
- // additional
32
- ' module export import define';
33
-
34
- this.regexList = [
35
- { regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' },
36
- { regex: new RegExp("\\%.+", 'gm'), css: 'comments' },
37
- { regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' },
38
- { regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' },
39
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
40
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
41
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
42
- ];
43
- };
44
-
45
- Brush.prototype = new SyntaxHighlighter.Highlighter();
46
- Brush.aliases = ['erl', 'erlang'];
47
-
48
- SyntaxHighlighter.brushes.Erland = Brush;
49
-
50
- // CommonJS
51
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52
- })();
@@ -1,67 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- // Contributed by Andres Almiray
25
- // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
26
-
27
- var keywords = 'as assert break case catch class continue def default do else extends finally ' +
28
- 'if in implements import instanceof interface new package property return switch ' +
29
- 'throw throws try while public protected private static';
30
- var types = 'void boolean byte char short int long float double';
31
- var constants = 'null';
32
- var methods = 'allProperties count get size '+
33
- 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
34
- 'findIndexOf grep inject max min reverseEach sort ' +
35
- 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
36
- 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
37
- 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
38
- 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
39
- 'transformChar transformLine withOutputStream withPrintWriter withStream ' +
40
- 'withStreams withWriter withWriterAppend write writeLine '+
41
- 'dump inspect invokeMethod print println step times upto use waitForOrKill '+
42
- 'getText';
43
-
44
- this.regexList = [
45
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
46
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
47
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
48
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
49
- { regex: /""".*"""/g, css: 'string' }, // GStrings
50
- { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers
51
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword
52
- { regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type
53
- { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants
54
- { regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods
55
- ];
56
-
57
- this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
58
- }
59
-
60
- Brush.prototype = new SyntaxHighlighter.Highlighter();
61
- Brush.aliases = ['groovy'];
62
-
63
- SyntaxHighlighter.brushes.Groovy = Brush;
64
-
65
- // CommonJS
66
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
67
- })();
@@ -1,52 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/SyntaxHighlighter
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
- *
8
- * @version
9
- * 3.0.83 (July 02 2010)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2010 Alex Gorbatchev.
13
- *
14
- * @license
15
- * Dual licensed under the MIT and GPL licenses.
16
- */
17
- ;(function()
18
- {
19
- // CommonJS
20
- typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
-
22
- function Brush()
23
- {
24
- var keywords = 'break case catch continue ' +
25
- 'default delete do else false ' +
26
- 'for function if in instanceof ' +
27
- 'new null return super switch ' +
28
- 'this throw true try typeof var while with'
29
- ;
30
-
31
- var r = SyntaxHighlighter.regexLib;
32
-
33
- this.regexList = [
34
- { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
35
- { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
36
- { regex: r.singleLineCComments, css: 'comments' }, // one line comments
37
- { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
38
- { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
39
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
40
- ];
41
-
42
- this.forHtmlScript(r.scriptScriptTags);
43
- };
44
-
45
- Brush.prototype = new SyntaxHighlighter.Highlighter();
46
- Brush.aliases = ['js', 'jscript', 'javascript'];
47
-
48
- SyntaxHighlighter.brushes.JScript = Brush;
49
-
50
- // CommonJS
51
- typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52
- })();