orange 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/lib/orange/application.rb +1 -1
  2. data/lib/orange/carton.rb +55 -27
  3. data/lib/orange/cartons/site_carton.rb +4 -1
  4. data/lib/orange/core.rb +10 -2
  5. data/lib/orange/magick.rb +11 -0
  6. data/lib/orange/middleware/access_control.rb +16 -7
  7. data/lib/orange/middleware/base.rb +40 -1
  8. data/lib/orange/middleware/flex_router.rb +59 -0
  9. data/lib/orange/middleware/route_context.rb +2 -2
  10. data/lib/orange/middleware/route_site.rb +1 -1
  11. data/lib/orange/middleware/show_exceptions.rb +3 -1
  12. data/lib/orange/middleware/site_load.rb +14 -1
  13. data/lib/orange/middleware/static.rb +0 -2
  14. data/lib/orange/middleware/template.rb +3 -1
  15. data/lib/orange/resources/admin_resource.rb +25 -0
  16. data/lib/orange/resources/mapper.rb +3 -0
  17. data/lib/orange/resources/model_resource.rb +15 -9
  18. data/lib/orange/resources/page_parts.rb +0 -7
  19. data/lib/orange/resources/parser.rb +5 -4
  20. data/lib/orange/resources/singleton_model_resource.rb +7 -0
  21. data/lib/orange/resources/sitemap_resource.rb +96 -0
  22. data/lib/orange/stack.rb +5 -5
  23. data/spec/{application_spec.rb → orange/application_spec.rb} +0 -0
  24. data/spec/orange/carton_spec.rb +136 -0
  25. data/spec/{core_spec.rb → orange/core_spec.rb} +10 -0
  26. data/spec/{magick_spec.rb → orange/magick_spec.rb} +11 -0
  27. data/spec/orange/middleware/access_control_spec.rb +3 -0
  28. data/spec/orange/middleware/base_spec.rb +37 -0
  29. data/spec/orange/middleware/database_spec.rb +3 -0
  30. data/spec/orange/middleware/globals_spec.rb +3 -0
  31. data/spec/orange/middleware/recapture_spec.rb +3 -0
  32. data/spec/orange/middleware/rerouter_spec.rb +3 -0
  33. data/spec/orange/middleware/restful_router_spec.rb +3 -0
  34. data/spec/orange/middleware/route_context_spec.rb +3 -0
  35. data/spec/orange/middleware/route_site_spec.rb +3 -0
  36. data/spec/orange/middleware/show_exceptions_spec.rb +3 -0
  37. data/spec/orange/middleware/site_load_spec.rb +26 -0
  38. data/spec/orange/middleware/static_file_spec.rb +3 -0
  39. data/spec/orange/middleware/static_spec.rb +3 -0
  40. data/spec/orange/middleware/template_spec.rb +3 -0
  41. data/spec/{mock → orange/mock}/mock_app.rb +0 -0
  42. data/spec/orange/mock/mock_carton.rb +43 -0
  43. data/spec/{mock → orange/mock}/mock_core.rb +0 -0
  44. data/spec/{mock → orange/mock}/mock_middleware.rb +8 -0
  45. data/spec/{mock → orange/mock}/mock_mixins.rb +0 -0
  46. data/spec/{mock → orange/mock}/mock_model_resource.rb +4 -0
  47. data/spec/{mock → orange/mock}/mock_pulp.rb +0 -0
  48. data/spec/{mock → orange/mock}/mock_resource.rb +0 -0
  49. data/spec/{mock → orange/mock}/mock_router.rb +0 -0
  50. data/spec/{orange_spec.rb → orange/orange_spec.rb} +0 -0
  51. data/spec/{packet_spec.rb → orange/packet_spec.rb} +0 -0
  52. data/spec/{resource_spec.rb → orange/resource_spec.rb} +0 -0
  53. data/spec/orange/resources/admin_resource_spec.rb +16 -0
  54. data/spec/{resources → orange/resources}/mapper_spec.rb +0 -0
  55. data/spec/{resources → orange/resources}/model_resource_spec.rb +104 -0
  56. data/spec/{resources → orange/resources}/parser_spec.rb +0 -0
  57. data/spec/{resources → orange/resources}/routable_resource_spec.rb +0 -0
  58. data/spec/orange/resources/singleton_model_resource_spec.rb +4 -0
  59. data/spec/{resources/flex_router_spec.rb → orange/resources/sitemap_resource_spec.rb} +1 -1
  60. data/spec/orange/spec_helper.rb +51 -0
  61. data/spec/{stack_spec.rb → orange/stack_spec.rb} +0 -0
  62. metadata +45 -40
  63. data/lib/orange/resources/flex_router.rb +0 -13
  64. data/spec/carton_spec.rb +0 -5
  65. data/spec/middleware/access_control_spec.rb +0 -0
  66. data/spec/middleware/base_spec.rb +0 -0
  67. data/spec/middleware/database_spec.rb +0 -0
  68. data/spec/middleware/globals_spec.rb +0 -0
  69. data/spec/middleware/recapture_spec.rb +0 -0
  70. data/spec/middleware/rerouter_spec.rb +0 -0
  71. data/spec/middleware/restful_router_spec.rb +0 -0
  72. data/spec/middleware/route_context_spec.rb +0 -0
  73. data/spec/middleware/route_site_spec.rb +0 -0
  74. data/spec/middleware/show_exceptions_spec.rb +0 -0
  75. data/spec/middleware/site_load_spec.rb +0 -0
  76. data/spec/middleware/static_file_spec.rb +0 -0
  77. data/spec/middleware/static_spec.rb +0 -0
  78. data/spec/middleware/template_spec.rb +0 -0
  79. data/spec/mock/mock_carton.rb +0 -15
  80. data/spec/spec_helper.rb +0 -20
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orange
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Haslem
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-28 00:00:00 -05:00
12
+ date: 2010-01-25 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -120,6 +120,7 @@ files:
120
120
  - lib/orange/middleware/access_control.rb
121
121
  - lib/orange/middleware/base.rb
122
122
  - lib/orange/middleware/database.rb
123
+ - lib/orange/middleware/flex_router.rb
123
124
  - lib/orange/middleware/globals.rb
124
125
  - lib/orange/middleware/recapture.rb
125
126
  - lib/orange/middleware/rerouter.rb
@@ -133,12 +134,14 @@ files:
133
134
  - lib/orange/middleware/template.rb
134
135
  - lib/orange/packet.rb
135
136
  - lib/orange/resource.rb
136
- - lib/orange/resources/flex_router.rb
137
+ - lib/orange/resources/admin_resource.rb
137
138
  - lib/orange/resources/mapper.rb
138
139
  - lib/orange/resources/model_resource.rb
139
140
  - lib/orange/resources/page_parts.rb
140
141
  - lib/orange/resources/parser.rb
141
142
  - lib/orange/resources/routable_resource.rb
143
+ - lib/orange/resources/singleton_model_resource.rb
144
+ - lib/orange/resources/sitemap_resource.rb
142
145
  - lib/orange/stack.rb
143
146
  - README.markdown
144
147
  has_rdoc: true
@@ -170,41 +173,43 @@ signing_key:
170
173
  specification_version: 3
171
174
  summary: Middle ground between Sinatra and Rails
172
175
  test_files:
173
- - spec/application_spec.rb
174
- - spec/carton_spec.rb
175
- - spec/core_spec.rb
176
- - spec/magick_spec.rb
177
- - spec/middleware/access_control_spec.rb
178
- - spec/middleware/base_spec.rb
179
- - spec/middleware/database_spec.rb
180
- - spec/middleware/globals_spec.rb
181
- - spec/middleware/recapture_spec.rb
182
- - spec/middleware/rerouter_spec.rb
183
- - spec/middleware/restful_router_spec.rb
184
- - spec/middleware/route_context_spec.rb
185
- - spec/middleware/route_site_spec.rb
186
- - spec/middleware/show_exceptions_spec.rb
187
- - spec/middleware/site_load_spec.rb
188
- - spec/middleware/static_file_spec.rb
189
- - spec/middleware/static_spec.rb
190
- - spec/middleware/template_spec.rb
191
- - spec/mock/mock_app.rb
192
- - spec/mock/mock_carton.rb
193
- - spec/mock/mock_core.rb
194
- - spec/mock/mock_middleware.rb
195
- - spec/mock/mock_mixins.rb
196
- - spec/mock/mock_model_resource.rb
197
- - spec/mock/mock_pulp.rb
198
- - spec/mock/mock_resource.rb
199
- - spec/mock/mock_router.rb
200
- - spec/orange_spec.rb
201
- - spec/packet_spec.rb
202
- - spec/resource_spec.rb
203
- - spec/resources/flex_router_spec.rb
204
- - spec/resources/mapper_spec.rb
205
- - spec/resources/model_resource_spec.rb
206
- - spec/resources/parser_spec.rb
207
- - spec/resources/routable_resource_spec.rb
208
- - spec/spec_helper.rb
209
- - spec/stack_spec.rb
176
+ - spec/orange/application_spec.rb
177
+ - spec/orange/carton_spec.rb
178
+ - spec/orange/core_spec.rb
179
+ - spec/orange/magick_spec.rb
180
+ - spec/orange/middleware/access_control_spec.rb
181
+ - spec/orange/middleware/base_spec.rb
182
+ - spec/orange/middleware/database_spec.rb
183
+ - spec/orange/middleware/globals_spec.rb
184
+ - spec/orange/middleware/recapture_spec.rb
185
+ - spec/orange/middleware/rerouter_spec.rb
186
+ - spec/orange/middleware/restful_router_spec.rb
187
+ - spec/orange/middleware/route_context_spec.rb
188
+ - spec/orange/middleware/route_site_spec.rb
189
+ - spec/orange/middleware/show_exceptions_spec.rb
190
+ - spec/orange/middleware/site_load_spec.rb
191
+ - spec/orange/middleware/static_file_spec.rb
192
+ - spec/orange/middleware/static_spec.rb
193
+ - spec/orange/middleware/template_spec.rb
194
+ - spec/orange/mock/mock_app.rb
195
+ - spec/orange/mock/mock_carton.rb
196
+ - spec/orange/mock/mock_core.rb
197
+ - spec/orange/mock/mock_middleware.rb
198
+ - spec/orange/mock/mock_mixins.rb
199
+ - spec/orange/mock/mock_model_resource.rb
200
+ - spec/orange/mock/mock_pulp.rb
201
+ - spec/orange/mock/mock_resource.rb
202
+ - spec/orange/mock/mock_router.rb
203
+ - spec/orange/orange_spec.rb
204
+ - spec/orange/packet_spec.rb
205
+ - spec/orange/resource_spec.rb
206
+ - spec/orange/resources/admin_resource_spec.rb
207
+ - spec/orange/resources/mapper_spec.rb
208
+ - spec/orange/resources/model_resource_spec.rb
209
+ - spec/orange/resources/parser_spec.rb
210
+ - spec/orange/resources/routable_resource_spec.rb
211
+ - spec/orange/resources/singleton_model_resource_spec.rb
212
+ - spec/orange/resources/sitemap_resource_spec.rb
213
+ - spec/orange/spec_helper.rb
214
+ - spec/orange/stack_spec.rb
210
215
  - spec/stats.rb
@@ -1,13 +0,0 @@
1
- require 'orange/core'
2
- require 'dm-is-nested_set'
3
- module Orange
4
- class FlexRouter
5
-
6
- end
7
-
8
- class Route < SiteCarton
9
- id
10
-
11
- is :nested_set, :scope => [:orange_site_id]
12
- end
13
- end
@@ -1,5 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe Orange::Carton do
4
- it "should be spec'ed"
5
- end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,15 +0,0 @@
1
- class MockCarton < Orange::Carton
2
- id
3
- admin do
4
- text :banana
5
- end
6
- end
7
-
8
- class MockCartonTwo < Orange::Carton
9
- def self.get(id)
10
- 'mock_get'
11
- end
12
- def self.all
13
- 'mock_all'
14
- end
15
- end
@@ -1,20 +0,0 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
-
4
- require 'orange'
5
-
6
- require 'mock/mock_app'
7
- require 'mock/mock_pulp'
8
- require 'mock/mock_core'
9
- require 'mock/mock_carton'
10
- require 'mock/mock_model_resource'
11
- require 'mock/mock_mixins'
12
- require 'mock/mock_router'
13
- require 'mock/mock_resource'
14
- require 'mock/mock_middleware'
15
- require 'rack/test'
16
-
17
-
18
- Spec::Runner.configure do |config|
19
- config.include(Rack::Test::Methods)
20
- end