orange 0.5.5 → 0.5.7

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. data/lib/orange.rb +2 -5
  2. data/spec/orange_spec.rb +5 -0
  3. data/spec/{orange-core/spec_helper.rb → spec_helper.rb} +0 -0
  4. metadata +28 -235
  5. data/lib/orange-core.rb +0 -8
  6. data/lib/orange-core/application.rb +0 -132
  7. data/lib/orange-core/assets/css/exceptions.css +0 -50
  8. data/lib/orange-core/assets/js/exceptions.js +0 -44
  9. data/lib/orange-core/carton.rb +0 -178
  10. data/lib/orange-core/core.rb +0 -266
  11. data/lib/orange-core/magick.rb +0 -270
  12. data/lib/orange-core/middleware/base.rb +0 -96
  13. data/lib/orange-core/middleware/database.rb +0 -45
  14. data/lib/orange-core/middleware/four_oh_four.rb +0 -45
  15. data/lib/orange-core/middleware/globals.rb +0 -17
  16. data/lib/orange-core/middleware/loader.rb +0 -13
  17. data/lib/orange-core/middleware/rerouter.rb +0 -53
  18. data/lib/orange-core/middleware/restful_router.rb +0 -99
  19. data/lib/orange-core/middleware/route_context.rb +0 -39
  20. data/lib/orange-core/middleware/route_site.rb +0 -51
  21. data/lib/orange-core/middleware/show_exceptions.rb +0 -80
  22. data/lib/orange-core/middleware/static.rb +0 -67
  23. data/lib/orange-core/middleware/static_file.rb +0 -32
  24. data/lib/orange-core/middleware/template.rb +0 -60
  25. data/lib/orange-core/packet.rb +0 -232
  26. data/lib/orange-core/plugin.rb +0 -172
  27. data/lib/orange-core/resource.rb +0 -96
  28. data/lib/orange-core/resources/mapper.rb +0 -36
  29. data/lib/orange-core/resources/model_resource.rb +0 -228
  30. data/lib/orange-core/resources/not_found.rb +0 -10
  31. data/lib/orange-core/resources/page_parts.rb +0 -68
  32. data/lib/orange-core/resources/parser.rb +0 -113
  33. data/lib/orange-core/resources/routable_resource.rb +0 -16
  34. data/lib/orange-core/resources/scaffold.rb +0 -106
  35. data/lib/orange-core/stack.rb +0 -226
  36. data/lib/orange-core/templates/exceptions.haml +0 -111
  37. data/lib/orange-core/views/default_resource/create.haml +0 -4
  38. data/lib/orange-core/views/default_resource/edit.haml +0 -9
  39. data/lib/orange-core/views/default_resource/list.haml +0 -10
  40. data/lib/orange-core/views/default_resource/show.haml +0 -4
  41. data/lib/orange-core/views/default_resource/table_row.haml +0 -7
  42. data/lib/orange-core/views/not_found/404.haml +0 -2
  43. data/lib/orange-more.rb +0 -23
  44. data/lib/orange-more/administration.rb +0 -1
  45. data/lib/orange-more/administration/assets/css/admin.css +0 -286
  46. data/lib/orange-more/administration/assets/css/blueprint-ie.css +0 -35
  47. data/lib/orange-more/administration/assets/css/blueprint-print.css +0 -29
  48. data/lib/orange-more/administration/assets/css/blueprint.css +0 -257
  49. data/lib/orange-more/administration/assets/js/jquery.js +0 -152
  50. data/lib/orange-more/administration/cartons/site.rb +0 -7
  51. data/lib/orange-more/administration/cartons/site_carton.rb +0 -12
  52. data/lib/orange-more/administration/cartons/user.rb +0 -27
  53. data/lib/orange-more/administration/middleware/access_control.rb +0 -156
  54. data/lib/orange-more/administration/middleware/site_load.rb +0 -25
  55. data/lib/orange-more/administration/plugin.rb +0 -23
  56. data/lib/orange-more/administration/resources/admin_resource.rb +0 -27
  57. data/lib/orange-more/administration/resources/site_resource.rb +0 -10
  58. data/lib/orange-more/administration/resources/user_resource.rb +0 -40
  59. data/lib/orange-more/administration/templates/admin.haml +0 -25
  60. data/lib/orange-more/administration/views/openid_login.haml +0 -14
  61. data/lib/orange-more/administration/views/users/create.haml +0 -10
  62. data/lib/orange-more/administration/views/users/edit.haml +0 -15
  63. data/lib/orange-more/adverts.rb +0 -1
  64. data/lib/orange-more/adverts/cartons/adverts_carton.rb +0 -14
  65. data/lib/orange-more/adverts/plugin.rb +0 -13
  66. data/lib/orange-more/adverts/resources/adverts_resource.rb +0 -27
  67. data/lib/orange-more/adverts/views/adverts/adverts.haml +0 -2
  68. data/lib/orange-more/analytics.rb +0 -1
  69. data/lib/orange-more/analytics/middleware/analytics.rb +0 -30
  70. data/lib/orange-more/analytics/plugin.rb +0 -11
  71. data/lib/orange-more/analytics/resources/analytics_resource.rb +0 -42
  72. data/lib/orange-more/assets.rb +0 -1
  73. data/lib/orange-more/assets/cartons/asset_carton.rb +0 -27
  74. data/lib/orange-more/assets/plugin.rb +0 -13
  75. data/lib/orange-more/assets/resources/asset_resource.rb +0 -115
  76. data/lib/orange-more/assets/views/assets/change.haml +0 -1
  77. data/lib/orange-more/assets/views/assets/create.haml +0 -13
  78. data/lib/orange-more/assets/views/assets/insert.haml +0 -1
  79. data/lib/orange-more/blog.rb +0 -1
  80. data/lib/orange-more/blog/cartons/blog.rb +0 -8
  81. data/lib/orange-more/blog/cartons/blog_post.rb +0 -60
  82. data/lib/orange-more/blog/plugin.rb +0 -14
  83. data/lib/orange-more/blog/resources/blog_post_resource.rb +0 -53
  84. data/lib/orange-more/blog/resources/blog_resource.rb +0 -104
  85. data/lib/orange-more/blog/views/blog/blog_archive_view.haml +0 -6
  86. data/lib/orange-more/blog/views/blog/blog_offset_list_view.haml +0 -12
  87. data/lib/orange-more/blog/views/blog/blog_post_view.haml +0 -4
  88. data/lib/orange-more/blog/views/blog/sitemap_row.haml +0 -14
  89. data/lib/orange-more/blog/views/blog_posts/edit.haml +0 -8
  90. data/lib/orange-more/blog/views/blog_posts/show.haml +0 -4
  91. data/lib/orange-more/cloud.rb +0 -1
  92. data/lib/orange-more/cloud/plugin.rb +0 -10
  93. data/lib/orange-more/cloud/resources/cloud_resource.rb +0 -21
  94. data/lib/orange-more/contactforms.rb +0 -1
  95. data/lib/orange-more/contactforms/assets/js/jquery.validate.pack.js +0 -15
  96. data/lib/orange-more/contactforms/assets/js/lib/jquery-1.4.2.js +0 -6240
  97. data/lib/orange-more/contactforms/assets/js/lib/jquery.form.js +0 -660
  98. data/lib/orange-more/contactforms/assets/js/lib/jquery.js +0 -4376
  99. data/lib/orange-more/contactforms/assets/js/lib/jquery.metadata.js +0 -122
  100. data/lib/orange-more/contactforms/cartons/contactforms_carton.rb +0 -12
  101. data/lib/orange-more/contactforms/plugin.rb +0 -13
  102. data/lib/orange-more/contactforms/resources/contactforms_resource.rb +0 -56
  103. data/lib/orange-more/contactforms/views/contactforms/contactform.haml +0 -20
  104. data/lib/orange-more/debugger.rb +0 -1
  105. data/lib/orange-more/debugger/assets/css/debug_bar.css +0 -46
  106. data/lib/orange-more/debugger/middleware/debugger.rb +0 -50
  107. data/lib/orange-more/debugger/plugin.rb +0 -12
  108. data/lib/orange-more/debugger/views/debug_bar.haml +0 -87
  109. data/lib/orange-more/disqus.rb +0 -1
  110. data/lib/orange-more/disqus/plugin.rb +0 -11
  111. data/lib/orange-more/disqus/resources/disqus_resource.rb +0 -9
  112. data/lib/orange-more/disqus/views/disqus/comment_thread.haml +0 -7
  113. data/lib/orange-more/donations.rb +0 -1
  114. data/lib/orange-more/donations/cartons/donation_carton.rb +0 -9
  115. data/lib/orange-more/donations/plugin.rb +0 -12
  116. data/lib/orange-more/donations/resources/donations_resource.rb +0 -51
  117. data/lib/orange-more/donations/views/donations/donate_form.haml +0 -21
  118. data/lib/orange-more/donations/views/donations/donate_thanks.haml +0 -2
  119. data/lib/orange-more/donations/views/donations/paypal_form.haml +0 -13
  120. data/lib/orange-more/events.rb +0 -1
  121. data/lib/orange-more/events/assets/js/events.js +0 -55
  122. data/lib/orange-more/events/cartons/orange_calendar.rb +0 -8
  123. data/lib/orange-more/events/cartons/orange_event.rb +0 -60
  124. data/lib/orange-more/events/plugin.rb +0 -14
  125. data/lib/orange-more/events/resources/calendar_resource.rb +0 -33
  126. data/lib/orange-more/events/resources/event_resource.rb +0 -147
  127. data/lib/orange-more/events/views/calendar/calendar.haml +0 -8
  128. data/lib/orange-more/events/views/events/create.haml +0 -55
  129. data/lib/orange-more/events/views/events/edit.haml +0 -59
  130. data/lib/orange-more/events/views/events/list.haml +0 -13
  131. data/lib/orange-more/events/views/events/show.haml +0 -4
  132. data/lib/orange-more/events/views/events/table_row.haml +0 -17
  133. data/lib/orange-more/members.rb +0 -1
  134. data/lib/orange-more/members/cartons/member_carton.rb +0 -38
  135. data/lib/orange-more/members/plugin.rb +0 -13
  136. data/lib/orange-more/members/resources/members_resource.rb +0 -327
  137. data/lib/orange-more/members/views/members/create.haml +0 -12
  138. data/lib/orange-more/members/views/members/edit.haml +0 -15
  139. data/lib/orange-more/members/views/members/live.show.haml +0 -1
  140. data/lib/orange-more/members/views/members/login.haml +0 -17
  141. data/lib/orange-more/members/views/members/logout.haml +0 -1
  142. data/lib/orange-more/members/views/members/profile.haml +0 -50
  143. data/lib/orange-more/members/views/members/register.haml +0 -37
  144. data/lib/orange-more/news.rb +0 -1
  145. data/lib/orange-more/news/cartons/news.rb +0 -12
  146. data/lib/orange-more/news/plugin.rb +0 -13
  147. data/lib/orange-more/news/resources/news_resource.rb +0 -82
  148. data/lib/orange-more/news/views/news/archive.haml +0 -14
  149. data/lib/orange-more/news/views/news/edit.haml +0 -7
  150. data/lib/orange-more/news/views/news/latest.haml +0 -8
  151. data/lib/orange-more/news/views/news/sitemap_row.haml +0 -14
  152. data/lib/orange-more/pages.rb +0 -1
  153. data/lib/orange-more/pages/cartons/page_carton.rb +0 -14
  154. data/lib/orange-more/pages/cartons/page_version_carton.rb +0 -12
  155. data/lib/orange-more/pages/plugin.rb +0 -13
  156. data/lib/orange-more/pages/resources/page_resource.rb +0 -179
  157. data/lib/orange-more/pages/views/pages/edit.haml +0 -34
  158. data/lib/orange-more/pages/views/pages/show.haml +0 -6
  159. data/lib/orange-more/sitemap.rb +0 -1
  160. data/lib/orange-more/sitemap/assets/img/sitemap_down.png +0 -0
  161. data/lib/orange-more/sitemap/assets/img/sitemap_down_d.png +0 -0
  162. data/lib/orange-more/sitemap/assets/img/sitemap_indent.png +0 -0
  163. data/lib/orange-more/sitemap/assets/img/sitemap_indent_d.png +0 -0
  164. data/lib/orange-more/sitemap/assets/img/sitemap_outdent.png +0 -0
  165. data/lib/orange-more/sitemap/assets/img/sitemap_outdent_d.png +0 -0
  166. data/lib/orange-more/sitemap/assets/img/sitemap_up.png +0 -0
  167. data/lib/orange-more/sitemap/assets/img/sitemap_up_d.png +0 -0
  168. data/lib/orange-more/sitemap/assets/js/sitemap.js +0 -11
  169. data/lib/orange-more/sitemap/cartons/route.rb +0 -43
  170. data/lib/orange-more/sitemap/middleware/flex_router.rb +0 -25
  171. data/lib/orange-more/sitemap/plugin.rb +0 -17
  172. data/lib/orange-more/sitemap/resources/sitemap_resource.rb +0 -295
  173. data/lib/orange-more/sitemap/views/default_resource/sitemap_row.haml +0 -30
  174. data/lib/orange-more/sitemap/views/sitemap/breadcrumb.haml +0 -12
  175. data/lib/orange-more/sitemap/views/sitemap/list.haml +0 -4
  176. data/lib/orange-more/sitemap/views/sitemap/one_level.haml +0 -7
  177. data/lib/orange-more/sitemap/views/sitemap/route_actions.haml +0 -15
  178. data/lib/orange-more/sitemap/views/sitemap/sitemap_links.haml +0 -14
  179. data/lib/orange-more/sitemap/views/sitemap/table_row.haml +0 -30
  180. data/lib/orange-more/sitemap/views/sitemap/two_level.haml +0 -13
  181. data/lib/orange-more/slices.rb +0 -1
  182. data/lib/orange-more/slices/middleware/radius_parser.rb +0 -24
  183. data/lib/orange-more/slices/plugin.rb +0 -15
  184. data/lib/orange-more/slices/resources/radius.rb +0 -117
  185. data/lib/orange-more/slices/resources/slices.rb +0 -35
  186. data/lib/orange-more/subsites.rb +0 -1
  187. data/lib/orange-more/subsites/cartons/subsite.rb +0 -8
  188. data/lib/orange-more/subsites/middleware/subsite_load.rb +0 -29
  189. data/lib/orange-more/subsites/plugin.rb +0 -17
  190. data/lib/orange-more/subsites/resources/subsite_resource.rb +0 -54
  191. data/lib/orange-more/subsites/views/subsites/index.haml +0 -2
  192. data/lib/orange-more/testimonials.rb +0 -1
  193. data/lib/orange-more/testimonials/cartons/testimonials_carton.rb +0 -15
  194. data/lib/orange-more/testimonials/plugin.rb +0 -13
  195. data/lib/orange-more/testimonials/resources/testimonials_resource.rb +0 -42
  196. data/lib/orange-more/testimonials/views/testimonials/testimonials.haml +0 -4
  197. data/spec/orange-core/application_spec.rb +0 -183
  198. data/spec/orange-core/carton_spec.rb +0 -136
  199. data/spec/orange-core/core_spec.rb +0 -248
  200. data/spec/orange-core/magick_spec.rb +0 -96
  201. data/spec/orange-core/middleware/base_spec.rb +0 -38
  202. data/spec/orange-core/middleware/globals_spec.rb +0 -3
  203. data/spec/orange-core/middleware/rerouter_spec.rb +0 -3
  204. data/spec/orange-core/middleware/restful_router_spec.rb +0 -3
  205. data/spec/orange-core/middleware/route_context_spec.rb +0 -3
  206. data/spec/orange-core/middleware/route_site_spec.rb +0 -3
  207. data/spec/orange-core/middleware/show_exceptions_spec.rb +0 -3
  208. data/spec/orange-core/middleware/static_file_spec.rb +0 -3
  209. data/spec/orange-core/middleware/static_spec.rb +0 -3
  210. data/spec/orange-core/mock/mock_app.rb +0 -16
  211. data/spec/orange-core/mock/mock_carton.rb +0 -43
  212. data/spec/orange-core/mock/mock_core.rb +0 -2
  213. data/spec/orange-core/mock/mock_middleware.rb +0 -25
  214. data/spec/orange-core/mock/mock_mixins.rb +0 -19
  215. data/spec/orange-core/mock/mock_model_resource.rb +0 -47
  216. data/spec/orange-core/mock/mock_pulp.rb +0 -24
  217. data/spec/orange-core/mock/mock_resource.rb +0 -26
  218. data/spec/orange-core/mock/mock_router.rb +0 -10
  219. data/spec/orange-core/orange_spec.rb +0 -19
  220. data/spec/orange-core/packet_spec.rb +0 -203
  221. data/spec/orange-core/resource_spec.rb +0 -96
  222. data/spec/orange-core/resources/mapper_spec.rb +0 -5
  223. data/spec/orange-core/resources/model_resource_spec.rb +0 -246
  224. data/spec/orange-core/resources/parser_spec.rb +0 -5
  225. data/spec/orange-core/resources/routable_resource_spec.rb +0 -5
  226. data/spec/orange-core/stack_spec.rb +0 -232
@@ -1,5 +1,2 @@
1
- libdir = File.dirname(__FILE__)
2
- $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
-
4
- require File.join(libdir, 'orange-core')
5
- require File.join(libdir, 'orange-more')
1
+ require 'orange-core'
2
+ require 'orange-more'
@@ -0,0 +1,5 @@
1
+ describe "Orange" do
2
+ it "should be awesome" do
3
+
4
+ end
5
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 5
9
- version: 0.5.5
8
+ - 7
9
+ version: 0.5.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Haslem
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-11 00:00:00 -04:00
17
+ date: 2010-07-07 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -32,21 +32,21 @@ dependencies:
32
32
  type: :runtime
33
33
  version_requirements: *id001
34
34
  - !ruby/object:Gem::Dependency
35
- name: haml
35
+ name: orange-core
36
36
  prerelease: false
37
37
  requirement: &id002 !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  segments:
42
- - 2
43
- - 2
44
- - 13
45
- version: 2.2.13
42
+ - 0
43
+ - 5
44
+ - 7
45
+ version: 0.5.7
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency
49
- name: rspec
49
+ name: orange-more
50
50
  prerelease: false
51
51
  requirement: &id003 !ruby/object:Gem::Requirement
52
52
  requirements:
@@ -54,11 +54,13 @@ dependencies:
54
54
  - !ruby/object:Gem::Version
55
55
  segments:
56
56
  - 0
57
- version: "0"
58
- type: :development
57
+ - 5
58
+ - 7
59
+ version: 0.5.7
60
+ type: :runtime
59
61
  version_requirements: *id003
60
62
  - !ruby/object:Gem::Dependency
61
- name: rack-test
63
+ name: rspec
62
64
  prerelease: false
63
65
  requirement: &id004 !ruby/object:Gem::Requirement
64
66
  requirements:
@@ -69,6 +71,18 @@ dependencies:
69
71
  version: "0"
70
72
  type: :development
71
73
  version_requirements: *id004
74
+ - !ruby/object:Gem::Dependency
75
+ name: rack-test
76
+ prerelease: false
77
+ requirement: &id005 !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ segments:
82
+ - 0
83
+ version: "0"
84
+ type: :development
85
+ version_requirements: *id005
72
86
  description: Orange is a Ruby framework for building managed websites with code as simple as Sinatra
73
87
  email: therabidbanana@gmail.com
74
88
  executables: []
@@ -78,198 +92,6 @@ extensions: []
78
92
  extra_rdoc_files:
79
93
  - README.markdown
80
94
  files:
81
- - lib/orange-core.rb
82
- - lib/orange-core/application.rb
83
- - lib/orange-core/assets/css/exceptions.css
84
- - lib/orange-core/assets/js/exceptions.js
85
- - lib/orange-core/carton.rb
86
- - lib/orange-core/core.rb
87
- - lib/orange-core/magick.rb
88
- - lib/orange-core/middleware/base.rb
89
- - lib/orange-core/middleware/database.rb
90
- - lib/orange-core/middleware/four_oh_four.rb
91
- - lib/orange-core/middleware/globals.rb
92
- - lib/orange-core/middleware/loader.rb
93
- - lib/orange-core/middleware/rerouter.rb
94
- - lib/orange-core/middleware/restful_router.rb
95
- - lib/orange-core/middleware/route_context.rb
96
- - lib/orange-core/middleware/route_site.rb
97
- - lib/orange-core/middleware/show_exceptions.rb
98
- - lib/orange-core/middleware/static.rb
99
- - lib/orange-core/middleware/static_file.rb
100
- - lib/orange-core/middleware/template.rb
101
- - lib/orange-core/packet.rb
102
- - lib/orange-core/plugin.rb
103
- - lib/orange-core/resource.rb
104
- - lib/orange-core/resources/mapper.rb
105
- - lib/orange-core/resources/model_resource.rb
106
- - lib/orange-core/resources/not_found.rb
107
- - lib/orange-core/resources/page_parts.rb
108
- - lib/orange-core/resources/parser.rb
109
- - lib/orange-core/resources/routable_resource.rb
110
- - lib/orange-core/resources/scaffold.rb
111
- - lib/orange-core/stack.rb
112
- - lib/orange-core/templates/exceptions.haml
113
- - lib/orange-core/views/default_resource/create.haml
114
- - lib/orange-core/views/default_resource/edit.haml
115
- - lib/orange-core/views/default_resource/list.haml
116
- - lib/orange-core/views/default_resource/show.haml
117
- - lib/orange-core/views/default_resource/table_row.haml
118
- - lib/orange-core/views/not_found/404.haml
119
- - lib/orange-more.rb
120
- - lib/orange-more/administration.rb
121
- - lib/orange-more/administration/assets/css/admin.css
122
- - lib/orange-more/administration/assets/css/blueprint-ie.css
123
- - lib/orange-more/administration/assets/css/blueprint-print.css
124
- - lib/orange-more/administration/assets/css/blueprint.css
125
- - lib/orange-more/administration/assets/js/jquery.js
126
- - lib/orange-more/administration/cartons/site.rb
127
- - lib/orange-more/administration/cartons/site_carton.rb
128
- - lib/orange-more/administration/cartons/user.rb
129
- - lib/orange-more/administration/middleware/access_control.rb
130
- - lib/orange-more/administration/middleware/site_load.rb
131
- - lib/orange-more/administration/plugin.rb
132
- - lib/orange-more/administration/resources/admin_resource.rb
133
- - lib/orange-more/administration/resources/site_resource.rb
134
- - lib/orange-more/administration/resources/user_resource.rb
135
- - lib/orange-more/administration/templates/admin.haml
136
- - lib/orange-more/administration/views/openid_login.haml
137
- - lib/orange-more/administration/views/users/create.haml
138
- - lib/orange-more/administration/views/users/edit.haml
139
- - lib/orange-more/adverts.rb
140
- - lib/orange-more/adverts/cartons/adverts_carton.rb
141
- - lib/orange-more/adverts/plugin.rb
142
- - lib/orange-more/adverts/resources/adverts_resource.rb
143
- - lib/orange-more/adverts/views/adverts/adverts.haml
144
- - lib/orange-more/analytics.rb
145
- - lib/orange-more/analytics/middleware/analytics.rb
146
- - lib/orange-more/analytics/plugin.rb
147
- - lib/orange-more/analytics/resources/analytics_resource.rb
148
- - lib/orange-more/assets.rb
149
- - lib/orange-more/assets/cartons/asset_carton.rb
150
- - lib/orange-more/assets/plugin.rb
151
- - lib/orange-more/assets/resources/asset_resource.rb
152
- - lib/orange-more/assets/views/assets/change.haml
153
- - lib/orange-more/assets/views/assets/create.haml
154
- - lib/orange-more/assets/views/assets/insert.haml
155
- - lib/orange-more/blog.rb
156
- - lib/orange-more/blog/cartons/blog.rb
157
- - lib/orange-more/blog/cartons/blog_post.rb
158
- - lib/orange-more/blog/plugin.rb
159
- - lib/orange-more/blog/resources/blog_post_resource.rb
160
- - lib/orange-more/blog/resources/blog_resource.rb
161
- - lib/orange-more/blog/views/blog/blog_archive_view.haml
162
- - lib/orange-more/blog/views/blog/blog_offset_list_view.haml
163
- - lib/orange-more/blog/views/blog/blog_post_view.haml
164
- - lib/orange-more/blog/views/blog/sitemap_row.haml
165
- - lib/orange-more/blog/views/blog_posts/edit.haml
166
- - lib/orange-more/blog/views/blog_posts/show.haml
167
- - lib/orange-more/cloud.rb
168
- - lib/orange-more/cloud/plugin.rb
169
- - lib/orange-more/cloud/resources/cloud_resource.rb
170
- - lib/orange-more/contactforms.rb
171
- - lib/orange-more/contactforms/assets/js/jquery.validate.pack.js
172
- - lib/orange-more/contactforms/assets/js/lib/jquery-1.4.2.js
173
- - lib/orange-more/contactforms/assets/js/lib/jquery.form.js
174
- - lib/orange-more/contactforms/assets/js/lib/jquery.js
175
- - lib/orange-more/contactforms/assets/js/lib/jquery.metadata.js
176
- - lib/orange-more/contactforms/cartons/contactforms_carton.rb
177
- - lib/orange-more/contactforms/plugin.rb
178
- - lib/orange-more/contactforms/resources/contactforms_resource.rb
179
- - lib/orange-more/contactforms/views/contactforms/contactform.haml
180
- - lib/orange-more/debugger.rb
181
- - lib/orange-more/debugger/assets/css/debug_bar.css
182
- - lib/orange-more/debugger/middleware/debugger.rb
183
- - lib/orange-more/debugger/plugin.rb
184
- - lib/orange-more/debugger/views/debug_bar.haml
185
- - lib/orange-more/disqus.rb
186
- - lib/orange-more/disqus/plugin.rb
187
- - lib/orange-more/disqus/resources/disqus_resource.rb
188
- - lib/orange-more/disqus/views/disqus/comment_thread.haml
189
- - lib/orange-more/donations.rb
190
- - lib/orange-more/donations/cartons/donation_carton.rb
191
- - lib/orange-more/donations/plugin.rb
192
- - lib/orange-more/donations/resources/donations_resource.rb
193
- - lib/orange-more/donations/views/donations/donate_form.haml
194
- - lib/orange-more/donations/views/donations/donate_thanks.haml
195
- - lib/orange-more/donations/views/donations/paypal_form.haml
196
- - lib/orange-more/events.rb
197
- - lib/orange-more/events/assets/js/events.js
198
- - lib/orange-more/events/cartons/orange_calendar.rb
199
- - lib/orange-more/events/cartons/orange_event.rb
200
- - lib/orange-more/events/plugin.rb
201
- - lib/orange-more/events/resources/calendar_resource.rb
202
- - lib/orange-more/events/resources/event_resource.rb
203
- - lib/orange-more/events/views/calendar/calendar.haml
204
- - lib/orange-more/events/views/events/create.haml
205
- - lib/orange-more/events/views/events/edit.haml
206
- - lib/orange-more/events/views/events/list.haml
207
- - lib/orange-more/events/views/events/show.haml
208
- - lib/orange-more/events/views/events/table_row.haml
209
- - lib/orange-more/members.rb
210
- - lib/orange-more/members/cartons/member_carton.rb
211
- - lib/orange-more/members/plugin.rb
212
- - lib/orange-more/members/resources/members_resource.rb
213
- - lib/orange-more/members/views/members/create.haml
214
- - lib/orange-more/members/views/members/edit.haml
215
- - lib/orange-more/members/views/members/live.show.haml
216
- - lib/orange-more/members/views/members/login.haml
217
- - lib/orange-more/members/views/members/logout.haml
218
- - lib/orange-more/members/views/members/profile.haml
219
- - lib/orange-more/members/views/members/register.haml
220
- - lib/orange-more/news.rb
221
- - lib/orange-more/news/cartons/news.rb
222
- - lib/orange-more/news/plugin.rb
223
- - lib/orange-more/news/resources/news_resource.rb
224
- - lib/orange-more/news/views/news/archive.haml
225
- - lib/orange-more/news/views/news/edit.haml
226
- - lib/orange-more/news/views/news/latest.haml
227
- - lib/orange-more/news/views/news/sitemap_row.haml
228
- - lib/orange-more/pages.rb
229
- - lib/orange-more/pages/cartons/page_carton.rb
230
- - lib/orange-more/pages/cartons/page_version_carton.rb
231
- - lib/orange-more/pages/plugin.rb
232
- - lib/orange-more/pages/resources/page_resource.rb
233
- - lib/orange-more/pages/views/pages/edit.haml
234
- - lib/orange-more/pages/views/pages/show.haml
235
- - lib/orange-more/sitemap.rb
236
- - lib/orange-more/sitemap/assets/img/sitemap_down.png
237
- - lib/orange-more/sitemap/assets/img/sitemap_down_d.png
238
- - lib/orange-more/sitemap/assets/img/sitemap_indent.png
239
- - lib/orange-more/sitemap/assets/img/sitemap_indent_d.png
240
- - lib/orange-more/sitemap/assets/img/sitemap_outdent.png
241
- - lib/orange-more/sitemap/assets/img/sitemap_outdent_d.png
242
- - lib/orange-more/sitemap/assets/img/sitemap_up.png
243
- - lib/orange-more/sitemap/assets/img/sitemap_up_d.png
244
- - lib/orange-more/sitemap/assets/js/sitemap.js
245
- - lib/orange-more/sitemap/cartons/route.rb
246
- - lib/orange-more/sitemap/middleware/flex_router.rb
247
- - lib/orange-more/sitemap/plugin.rb
248
- - lib/orange-more/sitemap/resources/sitemap_resource.rb
249
- - lib/orange-more/sitemap/views/default_resource/sitemap_row.haml
250
- - lib/orange-more/sitemap/views/sitemap/breadcrumb.haml
251
- - lib/orange-more/sitemap/views/sitemap/list.haml
252
- - lib/orange-more/sitemap/views/sitemap/one_level.haml
253
- - lib/orange-more/sitemap/views/sitemap/route_actions.haml
254
- - lib/orange-more/sitemap/views/sitemap/sitemap_links.haml
255
- - lib/orange-more/sitemap/views/sitemap/table_row.haml
256
- - lib/orange-more/sitemap/views/sitemap/two_level.haml
257
- - lib/orange-more/slices.rb
258
- - lib/orange-more/slices/middleware/radius_parser.rb
259
- - lib/orange-more/slices/plugin.rb
260
- - lib/orange-more/slices/resources/radius.rb
261
- - lib/orange-more/slices/resources/slices.rb
262
- - lib/orange-more/subsites.rb
263
- - lib/orange-more/subsites/cartons/subsite.rb
264
- - lib/orange-more/subsites/middleware/subsite_load.rb
265
- - lib/orange-more/subsites/plugin.rb
266
- - lib/orange-more/subsites/resources/subsite_resource.rb
267
- - lib/orange-more/subsites/views/subsites/index.haml
268
- - lib/orange-more/testimonials.rb
269
- - lib/orange-more/testimonials/cartons/testimonials_carton.rb
270
- - lib/orange-more/testimonials/plugin.rb
271
- - lib/orange-more/testimonials/resources/testimonials_resource.rb
272
- - lib/orange-more/testimonials/views/testimonials/testimonials.haml
273
95
  - lib/orange.rb
274
96
  - README.markdown
275
97
  has_rdoc: true
@@ -303,35 +125,6 @@ signing_key:
303
125
  specification_version: 3
304
126
  summary: Middle ground between Sinatra and Rails
305
127
  test_files:
306
- - spec/orange-core/application_spec.rb
307
- - spec/orange-core/carton_spec.rb
308
- - spec/orange-core/core_spec.rb
309
- - spec/orange-core/magick_spec.rb
310
- - spec/orange-core/middleware/base_spec.rb
311
- - spec/orange-core/middleware/globals_spec.rb
312
- - spec/orange-core/middleware/rerouter_spec.rb
313
- - spec/orange-core/middleware/restful_router_spec.rb
314
- - spec/orange-core/middleware/route_context_spec.rb
315
- - spec/orange-core/middleware/route_site_spec.rb
316
- - spec/orange-core/middleware/show_exceptions_spec.rb
317
- - spec/orange-core/middleware/static_file_spec.rb
318
- - spec/orange-core/middleware/static_spec.rb
319
- - spec/orange-core/mock/mock_app.rb
320
- - spec/orange-core/mock/mock_carton.rb
321
- - spec/orange-core/mock/mock_core.rb
322
- - spec/orange-core/mock/mock_middleware.rb
323
- - spec/orange-core/mock/mock_mixins.rb
324
- - spec/orange-core/mock/mock_model_resource.rb
325
- - spec/orange-core/mock/mock_pulp.rb
326
- - spec/orange-core/mock/mock_resource.rb
327
- - spec/orange-core/mock/mock_router.rb
328
- - spec/orange-core/orange_spec.rb
329
- - spec/orange-core/packet_spec.rb
330
- - spec/orange-core/resource_spec.rb
331
- - spec/orange-core/resources/mapper_spec.rb
332
- - spec/orange-core/resources/model_resource_spec.rb
333
- - spec/orange-core/resources/parser_spec.rb
334
- - spec/orange-core/resources/routable_resource_spec.rb
335
- - spec/orange-core/spec_helper.rb
336
- - spec/orange-core/stack_spec.rb
128
+ - spec/orange_spec.rb
129
+ - spec/spec_helper.rb
337
130
  - spec/stats.rb
@@ -1,8 +0,0 @@
1
- libdir = File.dirname(__FILE__)
2
- $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
-
4
- require File.join(libdir, 'orange-core', 'magick.rb')
5
- Dir.glob(File.join(libdir, 'orange-core', '*.rb')).each {|f| require f }
6
- Dir.glob(File.join(libdir, 'orange-core', 'cartons', '*.rb')).each {|f| require f }
7
- Dir.glob(File.join(libdir, 'orange-core', 'resources', '*.rb')).each {|f| require f }
8
- Dir.glob(File.join(libdir, 'orange-core', 'middleware', '*.rb')).each {|f| require f }
@@ -1,132 +0,0 @@
1
- module Orange
2
- # Orange::Application is the main class used for building an
3
- # Orange App. Typically you will not initialize it directly,
4
- # but use the app method, which returns the entire Orange
5
- # stack, with all middleware and the Orange::Application as
6
- # the main receiver
7
- #
8
- # To override the stack generated by default, you can use
9
- # the self.stack method, which will be used to create a new
10
- # Orange::Stack
11
- class Application
12
- extend ClassInheritableAttributes
13
- cattr_accessor :core, :stack_block
14
- # Initialize will set the core, and additionally accept any
15
- # other options to be added in to the opts array
16
- # @param [Orange::Core] core the orange core instance that this application will use
17
- # @param [Hash] *opts the optional arguments
18
- def initialize(core = false, *opts, &block)
19
- @core = core || self.class.core
20
- @options ||= {}
21
- @options = Orange::Options.new(*opts, &block).hash.with_defaults(self.class.opts)
22
- @core.application(self) # Register self into core
23
- init
24
- end
25
-
26
- # stack_init is ONLY called after the {#app}
27
- # method is called, loading a stack
28
- # (just in case the middleware stack added necessary functionality, etc)
29
- def stack_init
30
- end
31
-
32
- # This method is called by initialize, subclasses should override this method
33
- # for their own initialization needs.
34
- #
35
- # It will usually be better to use stack_init, which gives full access to
36
- # the initialized stack
37
- def init
38
- end
39
-
40
- # Set the orange core to be a new core
41
- #
42
- # Generally, the core should be set during initialization, rather
43
- # than with this method.
44
- # @param [Orange::Core] core the orange core instance
45
- def set_core(core)
46
- @core = core
47
- end
48
-
49
- # The standard call as required by rack. This will
50
- # make an Orange::Packet object (if necessary) and
51
- # then send it to the appropriate router for routing.
52
- #
53
- # If the :self_routing option is true (default) then
54
- # the packet will be routed by the application if there
55
- # is not already another class volunteering for that role.
56
- # (Routers declare themselves in the orange
57
- # env['route.router'] to be called by the application)
58
- #
59
- #
60
- def call(env)
61
- packet = Orange::Packet.new(@core, env)
62
- # Set up this application as router if nothing else has
63
- # assumed routing responsibility (for Sinatra DSL like routing)
64
- self_routing = opts[:self_routing] || true
65
- if (!packet['route.router'] && self_routing)
66
- packet['route.router'] = self
67
- end
68
- packet.route
69
- packet.finish
70
- end
71
-
72
- # Returns the core
73
- # @return [Orange::Core] the core instance set for the application
74
- def orange
75
- @core
76
- end
77
-
78
- # The default route method for the application. Must be overridden in subclasses.
79
- #
80
- # This method will raise a RuntimeError if not overridden.
81
- # The intent is for the application subclass to override this method
82
- # and use it to handle packets not routed by Stack middleware.
83
- def route(packet)
84
- raise "default response from Orange::Application.route"
85
- end
86
-
87
- # Used to set optional values at class level. Will be merged into the options
88
- # given at initialization time
89
- def self.set(key, v = true)
90
- @class_opts ||= {}
91
- @class_opts[key] = v
92
- end
93
-
94
- # Gives access to class defined options.
95
- def self.opts
96
- @class_opts ||= {}
97
- end
98
-
99
- # Gives access to options for the application, both from the class and the
100
- # instance level.
101
- # @return [Hash] the options hash
102
- def opts
103
- @options
104
- end
105
-
106
- # Returns an instance of Orange::Stack to be run by Rack
107
- #
108
- # Usually, you'll call this in the rackup file: `run MyApplication.app`
109
- def self.app(c = false)
110
- if c
111
- self.core = c
112
- else
113
- self.core ||= Orange::Core.new
114
- end
115
- return self.core.stack unless self.core.stack.blank?
116
- if self.stack_block.instance_of?(Proc)
117
- Orange::Stack.new self, self.core, &self.stack_block # turn saved proc into a block arg
118
- else
119
- Orange::Stack.new self, self.core
120
- end
121
- end
122
-
123
- # Changes the stack that will be used when {#app}
124
- # is called
125
- #
126
- # Each call to stack overrides the previous one.
127
- def self.stack(core = false, &block)
128
- self.core = core if core
129
- self.stack_block = Proc.new # pulls in the block and makes it a proc
130
- end
131
- end
132
- end