makandra_resource_controller 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/lib/resource_controller/helpers/current_objects.rb +1 -1
- data/test/Gemfile +5 -5
- data/test/test/unit/helpers/current_objects_test.rb +8 -0
- metadata +91 -92
- data/test/Gemfile.lock +0 -95
data/VERSION.yml
CHANGED
@@ -14,7 +14,7 @@ module ResourceController
|
|
14
14
|
# In order to customize the way the collection is fetched, to add something like pagination, for example, override this method.
|
15
15
|
#
|
16
16
|
def collection
|
17
|
-
end_of_association_chain.find(:all)
|
17
|
+
@collection ||= end_of_association_chain.find(:all)
|
18
18
|
end
|
19
19
|
|
20
20
|
# Returns the current param.
|
data/test/Gemfile
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
gem 'rails', '=3.0.1'
|
4
|
-
gem 'sqlite3-ruby', :require => 'sqlite3'
|
4
|
+
gem 'sqlite3-ruby', '=1.3.2', :require => 'sqlite3'
|
5
5
|
gem "makandra_resource_controller", :path => "../"
|
6
6
|
|
7
|
-
gem 'redgreen'
|
7
|
+
gem 'redgreen', '=1.2.2'
|
8
8
|
|
9
9
|
group :test do
|
10
|
-
gem "shoulda"
|
11
|
-
gem "mocha"
|
12
|
-
gem "ruby-debug"
|
10
|
+
gem "shoulda", '=2.11.3'
|
11
|
+
gem "mocha", '=0.9.9'
|
12
|
+
gem "ruby-debug", '=0.10.4'
|
13
13
|
end
|
@@ -27,6 +27,14 @@ class ResourceController::Helpers::CurrentObjectsTest < Test::Unit::TestCase
|
|
27
27
|
should "find all" do
|
28
28
|
assert_equal @collection, @controller.send(:collection)
|
29
29
|
end
|
30
|
+
|
31
|
+
should "cache the loaded collection" do
|
32
|
+
Post.reset_mocha
|
33
|
+
Post.expects(:find).with(:all).once.returns(@collection)
|
34
|
+
2.times do
|
35
|
+
@controller.send(:collection)
|
36
|
+
end
|
37
|
+
end
|
30
38
|
end
|
31
39
|
|
32
40
|
context "param helper" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makandra_resource_controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 5
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 3
|
10
|
+
version: 0.7.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Golick
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2011-
|
22
|
+
date: 2011-11-29 00:00:00 +01:00
|
23
23
|
default_executable:
|
24
24
|
dependencies: []
|
25
25
|
|
@@ -85,7 +85,6 @@ files:
|
|
85
85
|
- lib/urligence.rb
|
86
86
|
- rails/init.rb
|
87
87
|
- test/Gemfile
|
88
|
-
- test/Gemfile.lock
|
89
88
|
- test/Rakefile
|
90
89
|
- test/app/controllers/accounts_controller.rb
|
91
90
|
- test/app/controllers/application_controller.rb
|
@@ -315,114 +314,114 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
314
|
requirements: []
|
316
315
|
|
317
316
|
rubyforge_project:
|
318
|
-
rubygems_version: 1.3.
|
317
|
+
rubygems_version: 1.3.9.3
|
319
318
|
signing_key:
|
320
319
|
specification_version: 3
|
321
320
|
summary: Rails RESTful controller abstraction plugin.
|
322
321
|
test_files:
|
322
|
+
- test/vendor/plugins/dynamic_form/init.rb
|
323
|
+
- test/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb
|
324
|
+
- test/vendor/plugins/dynamic_form/test/dynamic_form_test.rb
|
325
|
+
- test/vendor/plugins/dynamic_form/test/test_helper.rb
|
326
|
+
- test/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb
|
327
|
+
- test/test/unit/failable_action_options_test.rb
|
328
|
+
- test/test/unit/option_test.rb
|
329
|
+
- test/test/unit/photo_test.rb
|
330
|
+
- test/test/unit/helpers_test.rb
|
331
|
+
- test/test/unit/accessors_test.rb
|
332
|
+
- test/test/unit/project_test.rb
|
333
|
+
- test/test/unit/image_test.rb
|
334
|
+
- test/test/unit/post_test.rb
|
335
|
+
- test/test/unit/tag_test.rb
|
336
|
+
- test/test/unit/something_test.rb
|
337
|
+
- test/test/unit/response_collector_test.rb
|
338
|
+
- test/test/unit/base_test.rb
|
339
|
+
- test/test/unit/account_test.rb
|
340
|
+
- test/test/unit/urligence_test.rb
|
341
|
+
- test/test/unit/helpers/singleton_current_objects_test.rb
|
342
|
+
- test/test/unit/helpers/nested_test.rb
|
343
|
+
- test/test/unit/helpers/internal_test.rb
|
344
|
+
- test/test/unit/helpers/urls_test.rb
|
345
|
+
- test/test/unit/helpers/singleton_nested_test.rb
|
346
|
+
- test/test/unit/helpers/singleton_urls_test.rb
|
347
|
+
- test/test/unit/helpers/current_objects_test.rb
|
348
|
+
- test/test/unit/comment_test.rb
|
349
|
+
- test/test/unit/action_options_test.rb
|
350
|
+
- test/test/test_helper.rb
|
351
|
+
- test/test/functional/users_controller_test.rb
|
352
|
+
- test/test/functional/tags_controller_test.rb
|
353
|
+
- test/test/functional/comments_controller_test.rb
|
354
|
+
- test/test/functional/posts_controller_test.rb
|
355
|
+
- test/test/functional/somethings_controller_test.rb
|
356
|
+
- test/test/functional/projects_controller_test.rb
|
357
|
+
- test/test/functional/people_controller_test.rb
|
358
|
+
- test/test/functional/images_controller_test.rb
|
359
|
+
- test/test/functional/photos_controller_test.rb
|
360
|
+
- test/test/functional/cms/options_controller_test.rb
|
361
|
+
- test/test/functional/cms/products_controller_test.rb
|
362
|
+
- test/test/functional/cms/photos_controller_test.rb
|
363
|
+
- test/app/controllers/tags_controller.rb
|
364
|
+
- test/app/controllers/comments_controller.rb
|
365
|
+
- test/app/controllers/options_controller.rb
|
366
|
+
- test/app/controllers/images_controller.rb
|
367
|
+
- test/app/controllers/photos_controller.rb
|
323
368
|
- test/app/controllers/accounts_controller.rb
|
324
369
|
- test/app/controllers/application_controller.rb
|
325
|
-
- test/app/controllers/
|
370
|
+
- test/app/controllers/users_controller.rb
|
371
|
+
- test/app/controllers/somethings_controller.rb
|
372
|
+
- test/app/controllers/people_controller.rb
|
373
|
+
- test/app/controllers/projects_controller.rb
|
374
|
+
- test/app/controllers/posts_controller.rb
|
326
375
|
- test/app/controllers/cms/personnel_controller.rb
|
376
|
+
- test/app/controllers/cms/options_controller.rb
|
327
377
|
- test/app/controllers/cms/photos_controller.rb
|
328
378
|
- test/app/controllers/cms/products_controller.rb
|
329
|
-
- test/app/
|
330
|
-
- test/app/
|
331
|
-
- test/app/
|
332
|
-
- test/app/
|
333
|
-
- test/app/
|
334
|
-
- test/app/
|
335
|
-
- test/app/
|
336
|
-
- test/app/
|
337
|
-
- test/app/
|
338
|
-
- test/app/
|
379
|
+
- test/app/models/personnel.rb
|
380
|
+
- test/app/models/tag.rb
|
381
|
+
- test/app/models/option.rb
|
382
|
+
- test/app/models/something.rb
|
383
|
+
- test/app/models/product.rb
|
384
|
+
- test/app/models/account.rb
|
385
|
+
- test/app/models/image.rb
|
386
|
+
- test/app/models/project.rb
|
387
|
+
- test/app/models/user.rb
|
388
|
+
- test/app/models/photo.rb
|
389
|
+
- test/app/models/comment.rb
|
390
|
+
- test/app/models/post.rb
|
391
|
+
- test/app/helpers/photos_helper.rb
|
392
|
+
- test/app/helpers/options_helper.rb
|
339
393
|
- test/app/helpers/accounts_helper.rb
|
394
|
+
- test/app/helpers/posts_helper.rb
|
340
395
|
- test/app/helpers/application_helper.rb
|
341
|
-
- test/app/helpers/
|
342
|
-
- test/app/helpers/
|
396
|
+
- test/app/helpers/tags_helper.rb
|
397
|
+
- test/app/helpers/users_helper.rb
|
343
398
|
- test/app/helpers/images_helper.rb
|
344
|
-
- test/app/helpers/options_helper.rb
|
345
399
|
- test/app/helpers/people_helper.rb
|
346
|
-
- test/app/helpers/photos_helper.rb
|
347
|
-
- test/app/helpers/posts_helper.rb
|
348
400
|
- test/app/helpers/projects_helper.rb
|
349
401
|
- test/app/helpers/somethings_helper.rb
|
350
|
-
- test/app/helpers/
|
351
|
-
- test/app/helpers/
|
352
|
-
- test/app/models/account.rb
|
353
|
-
- test/app/models/comment.rb
|
354
|
-
- test/app/models/image.rb
|
355
|
-
- test/app/models/option.rb
|
356
|
-
- test/app/models/personnel.rb
|
357
|
-
- test/app/models/photo.rb
|
358
|
-
- test/app/models/post.rb
|
359
|
-
- test/app/models/product.rb
|
360
|
-
- test/app/models/project.rb
|
361
|
-
- test/app/models/something.rb
|
362
|
-
- test/app/models/tag.rb
|
363
|
-
- test/app/models/user.rb
|
364
|
-
- test/config/application.rb
|
402
|
+
- test/app/helpers/comments_helper.rb
|
403
|
+
- test/app/helpers/cms/products_helper.rb
|
365
404
|
- test/config/boot.rb
|
366
|
-
- test/config/
|
405
|
+
- test/config/routes.rb
|
406
|
+
- test/config/application.rb
|
367
407
|
- test/config/environments/development.rb
|
368
408
|
- test/config/environments/test.rb
|
369
|
-
- test/config/
|
370
|
-
- test/config/initializers/secret_token.rb
|
409
|
+
- test/config/environment.rb
|
371
410
|
- test/config/initializers/session_store.rb
|
372
|
-
- test/config/
|
373
|
-
- test/
|
374
|
-
- test/db/migrate/
|
411
|
+
- test/config/initializers/secret_token.rb
|
412
|
+
- test/config/initializers/inflections.rb
|
413
|
+
- test/db/migrate/012_create_users.rb
|
414
|
+
- test/db/migrate/005_create_photos.rb
|
415
|
+
- test/db/migrate/011_create_images.rb
|
416
|
+
- test/db/migrate/010_create_projects.rb
|
375
417
|
- test/db/migrate/003_create_comments.rb
|
376
418
|
- test/db/migrate/004_create_options.rb
|
377
|
-
- test/db/migrate/
|
378
|
-
- test/db/migrate/006_create_tags.rb
|
379
|
-
- test/db/migrate/007_create_somethings.rb
|
380
|
-
- test/db/migrate/008_create_accounts.rb
|
419
|
+
- test/db/migrate/002_create_products.rb
|
381
420
|
- test/db/migrate/009_add_account_id_to_photos.rb
|
382
|
-
- test/db/migrate/010_create_projects.rb
|
383
|
-
- test/db/migrate/011_create_images.rb
|
384
|
-
- test/db/migrate/012_create_users.rb
|
385
421
|
- test/db/migrate/013_create_personnel.rb
|
386
422
|
- test/db/migrate/014_add_personnel_id_to_photos.rb
|
423
|
+
- test/db/migrate/008_create_accounts.rb
|
424
|
+
- test/db/migrate/007_create_somethings.rb
|
425
|
+
- test/db/migrate/001_create_posts.rb
|
426
|
+
- test/db/migrate/006_create_tags.rb
|
387
427
|
- test/db/schema.rb
|
388
|
-
- test/test/functional/cms/options_controller_test.rb
|
389
|
-
- test/test/functional/cms/photos_controller_test.rb
|
390
|
-
- test/test/functional/cms/products_controller_test.rb
|
391
|
-
- test/test/functional/comments_controller_test.rb
|
392
|
-
- test/test/functional/images_controller_test.rb
|
393
|
-
- test/test/functional/people_controller_test.rb
|
394
|
-
- test/test/functional/photos_controller_test.rb
|
395
|
-
- test/test/functional/posts_controller_test.rb
|
396
|
-
- test/test/functional/projects_controller_test.rb
|
397
|
-
- test/test/functional/somethings_controller_test.rb
|
398
|
-
- test/test/functional/tags_controller_test.rb
|
399
|
-
- test/test/functional/users_controller_test.rb
|
400
|
-
- test/test/test_helper.rb
|
401
|
-
- test/test/unit/accessors_test.rb
|
402
|
-
- test/test/unit/account_test.rb
|
403
|
-
- test/test/unit/action_options_test.rb
|
404
|
-
- test/test/unit/base_test.rb
|
405
|
-
- test/test/unit/comment_test.rb
|
406
|
-
- test/test/unit/failable_action_options_test.rb
|
407
|
-
- test/test/unit/helpers/current_objects_test.rb
|
408
|
-
- test/test/unit/helpers/internal_test.rb
|
409
|
-
- test/test/unit/helpers/nested_test.rb
|
410
|
-
- test/test/unit/helpers/singleton_current_objects_test.rb
|
411
|
-
- test/test/unit/helpers/singleton_nested_test.rb
|
412
|
-
- test/test/unit/helpers/singleton_urls_test.rb
|
413
|
-
- test/test/unit/helpers/urls_test.rb
|
414
|
-
- test/test/unit/helpers_test.rb
|
415
|
-
- test/test/unit/image_test.rb
|
416
|
-
- test/test/unit/option_test.rb
|
417
|
-
- test/test/unit/photo_test.rb
|
418
|
-
- test/test/unit/post_test.rb
|
419
|
-
- test/test/unit/project_test.rb
|
420
|
-
- test/test/unit/response_collector_test.rb
|
421
|
-
- test/test/unit/something_test.rb
|
422
|
-
- test/test/unit/tag_test.rb
|
423
|
-
- test/test/unit/urligence_test.rb
|
424
|
-
- test/vendor/plugins/dynamic_form/init.rb
|
425
|
-
- test/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb
|
426
|
-
- test/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb
|
427
|
-
- test/vendor/plugins/dynamic_form/test/dynamic_form_test.rb
|
428
|
-
- test/vendor/plugins/dynamic_form/test/test_helper.rb
|
data/test/Gemfile.lock
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /home/henning/Projekte/resource_controller
|
3
|
-
specs:
|
4
|
-
makandra_resource_controller (0.7.1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
abstract (1.0.0)
|
10
|
-
actionmailer (3.0.1)
|
11
|
-
actionpack (= 3.0.1)
|
12
|
-
mail (~> 2.2.5)
|
13
|
-
actionpack (3.0.1)
|
14
|
-
activemodel (= 3.0.1)
|
15
|
-
activesupport (= 3.0.1)
|
16
|
-
builder (~> 2.1.2)
|
17
|
-
erubis (~> 2.6.6)
|
18
|
-
i18n (~> 0.4.1)
|
19
|
-
rack (~> 1.2.1)
|
20
|
-
rack-mount (~> 0.6.12)
|
21
|
-
rack-test (~> 0.5.4)
|
22
|
-
tzinfo (~> 0.3.23)
|
23
|
-
activemodel (3.0.1)
|
24
|
-
activesupport (= 3.0.1)
|
25
|
-
builder (~> 2.1.2)
|
26
|
-
i18n (~> 0.4.1)
|
27
|
-
activerecord (3.0.1)
|
28
|
-
activemodel (= 3.0.1)
|
29
|
-
activesupport (= 3.0.1)
|
30
|
-
arel (~> 1.0.0)
|
31
|
-
tzinfo (~> 0.3.23)
|
32
|
-
activeresource (3.0.1)
|
33
|
-
activemodel (= 3.0.1)
|
34
|
-
activesupport (= 3.0.1)
|
35
|
-
activesupport (3.0.1)
|
36
|
-
arel (1.0.1)
|
37
|
-
activesupport (~> 3.0.0)
|
38
|
-
builder (2.1.2)
|
39
|
-
columnize (0.3.2)
|
40
|
-
erubis (2.6.6)
|
41
|
-
abstract (>= 1.0.0)
|
42
|
-
i18n (0.4.2)
|
43
|
-
linecache (0.43)
|
44
|
-
mail (2.2.10)
|
45
|
-
activesupport (>= 2.3.6)
|
46
|
-
i18n (~> 0.4.1)
|
47
|
-
mime-types (~> 1.16)
|
48
|
-
treetop (~> 1.4.8)
|
49
|
-
mime-types (1.16)
|
50
|
-
mocha (0.9.9)
|
51
|
-
rake
|
52
|
-
polyglot (0.3.1)
|
53
|
-
rack (1.2.1)
|
54
|
-
rack-mount (0.6.13)
|
55
|
-
rack (>= 1.0.0)
|
56
|
-
rack-test (0.5.7)
|
57
|
-
rack (>= 1.0)
|
58
|
-
rails (3.0.1)
|
59
|
-
actionmailer (= 3.0.1)
|
60
|
-
actionpack (= 3.0.1)
|
61
|
-
activerecord (= 3.0.1)
|
62
|
-
activeresource (= 3.0.1)
|
63
|
-
activesupport (= 3.0.1)
|
64
|
-
bundler (~> 1.0.0)
|
65
|
-
railties (= 3.0.1)
|
66
|
-
railties (3.0.1)
|
67
|
-
actionpack (= 3.0.1)
|
68
|
-
activesupport (= 3.0.1)
|
69
|
-
rake (>= 0.8.4)
|
70
|
-
thor (~> 0.14.0)
|
71
|
-
rake (0.8.7)
|
72
|
-
redgreen (1.2.2)
|
73
|
-
ruby-debug (0.10.4)
|
74
|
-
columnize (>= 0.1)
|
75
|
-
ruby-debug-base (~> 0.10.4.0)
|
76
|
-
ruby-debug-base (0.10.4)
|
77
|
-
linecache (>= 0.3)
|
78
|
-
shoulda (2.11.3)
|
79
|
-
sqlite3-ruby (1.3.2)
|
80
|
-
thor (0.14.4)
|
81
|
-
treetop (1.4.9)
|
82
|
-
polyglot (>= 0.3.1)
|
83
|
-
tzinfo (0.3.23)
|
84
|
-
|
85
|
-
PLATFORMS
|
86
|
-
ruby
|
87
|
-
|
88
|
-
DEPENDENCIES
|
89
|
-
makandra_resource_controller!
|
90
|
-
mocha
|
91
|
-
rails (= 3.0.1)
|
92
|
-
redgreen
|
93
|
-
ruby-debug
|
94
|
-
shoulda
|
95
|
-
sqlite3-ruby
|