rules_view 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/LICENSE +20 -0
  4. data/README.textile +129 -0
  5. data/Rakefile +47 -0
  6. data/VERSION +1 -0
  7. data/app/views/layouts/rules_view.html.erb +43 -0
  8. data/app/views/re_view/template.html.erb +196 -0
  9. data/autotest/discover.rb +2 -0
  10. data/generators/install_generator.rb +41 -0
  11. data/generators/layout_generator.rb +41 -0
  12. data/generators/manifests/application.rb +116 -0
  13. data/generators/manifests/application.yml +8 -0
  14. data/generators/manifests/layout.rb +17 -0
  15. data/generators/manifests/layout.yml +5 -0
  16. data/generators/manifests/templates/app/views/layouts/rules_view_layout.html.erb +47 -0
  17. data/generators/manifests/templates/config/initializers/rules_view.rb +1 -0
  18. data/generators/manifests/templates/doc/README.rules_view +97 -0
  19. data/generators/manifests/templates/public/javascripts/rules_view/jquery-1.4.2.min.js +154 -0
  20. data/generators/manifests/templates/public/javascripts/rules_view/jquery.autocomplete.pack.js +13 -0
  21. data/generators/manifests/templates/public/javascripts/rules_view/jquery.blockUI.js +486 -0
  22. data/generators/manifests/templates/public/javascripts/rules_view/jquery.fancybox-1.3.1.js +1077 -0
  23. data/generators/manifests/templates/public/javascripts/rules_view/re_view.js +148 -0
  24. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/ie.css +35 -0
  25. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/cross.png +0 -0
  26. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/key.png +0 -0
  27. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/tick.png +0 -0
  28. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/readme.txt +32 -0
  29. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/screen.css +97 -0
  30. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/readme.txt +14 -0
  31. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/screen.css +71 -0
  32. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/doc.png +0 -0
  33. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/email.png +0 -0
  34. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/external.png +0 -0
  35. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/feed.png +0 -0
  36. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/im.png +0 -0
  37. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  38. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/visited.png +0 -0
  39. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/xls.png +0 -0
  40. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/readme.txt +18 -0
  41. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/screen.css +40 -0
  42. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/readme.txt +10 -0
  43. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/screen.css +110 -0
  44. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/print.css +29 -0
  45. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/screen.css +258 -0
  46. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/forms.css +65 -0
  47. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.css +280 -0
  48. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.png +0 -0
  49. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/ie.css +76 -0
  50. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/print.css +85 -0
  51. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/reset.css +45 -0
  52. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/typography.css +106 -0
  53. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/blank.gif +0 -0
  54. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_close.png +0 -0
  55. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_loading.png +0 -0
  56. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_left.png +0 -0
  57. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_right.png +0 -0
  58. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_e.png +0 -0
  59. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_n.png +0 -0
  60. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_ne.png +0 -0
  61. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_nw.png +0 -0
  62. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_s.png +0 -0
  63. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_se.png +0 -0
  64. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_sw.png +0 -0
  65. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_w.png +0 -0
  66. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_left.png +0 -0
  67. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_main.png +0 -0
  68. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_over.png +0 -0
  69. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_right.png +0 -0
  70. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-x.png +0 -0
  71. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-y.png +0 -0
  72. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox.png +0 -0
  73. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/jquery.fancybox-1.3.1.css +363 -0
  74. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_box/shadowbox.png +0 -0
  75. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_box/whitebox.jpg +0 -0
  76. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/checked-off.gif +0 -0
  77. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/checked-on.gif +0 -0
  78. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/icon-add.png +0 -0
  79. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/icon-delete.png +0 -0
  80. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-add.png +0 -0
  81. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-remove.png +0 -0
  82. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-select.png +0 -0
  83. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-blue-left.gif +0 -0
  84. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-blue-right.gif +0 -0
  85. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-gray-left.gif +0 -0
  86. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-gray-right.gif +0 -0
  87. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-green-left.gif +0 -0
  88. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-green-right.gif +0 -0
  89. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-orange-left.gif +0 -0
  90. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-orange-right.gif +0 -0
  91. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-red-left.gif +0 -0
  92. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-red-right.gif +0 -0
  93. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_error/re-alert-close.png +0 -0
  94. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_navigate/breadcrumb.png +0 -0
  95. data/generators/manifests/templates/public/stylesheets/rules_view/jquery.autocomplete.css +53 -0
  96. data/generators/manifests/templates/public/stylesheets/rules_view/rules_view.css +738 -0
  97. data/init.rb +1 -0
  98. data/lib/rules_view/alerts.rb +51 -0
  99. data/lib/rules_view/boxes.rb +25 -0
  100. data/lib/rules_view/buttons.rb +113 -0
  101. data/lib/rules_view/config.rb +21 -0
  102. data/lib/rules_view/defer.rb +30 -0
  103. data/lib/rules_view/engine.rb +28 -0
  104. data/lib/rules_view/form_builder.rb +62 -0
  105. data/lib/rules_view/form_fields.rb +41 -0
  106. data/lib/rules_view/form_styles.rb +112 -0
  107. data/lib/rules_view/model_loader.rb +64 -0
  108. data/lib/rules_view/navigate.rb +40 -0
  109. data/lib/rules_view.rb +20 -0
  110. data/rules_view.gemspec +239 -0
  111. data/spec/lib/rules_view/alerts_spec.rb +145 -0
  112. data/spec/lib/rules_view/boxes_spec.rb +49 -0
  113. data/spec/lib/rules_view/buttons_spec.rb +184 -0
  114. data/spec/lib/rules_view/defer_spec.rb +90 -0
  115. data/spec/lib/rules_view/form_builder_fields_spec.rb +184 -0
  116. data/spec/lib/rules_view/form_builder_spec.rb +19 -0
  117. data/spec/lib/rules_view/form_fields_spec.rb +219 -0
  118. data/spec/lib/rules_view/form_styles_spec.rb +290 -0
  119. data/spec/lib/rules_view/model_loader_spec.rb +202 -0
  120. data/spec/lib/rules_view/navigate_spec.rb +61 -0
  121. data/spec/rails_3_0_0_root/.gitignore +4 -0
  122. data/spec/rails_3_0_0_root/.rspec +1 -0
  123. data/spec/rails_3_0_0_root/Gemfile +13 -0
  124. data/spec/rails_3_0_0_root/Gemfile.lock +101 -0
  125. data/spec/rails_3_0_0_root/README +256 -0
  126. data/spec/rails_3_0_0_root/Rakefile +7 -0
  127. data/spec/rails_3_0_0_root/app/controllers/application_controller.rb +3 -0
  128. data/spec/rails_3_0_0_root/app/helpers/application_helper.rb +2 -0
  129. data/spec/rails_3_0_0_root/app/views/layouts/application.html.erb +14 -0
  130. data/spec/rails_3_0_0_root/autotest/discover.rb +2 -0
  131. data/spec/rails_3_0_0_root/config/application.rb +42 -0
  132. data/spec/rails_3_0_0_root/config/boot.rb +13 -0
  133. data/spec/rails_3_0_0_root/config/database.yml +22 -0
  134. data/spec/rails_3_0_0_root/config/environment.rb +5 -0
  135. data/spec/rails_3_0_0_root/config/environments/development.rb +26 -0
  136. data/spec/rails_3_0_0_root/config/environments/production.rb +49 -0
  137. data/spec/rails_3_0_0_root/config/environments/test.rb +35 -0
  138. data/spec/rails_3_0_0_root/config/initializers/backtrace_silencers.rb +7 -0
  139. data/spec/rails_3_0_0_root/config/initializers/inflections.rb +10 -0
  140. data/spec/rails_3_0_0_root/config/initializers/mime_types.rb +5 -0
  141. data/spec/rails_3_0_0_root/config/initializers/secret_token.rb +7 -0
  142. data/spec/rails_3_0_0_root/config/initializers/session_store.rb +8 -0
  143. data/spec/rails_3_0_0_root/config/locales/en.yml +5 -0
  144. data/spec/rails_3_0_0_root/config/routes.rb +58 -0
  145. data/spec/rails_3_0_0_root/config.ru +4 -0
  146. data/spec/rails_3_0_0_root/db/seeds.rb +7 -0
  147. data/spec/rails_3_0_0_root/doc/README_FOR_APP +2 -0
  148. data/spec/rails_3_0_0_root/lib/tasks/.gitkeep +0 -0
  149. data/spec/rails_3_0_0_root/public/404.html +26 -0
  150. data/spec/rails_3_0_0_root/public/422.html +26 -0
  151. data/spec/rails_3_0_0_root/public/500.html +26 -0
  152. data/spec/rails_3_0_0_root/public/favicon.ico +0 -0
  153. data/spec/rails_3_0_0_root/public/images/rails.png +0 -0
  154. data/spec/rails_3_0_0_root/public/index.html +239 -0
  155. data/spec/rails_3_0_0_root/public/javascripts/application.js +2 -0
  156. data/spec/rails_3_0_0_root/public/javascripts/controls.js +965 -0
  157. data/spec/rails_3_0_0_root/public/javascripts/dragdrop.js +974 -0
  158. data/spec/rails_3_0_0_root/public/javascripts/effects.js +1123 -0
  159. data/spec/rails_3_0_0_root/public/javascripts/prototype.js +6001 -0
  160. data/spec/rails_3_0_0_root/public/javascripts/rails.js +175 -0
  161. data/spec/rails_3_0_0_root/public/robots.txt +5 -0
  162. data/spec/rails_3_0_0_root/public/stylesheets/.gitkeep +0 -0
  163. data/spec/rails_3_0_0_root/script/rails +6 -0
  164. data/spec/rails_3_0_0_root/spec/spec_helper.rb +27 -0
  165. data/spec/rails_3_0_0_root/vendor/plugins/.gitkeep +0 -0
  166. data/spec/spec_helper.rb +29 -0
  167. data/spec/support/create_memory_db.rb +2 -0
  168. data/tasks/rspec.rake +46 -0
  169. metadata +278 -0
@@ -0,0 +1,239 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rules_view}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Chris Douglas"]
12
+ s.date = %q{2010-10-21}
13
+ s.description = %q{Ruby Rails Rules Engine Framework Views}
14
+ s.email = %q{dougo.chris@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.textile"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.textile",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "app/views/layouts/rules_view.html.erb",
27
+ "app/views/re_view/template.html.erb",
28
+ "autotest/discover.rb",
29
+ "generators/install_generator.rb",
30
+ "generators/layout_generator.rb",
31
+ "generators/manifests/application.rb",
32
+ "generators/manifests/application.yml",
33
+ "generators/manifests/layout.rb",
34
+ "generators/manifests/layout.yml",
35
+ "generators/manifests/templates/app/views/layouts/rules_view_layout.html.erb",
36
+ "generators/manifests/templates/config/initializers/rules_view.rb",
37
+ "generators/manifests/templates/doc/README.rules_view",
38
+ "generators/manifests/templates/public/javascripts/rules_view/jquery-1.4.2.min.js",
39
+ "generators/manifests/templates/public/javascripts/rules_view/jquery.autocomplete.pack.js",
40
+ "generators/manifests/templates/public/javascripts/rules_view/jquery.blockUI.js",
41
+ "generators/manifests/templates/public/javascripts/rules_view/jquery.fancybox-1.3.1.js",
42
+ "generators/manifests/templates/public/javascripts/rules_view/re_view.js",
43
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/ie.css",
44
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/cross.png",
45
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/key.png",
46
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/tick.png",
47
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/readme.txt",
48
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/screen.css",
49
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/readme.txt",
50
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/screen.css",
51
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/doc.png",
52
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/email.png",
53
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/external.png",
54
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/feed.png",
55
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/im.png",
56
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/pdf.png",
57
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/visited.png",
58
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/xls.png",
59
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/readme.txt",
60
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/screen.css",
61
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/readme.txt",
62
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/screen.css",
63
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/print.css",
64
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/screen.css",
65
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/forms.css",
66
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.css",
67
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.png",
68
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/ie.css",
69
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/print.css",
70
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/reset.css",
71
+ "generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/typography.css",
72
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/blank.gif",
73
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_close.png",
74
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_loading.png",
75
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_left.png",
76
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_right.png",
77
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_e.png",
78
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_n.png",
79
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_ne.png",
80
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_nw.png",
81
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_s.png",
82
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_se.png",
83
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_sw.png",
84
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_w.png",
85
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_left.png",
86
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_main.png",
87
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_over.png",
88
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_right.png",
89
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-x.png",
90
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-y.png",
91
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox.png",
92
+ "generators/manifests/templates/public/stylesheets/rules_view/fancybox/jquery.fancybox-1.3.1.css",
93
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_box/shadowbox.png",
94
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_box/whitebox.jpg",
95
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/checked-off.gif",
96
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/checked-on.gif",
97
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/icon-add.png",
98
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/icon-delete.png",
99
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-add.png",
100
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-remove.png",
101
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-select.png",
102
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-blue-left.gif",
103
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-blue-right.gif",
104
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-gray-left.gif",
105
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-gray-right.gif",
106
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-green-left.gif",
107
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-green-right.gif",
108
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-orange-left.gif",
109
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-orange-right.gif",
110
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-red-left.gif",
111
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-red-right.gif",
112
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_error/re-alert-close.png",
113
+ "generators/manifests/templates/public/stylesheets/rules_view/images/re_view_navigate/breadcrumb.png",
114
+ "generators/manifests/templates/public/stylesheets/rules_view/jquery.autocomplete.css",
115
+ "generators/manifests/templates/public/stylesheets/rules_view/rules_view.css",
116
+ "init.rb",
117
+ "lib/rules_view.rb",
118
+ "lib/rules_view/alerts.rb",
119
+ "lib/rules_view/boxes.rb",
120
+ "lib/rules_view/buttons.rb",
121
+ "lib/rules_view/config.rb",
122
+ "lib/rules_view/defer.rb",
123
+ "lib/rules_view/engine.rb",
124
+ "lib/rules_view/form_builder.rb",
125
+ "lib/rules_view/form_fields.rb",
126
+ "lib/rules_view/form_styles.rb",
127
+ "lib/rules_view/model_loader.rb",
128
+ "lib/rules_view/navigate.rb",
129
+ "rules_view.gemspec",
130
+ "spec/lib/rules_view/alerts_spec.rb",
131
+ "spec/lib/rules_view/boxes_spec.rb",
132
+ "spec/lib/rules_view/buttons_spec.rb",
133
+ "spec/lib/rules_view/defer_spec.rb",
134
+ "spec/lib/rules_view/form_builder_fields_spec.rb",
135
+ "spec/lib/rules_view/form_builder_spec.rb",
136
+ "spec/lib/rules_view/form_fields_spec.rb",
137
+ "spec/lib/rules_view/form_styles_spec.rb",
138
+ "spec/lib/rules_view/model_loader_spec.rb",
139
+ "spec/lib/rules_view/navigate_spec.rb",
140
+ "spec/rails_3_0_0_root/.gitignore",
141
+ "spec/rails_3_0_0_root/.rspec",
142
+ "spec/rails_3_0_0_root/Gemfile",
143
+ "spec/rails_3_0_0_root/Gemfile.lock",
144
+ "spec/rails_3_0_0_root/README",
145
+ "spec/rails_3_0_0_root/Rakefile",
146
+ "spec/rails_3_0_0_root/app/controllers/application_controller.rb",
147
+ "spec/rails_3_0_0_root/app/helpers/application_helper.rb",
148
+ "spec/rails_3_0_0_root/app/views/layouts/application.html.erb",
149
+ "spec/rails_3_0_0_root/autotest/discover.rb",
150
+ "spec/rails_3_0_0_root/config.ru",
151
+ "spec/rails_3_0_0_root/config/application.rb",
152
+ "spec/rails_3_0_0_root/config/boot.rb",
153
+ "spec/rails_3_0_0_root/config/database.yml",
154
+ "spec/rails_3_0_0_root/config/environment.rb",
155
+ "spec/rails_3_0_0_root/config/environments/development.rb",
156
+ "spec/rails_3_0_0_root/config/environments/production.rb",
157
+ "spec/rails_3_0_0_root/config/environments/test.rb",
158
+ "spec/rails_3_0_0_root/config/initializers/backtrace_silencers.rb",
159
+ "spec/rails_3_0_0_root/config/initializers/inflections.rb",
160
+ "spec/rails_3_0_0_root/config/initializers/mime_types.rb",
161
+ "spec/rails_3_0_0_root/config/initializers/secret_token.rb",
162
+ "spec/rails_3_0_0_root/config/initializers/session_store.rb",
163
+ "spec/rails_3_0_0_root/config/locales/en.yml",
164
+ "spec/rails_3_0_0_root/config/routes.rb",
165
+ "spec/rails_3_0_0_root/db/seeds.rb",
166
+ "spec/rails_3_0_0_root/doc/README_FOR_APP",
167
+ "spec/rails_3_0_0_root/lib/tasks/.gitkeep",
168
+ "spec/rails_3_0_0_root/public/404.html",
169
+ "spec/rails_3_0_0_root/public/422.html",
170
+ "spec/rails_3_0_0_root/public/500.html",
171
+ "spec/rails_3_0_0_root/public/favicon.ico",
172
+ "spec/rails_3_0_0_root/public/images/rails.png",
173
+ "spec/rails_3_0_0_root/public/index.html",
174
+ "spec/rails_3_0_0_root/public/javascripts/application.js",
175
+ "spec/rails_3_0_0_root/public/javascripts/controls.js",
176
+ "spec/rails_3_0_0_root/public/javascripts/dragdrop.js",
177
+ "spec/rails_3_0_0_root/public/javascripts/effects.js",
178
+ "spec/rails_3_0_0_root/public/javascripts/prototype.js",
179
+ "spec/rails_3_0_0_root/public/javascripts/rails.js",
180
+ "spec/rails_3_0_0_root/public/robots.txt",
181
+ "spec/rails_3_0_0_root/public/stylesheets/.gitkeep",
182
+ "spec/rails_3_0_0_root/script/rails",
183
+ "spec/rails_3_0_0_root/spec/spec_helper.rb",
184
+ "spec/rails_3_0_0_root/vendor/plugins/.gitkeep",
185
+ "spec/spec_helper.rb",
186
+ "spec/support/create_memory_db.rb",
187
+ "tasks/rspec.rake"
188
+ ]
189
+ s.homepage = %q{http://github.com/dougochris/rules_view}
190
+ s.rdoc_options = ["--charset=UTF-8"]
191
+ s.require_paths = ["lib"]
192
+ s.rubygems_version = %q{1.3.7}
193
+ s.summary = %q{views and styles used in my rules engine and other projects}
194
+ s.test_files = [
195
+ "spec/lib/rules_view/alerts_spec.rb",
196
+ "spec/lib/rules_view/boxes_spec.rb",
197
+ "spec/lib/rules_view/buttons_spec.rb",
198
+ "spec/lib/rules_view/defer_spec.rb",
199
+ "spec/lib/rules_view/form_builder_fields_spec.rb",
200
+ "spec/lib/rules_view/form_builder_spec.rb",
201
+ "spec/lib/rules_view/form_fields_spec.rb",
202
+ "spec/lib/rules_view/form_styles_spec.rb",
203
+ "spec/lib/rules_view/model_loader_spec.rb",
204
+ "spec/lib/rules_view/navigate_spec.rb",
205
+ "spec/rails_3_0_0_root/app/controllers/application_controller.rb",
206
+ "spec/rails_3_0_0_root/app/helpers/application_helper.rb",
207
+ "spec/rails_3_0_0_root/autotest/discover.rb",
208
+ "spec/rails_3_0_0_root/config/application.rb",
209
+ "spec/rails_3_0_0_root/config/boot.rb",
210
+ "spec/rails_3_0_0_root/config/environment.rb",
211
+ "spec/rails_3_0_0_root/config/environments/development.rb",
212
+ "spec/rails_3_0_0_root/config/environments/production.rb",
213
+ "spec/rails_3_0_0_root/config/environments/test.rb",
214
+ "spec/rails_3_0_0_root/config/initializers/backtrace_silencers.rb",
215
+ "spec/rails_3_0_0_root/config/initializers/inflections.rb",
216
+ "spec/rails_3_0_0_root/config/initializers/mime_types.rb",
217
+ "spec/rails_3_0_0_root/config/initializers/secret_token.rb",
218
+ "spec/rails_3_0_0_root/config/initializers/session_store.rb",
219
+ "spec/rails_3_0_0_root/config/routes.rb",
220
+ "spec/rails_3_0_0_root/db/seeds.rb",
221
+ "spec/rails_3_0_0_root/spec/spec_helper.rb",
222
+ "spec/spec_helper.rb",
223
+ "spec/support/create_memory_db.rb"
224
+ ]
225
+
226
+ if s.respond_to? :specification_version then
227
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
228
+ s.specification_version = 3
229
+
230
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
231
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
232
+ else
233
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
234
+ end
235
+ else
236
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
237
+ end
238
+ end
239
+
@@ -0,0 +1,145 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "re_alert" do
4
+ include RSpec::Rails::HelperExampleGroup
5
+
6
+ def call_re_alert(error, success, notice)
7
+ flash[:error] = "#{error}"
8
+ flash[:success] = "#{success}"
9
+ flash[:notice] = "#{notice}"
10
+ helper.re_alert
11
+ end
12
+
13
+ it "should be accessible to rails apps by default" do
14
+ ActionView::Base.new.methods.should include("re_alert")
15
+ end
16
+
17
+ it "should be html safe" do
18
+ call_re_alert("error", "", "").should be_html_safe
19
+ call_re_alert("<error>", "", "").should have_selector('div#re_alert > div.error > span') do |error_message|
20
+ error_message.inner_html.should == "&lt;error&gt;"
21
+ end
22
+ end
23
+
24
+ describe "setting an error message" do
25
+ it "should display the message" do
26
+ call_re_alert("error", "", "").should have_selector('div#re_alert > div.error > strong', :content => 'Error :')
27
+ call_re_alert("error", "", "").should have_selector('div#re_alert > div.error > span', :content => "error")
28
+ end
29
+
30
+ it "should not display the success message or notice message" do
31
+ call_re_alert("error", "success", "notice").should_not have_selector('div.success')
32
+ call_re_alert("error", "success", "notice").should_not have_selector('div.notice')
33
+ end
34
+
35
+ it "should reset the error, success and notice message" do
36
+ call_re_alert("error", "success", "notice")
37
+ flash[:error].should be_blank
38
+ flash[:success].should be_blank
39
+ flash[:notice].should be_blank
40
+ end
41
+ end
42
+
43
+ describe "setting a success message" do
44
+ it "should display the message" do
45
+ call_re_alert("", "success", "").should have_selector('div#re_alert > div.success > strong', :content => "Success :")
46
+ call_re_alert("", "success", "").should have_selector('div#re_alert > div.success > span', :content => "success")
47
+ end
48
+
49
+ it "should not display the notice message" do
50
+ call_re_alert("", "success", "notice").should_not have_selector('div.notice')
51
+ end
52
+
53
+ it "should reset the success and notice message" do
54
+ call_re_alert("", "success", "notice")
55
+ flash[:error].should be_blank
56
+ flash[:success].should be_blank
57
+ flash[:notice].should be_blank
58
+ end
59
+ end
60
+
61
+ describe "setting a notice message" do
62
+ it "should display the message" do
63
+ call_re_alert("", "", "notice").should have_selector('div#re_alert > div.notice > strong', :content => "Warning :")
64
+ call_re_alert("", "", "notice").should have_selector('div#re_alert > div.notice > span', :content => "notice")
65
+ end
66
+
67
+ it "should reset the notice message" do
68
+ call_re_alert("", "", "notice")
69
+ flash[:notice].should be_blank
70
+ end
71
+ end
72
+
73
+ describe "setting nothing" do
74
+ it "should have an empty re_alert block" do
75
+ call_re_alert("", "", "").should have_selector('div#re_alert', :content => "")
76
+ end
77
+ end
78
+
79
+ end
80
+
81
+
82
+ describe "re_alert_js" do
83
+ include RSpec::Rails::HelperExampleGroup
84
+ def call_re_alert_js(error, success, notice)
85
+ flash[:error] = "#{error}"
86
+ flash[:success] = "#{success}"
87
+ flash[:notice] = "#{notice}"
88
+ helper.re_alert_js
89
+ end
90
+
91
+ it "should be accessible to rails apps by default" do
92
+ ActionView::Base.new.methods.should include("re_alert_js")
93
+ end
94
+
95
+ it "should be a safe buffer" do
96
+ call_re_alert_js("error", "", "").should be_html_safe
97
+ call_re_alert_js("<error>", "", "").should =~ /&lt;error&gt;/
98
+ end
99
+
100
+ describe "setting an error message" do
101
+ it "should display the message" do
102
+ call_re_alert_js("<p>error</p>", "", "").should =~ /\$.re_error_message/
103
+ end
104
+
105
+ it "should not display the success message or notice message" do
106
+ call_re_alert_js("error", "success", "notice").should_not =~ /\$.re_success_message/
107
+ call_re_alert_js("error", "success", "notice").should_not =~ /\$.re_notice_message/
108
+ end
109
+
110
+ it "should reset the error, success and notice message" do
111
+ call_re_alert_js("error", "success", "notice")
112
+ flash[:error].should be_blank
113
+ flash[:success].should be_blank
114
+ flash[:notice].should be_blank
115
+ end
116
+ end
117
+
118
+ describe "setting a success message" do
119
+ it "should display the message" do
120
+ call_re_alert_js("", "success", "").should =~ /\$.re_success_message/
121
+ end
122
+
123
+ it "should not display the notice message" do
124
+ call_re_alert_js("", "success", "notice").should_not =~ /\$.re_notice_message/
125
+ end
126
+
127
+ it "should reset the success and notice message" do
128
+ call_re_alert_js("", "success", "notice")
129
+ flash[:error].should be_blank
130
+ flash[:success].should be_blank
131
+ flash[:notice].should be_blank
132
+ end
133
+ end
134
+
135
+ describe "setting a notice message" do
136
+ it "should display the message" do
137
+ call_re_alert_js("", "", "notice").should =~ /\$.re_notice_message/
138
+ end
139
+
140
+ it "should reset the notice message" do
141
+ call_re_alert_js("", "", "notice")
142
+ flash[:notice].should be_blank
143
+ end
144
+ end
145
+ end
@@ -0,0 +1,49 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "re_whitebox" do
4
+ include RSpec::Rails::HelperExampleGroup
5
+
6
+ def call_re_whitebox
7
+ helper.re_whitebox do
8
+ "body text"
9
+ end
10
+ end
11
+
12
+ it "should be accessible to rails apps by default" do
13
+ ActionView::Base.new.methods.should include("re_whitebox")
14
+ end
15
+
16
+ it "should be html safe" do
17
+ call_re_whitebox().should be_html_safe
18
+ end
19
+
20
+ it "should wrap the content in a whitebox" do
21
+ call_re_whitebox().should have_selector('div.re-whitebox div.re-whitebox-content', :content => "body text")
22
+ call_re_whitebox().should have_selector('div.re-whitebox div.clear')
23
+ end
24
+ end
25
+
26
+
27
+ describe "re_shadowbox" do
28
+ include RSpec::Rails::HelperExampleGroup
29
+
30
+ def call_re_shadowbox
31
+ helper.re_shadowbox do
32
+ 'body text'
33
+ end
34
+ end
35
+
36
+ it "should be accessible to rails apps by default" do
37
+ ActionView::Base.new.methods.should include("re_shadowbox")
38
+ end
39
+
40
+ it "should be html safe" do
41
+ call_re_shadowbox.should be_html_safe
42
+ end
43
+
44
+ it "should wrap the content in a shadowbox" do
45
+ call_re_shadowbox.should have_selector('div.re-shadowbox-outer div.re-shadowbox-inner', :content => "body text")
46
+ call_re_shadowbox.should have_selector('div.re-shadowbox-outer div.clear')
47
+ end
48
+ end
49
+
@@ -0,0 +1,184 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "re_button_submit" do
4
+ include RSpec::Rails::HelperExampleGroup
5
+
6
+ it "should be accessible to rails apps by default" do
7
+ ActionView::Base.new.methods.should include("re_button_submit")
8
+ end
9
+
10
+ it "should be html safe" do
11
+ helper.re_button_submit("Title", "red").should be_html_safe
12
+ helper.re_button_submit("<Title>", "red").should =~/&lt;Title&gt;/
13
+ end
14
+
15
+ it "should set the default class to re-form-field" do
16
+ helper.re_button_submit("Title", "red").should have_selector('div.re-form-button input[type=submit].re-form-button-red')
17
+ end
18
+
19
+ it "should set the width from the span value" do
20
+ helper.re_button_submit("Title", "red", :span => '20').should have_selector('div.re-form-button.span-20')
21
+ end
22
+
23
+ it "should be html safe" do
24
+ helper.re_button_submit("Title", "red").should have_selector('div.re-form-button input[value=Title]')
25
+ end
26
+
27
+ end
28
+
29
+ %w(gray blue green orange red).each do |color|
30
+ describe "re_button_submit_#{color}" do
31
+ include RSpec::Rails::HelperExampleGroup
32
+
33
+ it "should be accessible to rails apps by default" do
34
+ ActionView::Base.new.methods.should include("re_button_submit_#{color}")
35
+ end
36
+
37
+ it "should call button submit" do
38
+ helper.should_receive(:re_button_submit).with("title", "#{color}", {})
39
+ helper.instance_eval("re_button_submit_#{color}('title')")
40
+ end
41
+ end
42
+ end
43
+
44
+ describe "re_button_link" do
45
+ include RSpec::Rails::HelperExampleGroup
46
+
47
+ it "should be accessible to rails apps by default" do
48
+ ActionView::Base.new.methods.should include("re_button_link")
49
+ end
50
+
51
+ it "should be html safe" do
52
+ helper.re_button_link("Title", "http://wow", "red").should be_html_safe
53
+ helper.re_button_link("<Title>", "http://wow", "red").should =~/&lt;Title&gt;/
54
+ end
55
+
56
+ it "should set the default class to re-form-field" do
57
+ helper.re_button_link("Title", "http://wow", "red").should have_selector("div.re-form-button a.re-form-button-red") do |anchor|
58
+ anchor.first.attribute('href').value.should == "http://wow"
59
+ end
60
+ end
61
+
62
+ it "should set the width from the span value" do
63
+ helper.re_button_link("Title", "http://wow", "red", :span => '20').should have_selector('div.re-form-button.span-20')
64
+ end
65
+
66
+ end
67
+
68
+ %w(gray blue green orange red).each do |color|
69
+ describe "re_button_link_#{color}" do
70
+ include RSpec::Rails::HelperExampleGroup
71
+
72
+ it "should be accessible to rails apps by default" do
73
+ ActionView::Base.new.methods.should include("re_button_link_#{color}")
74
+ end
75
+
76
+ it "should call button link" do
77
+ helper.should_receive(:re_button_link).with("title", "url", "#{color}", {})
78
+ helper.instance_eval("re_button_link_#{color}('title', 'url')")
79
+ end
80
+ end
81
+ end
82
+
83
+
84
+ describe "re_add_link" do
85
+ include RSpec::Rails::HelperExampleGroup
86
+
87
+ it "should call link_to with the title" do
88
+ helper.should_receive(:link_to).with("mock_title", "#", anything())
89
+ helper.re_add_link('mock_title', 'mock_id')
90
+ end
91
+
92
+ it "should call link_to with the id" do
93
+ helper.should_receive(:link_to).with(anything(), anything(), hash_including({:id => 'mock_id'}))
94
+ helper.re_add_link('mock_title', 'mock_id')
95
+ end
96
+
97
+ it "should set the link class to re-add-link" do
98
+ helper.should_receive(:link_to).with(anything(), anything(), hash_including({:class => 're-add-link'}))
99
+ helper.re_add_link('mock_title', 'mock_id')
100
+ end
101
+ end
102
+
103
+ describe "re_remove_link" do
104
+ include RSpec::Rails::HelperExampleGroup
105
+
106
+ it "shouldbe blank if the id is 0" do
107
+ helper.re_remove_link('mock_title', 'object[name]', 0).should be_blank
108
+ end
109
+
110
+ it "should call link_to with the title" do
111
+ helper.should_receive(:link_to).with("mock_title", anything(), anything())
112
+ helper.re_remove_link('mock_title', 'object[name]', 'mock_id')
113
+ end
114
+
115
+ it "should call link_to with the id" do
116
+ helper.should_receive(:link_to).with(anything(), anything(), hash_including({:id => 'object_name_remove'}))
117
+ helper.re_remove_link('mock_title', 'object[name]', 'mock_id')
118
+ end
119
+
120
+ it "should set the link class to re-remove-link" do
121
+ helper.should_receive(:link_to).with(anything(), anything(), hash_including({:class => 're-remove-link'}))
122
+ helper.re_remove_link('mock_title', 'object[name]', 'mock_id')
123
+ end
124
+
125
+ end
126
+
127
+ describe "re_remove_field" do
128
+ include RSpec::Rails::HelperExampleGroup
129
+
130
+ it "should be blank if the id is 0" do
131
+ helper.re_remove_field('object[name]', 0).should be_blank
132
+ end
133
+
134
+ it "should call hidden_field_tag with the _delete field" do
135
+ helper.should_receive(:hidden_field_tag).with("object[name][_delete]", anything(), anything())
136
+ helper.re_remove_field('object[name]', 'mock_id')
137
+ end
138
+
139
+ it "should call hidden_field_tag with the id" do
140
+ helper.should_receive(:hidden_field_tag).with(anything(), anything(), hash_including({:id => 'object_name__delete'}))
141
+ helper.re_remove_field('object[name]', 'mock_id')
142
+ end
143
+ end
144
+
145
+ describe "re_button_add" do
146
+ include RSpec::Rails::HelperExampleGroup
147
+
148
+ it "should a link to with the class re-button-add" do
149
+ helper.re_button_add('http://test').should have_selector('a.re-button-add') do |anchor|
150
+ anchor.first.attribute('href').value.should == "http://test"
151
+ end
152
+ end
153
+ end
154
+
155
+ describe "re_button_remove" do
156
+ include RSpec::Rails::HelperExampleGroup
157
+
158
+ it "should a link to with the class re-button-remove" do
159
+ helper.re_button_remove('http://test').should have_selector('a.re-button-remove') do |anchor|
160
+ anchor.first.attribute('href').value.should == "http://test"
161
+ end
162
+ end
163
+ end
164
+
165
+ describe "re_button_select" do
166
+ include RSpec::Rails::HelperExampleGroup
167
+
168
+ it "should a link to with the class re-button-select" do
169
+ helper.re_button_select('http://test').should have_selector('a.re-button-select') do |anchor|
170
+ anchor.first.attribute('href').value.should == "http://test"
171
+ end
172
+ end
173
+ end
174
+
175
+ describe "re_button_checked" do
176
+ include RSpec::Rails::HelperExampleGroup
177
+
178
+ it "should a link to with the class re-button-checked" do
179
+ helper.re_button_checked('http://test').should have_selector('a.re-button-checked') do |anchor|
180
+ anchor.first.attribute('href').value.should == "http://test"
181
+ end
182
+ end
183
+ end
184
+