orange 0.5.5 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/orange.rb +2 -5
- data/spec/orange_spec.rb +5 -0
- data/spec/{orange-core/spec_helper.rb → spec_helper.rb} +0 -0
- metadata +28 -235
- data/lib/orange-core.rb +0 -8
- data/lib/orange-core/application.rb +0 -132
- data/lib/orange-core/assets/css/exceptions.css +0 -50
- data/lib/orange-core/assets/js/exceptions.js +0 -44
- data/lib/orange-core/carton.rb +0 -178
- data/lib/orange-core/core.rb +0 -266
- data/lib/orange-core/magick.rb +0 -270
- data/lib/orange-core/middleware/base.rb +0 -96
- data/lib/orange-core/middleware/database.rb +0 -45
- data/lib/orange-core/middleware/four_oh_four.rb +0 -45
- data/lib/orange-core/middleware/globals.rb +0 -17
- data/lib/orange-core/middleware/loader.rb +0 -13
- data/lib/orange-core/middleware/rerouter.rb +0 -53
- data/lib/orange-core/middleware/restful_router.rb +0 -99
- data/lib/orange-core/middleware/route_context.rb +0 -39
- data/lib/orange-core/middleware/route_site.rb +0 -51
- data/lib/orange-core/middleware/show_exceptions.rb +0 -80
- data/lib/orange-core/middleware/static.rb +0 -67
- data/lib/orange-core/middleware/static_file.rb +0 -32
- data/lib/orange-core/middleware/template.rb +0 -60
- data/lib/orange-core/packet.rb +0 -232
- data/lib/orange-core/plugin.rb +0 -172
- data/lib/orange-core/resource.rb +0 -96
- data/lib/orange-core/resources/mapper.rb +0 -36
- data/lib/orange-core/resources/model_resource.rb +0 -228
- data/lib/orange-core/resources/not_found.rb +0 -10
- data/lib/orange-core/resources/page_parts.rb +0 -68
- data/lib/orange-core/resources/parser.rb +0 -113
- data/lib/orange-core/resources/routable_resource.rb +0 -16
- data/lib/orange-core/resources/scaffold.rb +0 -106
- data/lib/orange-core/stack.rb +0 -226
- data/lib/orange-core/templates/exceptions.haml +0 -111
- data/lib/orange-core/views/default_resource/create.haml +0 -4
- data/lib/orange-core/views/default_resource/edit.haml +0 -9
- data/lib/orange-core/views/default_resource/list.haml +0 -10
- data/lib/orange-core/views/default_resource/show.haml +0 -4
- data/lib/orange-core/views/default_resource/table_row.haml +0 -7
- data/lib/orange-core/views/not_found/404.haml +0 -2
- data/lib/orange-more.rb +0 -23
- data/lib/orange-more/administration.rb +0 -1
- data/lib/orange-more/administration/assets/css/admin.css +0 -286
- data/lib/orange-more/administration/assets/css/blueprint-ie.css +0 -35
- data/lib/orange-more/administration/assets/css/blueprint-print.css +0 -29
- data/lib/orange-more/administration/assets/css/blueprint.css +0 -257
- data/lib/orange-more/administration/assets/js/jquery.js +0 -152
- data/lib/orange-more/administration/cartons/site.rb +0 -7
- data/lib/orange-more/administration/cartons/site_carton.rb +0 -12
- data/lib/orange-more/administration/cartons/user.rb +0 -27
- data/lib/orange-more/administration/middleware/access_control.rb +0 -156
- data/lib/orange-more/administration/middleware/site_load.rb +0 -25
- data/lib/orange-more/administration/plugin.rb +0 -23
- data/lib/orange-more/administration/resources/admin_resource.rb +0 -27
- data/lib/orange-more/administration/resources/site_resource.rb +0 -10
- data/lib/orange-more/administration/resources/user_resource.rb +0 -40
- data/lib/orange-more/administration/templates/admin.haml +0 -25
- data/lib/orange-more/administration/views/openid_login.haml +0 -14
- data/lib/orange-more/administration/views/users/create.haml +0 -10
- data/lib/orange-more/administration/views/users/edit.haml +0 -15
- data/lib/orange-more/adverts.rb +0 -1
- data/lib/orange-more/adverts/cartons/adverts_carton.rb +0 -14
- data/lib/orange-more/adverts/plugin.rb +0 -13
- data/lib/orange-more/adverts/resources/adverts_resource.rb +0 -27
- data/lib/orange-more/adverts/views/adverts/adverts.haml +0 -2
- data/lib/orange-more/analytics.rb +0 -1
- data/lib/orange-more/analytics/middleware/analytics.rb +0 -30
- data/lib/orange-more/analytics/plugin.rb +0 -11
- data/lib/orange-more/analytics/resources/analytics_resource.rb +0 -42
- data/lib/orange-more/assets.rb +0 -1
- data/lib/orange-more/assets/cartons/asset_carton.rb +0 -27
- data/lib/orange-more/assets/plugin.rb +0 -13
- data/lib/orange-more/assets/resources/asset_resource.rb +0 -115
- data/lib/orange-more/assets/views/assets/change.haml +0 -1
- data/lib/orange-more/assets/views/assets/create.haml +0 -13
- data/lib/orange-more/assets/views/assets/insert.haml +0 -1
- data/lib/orange-more/blog.rb +0 -1
- data/lib/orange-more/blog/cartons/blog.rb +0 -8
- data/lib/orange-more/blog/cartons/blog_post.rb +0 -60
- data/lib/orange-more/blog/plugin.rb +0 -14
- data/lib/orange-more/blog/resources/blog_post_resource.rb +0 -53
- data/lib/orange-more/blog/resources/blog_resource.rb +0 -104
- data/lib/orange-more/blog/views/blog/blog_archive_view.haml +0 -6
- data/lib/orange-more/blog/views/blog/blog_offset_list_view.haml +0 -12
- data/lib/orange-more/blog/views/blog/blog_post_view.haml +0 -4
- data/lib/orange-more/blog/views/blog/sitemap_row.haml +0 -14
- data/lib/orange-more/blog/views/blog_posts/edit.haml +0 -8
- data/lib/orange-more/blog/views/blog_posts/show.haml +0 -4
- data/lib/orange-more/cloud.rb +0 -1
- data/lib/orange-more/cloud/plugin.rb +0 -10
- data/lib/orange-more/cloud/resources/cloud_resource.rb +0 -21
- data/lib/orange-more/contactforms.rb +0 -1
- data/lib/orange-more/contactforms/assets/js/jquery.validate.pack.js +0 -15
- data/lib/orange-more/contactforms/assets/js/lib/jquery-1.4.2.js +0 -6240
- data/lib/orange-more/contactforms/assets/js/lib/jquery.form.js +0 -660
- data/lib/orange-more/contactforms/assets/js/lib/jquery.js +0 -4376
- data/lib/orange-more/contactforms/assets/js/lib/jquery.metadata.js +0 -122
- data/lib/orange-more/contactforms/cartons/contactforms_carton.rb +0 -12
- data/lib/orange-more/contactforms/plugin.rb +0 -13
- data/lib/orange-more/contactforms/resources/contactforms_resource.rb +0 -56
- data/lib/orange-more/contactforms/views/contactforms/contactform.haml +0 -20
- data/lib/orange-more/debugger.rb +0 -1
- data/lib/orange-more/debugger/assets/css/debug_bar.css +0 -46
- data/lib/orange-more/debugger/middleware/debugger.rb +0 -50
- data/lib/orange-more/debugger/plugin.rb +0 -12
- data/lib/orange-more/debugger/views/debug_bar.haml +0 -87
- data/lib/orange-more/disqus.rb +0 -1
- data/lib/orange-more/disqus/plugin.rb +0 -11
- data/lib/orange-more/disqus/resources/disqus_resource.rb +0 -9
- data/lib/orange-more/disqus/views/disqus/comment_thread.haml +0 -7
- data/lib/orange-more/donations.rb +0 -1
- data/lib/orange-more/donations/cartons/donation_carton.rb +0 -9
- data/lib/orange-more/donations/plugin.rb +0 -12
- data/lib/orange-more/donations/resources/donations_resource.rb +0 -51
- data/lib/orange-more/donations/views/donations/donate_form.haml +0 -21
- data/lib/orange-more/donations/views/donations/donate_thanks.haml +0 -2
- data/lib/orange-more/donations/views/donations/paypal_form.haml +0 -13
- data/lib/orange-more/events.rb +0 -1
- data/lib/orange-more/events/assets/js/events.js +0 -55
- data/lib/orange-more/events/cartons/orange_calendar.rb +0 -8
- data/lib/orange-more/events/cartons/orange_event.rb +0 -60
- data/lib/orange-more/events/plugin.rb +0 -14
- data/lib/orange-more/events/resources/calendar_resource.rb +0 -33
- data/lib/orange-more/events/resources/event_resource.rb +0 -147
- data/lib/orange-more/events/views/calendar/calendar.haml +0 -8
- data/lib/orange-more/events/views/events/create.haml +0 -55
- data/lib/orange-more/events/views/events/edit.haml +0 -59
- data/lib/orange-more/events/views/events/list.haml +0 -13
- data/lib/orange-more/events/views/events/show.haml +0 -4
- data/lib/orange-more/events/views/events/table_row.haml +0 -17
- data/lib/orange-more/members.rb +0 -1
- data/lib/orange-more/members/cartons/member_carton.rb +0 -38
- data/lib/orange-more/members/plugin.rb +0 -13
- data/lib/orange-more/members/resources/members_resource.rb +0 -327
- data/lib/orange-more/members/views/members/create.haml +0 -12
- data/lib/orange-more/members/views/members/edit.haml +0 -15
- data/lib/orange-more/members/views/members/live.show.haml +0 -1
- data/lib/orange-more/members/views/members/login.haml +0 -17
- data/lib/orange-more/members/views/members/logout.haml +0 -1
- data/lib/orange-more/members/views/members/profile.haml +0 -50
- data/lib/orange-more/members/views/members/register.haml +0 -37
- data/lib/orange-more/news.rb +0 -1
- data/lib/orange-more/news/cartons/news.rb +0 -12
- data/lib/orange-more/news/plugin.rb +0 -13
- data/lib/orange-more/news/resources/news_resource.rb +0 -82
- data/lib/orange-more/news/views/news/archive.haml +0 -14
- data/lib/orange-more/news/views/news/edit.haml +0 -7
- data/lib/orange-more/news/views/news/latest.haml +0 -8
- data/lib/orange-more/news/views/news/sitemap_row.haml +0 -14
- data/lib/orange-more/pages.rb +0 -1
- data/lib/orange-more/pages/cartons/page_carton.rb +0 -14
- data/lib/orange-more/pages/cartons/page_version_carton.rb +0 -12
- data/lib/orange-more/pages/plugin.rb +0 -13
- data/lib/orange-more/pages/resources/page_resource.rb +0 -179
- data/lib/orange-more/pages/views/pages/edit.haml +0 -34
- data/lib/orange-more/pages/views/pages/show.haml +0 -6
- data/lib/orange-more/sitemap.rb +0 -1
- data/lib/orange-more/sitemap/assets/img/sitemap_down.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_down_d.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_indent.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_indent_d.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_outdent.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_outdent_d.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_up.png +0 -0
- data/lib/orange-more/sitemap/assets/img/sitemap_up_d.png +0 -0
- data/lib/orange-more/sitemap/assets/js/sitemap.js +0 -11
- data/lib/orange-more/sitemap/cartons/route.rb +0 -43
- data/lib/orange-more/sitemap/middleware/flex_router.rb +0 -25
- data/lib/orange-more/sitemap/plugin.rb +0 -17
- data/lib/orange-more/sitemap/resources/sitemap_resource.rb +0 -295
- data/lib/orange-more/sitemap/views/default_resource/sitemap_row.haml +0 -30
- data/lib/orange-more/sitemap/views/sitemap/breadcrumb.haml +0 -12
- data/lib/orange-more/sitemap/views/sitemap/list.haml +0 -4
- data/lib/orange-more/sitemap/views/sitemap/one_level.haml +0 -7
- data/lib/orange-more/sitemap/views/sitemap/route_actions.haml +0 -15
- data/lib/orange-more/sitemap/views/sitemap/sitemap_links.haml +0 -14
- data/lib/orange-more/sitemap/views/sitemap/table_row.haml +0 -30
- data/lib/orange-more/sitemap/views/sitemap/two_level.haml +0 -13
- data/lib/orange-more/slices.rb +0 -1
- data/lib/orange-more/slices/middleware/radius_parser.rb +0 -24
- data/lib/orange-more/slices/plugin.rb +0 -15
- data/lib/orange-more/slices/resources/radius.rb +0 -117
- data/lib/orange-more/slices/resources/slices.rb +0 -35
- data/lib/orange-more/subsites.rb +0 -1
- data/lib/orange-more/subsites/cartons/subsite.rb +0 -8
- data/lib/orange-more/subsites/middleware/subsite_load.rb +0 -29
- data/lib/orange-more/subsites/plugin.rb +0 -17
- data/lib/orange-more/subsites/resources/subsite_resource.rb +0 -54
- data/lib/orange-more/subsites/views/subsites/index.haml +0 -2
- data/lib/orange-more/testimonials.rb +0 -1
- data/lib/orange-more/testimonials/cartons/testimonials_carton.rb +0 -15
- data/lib/orange-more/testimonials/plugin.rb +0 -13
- data/lib/orange-more/testimonials/resources/testimonials_resource.rb +0 -42
- data/lib/orange-more/testimonials/views/testimonials/testimonials.haml +0 -4
- data/spec/orange-core/application_spec.rb +0 -183
- data/spec/orange-core/carton_spec.rb +0 -136
- data/spec/orange-core/core_spec.rb +0 -248
- data/spec/orange-core/magick_spec.rb +0 -96
- data/spec/orange-core/middleware/base_spec.rb +0 -38
- data/spec/orange-core/middleware/globals_spec.rb +0 -3
- data/spec/orange-core/middleware/rerouter_spec.rb +0 -3
- data/spec/orange-core/middleware/restful_router_spec.rb +0 -3
- data/spec/orange-core/middleware/route_context_spec.rb +0 -3
- data/spec/orange-core/middleware/route_site_spec.rb +0 -3
- data/spec/orange-core/middleware/show_exceptions_spec.rb +0 -3
- data/spec/orange-core/middleware/static_file_spec.rb +0 -3
- data/spec/orange-core/middleware/static_spec.rb +0 -3
- data/spec/orange-core/mock/mock_app.rb +0 -16
- data/spec/orange-core/mock/mock_carton.rb +0 -43
- data/spec/orange-core/mock/mock_core.rb +0 -2
- data/spec/orange-core/mock/mock_middleware.rb +0 -25
- data/spec/orange-core/mock/mock_mixins.rb +0 -19
- data/spec/orange-core/mock/mock_model_resource.rb +0 -47
- data/spec/orange-core/mock/mock_pulp.rb +0 -24
- data/spec/orange-core/mock/mock_resource.rb +0 -26
- data/spec/orange-core/mock/mock_router.rb +0 -10
- data/spec/orange-core/orange_spec.rb +0 -19
- data/spec/orange-core/packet_spec.rb +0 -203
- data/spec/orange-core/resource_spec.rb +0 -96
- data/spec/orange-core/resources/mapper_spec.rb +0 -5
- data/spec/orange-core/resources/model_resource_spec.rb +0 -246
- data/spec/orange-core/resources/parser_spec.rb +0 -5
- data/spec/orange-core/resources/routable_resource_spec.rb +0 -5
- data/spec/orange-core/stack_spec.rb +0 -232
data/lib/orange.rb
CHANGED
data/spec/orange_spec.rb
ADDED
File without changes
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.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-
|
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:
|
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
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
version:
|
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:
|
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
|
-
|
58
|
-
|
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:
|
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/
|
307
|
-
- spec/
|
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
|
data/lib/orange-core.rb
DELETED
@@ -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
|