graphql_devise 0.12.3 → 0.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +54 -0
- data/Gemfile +2 -0
- data/README.md +116 -65
- data/Rakefile +2 -0
- data/app/controllers/graphql_devise/application_controller.rb +2 -0
- data/app/controllers/graphql_devise/concerns/set_user_by_token.rb +6 -0
- data/app/controllers/graphql_devise/graphql_controller.rb +2 -0
- data/app/helpers/graphql_devise/application_helper.rb +2 -0
- data/app/helpers/graphql_devise/mailer_helper.rb +2 -0
- data/app/models/graphql_devise/concerns/model.rb +16 -0
- data/app/views/graphql_devise/mailer/confirmation_instructions.html.erb +1 -1
- data/app/views/graphql_devise/mailer/reset_password_instructions.html.erb +1 -1
- data/config/routes.rb +2 -0
- data/lib/generators/graphql_devise/install_generator.rb +3 -1
- data/lib/graphql_devise.rb +2 -0
- data/lib/graphql_devise/concerns/controller_methods.rb +2 -0
- data/lib/graphql_devise/default_operations/mutations.rb +2 -0
- data/lib/graphql_devise/default_operations/resolvers.rb +2 -0
- data/lib/graphql_devise/engine.rb +2 -0
- data/lib/graphql_devise/errors/authentication_error.rb +2 -0
- data/lib/graphql_devise/errors/detailed_user_error.rb +2 -0
- data/lib/graphql_devise/errors/error_codes.rb +2 -0
- data/lib/graphql_devise/errors/execution_error.rb +2 -0
- data/lib/graphql_devise/errors/user_error.rb +2 -0
- data/lib/graphql_devise/model/with_email_updater.rb +74 -0
- data/lib/graphql_devise/mount_method/operation_preparer.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_preparers/custom_operation_preparer.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_preparers/gql_name_setter.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_preparers/resource_name_setter.rb +2 -0
- data/lib/graphql_devise/mount_method/operation_sanitizer.rb +2 -0
- data/lib/graphql_devise/mount_method/option_sanitizer.rb +2 -0
- data/lib/graphql_devise/mount_method/option_sanitizers/array_checker.rb +2 -0
- data/lib/graphql_devise/mount_method/option_sanitizers/class_checker.rb +2 -0
- data/lib/graphql_devise/mount_method/option_sanitizers/hash_checker.rb +2 -0
- data/lib/graphql_devise/mount_method/option_sanitizers/string_checker.rb +2 -0
- data/lib/graphql_devise/mount_method/option_validators/provided_operations_validator.rb +2 -0
- data/lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb +2 -0
- data/lib/graphql_devise/mount_method/option_validators/supported_operations_validator.rb +2 -0
- data/lib/graphql_devise/mount_method/options_validator.rb +2 -0
- data/lib/graphql_devise/mount_method/supported_options.rb +2 -0
- data/lib/graphql_devise/mutations/base.rb +2 -0
- data/lib/graphql_devise/mutations/login.rb +2 -0
- data/lib/graphql_devise/mutations/logout.rb +2 -0
- data/lib/graphql_devise/mutations/resend_confirmation.rb +16 -6
- data/lib/graphql_devise/mutations/send_password_reset.rb +3 -1
- data/lib/graphql_devise/mutations/sign_up.rb +12 -3
- data/lib/graphql_devise/mutations/update_password.rb +2 -0
- data/lib/graphql_devise/rails/routes.rb +2 -0
- data/lib/graphql_devise/resolvers/base.rb +2 -0
- data/lib/graphql_devise/resolvers/check_password_token.rb +2 -0
- data/lib/graphql_devise/resolvers/confirm_account.rb +7 -2
- data/lib/graphql_devise/resolvers/dummy.rb +2 -0
- data/lib/graphql_devise/resource_loader.rb +2 -0
- data/lib/graphql_devise/schema.rb +2 -0
- data/lib/graphql_devise/schema_plugin.rb +8 -0
- data/lib/graphql_devise/types/authenticatable_type.rb +2 -0
- data/lib/graphql_devise/types/credential_type.rb +2 -0
- data/lib/graphql_devise/types/mutation_type.rb +2 -0
- data/lib/graphql_devise/types/query_type.rb +2 -0
- data/lib/graphql_devise/version.rb +3 -1
- data/spec/dummy/Rakefile +2 -0
- data/spec/dummy/app/controllers/api/v1/graphql_controller.rb +3 -1
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/graphql/dummy_schema.rb +4 -1
- data/spec/dummy/app/graphql/interpreter_schema.rb +2 -0
- data/spec/dummy/app/graphql/mutations/login.rb +2 -0
- data/spec/dummy/app/graphql/mutations/register_confirmed_user.rb +2 -0
- data/spec/dummy/app/graphql/mutations/sign_up.rb +2 -0
- data/spec/dummy/app/graphql/mutations/update_user.rb +22 -0
- data/spec/dummy/app/graphql/resolvers/confirm_admin_account.rb +13 -0
- data/spec/dummy/app/graphql/resolvers/public_user.rb +2 -0
- data/spec/dummy/app/graphql/resolvers/user_show.rb +2 -0
- data/spec/dummy/app/graphql/types/admin_type.rb +8 -0
- data/spec/dummy/app/graphql/types/base_object.rb +2 -0
- data/spec/dummy/app/graphql/types/custom_admin_type.rb +2 -0
- data/spec/dummy/app/graphql/types/mutation_type.rb +3 -0
- data/spec/dummy/app/graphql/types/query_type.rb +2 -0
- data/spec/dummy/app/graphql/types/user_type.rb +2 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +2 -0
- data/spec/dummy/app/models/admin.rb +2 -0
- data/spec/dummy/app/models/application_record.rb +2 -0
- data/spec/dummy/app/models/guest.rb +2 -0
- data/spec/dummy/app/models/schema_user.rb +13 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/app/models/users.rb +2 -0
- data/spec/dummy/app/models/users/customer.rb +2 -0
- data/spec/dummy/config.ru +2 -0
- data/spec/dummy/config/application.rb +2 -0
- data/spec/dummy/config/environment.rb +2 -0
- data/spec/dummy/config/environments/development.rb +2 -0
- data/spec/dummy/config/environments/production.rb +2 -0
- data/spec/dummy/config/environments/test.rb +2 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +2 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -0
- data/spec/dummy/config/initializers/cors.rb +2 -0
- data/spec/dummy/config/initializers/devise.rb +1 -1
- data/spec/dummy/config/initializers/devise_token_auth.rb +2 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +2 -0
- data/spec/dummy/config/initializers/i18n.rb +2 -0
- data/spec/dummy/config/initializers/inflections.rb +2 -0
- data/spec/dummy/config/initializers/mime_types.rb +2 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/spec/dummy/config/puma.rb +2 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/spring.rb +2 -0
- data/spec/dummy/db/migrate/20190815114303_create_users.rb +2 -0
- data/spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb +2 -0
- data/spec/dummy/db/migrate/20190916012505_create_admins.rb +2 -0
- data/spec/dummy/db/migrate/20191013213045_create_guests.rb +2 -0
- data/spec/dummy/db/migrate/20200321121807_create_users_customers.rb +2 -0
- data/spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb +7 -0
- data/spec/dummy/db/migrate/20200623003142_create_schema_users.rb +46 -0
- data/spec/dummy/db/schema.rb +28 -2
- data/spec/dummy/db/seeds.rb +2 -0
- data/spec/factories/admins.rb +2 -0
- data/spec/factories/guests.rb +2 -0
- data/spec/factories/schema_users.rb +13 -0
- data/spec/factories/users.rb +2 -0
- data/spec/factories/users_customers.rb +2 -0
- data/spec/generators/graphql_devise/install_generator_spec.rb +3 -1
- data/spec/graphql_devise/model/with_email_updater_spec.rb +131 -0
- data/spec/graphql_devise_spec.rb +2 -0
- data/spec/models/user_spec.rb +2 -0
- data/spec/rails_helper.rb +3 -0
- data/spec/requests/graphql_controller_spec.rb +2 -0
- data/spec/requests/mutations/additional_mutations_spec.rb +2 -0
- data/spec/requests/mutations/additional_queries_spec.rb +2 -0
- data/spec/requests/mutations/login_spec.rb +2 -0
- data/spec/requests/mutations/logout_spec.rb +2 -0
- data/spec/requests/mutations/resend_confirmation_spec.rb +29 -4
- data/spec/requests/mutations/send_password_reset_spec.rb +2 -0
- data/spec/requests/mutations/sign_up_spec.rb +15 -2
- data/spec/requests/mutations/update_password_spec.rb +2 -0
- data/spec/requests/queries/check_password_token_spec.rb +2 -0
- data/spec/requests/queries/confirm_account_spec.rb +102 -42
- data/spec/requests/user_controller_spec.rb +57 -8
- data/spec/services/mount_method/operation_preparer_spec.rb +2 -0
- data/spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb +2 -0
- data/spec/services/mount_method/operation_preparers/default_operation_preparer_spec.rb +2 -0
- data/spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb +2 -0
- data/spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb +2 -0
- data/spec/services/mount_method/operation_preparers/resolver_type_setter_spec.rb +2 -0
- data/spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb +2 -0
- data/spec/services/mount_method/operation_sanitizer_spec.rb +2 -0
- data/spec/services/mount_method/option_sanitizer_spec.rb +2 -0
- data/spec/services/mount_method/option_sanitizers/array_checker_spec.rb +2 -0
- data/spec/services/mount_method/option_sanitizers/class_checker_spec.rb +2 -0
- data/spec/services/mount_method/option_sanitizers/hash_checker_spec.rb +2 -0
- data/spec/services/mount_method/option_sanitizers/string_checker_spec.rb +2 -0
- data/spec/services/mount_method/option_validators/provided_operations_validator_spec.rb +2 -0
- data/spec/services/mount_method/option_validators/skip_only_validator_spec.rb +2 -0
- data/spec/services/mount_method/option_validators/supported_operations_validator_spec.rb +2 -0
- data/spec/services/mount_method/options_validator_spec.rb +2 -0
- data/spec/services/resource_loader_spec.rb +2 -0
- data/spec/services/schema_plugin_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/contexts/graphql_request.rb +2 -0
- data/spec/support/factory_bot.rb +2 -0
- data/spec/support/matchers/auth_headers_matcher.rb +2 -0
- data/spec/support/matchers/not_change_matcher.rb +2 -0
- data/spec/support/requests/auth_helpers.rb +2 -0
- data/spec/support/requests/json_helpers.rb +2 -0
- metadata +19 -2
data/spec/spec_helper.rb
CHANGED
data/spec/support/factory_bot.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql_devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Celi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: devise_token_auth
|
@@ -314,6 +314,7 @@ files:
|
|
314
314
|
- lib/graphql_devise/errors/error_codes.rb
|
315
315
|
- lib/graphql_devise/errors/execution_error.rb
|
316
316
|
- lib/graphql_devise/errors/user_error.rb
|
317
|
+
- lib/graphql_devise/model/with_email_updater.rb
|
317
318
|
- lib/graphql_devise/mount_method/operation_preparer.rb
|
318
319
|
- lib/graphql_devise/mount_method/operation_preparers/custom_operation_preparer.rb
|
319
320
|
- lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb
|
@@ -362,8 +363,11 @@ files:
|
|
362
363
|
- spec/dummy/app/graphql/mutations/login.rb
|
363
364
|
- spec/dummy/app/graphql/mutations/register_confirmed_user.rb
|
364
365
|
- spec/dummy/app/graphql/mutations/sign_up.rb
|
366
|
+
- spec/dummy/app/graphql/mutations/update_user.rb
|
367
|
+
- spec/dummy/app/graphql/resolvers/confirm_admin_account.rb
|
365
368
|
- spec/dummy/app/graphql/resolvers/public_user.rb
|
366
369
|
- spec/dummy/app/graphql/resolvers/user_show.rb
|
370
|
+
- spec/dummy/app/graphql/types/admin_type.rb
|
367
371
|
- spec/dummy/app/graphql/types/base_object.rb
|
368
372
|
- spec/dummy/app/graphql/types/custom_admin_type.rb
|
369
373
|
- spec/dummy/app/graphql/types/mutation_type.rb
|
@@ -374,6 +378,7 @@ files:
|
|
374
378
|
- spec/dummy/app/models/admin.rb
|
375
379
|
- spec/dummy/app/models/application_record.rb
|
376
380
|
- spec/dummy/app/models/guest.rb
|
381
|
+
- spec/dummy/app/models/schema_user.rb
|
377
382
|
- spec/dummy/app/models/user.rb
|
378
383
|
- spec/dummy/app/models/users.rb
|
379
384
|
- spec/dummy/app/models/users/customer.rb
|
@@ -412,14 +417,18 @@ files:
|
|
412
417
|
- spec/dummy/db/migrate/20190916012505_create_admins.rb
|
413
418
|
- spec/dummy/db/migrate/20191013213045_create_guests.rb
|
414
419
|
- spec/dummy/db/migrate/20200321121807_create_users_customers.rb
|
420
|
+
- spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb
|
421
|
+
- spec/dummy/db/migrate/20200623003142_create_schema_users.rb
|
415
422
|
- spec/dummy/db/schema.rb
|
416
423
|
- spec/dummy/db/seeds.rb
|
417
424
|
- spec/dummy/public/robots.txt
|
418
425
|
- spec/factories/admins.rb
|
419
426
|
- spec/factories/guests.rb
|
427
|
+
- spec/factories/schema_users.rb
|
420
428
|
- spec/factories/users.rb
|
421
429
|
- spec/factories/users_customers.rb
|
422
430
|
- spec/generators/graphql_devise/install_generator_spec.rb
|
431
|
+
- spec/graphql_devise/model/with_email_updater_spec.rb
|
423
432
|
- spec/graphql_devise_spec.rb
|
424
433
|
- spec/models/user_spec.rb
|
425
434
|
- spec/rails_helper.rb
|
@@ -497,8 +506,11 @@ test_files:
|
|
497
506
|
- spec/dummy/app/graphql/mutations/login.rb
|
498
507
|
- spec/dummy/app/graphql/mutations/register_confirmed_user.rb
|
499
508
|
- spec/dummy/app/graphql/mutations/sign_up.rb
|
509
|
+
- spec/dummy/app/graphql/mutations/update_user.rb
|
510
|
+
- spec/dummy/app/graphql/resolvers/confirm_admin_account.rb
|
500
511
|
- spec/dummy/app/graphql/resolvers/public_user.rb
|
501
512
|
- spec/dummy/app/graphql/resolvers/user_show.rb
|
513
|
+
- spec/dummy/app/graphql/types/admin_type.rb
|
502
514
|
- spec/dummy/app/graphql/types/base_object.rb
|
503
515
|
- spec/dummy/app/graphql/types/custom_admin_type.rb
|
504
516
|
- spec/dummy/app/graphql/types/mutation_type.rb
|
@@ -509,6 +521,7 @@ test_files:
|
|
509
521
|
- spec/dummy/app/models/admin.rb
|
510
522
|
- spec/dummy/app/models/application_record.rb
|
511
523
|
- spec/dummy/app/models/guest.rb
|
524
|
+
- spec/dummy/app/models/schema_user.rb
|
512
525
|
- spec/dummy/app/models/user.rb
|
513
526
|
- spec/dummy/app/models/users.rb
|
514
527
|
- spec/dummy/app/models/users/customer.rb
|
@@ -547,14 +560,18 @@ test_files:
|
|
547
560
|
- spec/dummy/db/migrate/20190916012505_create_admins.rb
|
548
561
|
- spec/dummy/db/migrate/20191013213045_create_guests.rb
|
549
562
|
- spec/dummy/db/migrate/20200321121807_create_users_customers.rb
|
563
|
+
- spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb
|
564
|
+
- spec/dummy/db/migrate/20200623003142_create_schema_users.rb
|
550
565
|
- spec/dummy/db/schema.rb
|
551
566
|
- spec/dummy/db/seeds.rb
|
552
567
|
- spec/dummy/public/robots.txt
|
553
568
|
- spec/factories/admins.rb
|
554
569
|
- spec/factories/guests.rb
|
570
|
+
- spec/factories/schema_users.rb
|
555
571
|
- spec/factories/users.rb
|
556
572
|
- spec/factories/users_customers.rb
|
557
573
|
- spec/generators/graphql_devise/install_generator_spec.rb
|
574
|
+
- spec/graphql_devise/model/with_email_updater_spec.rb
|
558
575
|
- spec/graphql_devise_spec.rb
|
559
576
|
- spec/models/user_spec.rb
|
560
577
|
- spec/rails_helper.rb
|