record_collection 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/record_collection/version.rb +1 -1
- metadata +3 -220
- data/.gitignore +0 -24
- data/.rspec +0 -1
- data/.travis.yml +0 -15
- data/CHANGELOG.md +0 -88
- data/Gemfile +0 -15
- data/LICENSE.txt +0 -22
- data/app/assets/images/record_collection/.keep +0 -0
- data/bin/rails +0 -13
- data/gemfiles/Gemfile.rails-4.2.x +0 -10
- data/gemfiles/Gemfile.rails-5.0.x +0 -10
- data/gemfiles/Gemfile.rails-master +0 -13
- data/record_collection.gemspec +0 -50
- data/spec/base/accessors_spec.rb +0 -20
- data/spec/base/after_record_update_no_arity_spec.rb +0 -15
- data/spec/base/after_record_update_spec.rb +0 -22
- data/spec/base/before_record_update_no_arity_spec.rb +0 -15
- data/spec/base/before_record_update_spec.rb +0 -22
- data/spec/base/behaviour_spec.rb +0 -39
- data/spec/base/finding_records_spec.rb +0 -98
- data/spec/base/inheritance_spec.rb +0 -15
- data/spec/base/refine_relation_spec.rb +0 -10
- data/spec/base/validations_spec.rb +0 -26
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/config/manifest.js +0 -3
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js.coffee +0 -23
- data/spec/dummy/app/assets/javascripts/foundation.min.js +0 -6081
- data/spec/dummy/app/assets/javascripts/modernizr.js +0 -8
- data/spec/dummy/app/assets/stylesheets/application.sass +0 -3
- data/spec/dummy/app/assets/stylesheets/components/_forms.sass +0 -4
- data/spec/dummy/app/assets/stylesheets/components/_structure.sass +0 -9
- data/spec/dummy/app/assets/stylesheets/foundation.css +0 -6201
- data/spec/dummy/app/assets/stylesheets/normalize.css +0 -427
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/dashboard_controller.rb +0 -4
- data/spec/dummy/app/controllers/employees_controller.rb +0 -73
- data/spec/dummy/app/controllers/projects_controller.rb +0 -73
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/employee/collection.rb +0 -6
- data/spec/dummy/app/models/employee.rb +0 -3
- data/spec/dummy/app/models/project/collection.rb +0 -6
- data/spec/dummy/app/models/project.rb +0 -3
- data/spec/dummy/app/views/application/_form_errors.html.slim +0 -8
- data/spec/dummy/app/views/dashboard/home.html.slim +0 -1
- data/spec/dummy/app/views/employees/_form.html.erb +0 -25
- data/spec/dummy/app/views/employees/collection_edit.html.slim +0 -11
- data/spec/dummy/app/views/employees/edit.html.erb +0 -6
- data/spec/dummy/app/views/employees/index.html.slim +0 -28
- data/spec/dummy/app/views/employees/new.html.erb +0 -5
- data/spec/dummy/app/views/employees/show.html.erb +0 -14
- data/spec/dummy/app/views/layouts/application.html.slim +0 -30
- data/spec/dummy/app/views/projects/_form.html.erb +0 -21
- data/spec/dummy/app/views/projects/collection_edit.html.slim +0 -11
- data/spec/dummy/app/views/projects/edit.html.erb +0 -6
- data/spec/dummy/app/views/projects/index.html.slim +0 -20
- data/spec/dummy/app/views/projects/new.html.erb +0 -5
- data/spec/dummy/app/views/projects/show.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -29
- data/spec/dummy/config/application.rb +0 -26
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -41
- data/spec/dummy/config/environments/production.rb +0 -79
- data/spec/dummy/config/environments/test.rb +0 -48
- data/spec/dummy/config/initializers/assets.rb +0 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/record_collection.en.yml +0 -28
- data/spec/dummy/config/routes.rb +0 -5
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20150203124634_create_employees.rb +0 -10
- data/spec/dummy/db/migrate/20150204103712_add_vegan_to_employees.rb +0 -5
- data/spec/dummy/db/migrate/20150204103925_add_admin_to_employees.rb +0 -5
- data/spec/dummy/db/migrate/20150204125014_create_projects.rb +0 -11
- data/spec/dummy/db/migrate/20150721122805_add_description_to_projects.rb +0 -5
- data/spec/dummy/db/migrate/20151215123553_add_project_id_to_employees.rb +0 -5
- data/spec/dummy/db/migrate/20151225113902_add_start_date_to_projects.rb +0 -5
- data/spec/dummy/db/migrate/20151226083300_add_hint_visible_to_projects.rb +0 -5
- data/spec/dummy/db/schema.rb +0 -37
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/features/disabled_boolean_spec.rb +0 -19
- data/spec/features/multi_select_spec.rb +0 -24
- data/spec/features/optional_boolean_hint_and_append_text_spec.rb +0 -12
- data/spec/features/optional_boolean_with_normal_resource_spec.rb +0 -20
- data/spec/features/optional_date_field_all_nil_spec.rb +0 -10
- data/spec/features/optional_text_field_with_normal_resource_spec.rb +0 -16
- data/spec/features/optionals_with_one_record_spec.rb +0 -16
- data/spec/features/translations_spec.rb +0 -9
- data/spec/fixtures/collections.rb +0 -0
- data/spec/rails/form_builder_spec.rb +0 -113
- data/spec/rails/form_for_spec.rb +0 -58
- data/spec/record_selection/base_spec.rb +0 -157
- data/spec/record_selection/name_spec.rb +0 -10
- data/spec/spec_helper.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57aa8e0bdebecd8eed6864404e367592a4b7b28abab43ef5ad879fc991e6eace
|
4
|
+
data.tar.gz: dae09d45fa5a428fc169386f9e972d9e181df80329a8219ad4b499ac160cff43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0534afd93542e274a8b3df840e01086dff403e70e9efb699bd15a1b45d5f6bfceaf0867877c146c08cd3f0baefe316030b85a5a130d41093f4a48e73c6e12307
|
7
|
+
data.tar.gz: ca2d803be704d4d275ebb148b17046a00203aa5598c001d51aa46a2d5a194bf42913e0eb2b2b72fea8ff979013d38987fe1a18e0f4fc8f7aea0c1b86cbc1563b
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: record_collection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin ter Kuile
|
@@ -334,20 +334,12 @@ dependencies:
|
|
334
334
|
description: This gem helps you to work on subsets or rails models
|
335
335
|
email:
|
336
336
|
- bterkuile@gmail.com
|
337
|
-
executables:
|
338
|
-
- rails
|
337
|
+
executables: []
|
339
338
|
extensions: []
|
340
339
|
extra_rdoc_files: []
|
341
340
|
files:
|
342
|
-
- ".gitignore"
|
343
|
-
- ".rspec"
|
344
|
-
- ".travis.yml"
|
345
|
-
- CHANGELOG.md
|
346
|
-
- Gemfile
|
347
|
-
- LICENSE.txt
|
348
341
|
- README.md
|
349
342
|
- Rakefile
|
350
|
-
- app/assets/images/record_collection/.keep
|
351
343
|
- app/assets/javascripts/record_collection/all.js.coffee
|
352
344
|
- app/assets/javascripts/record_collection/multi_select.js.coffee
|
353
345
|
- app/assets/javascripts/record_collection/optionals.js.coffee
|
@@ -357,12 +349,8 @@ files:
|
|
357
349
|
- app/controllers/record_collection/application_controller.rb
|
358
350
|
- app/helpers/record_collection/application_helper.rb
|
359
351
|
- app/views/layouts/record_collection/application.html.erb
|
360
|
-
- bin/rails
|
361
352
|
- config/environment.rb
|
362
353
|
- config/spring.rb
|
363
|
-
- gemfiles/Gemfile.rails-4.2.x
|
364
|
-
- gemfiles/Gemfile.rails-5.0.x
|
365
|
-
- gemfiles/Gemfile.rails-master
|
366
354
|
- lib/generators/collection_scaffold/collection_scaffold_generator.rb
|
367
355
|
- lib/generators/collection_scaffold/templates/_form.html.haml
|
368
356
|
- lib/generators/collection_scaffold/templates/_form.html.slim
|
@@ -388,109 +376,6 @@ files:
|
|
388
376
|
- lib/record_collection/rails/form_helper.rb
|
389
377
|
- lib/record_collection/rails/routes.rb
|
390
378
|
- lib/record_collection/version.rb
|
391
|
-
- record_collection.gemspec
|
392
|
-
- spec/base/accessors_spec.rb
|
393
|
-
- spec/base/after_record_update_no_arity_spec.rb
|
394
|
-
- spec/base/after_record_update_spec.rb
|
395
|
-
- spec/base/before_record_update_no_arity_spec.rb
|
396
|
-
- spec/base/before_record_update_spec.rb
|
397
|
-
- spec/base/behaviour_spec.rb
|
398
|
-
- spec/base/finding_records_spec.rb
|
399
|
-
- spec/base/inheritance_spec.rb
|
400
|
-
- spec/base/refine_relation_spec.rb
|
401
|
-
- spec/base/validations_spec.rb
|
402
|
-
- spec/dummy/README.rdoc
|
403
|
-
- spec/dummy/Rakefile
|
404
|
-
- spec/dummy/app/assets/config/manifest.js
|
405
|
-
- spec/dummy/app/assets/images/.keep
|
406
|
-
- spec/dummy/app/assets/javascripts/application.js.coffee
|
407
|
-
- spec/dummy/app/assets/javascripts/foundation.min.js
|
408
|
-
- spec/dummy/app/assets/javascripts/modernizr.js
|
409
|
-
- spec/dummy/app/assets/stylesheets/application.sass
|
410
|
-
- spec/dummy/app/assets/stylesheets/components/_forms.sass
|
411
|
-
- spec/dummy/app/assets/stylesheets/components/_structure.sass
|
412
|
-
- spec/dummy/app/assets/stylesheets/foundation.css
|
413
|
-
- spec/dummy/app/assets/stylesheets/normalize.css
|
414
|
-
- spec/dummy/app/controllers/application_controller.rb
|
415
|
-
- spec/dummy/app/controllers/concerns/.keep
|
416
|
-
- spec/dummy/app/controllers/dashboard_controller.rb
|
417
|
-
- spec/dummy/app/controllers/employees_controller.rb
|
418
|
-
- spec/dummy/app/controllers/projects_controller.rb
|
419
|
-
- spec/dummy/app/helpers/application_helper.rb
|
420
|
-
- spec/dummy/app/mailers/.keep
|
421
|
-
- spec/dummy/app/models/.keep
|
422
|
-
- spec/dummy/app/models/concerns/.keep
|
423
|
-
- spec/dummy/app/models/employee.rb
|
424
|
-
- spec/dummy/app/models/employee/collection.rb
|
425
|
-
- spec/dummy/app/models/project.rb
|
426
|
-
- spec/dummy/app/models/project/collection.rb
|
427
|
-
- spec/dummy/app/views/application/_form_errors.html.slim
|
428
|
-
- spec/dummy/app/views/dashboard/home.html.slim
|
429
|
-
- spec/dummy/app/views/employees/_form.html.erb
|
430
|
-
- spec/dummy/app/views/employees/collection_edit.html.slim
|
431
|
-
- spec/dummy/app/views/employees/edit.html.erb
|
432
|
-
- spec/dummy/app/views/employees/index.html.slim
|
433
|
-
- spec/dummy/app/views/employees/new.html.erb
|
434
|
-
- spec/dummy/app/views/employees/show.html.erb
|
435
|
-
- spec/dummy/app/views/layouts/application.html.slim
|
436
|
-
- spec/dummy/app/views/projects/_form.html.erb
|
437
|
-
- spec/dummy/app/views/projects/collection_edit.html.slim
|
438
|
-
- spec/dummy/app/views/projects/edit.html.erb
|
439
|
-
- spec/dummy/app/views/projects/index.html.slim
|
440
|
-
- spec/dummy/app/views/projects/new.html.erb
|
441
|
-
- spec/dummy/app/views/projects/show.html.erb
|
442
|
-
- spec/dummy/bin/bundle
|
443
|
-
- spec/dummy/bin/rails
|
444
|
-
- spec/dummy/bin/rake
|
445
|
-
- spec/dummy/bin/setup
|
446
|
-
- spec/dummy/config.ru
|
447
|
-
- spec/dummy/config/application.rb
|
448
|
-
- spec/dummy/config/boot.rb
|
449
|
-
- spec/dummy/config/database.yml
|
450
|
-
- spec/dummy/config/environment.rb
|
451
|
-
- spec/dummy/config/environments/development.rb
|
452
|
-
- spec/dummy/config/environments/production.rb
|
453
|
-
- spec/dummy/config/environments/test.rb
|
454
|
-
- spec/dummy/config/initializers/assets.rb
|
455
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
456
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
457
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
458
|
-
- spec/dummy/config/initializers/inflections.rb
|
459
|
-
- spec/dummy/config/initializers/mime_types.rb
|
460
|
-
- spec/dummy/config/initializers/session_store.rb
|
461
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
462
|
-
- spec/dummy/config/locales/record_collection.en.yml
|
463
|
-
- spec/dummy/config/routes.rb
|
464
|
-
- spec/dummy/config/secrets.yml
|
465
|
-
- spec/dummy/db/migrate/20150203124634_create_employees.rb
|
466
|
-
- spec/dummy/db/migrate/20150204103712_add_vegan_to_employees.rb
|
467
|
-
- spec/dummy/db/migrate/20150204103925_add_admin_to_employees.rb
|
468
|
-
- spec/dummy/db/migrate/20150204125014_create_projects.rb
|
469
|
-
- spec/dummy/db/migrate/20150721122805_add_description_to_projects.rb
|
470
|
-
- spec/dummy/db/migrate/20151215123553_add_project_id_to_employees.rb
|
471
|
-
- spec/dummy/db/migrate/20151225113902_add_start_date_to_projects.rb
|
472
|
-
- spec/dummy/db/migrate/20151226083300_add_hint_visible_to_projects.rb
|
473
|
-
- spec/dummy/db/schema.rb
|
474
|
-
- spec/dummy/lib/assets/.keep
|
475
|
-
- spec/dummy/log/.keep
|
476
|
-
- spec/dummy/public/404.html
|
477
|
-
- spec/dummy/public/422.html
|
478
|
-
- spec/dummy/public/500.html
|
479
|
-
- spec/dummy/public/favicon.ico
|
480
|
-
- spec/features/disabled_boolean_spec.rb
|
481
|
-
- spec/features/multi_select_spec.rb
|
482
|
-
- spec/features/optional_boolean_hint_and_append_text_spec.rb
|
483
|
-
- spec/features/optional_boolean_with_normal_resource_spec.rb
|
484
|
-
- spec/features/optional_date_field_all_nil_spec.rb
|
485
|
-
- spec/features/optional_text_field_with_normal_resource_spec.rb
|
486
|
-
- spec/features/optionals_with_one_record_spec.rb
|
487
|
-
- spec/features/translations_spec.rb
|
488
|
-
- spec/fixtures/collections.rb
|
489
|
-
- spec/rails/form_builder_spec.rb
|
490
|
-
- spec/rails/form_for_spec.rb
|
491
|
-
- spec/record_selection/base_spec.rb
|
492
|
-
- spec/record_selection/name_spec.rb
|
493
|
-
- spec/spec_helper.rb
|
494
379
|
homepage: https://github.com/bterkuile/record_collection
|
495
380
|
licenses:
|
496
381
|
- MIT
|
@@ -512,106 +397,4 @@ requirements: []
|
|
512
397
|
rubygems_version: 3.7.2
|
513
398
|
specification_version: 4
|
514
399
|
summary: Manage collections of records in Ruby on Rails
|
515
|
-
test_files:
|
516
|
-
- spec/base/accessors_spec.rb
|
517
|
-
- spec/base/after_record_update_no_arity_spec.rb
|
518
|
-
- spec/base/after_record_update_spec.rb
|
519
|
-
- spec/base/before_record_update_no_arity_spec.rb
|
520
|
-
- spec/base/before_record_update_spec.rb
|
521
|
-
- spec/base/behaviour_spec.rb
|
522
|
-
- spec/base/finding_records_spec.rb
|
523
|
-
- spec/base/inheritance_spec.rb
|
524
|
-
- spec/base/refine_relation_spec.rb
|
525
|
-
- spec/base/validations_spec.rb
|
526
|
-
- spec/dummy/README.rdoc
|
527
|
-
- spec/dummy/Rakefile
|
528
|
-
- spec/dummy/app/assets/config/manifest.js
|
529
|
-
- spec/dummy/app/assets/images/.keep
|
530
|
-
- spec/dummy/app/assets/javascripts/application.js.coffee
|
531
|
-
- spec/dummy/app/assets/javascripts/foundation.min.js
|
532
|
-
- spec/dummy/app/assets/javascripts/modernizr.js
|
533
|
-
- spec/dummy/app/assets/stylesheets/application.sass
|
534
|
-
- spec/dummy/app/assets/stylesheets/components/_forms.sass
|
535
|
-
- spec/dummy/app/assets/stylesheets/components/_structure.sass
|
536
|
-
- spec/dummy/app/assets/stylesheets/foundation.css
|
537
|
-
- spec/dummy/app/assets/stylesheets/normalize.css
|
538
|
-
- spec/dummy/app/controllers/application_controller.rb
|
539
|
-
- spec/dummy/app/controllers/concerns/.keep
|
540
|
-
- spec/dummy/app/controllers/dashboard_controller.rb
|
541
|
-
- spec/dummy/app/controllers/employees_controller.rb
|
542
|
-
- spec/dummy/app/controllers/projects_controller.rb
|
543
|
-
- spec/dummy/app/helpers/application_helper.rb
|
544
|
-
- spec/dummy/app/mailers/.keep
|
545
|
-
- spec/dummy/app/models/.keep
|
546
|
-
- spec/dummy/app/models/concerns/.keep
|
547
|
-
- spec/dummy/app/models/employee.rb
|
548
|
-
- spec/dummy/app/models/employee/collection.rb
|
549
|
-
- spec/dummy/app/models/project.rb
|
550
|
-
- spec/dummy/app/models/project/collection.rb
|
551
|
-
- spec/dummy/app/views/application/_form_errors.html.slim
|
552
|
-
- spec/dummy/app/views/dashboard/home.html.slim
|
553
|
-
- spec/dummy/app/views/employees/_form.html.erb
|
554
|
-
- spec/dummy/app/views/employees/collection_edit.html.slim
|
555
|
-
- spec/dummy/app/views/employees/edit.html.erb
|
556
|
-
- spec/dummy/app/views/employees/index.html.slim
|
557
|
-
- spec/dummy/app/views/employees/new.html.erb
|
558
|
-
- spec/dummy/app/views/employees/show.html.erb
|
559
|
-
- spec/dummy/app/views/layouts/application.html.slim
|
560
|
-
- spec/dummy/app/views/projects/_form.html.erb
|
561
|
-
- spec/dummy/app/views/projects/collection_edit.html.slim
|
562
|
-
- spec/dummy/app/views/projects/edit.html.erb
|
563
|
-
- spec/dummy/app/views/projects/index.html.slim
|
564
|
-
- spec/dummy/app/views/projects/new.html.erb
|
565
|
-
- spec/dummy/app/views/projects/show.html.erb
|
566
|
-
- spec/dummy/bin/bundle
|
567
|
-
- spec/dummy/bin/rails
|
568
|
-
- spec/dummy/bin/rake
|
569
|
-
- spec/dummy/bin/setup
|
570
|
-
- spec/dummy/config.ru
|
571
|
-
- spec/dummy/config/application.rb
|
572
|
-
- spec/dummy/config/boot.rb
|
573
|
-
- spec/dummy/config/database.yml
|
574
|
-
- spec/dummy/config/environment.rb
|
575
|
-
- spec/dummy/config/environments/development.rb
|
576
|
-
- spec/dummy/config/environments/production.rb
|
577
|
-
- spec/dummy/config/environments/test.rb
|
578
|
-
- spec/dummy/config/initializers/assets.rb
|
579
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
580
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
581
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
582
|
-
- spec/dummy/config/initializers/inflections.rb
|
583
|
-
- spec/dummy/config/initializers/mime_types.rb
|
584
|
-
- spec/dummy/config/initializers/session_store.rb
|
585
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
586
|
-
- spec/dummy/config/locales/record_collection.en.yml
|
587
|
-
- spec/dummy/config/routes.rb
|
588
|
-
- spec/dummy/config/secrets.yml
|
589
|
-
- spec/dummy/db/migrate/20150203124634_create_employees.rb
|
590
|
-
- spec/dummy/db/migrate/20150204103712_add_vegan_to_employees.rb
|
591
|
-
- spec/dummy/db/migrate/20150204103925_add_admin_to_employees.rb
|
592
|
-
- spec/dummy/db/migrate/20150204125014_create_projects.rb
|
593
|
-
- spec/dummy/db/migrate/20150721122805_add_description_to_projects.rb
|
594
|
-
- spec/dummy/db/migrate/20151215123553_add_project_id_to_employees.rb
|
595
|
-
- spec/dummy/db/migrate/20151225113902_add_start_date_to_projects.rb
|
596
|
-
- spec/dummy/db/migrate/20151226083300_add_hint_visible_to_projects.rb
|
597
|
-
- spec/dummy/db/schema.rb
|
598
|
-
- spec/dummy/lib/assets/.keep
|
599
|
-
- spec/dummy/log/.keep
|
600
|
-
- spec/dummy/public/404.html
|
601
|
-
- spec/dummy/public/422.html
|
602
|
-
- spec/dummy/public/500.html
|
603
|
-
- spec/dummy/public/favicon.ico
|
604
|
-
- spec/features/disabled_boolean_spec.rb
|
605
|
-
- spec/features/multi_select_spec.rb
|
606
|
-
- spec/features/optional_boolean_hint_and_append_text_spec.rb
|
607
|
-
- spec/features/optional_boolean_with_normal_resource_spec.rb
|
608
|
-
- spec/features/optional_date_field_all_nil_spec.rb
|
609
|
-
- spec/features/optional_text_field_with_normal_resource_spec.rb
|
610
|
-
- spec/features/optionals_with_one_record_spec.rb
|
611
|
-
- spec/features/translations_spec.rb
|
612
|
-
- spec/fixtures/collections.rb
|
613
|
-
- spec/rails/form_builder_spec.rb
|
614
|
-
- spec/rails/form_for_spec.rb
|
615
|
-
- spec/record_selection/base_spec.rb
|
616
|
-
- spec/record_selection/name_spec.rb
|
617
|
-
- spec/spec_helper.rb
|
400
|
+
test_files: []
|
data/.gitignore
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
/.yardoc
|
2
|
-
/Gemfile.lock
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
*.bundle
|
10
|
-
*.so
|
11
|
-
*.o
|
12
|
-
*.a
|
13
|
-
mkmf.log
|
14
|
-
/temt
|
15
|
-
.bundle/
|
16
|
-
log/*.log
|
17
|
-
pkg/
|
18
|
-
spec/dummy/db/*.sqlite3
|
19
|
-
spec/dummy/db/*.sqlite3-journal
|
20
|
-
spec/dummy/log/*.log
|
21
|
-
spec/dummy/tmp/
|
22
|
-
spec/dummy/spec/
|
23
|
-
spec/dummy/.sass-cache
|
24
|
-
/*.gem
|
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
data/.travis.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
gemfile:
|
3
|
-
- gemfiles/Gemfile.rails-4.2.x
|
4
|
-
- gemfiles/Gemfile.rails-5.0.x
|
5
|
-
rvm:
|
6
|
-
- 2.1.9
|
7
|
-
- 2.2.5
|
8
|
-
- 2.3.1
|
9
|
-
matrix:
|
10
|
-
exclude:
|
11
|
-
rvm: 2.1.9
|
12
|
-
gemfile: gemfiles/Gemfile.rails-5.0.x
|
13
|
-
addons:
|
14
|
-
code_climate:
|
15
|
-
repo_token: 22819b10ef9110a7fef884ab105239fc16fd0562ac79ae54c2204b5e07343919
|
data/CHANGELOG.md
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
=========
|
3
|
-
|
4
|
-
2025-10-04 - v1.0.0
|
5
|
-
--------------------
|
6
|
-
### Changed
|
7
|
-
* Make it Rails 8.0.3 compatible. Might break older versions
|
8
|
-
|
9
|
-
2015-12-28 - v0.10.4
|
10
|
-
--------------------
|
11
|
-
### Added
|
12
|
-
* Allow #find(ids) on collection instance that could be the result of a
|
13
|
-
`joins` or an `includes` scope setup call
|
14
|
-
|
15
|
-
2015-12-26 - v0.10.3
|
16
|
-
--------------------
|
17
|
-
### Added
|
18
|
-
#### Add includes option for initializing a collection
|
19
|
-
```
|
20
|
-
employees = Employee::Collection.includes(:project).where(state: 'active')
|
21
|
-
employee.map(&:project) #=> one query
|
22
|
-
```
|
23
|
-
|
24
|
-
####
|
25
|
-
Add `#refine_relation` option to refine the collection by means of a
|
26
|
-
scope or include
|
27
|
-
```
|
28
|
-
class Employee
|
29
|
-
def self.with_project
|
30
|
-
includes(:project)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
employees = Employee::Collection.where(state: 'active')
|
34
|
-
employees.refine_relation{ with_project } #=> collection object with refined ActiveRecord relation object if it is instantiated as such
|
35
|
-
```
|
36
|
-
|
37
|
-
2015-12-26 - v0.10.2
|
38
|
-
--------------------
|
39
|
-
### Added
|
40
|
-
* Add append_text option for optional booleans
|
41
|
-
|
42
|
-
2015-12-26 - v0.10.1
|
43
|
-
--------------------
|
44
|
-
### Added
|
45
|
-
* Add hint option for optional booleans
|
46
|
-
|
47
|
-
2015-12-25 - v0.10.0
|
48
|
-
--------------------
|
49
|
-
### Changed
|
50
|
-
* renamed uniform_collection_attribute to uniform_collection_value
|
51
|
-
|
52
|
-
### Fixed
|
53
|
-
* Make optionals active when all the values in the collection are nil
|
54
|
-
|
55
|
-
2015-12-15 - v0.9.2
|
56
|
-
-------------------
|
57
|
-
|
58
|
-
### Added
|
59
|
-
#### Allow initialize with multiple chaning scope
|
60
|
-
```
|
61
|
-
Employee::Collection.where(a: 1).where(b: 3)
|
62
|
-
Employee::Collection.where(a: 1).where.not(b: 3)
|
63
|
-
```
|
64
|
-
|
65
|
-
2015-12-09 - v0.9.1
|
66
|
-
-------------------
|
67
|
-
|
68
|
-
### Added
|
69
|
-
* Use string separator argument like: RecordCollection.id\_separator
|
70
|
-
|
71
|
-
2015-11-03 - v0.9.0
|
72
|
-
-------------------
|
73
|
-
|
74
|
-
### Added
|
75
|
-
* Allow block without argument in before and after update hooks
|
76
|
-
|
77
|
-
2015-11-03 - v0.8.3
|
78
|
-
-------------------
|
79
|
-
|
80
|
-
### Added
|
81
|
-
* before\_record\_update hook
|
82
|
-
|
83
|
-
|
84
|
-
2015-11-03 - v0.8.2
|
85
|
-
-------------------
|
86
|
-
|
87
|
-
### Added
|
88
|
-
* Smarter find on collection object
|
data/Gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in record_collection.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
gem "rails", "~> 8.0"
|
7
|
-
|
8
|
-
group :development, :test do
|
9
|
-
gem 'puma'
|
10
|
-
end
|
11
|
-
|
12
|
-
group :test do
|
13
|
-
gem "codeclimate-test-reporter", require: nil
|
14
|
-
gem 'selenium-webdriver'
|
15
|
-
end
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2015 Benjamin ter Kuile
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
File without changes
|
data/bin/rails
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
-
|
4
|
-
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
-
ENGINE_PATH = File.expand_path('../../lib/record_collection/engine', __FILE__)
|
6
|
-
APP_PATH = File.expand_path("../spec/dummy/config/application", __dir__)
|
7
|
-
|
8
|
-
# Set up gems listed in the Gemfile.
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
10
|
-
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
11
|
-
|
12
|
-
require 'rails/all'
|
13
|
-
require 'rails/engine/commands'
|
@@ -1,13 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in record_collection.gemspec
|
4
|
-
gemspec path: '../'
|
5
|
-
|
6
|
-
gem "rails", github: 'rails/rails'
|
7
|
-
|
8
|
-
gem 'arel', github: 'rails/arel'
|
9
|
-
gem 'rack', github: 'rack/rack'
|
10
|
-
|
11
|
-
group :test do
|
12
|
-
gem "codeclimate-test-reporter", require: nil
|
13
|
-
end
|
data/record_collection.gemspec
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'record_collection/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "record_collection"
|
8
|
-
spec.version = RecordCollection::VERSION
|
9
|
-
spec.authors = ["Benjamin ter Kuile"]
|
10
|
-
spec.email = ["bterkuile@gmail.com"]
|
11
|
-
spec.summary = %q{Manage collections of records in Ruby on Rails}
|
12
|
-
spec.description = %q{This gem helps you to work on subsets or rails models}
|
13
|
-
spec.homepage = "https://github.com/bterkuile/record_collection"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject{ |f| f =~ %r{^(docs)} }
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
#spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
-
#spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
#spec.add_development_dependency "rspec", ">= 3.1.0"
|
24
|
-
spec.add_development_dependency "rspec-rails" #, "~> 3.1"
|
25
|
-
spec.add_development_dependency "rspec-its"
|
26
|
-
spec.add_development_dependency "pry", ">= 0.1"
|
27
|
-
spec.add_development_dependency "rails" #, "~> 4.1"
|
28
|
-
spec.add_development_dependency "sqlite3"
|
29
|
-
spec.add_development_dependency "slim-rails"
|
30
|
-
spec.add_development_dependency "coffee-rails"
|
31
|
-
spec.add_development_dependency "sass-rails"
|
32
|
-
spec.add_development_dependency "font-awesome-rails"
|
33
|
-
spec.add_development_dependency "jquery-rails"
|
34
|
-
spec.add_development_dependency "js-routes"
|
35
|
-
spec.add_development_dependency "capybara"
|
36
|
-
spec.add_development_dependency "capybara-screenshot"
|
37
|
-
spec.add_development_dependency "poltergeist"
|
38
|
-
spec.add_development_dependency "launchy"
|
39
|
-
spec.add_development_dependency "database_cleaner"
|
40
|
-
spec.add_development_dependency "spring"
|
41
|
-
spec.add_development_dependency "spring-commands-rspec"
|
42
|
-
#spec.add_development_dependency "quiet_assets"
|
43
|
-
spec.add_development_dependency "simple_form"
|
44
|
-
spec.add_development_dependency "rspec-html-matchers"
|
45
|
-
|
46
|
-
|
47
|
-
spec.add_runtime_dependency 'active_attr', '>= 0.8'
|
48
|
-
spec.add_runtime_dependency 'activemodel', '>= 4.1'
|
49
|
-
spec.add_runtime_dependency "railties", ">= 3.1"
|
50
|
-
end
|
data/spec/base/accessors_spec.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe RecordCollection::Base do
|
4
|
-
|
5
|
-
describe '#ids' do
|
6
|
-
it 'returns the ids of the collection' do
|
7
|
-
employee = Employee.create name: 'E1', section: 'ABC', admin: true, vegan: false
|
8
|
-
described_class.new([employee]).ids.should eq [employee.id]
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'Filters out nil records' do
|
12
|
-
employee = Employee.create name: 'E1', section: 'ABC', admin: true, vegan: false
|
13
|
-
described_class.new([employee, nil]).ids.should eq [employee.id]
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'returns an empty array for an empty collection' do
|
17
|
-
described_class.new.ids.should be_empty
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
class AfterRecordUpdateNoArityCollection < RecordCollection::Base
|
3
|
-
attribute :section
|
4
|
-
attribute :admin
|
5
|
-
after_record_update{ do_a_trick }
|
6
|
-
end
|
7
|
-
|
8
|
-
RSpec.describe AfterRecordUpdateNoArityCollection do
|
9
|
-
subject { described_class.new }
|
10
|
-
it "triggers the method" do
|
11
|
-
employee = Employee.create section: 'SE1', admin: false
|
12
|
-
expect( employee ).to receive :do_a_trick
|
13
|
-
described_class.new([employee]).update({})
|
14
|
-
end
|
15
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
class AfterRecordUpdateCollection < RecordCollection::Base
|
3
|
-
attribute :section
|
4
|
-
after_record_update{|record| record.update(admin: true) }
|
5
|
-
end
|
6
|
-
RSpec.describe AfterRecordUpdateCollection do
|
7
|
-
subject { described_class.new }
|
8
|
-
|
9
|
-
it "executes on the record" do
|
10
|
-
employee = Employee.create section: 'SE1', admin: false
|
11
|
-
described_class.new([employee]).update({})
|
12
|
-
employee.reload
|
13
|
-
employee.admin.should be true
|
14
|
-
end
|
15
|
-
|
16
|
-
it "will not be overridden by the update action itself (hence after)" do
|
17
|
-
employee = Employee.create section: 'SE1', admin: false
|
18
|
-
described_class.new([employee]).update(admin: false)
|
19
|
-
employee.reload
|
20
|
-
employee.admin.should be true
|
21
|
-
end
|
22
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
class BeforeRecordUpdateNoArityCollection < RecordCollection::Base
|
3
|
-
attribute :section
|
4
|
-
attribute :admin
|
5
|
-
before_record_update{ do_a_trick }
|
6
|
-
end
|
7
|
-
|
8
|
-
RSpec.describe BeforeRecordUpdateNoArityCollection do
|
9
|
-
subject { described_class.new }
|
10
|
-
it "triggers the method" do
|
11
|
-
employee = Employee.create section: 'SE1', admin: false
|
12
|
-
expect( employee ).to receive :do_a_trick
|
13
|
-
described_class.new([employee]).update({})
|
14
|
-
end
|
15
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
class BeforeRecordUpdateCollection < RecordCollection::Base
|
3
|
-
attribute :section
|
4
|
-
attribute :admin
|
5
|
-
before_record_update{|record| record.admin = true }
|
6
|
-
end
|
7
|
-
RSpec.describe BeforeRecordUpdateCollection do
|
8
|
-
subject { described_class.new }
|
9
|
-
it "executes on the record" do
|
10
|
-
employee = Employee.create section: 'SE1', admin: false
|
11
|
-
described_class.new([employee]).update({})
|
12
|
-
employee.reload
|
13
|
-
employee.admin.should be true
|
14
|
-
end
|
15
|
-
|
16
|
-
it "will be overriden by the actual update action (hence before)" do
|
17
|
-
employee = Employee.create section: 'SE1', admin: false
|
18
|
-
described_class.new([employee]).update(admin: false)
|
19
|
-
employee.reload
|
20
|
-
employee.admin.should be false
|
21
|
-
end
|
22
|
-
end
|