graphql_devise 0.14.1 → 0.17.0
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/.circleci/config.yml +118 -0
- data/Appraisals +26 -6
- data/CHANGELOG.md +72 -6
- data/README.md +184 -69
- data/Rakefile +2 -1
- data/app/controllers/graphql_devise/concerns/additional_controller_methods.rb +72 -0
- data/app/controllers/graphql_devise/concerns/set_user_by_token.rb +5 -27
- data/app/controllers/graphql_devise/graphql_controller.rb +1 -1
- data/app/helpers/graphql_devise/mailer_helper.rb +2 -2
- data/app/models/graphql_devise/concerns/additional_model_methods.rb +21 -0
- data/app/models/graphql_devise/concerns/model.rb +6 -9
- data/app/views/graphql_devise/mailer/confirmation_instructions.html.erb +7 -1
- data/graphql_devise.gemspec +1 -1
- data/lib/generators/graphql_devise/install_generator.rb +1 -1
- data/lib/graphql_devise.rb +20 -6
- data/lib/graphql_devise/concerns/controller_methods.rb +3 -3
- data/lib/graphql_devise/default_operations/mutations.rb +14 -8
- data/lib/graphql_devise/default_operations/resolvers.rb +2 -2
- data/lib/graphql_devise/model/with_email_updater.rb +34 -8
- data/lib/graphql_devise/mount_method/operation_preparer.rb +6 -6
- data/lib/graphql_devise/mount_method/operation_preparers/custom_operation_preparer.rb +6 -4
- data/lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb +7 -5
- data/lib/graphql_devise/mount_method/operation_preparers/{resource_name_setter.rb → resource_klass_setter.rb} +4 -4
- data/lib/graphql_devise/mount_method/operation_sanitizer.rb +13 -1
- data/lib/graphql_devise/mutations/confirm_registration_with_token.rb +30 -0
- data/lib/graphql_devise/mutations/register.rb +60 -0
- data/lib/graphql_devise/mutations/resend_confirmation_with_token.rb +44 -0
- data/lib/graphql_devise/mutations/sign_up.rb +1 -1
- data/lib/graphql_devise/resolvers/confirm_account.rb +1 -1
- data/lib/graphql_devise/resource_loader.rb +26 -11
- data/lib/graphql_devise/schema_plugin.rb +31 -10
- data/lib/graphql_devise/version.rb +1 -1
- data/spec/dummy/app/controllers/api/v1/graphql_controller.rb +13 -2
- data/spec/dummy/app/graphql/dummy_schema.rb +8 -6
- data/spec/dummy/app/graphql/mutations/register.rb +14 -0
- data/spec/dummy/app/graphql/types/query_type.rb +5 -0
- data/spec/dummy/config/routes.rb +7 -5
- data/spec/dummy/db/migrate/20200623003142_create_schema_users.rb +0 -1
- data/spec/dummy/db/migrate/20210516211417_add_vip_to_users.rb +5 -0
- data/spec/dummy/db/schema.rb +4 -4
- data/spec/generators/graphql_devise/install_generator_spec.rb +1 -1
- data/spec/graphql/user_queries_spec.rb +3 -1
- data/spec/graphql_devise/model/with_email_updater_spec.rb +97 -68
- data/spec/requests/graphql_controller_spec.rb +12 -11
- data/spec/requests/mutations/confirm_registration_with_token_spec.rb +117 -0
- data/spec/requests/mutations/register_spec.rb +166 -0
- data/spec/requests/mutations/resend_confirmation_with_token_spec.rb +137 -0
- data/spec/requests/queries/introspection_query_spec.rb +149 -0
- data/spec/requests/user_controller_spec.rb +86 -25
- data/spec/services/mount_method/operation_preparer_spec.rb +5 -5
- data/spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb +5 -5
- data/spec/services/mount_method/operation_preparers/default_operation_preparer_spec.rb +5 -5
- data/spec/services/mount_method/operation_preparers/{resource_name_setter_spec.rb → resource_klass_setter_spec.rb} +6 -6
- data/spec/services/mount_method/operation_sanitizer_spec.rb +3 -3
- data/spec/services/resource_loader_spec.rb +5 -5
- data/spec/support/contexts/graphql_request.rb +11 -3
- metadata +29 -12
- data/.travis.yml +0 -86
@@ -5,6 +5,14 @@ require 'rails_helper'
|
|
5
5
|
RSpec.describe "Integrations with the user's controller" do
|
6
6
|
include_context 'with graphql query request'
|
7
7
|
|
8
|
+
shared_examples 'returns a must authenticate error' do |field|
|
9
|
+
it 'returns a must sign in error' do
|
10
|
+
expect(json_response[:errors]).to contain_exactly(
|
11
|
+
hash_including(message: "#{field} field requires authentication", extensions: { code: 'AUTHENTICATION_ERROR' })
|
12
|
+
)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
8
16
|
let(:user) { create(:user, :confirmed) }
|
9
17
|
|
10
18
|
describe 'publicField' do
|
@@ -42,6 +50,22 @@ RSpec.describe "Integrations with the user's controller" do
|
|
42
50
|
GRAPHQL
|
43
51
|
end
|
44
52
|
|
53
|
+
context 'when authenticating before using the GQL schema' do
|
54
|
+
before { post_request('/api/v1/controller_auth') }
|
55
|
+
|
56
|
+
context 'when user is authenticated' do
|
57
|
+
let(:headers) { create(:schema_user).create_new_auth_token }
|
58
|
+
|
59
|
+
it 'allows authentication at the controller level' do
|
60
|
+
expect(json_response[:data][:privateField]).to eq('Field will always require authentication')
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
context 'when user is not authenticated' do
|
65
|
+
it_behaves_like 'returns a must authenticate error', 'privateField'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
45
69
|
context 'when using a regular schema' do
|
46
70
|
before { post_request('/api/v1/graphql') }
|
47
71
|
|
@@ -62,11 +86,7 @@ RSpec.describe "Integrations with the user's controller" do
|
|
62
86
|
end
|
63
87
|
|
64
88
|
context 'when user is not authenticated' do
|
65
|
-
|
66
|
-
expect(json_response[:errors]).to contain_exactly(
|
67
|
-
hash_including(message: 'privateField field requires authentication', extensions: { code: 'AUTHENTICATION_ERROR' })
|
68
|
-
)
|
69
|
-
end
|
89
|
+
it_behaves_like 'returns a must authenticate error', 'privateField'
|
70
90
|
end
|
71
91
|
|
72
92
|
context 'when using the failing route' do
|
@@ -91,11 +111,7 @@ RSpec.describe "Integrations with the user's controller" do
|
|
91
111
|
end
|
92
112
|
|
93
113
|
context 'when user is not authenticated' do
|
94
|
-
|
95
|
-
expect(json_response[:errors]).to contain_exactly(
|
96
|
-
hash_including(message: 'privateField field requires authentication', extensions: { code: 'AUTHENTICATION_ERROR' })
|
97
|
-
)
|
98
|
-
end
|
114
|
+
it_behaves_like 'returns a must authenticate error', 'privateField'
|
99
115
|
end
|
100
116
|
end
|
101
117
|
end
|
@@ -121,11 +137,7 @@ RSpec.describe "Integrations with the user's controller" do
|
|
121
137
|
end
|
122
138
|
|
123
139
|
context 'when user is not authenticated' do
|
124
|
-
|
125
|
-
expect(json_response[:errors]).to contain_exactly(
|
126
|
-
hash_including(message: 'dummyMutation field requires authentication', extensions: { code: 'AUTHENTICATION_ERROR' })
|
127
|
-
)
|
128
|
-
end
|
140
|
+
it_behaves_like 'returns a must authenticate error', 'dummyMutation'
|
129
141
|
end
|
130
142
|
end
|
131
143
|
|
@@ -141,11 +153,7 @@ RSpec.describe "Integrations with the user's controller" do
|
|
141
153
|
end
|
142
154
|
|
143
155
|
context 'when user is not authenticated' do
|
144
|
-
|
145
|
-
expect(json_response[:errors]).to contain_exactly(
|
146
|
-
hash_including(message: 'dummyMutation field requires authentication', extensions: { code: 'AUTHENTICATION_ERROR' })
|
147
|
-
)
|
148
|
-
end
|
156
|
+
it_behaves_like 'returns a must authenticate error', 'dummyMutation'
|
149
157
|
end
|
150
158
|
end
|
151
159
|
end
|
@@ -179,11 +187,7 @@ RSpec.describe "Integrations with the user's controller" do
|
|
179
187
|
end
|
180
188
|
|
181
189
|
context 'when user is not authenticated' do
|
182
|
-
|
183
|
-
expect(json_response[:errors]).to contain_exactly(
|
184
|
-
hash_including(message: 'user field requires authentication', extensions: { code: 'AUTHENTICATION_ERROR' })
|
185
|
-
)
|
186
|
-
end
|
190
|
+
it_behaves_like 'returns a must authenticate error', 'user'
|
187
191
|
end
|
188
192
|
end
|
189
193
|
|
@@ -251,4 +255,61 @@ RSpec.describe "Integrations with the user's controller" do
|
|
251
255
|
)
|
252
256
|
end
|
253
257
|
end
|
258
|
+
|
259
|
+
describe 'vipField' do
|
260
|
+
let(:error_message) { 'Field available only for VIP Users' }
|
261
|
+
let(:query) do
|
262
|
+
<<-GRAPHQL
|
263
|
+
query { vipField }
|
264
|
+
GRAPHQL
|
265
|
+
end
|
266
|
+
|
267
|
+
context 'when using a regular schema' do
|
268
|
+
before { post_request('/api/v1/graphql') }
|
269
|
+
|
270
|
+
context 'when user is authenticated' do
|
271
|
+
let(:headers) { user.create_new_auth_token }
|
272
|
+
|
273
|
+
context 'when schema user is VIP' do
|
274
|
+
let(:user) { create(:user, :confirmed, vip: true) }
|
275
|
+
|
276
|
+
it 'allows to perform the query' do
|
277
|
+
expect(json_response[:data][:vipField]).to eq(error_message)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
context 'when schema user is not VIP' do
|
282
|
+
it_behaves_like 'returns a must authenticate error', 'vipField'
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
context 'when user is not authenticated' do
|
287
|
+
it_behaves_like 'returns a must authenticate error', 'vipField'
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
context 'when using the interpreter schema' do
|
292
|
+
before { post_request('/api/v1/interpreter') }
|
293
|
+
|
294
|
+
context 'when user is authenticated' do
|
295
|
+
let(:headers) { user.create_new_auth_token }
|
296
|
+
|
297
|
+
context 'when schema user is VIP' do
|
298
|
+
let(:user) { create(:user, :confirmed, vip: true) }
|
299
|
+
|
300
|
+
it 'allows to perform the query' do
|
301
|
+
expect(json_response[:data][:vipField]).to eq(error_message)
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
context 'when schema user is not VIP' do
|
306
|
+
it_behaves_like 'returns a must authenticate error', 'vipField'
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
context 'when user is not authenticated' do
|
311
|
+
it_behaves_like 'returns a must authenticate error', 'vipField'
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
254
315
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'rails_helper'
|
4
4
|
|
5
5
|
RSpec.describe GraphqlDevise::MountMethod::OperationPreparer do
|
6
6
|
describe '#call' do
|
7
7
|
subject(:prepared_operations) do
|
8
8
|
described_class.new(
|
9
|
-
|
9
|
+
model: model,
|
10
10
|
selected_operations: selected,
|
11
11
|
preparer: preparer,
|
12
12
|
custom: custom,
|
@@ -15,14 +15,14 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparer do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
let(:logout_class) { Class.new(GraphQL::Schema::Resolver) }
|
18
|
-
let(:
|
18
|
+
let(:model) { User }
|
19
19
|
let(:preparer) { double(:preparer, call: logout_class) }
|
20
20
|
let(:custom) { { login: double(:custom_login, graphql_name: nil) } }
|
21
21
|
let(:additional) { { user_additional: double(:user_additional) } }
|
22
22
|
let(:selected) do
|
23
23
|
{
|
24
|
-
login:
|
25
|
-
logout:{ klass: logout_class }
|
24
|
+
login: { klass: double(:login_default) },
|
25
|
+
logout: { klass: logout_class }
|
26
26
|
}
|
27
27
|
end
|
28
28
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'rails_helper'
|
4
4
|
|
5
5
|
RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::CustomOperationPreparer do
|
6
6
|
describe '#call' do
|
7
|
-
subject(:prepared) { described_class.new(selected_keys: selected_keys, custom_operations: operations,
|
7
|
+
subject(:prepared) { described_class.new(selected_keys: selected_keys, custom_operations: operations, model: model).call }
|
8
8
|
|
9
9
|
let(:login_operation) { double(:confirm_operation, graphql_name: nil) }
|
10
10
|
let(:logout_operation) { double(:sign_up_operation, graphql_name: nil) }
|
11
|
-
let(:
|
11
|
+
let(:model) { User }
|
12
12
|
let(:operations) { { login: login_operation, logout: logout_operation, invalid: double(:invalid) } }
|
13
13
|
let(:selected_keys) { [:login, :logout, :sign_up, :confirm] }
|
14
14
|
|
@@ -22,8 +22,8 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::CustomOperationPr
|
|
22
22
|
|
23
23
|
prepared
|
24
24
|
|
25
|
-
expect(login_operation.instance_variable_get(:@
|
26
|
-
expect(logout_operation.instance_variable_get(:@
|
25
|
+
expect(login_operation.instance_variable_get(:@resource_klass)).to eq(User)
|
26
|
+
expect(logout_operation.instance_variable_get(:@resource_klass)).to eq(User)
|
27
27
|
end
|
28
28
|
|
29
29
|
context 'when no selected keys are provided' do
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'rails_helper'
|
4
4
|
|
5
5
|
RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::DefaultOperationPreparer do
|
6
6
|
describe '#call' do
|
7
7
|
subject(:prepared) { default_preparer.call }
|
8
8
|
|
9
|
-
let(:default_preparer) { described_class.new(selected_operations: operations, custom_keys: custom_keys,
|
9
|
+
let(:default_preparer) { described_class.new(selected_operations: operations, custom_keys: custom_keys, model: model, preparer: preparer) }
|
10
10
|
let(:confirm_operation) { double(:confirm_operation, graphql_name: nil) }
|
11
11
|
let(:sign_up_operation) { double(:sign_up_operation, graphql_name: nil) }
|
12
12
|
let(:login_operation) { double(:confirm_operation, graphql_name: nil) }
|
13
13
|
let(:logout_operation) { double(:sign_up_operation, graphql_name: nil) }
|
14
|
-
let(:
|
14
|
+
let(:model) { User }
|
15
15
|
let(:preparer) { double(:preparer) }
|
16
16
|
let(:custom_keys) { [:login, :logout] }
|
17
17
|
let(:operations) do
|
@@ -46,8 +46,8 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::DefaultOperationP
|
|
46
46
|
|
47
47
|
prepared
|
48
48
|
|
49
|
-
expect(confirm_operation.instance_variable_get(:@
|
50
|
-
expect(sign_up_operation.instance_variable_get(:@
|
49
|
+
expect(confirm_operation.instance_variable_get(:@resource_klass)).to eq(User)
|
50
|
+
expect(sign_up_operation.instance_variable_get(:@resource_klass)).to eq(User)
|
51
51
|
end
|
52
52
|
|
53
53
|
context 'when no custom keys are provided' do
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'rails_helper'
|
4
4
|
|
5
|
-
RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::
|
5
|
+
RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::ResourceKlassSetter do
|
6
6
|
describe '#call' do
|
7
|
-
subject(:prepared_operation) { described_class.new(
|
7
|
+
subject(:prepared_operation) { described_class.new(model).call(operation) }
|
8
8
|
|
9
|
-
let(:operation)
|
10
|
-
let(:
|
9
|
+
let(:operation) { double(:operation) }
|
10
|
+
let(:model) { User }
|
11
11
|
|
12
12
|
it 'sets a gql name to the operation' do
|
13
|
-
expect(prepared_operation.instance_variable_get(:@
|
13
|
+
expect(prepared_operation.instance_variable_get(:@resource_klass)).to eq(model)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -13,7 +13,7 @@ RSpec.describe GraphqlDevise::MountMethod::OperationSanitizer do
|
|
13
13
|
context 'when the operations passed are mutations' do
|
14
14
|
let(:skipped) { [] }
|
15
15
|
let(:only) { [] }
|
16
|
-
let(:default) { { operation1: op_class1, operation2: op_class2 } }
|
16
|
+
let(:default) { { operation1: { klass: op_class1 }, operation2: { klass: op_class2 } } }
|
17
17
|
|
18
18
|
context 'when no other option besides default is passed' do
|
19
19
|
it { is_expected.to eq(default) }
|
@@ -22,13 +22,13 @@ RSpec.describe GraphqlDevise::MountMethod::OperationSanitizer do
|
|
22
22
|
context 'when there are only operations' do
|
23
23
|
let(:only) { [:operation1] }
|
24
24
|
|
25
|
-
it { is_expected.to eq(operation1: op_class1) }
|
25
|
+
it { is_expected.to eq(operation1: { klass: op_class1 }) }
|
26
26
|
end
|
27
27
|
|
28
28
|
context 'when there are skipped operations' do
|
29
29
|
let(:skipped) { [:operation2] }
|
30
30
|
|
31
|
-
it { is_expected.to eq(operation1: op_class1) }
|
31
|
+
it { is_expected.to eq(operation1: { klass: op_class1 }) }
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'rails_helper'
|
4
4
|
|
5
5
|
RSpec.describe GraphqlDevise::ResourceLoader do
|
6
6
|
describe '#call' do
|
@@ -15,8 +15,8 @@ RSpec.describe GraphqlDevise::ResourceLoader do
|
|
15
15
|
|
16
16
|
before do
|
17
17
|
allow(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
|
18
|
-
allow(GraphqlDevise).to receive(:resource_mounted?).with(
|
19
|
-
allow(GraphqlDevise).to receive(:mount_resource).with(
|
18
|
+
allow(GraphqlDevise).to receive(:resource_mounted?).with(User).and_return(mounted)
|
19
|
+
allow(GraphqlDevise).to receive(:mount_resource).with(User)
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'loads operations into the provided types' do
|
@@ -64,13 +64,13 @@ RSpec.describe GraphqlDevise::ResourceLoader do
|
|
64
64
|
|
65
65
|
it 'adds mappings' do
|
66
66
|
expect(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
|
67
|
-
expect(GraphqlDevise).to receive(:mount_resource).with(
|
67
|
+
expect(GraphqlDevise).to receive(:mount_resource).with(User)
|
68
68
|
|
69
69
|
loader
|
70
70
|
end
|
71
71
|
|
72
72
|
context 'when resource was already mounted' do
|
73
|
-
before { allow(GraphqlDevise).to receive(:resource_mounted?).with(
|
73
|
+
before { allow(GraphqlDevise).to receive(:resource_mounted?).with(User).and_return(true) }
|
74
74
|
|
75
75
|
it 'skips schema loading' do
|
76
76
|
expect(query).not_to receive(:field)
|
@@ -5,17 +5,25 @@ RSpec.shared_context 'with graphql query request' do
|
|
5
5
|
let(:variables) { {} }
|
6
6
|
let(:graphql_params) do
|
7
7
|
if Rails::VERSION::MAJOR >= 5
|
8
|
-
|
8
|
+
{ params: { query: query, variables: variables }, headers: headers }
|
9
9
|
else
|
10
10
|
[{ query: query, variables: variables }, headers]
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def post_request(path = '/api/v1/graphql_auth')
|
15
|
-
|
15
|
+
send_request(path, :post)
|
16
16
|
end
|
17
17
|
|
18
18
|
def get_request(path = '/api/v1/graphql_auth')
|
19
|
-
|
19
|
+
send_request(path, :get)
|
20
|
+
end
|
21
|
+
|
22
|
+
def send_request(path, method)
|
23
|
+
if Rails::VERSION::MAJOR >= 5
|
24
|
+
public_send(method, path, **graphql_params)
|
25
|
+
else
|
26
|
+
public_send(method, path, *graphql_params)
|
27
|
+
end
|
20
28
|
end
|
21
29
|
end
|
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.17.0
|
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: 2021-
|
12
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: devise_token_auth
|
@@ -86,19 +86,19 @@ dependencies:
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
|
-
name: coveralls
|
89
|
+
name: coveralls-ruby
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- - "
|
92
|
+
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0'
|
94
|
+
version: '0.2'
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- - "
|
99
|
+
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
101
|
+
version: '0.2'
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: factory_bot
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
@@ -275,13 +275,13 @@ executables: []
|
|
275
275
|
extensions: []
|
276
276
|
extra_rdoc_files: []
|
277
277
|
files:
|
278
|
+
- ".circleci/config.yml"
|
278
279
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
279
280
|
- ".github/ISSUE_TEMPLATE/enhancement.md"
|
280
281
|
- ".github/ISSUE_TEMPLATE/question.md"
|
281
282
|
- ".gitignore"
|
282
283
|
- ".rspec"
|
283
284
|
- ".rubocop.yml"
|
284
|
-
- ".travis.yml"
|
285
285
|
- Appraisals
|
286
286
|
- CHANGELOG.md
|
287
287
|
- Gemfile
|
@@ -289,10 +289,12 @@ files:
|
|
289
289
|
- README.md
|
290
290
|
- Rakefile
|
291
291
|
- app/controllers/graphql_devise/application_controller.rb
|
292
|
+
- app/controllers/graphql_devise/concerns/additional_controller_methods.rb
|
292
293
|
- app/controllers/graphql_devise/concerns/set_user_by_token.rb
|
293
294
|
- app/controllers/graphql_devise/graphql_controller.rb
|
294
295
|
- app/helpers/graphql_devise/application_helper.rb
|
295
296
|
- app/helpers/graphql_devise/mailer_helper.rb
|
297
|
+
- app/models/graphql_devise/concerns/additional_model_methods.rb
|
296
298
|
- app/models/graphql_devise/concerns/model.rb
|
297
299
|
- app/views/.keep
|
298
300
|
- app/views/graphql_devise/mailer/confirmation_instructions.html.erb
|
@@ -322,7 +324,7 @@ files:
|
|
322
324
|
- lib/graphql_devise/mount_method/operation_preparers/gql_name_setter.rb
|
323
325
|
- lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb
|
324
326
|
- lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb
|
325
|
-
- lib/graphql_devise/mount_method/operation_preparers/
|
327
|
+
- lib/graphql_devise/mount_method/operation_preparers/resource_klass_setter.rb
|
326
328
|
- lib/graphql_devise/mount_method/operation_sanitizer.rb
|
327
329
|
- lib/graphql_devise/mount_method/option_sanitizer.rb
|
328
330
|
- lib/graphql_devise/mount_method/option_sanitizers/array_checker.rb
|
@@ -335,9 +337,12 @@ files:
|
|
335
337
|
- lib/graphql_devise/mount_method/options_validator.rb
|
336
338
|
- lib/graphql_devise/mount_method/supported_options.rb
|
337
339
|
- lib/graphql_devise/mutations/base.rb
|
340
|
+
- lib/graphql_devise/mutations/confirm_registration_with_token.rb
|
338
341
|
- lib/graphql_devise/mutations/login.rb
|
339
342
|
- lib/graphql_devise/mutations/logout.rb
|
343
|
+
- lib/graphql_devise/mutations/register.rb
|
340
344
|
- lib/graphql_devise/mutations/resend_confirmation.rb
|
345
|
+
- lib/graphql_devise/mutations/resend_confirmation_with_token.rb
|
341
346
|
- lib/graphql_devise/mutations/send_password_reset.rb
|
342
347
|
- lib/graphql_devise/mutations/send_password_reset_with_token.rb
|
343
348
|
- lib/graphql_devise/mutations/sign_up.rb
|
@@ -364,6 +369,7 @@ files:
|
|
364
369
|
- spec/dummy/app/graphql/dummy_schema.rb
|
365
370
|
- spec/dummy/app/graphql/interpreter_schema.rb
|
366
371
|
- spec/dummy/app/graphql/mutations/login.rb
|
372
|
+
- spec/dummy/app/graphql/mutations/register.rb
|
367
373
|
- spec/dummy/app/graphql/mutations/register_confirmed_user.rb
|
368
374
|
- spec/dummy/app/graphql/mutations/reset_admin_password_with_token.rb
|
369
375
|
- spec/dummy/app/graphql/mutations/sign_up.rb
|
@@ -423,6 +429,7 @@ files:
|
|
423
429
|
- spec/dummy/db/migrate/20200321121807_create_users_customers.rb
|
424
430
|
- spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb
|
425
431
|
- spec/dummy/db/migrate/20200623003142_create_schema_users.rb
|
432
|
+
- spec/dummy/db/migrate/20210516211417_add_vip_to_users.rb
|
426
433
|
- spec/dummy/db/schema.rb
|
427
434
|
- spec/dummy/db/seeds.rb
|
428
435
|
- spec/dummy/public/robots.txt
|
@@ -440,9 +447,12 @@ files:
|
|
440
447
|
- spec/requests/graphql_controller_spec.rb
|
441
448
|
- spec/requests/mutations/additional_mutations_spec.rb
|
442
449
|
- spec/requests/mutations/additional_queries_spec.rb
|
450
|
+
- spec/requests/mutations/confirm_registration_with_token_spec.rb
|
443
451
|
- spec/requests/mutations/login_spec.rb
|
444
452
|
- spec/requests/mutations/logout_spec.rb
|
453
|
+
- spec/requests/mutations/register_spec.rb
|
445
454
|
- spec/requests/mutations/resend_confirmation_spec.rb
|
455
|
+
- spec/requests/mutations/resend_confirmation_with_token_spec.rb
|
446
456
|
- spec/requests/mutations/send_password_reset_spec.rb
|
447
457
|
- spec/requests/mutations/send_password_reset_with_token_spec.rb
|
448
458
|
- spec/requests/mutations/sign_up_spec.rb
|
@@ -450,6 +460,7 @@ files:
|
|
450
460
|
- spec/requests/mutations/update_password_with_token_spec.rb
|
451
461
|
- spec/requests/queries/check_password_token_spec.rb
|
452
462
|
- spec/requests/queries/confirm_account_spec.rb
|
463
|
+
- spec/requests/queries/introspection_query_spec.rb
|
453
464
|
- spec/requests/user_controller_spec.rb
|
454
465
|
- spec/services/mount_method/operation_preparer_spec.rb
|
455
466
|
- spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb
|
@@ -457,7 +468,7 @@ files:
|
|
457
468
|
- spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
|
458
469
|
- spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
|
459
470
|
- spec/services/mount_method/operation_preparers/resolver_type_setter_spec.rb
|
460
|
-
- spec/services/mount_method/operation_preparers/
|
471
|
+
- spec/services/mount_method/operation_preparers/resource_klass_setter_spec.rb
|
461
472
|
- spec/services/mount_method/operation_sanitizer_spec.rb
|
462
473
|
- spec/services/mount_method/option_sanitizer_spec.rb
|
463
474
|
- spec/services/mount_method/option_sanitizers/array_checker_spec.rb
|
@@ -499,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
499
510
|
- !ruby/object:Gem::Version
|
500
511
|
version: '0'
|
501
512
|
requirements: []
|
502
|
-
rubygems_version: 3.
|
513
|
+
rubygems_version: 3.1.4
|
503
514
|
signing_key:
|
504
515
|
specification_version: 4
|
505
516
|
summary: GraphQL queries and mutations on top of devise_token_auth
|
@@ -512,6 +523,7 @@ test_files:
|
|
512
523
|
- spec/dummy/app/graphql/dummy_schema.rb
|
513
524
|
- spec/dummy/app/graphql/interpreter_schema.rb
|
514
525
|
- spec/dummy/app/graphql/mutations/login.rb
|
526
|
+
- spec/dummy/app/graphql/mutations/register.rb
|
515
527
|
- spec/dummy/app/graphql/mutations/register_confirmed_user.rb
|
516
528
|
- spec/dummy/app/graphql/mutations/reset_admin_password_with_token.rb
|
517
529
|
- spec/dummy/app/graphql/mutations/sign_up.rb
|
@@ -571,6 +583,7 @@ test_files:
|
|
571
583
|
- spec/dummy/db/migrate/20200321121807_create_users_customers.rb
|
572
584
|
- spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb
|
573
585
|
- spec/dummy/db/migrate/20200623003142_create_schema_users.rb
|
586
|
+
- spec/dummy/db/migrate/20210516211417_add_vip_to_users.rb
|
574
587
|
- spec/dummy/db/schema.rb
|
575
588
|
- spec/dummy/db/seeds.rb
|
576
589
|
- spec/dummy/public/robots.txt
|
@@ -588,9 +601,12 @@ test_files:
|
|
588
601
|
- spec/requests/graphql_controller_spec.rb
|
589
602
|
- spec/requests/mutations/additional_mutations_spec.rb
|
590
603
|
- spec/requests/mutations/additional_queries_spec.rb
|
604
|
+
- spec/requests/mutations/confirm_registration_with_token_spec.rb
|
591
605
|
- spec/requests/mutations/login_spec.rb
|
592
606
|
- spec/requests/mutations/logout_spec.rb
|
607
|
+
- spec/requests/mutations/register_spec.rb
|
593
608
|
- spec/requests/mutations/resend_confirmation_spec.rb
|
609
|
+
- spec/requests/mutations/resend_confirmation_with_token_spec.rb
|
594
610
|
- spec/requests/mutations/send_password_reset_spec.rb
|
595
611
|
- spec/requests/mutations/send_password_reset_with_token_spec.rb
|
596
612
|
- spec/requests/mutations/sign_up_spec.rb
|
@@ -598,6 +614,7 @@ test_files:
|
|
598
614
|
- spec/requests/mutations/update_password_with_token_spec.rb
|
599
615
|
- spec/requests/queries/check_password_token_spec.rb
|
600
616
|
- spec/requests/queries/confirm_account_spec.rb
|
617
|
+
- spec/requests/queries/introspection_query_spec.rb
|
601
618
|
- spec/requests/user_controller_spec.rb
|
602
619
|
- spec/services/mount_method/operation_preparer_spec.rb
|
603
620
|
- spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb
|
@@ -605,7 +622,7 @@ test_files:
|
|
605
622
|
- spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
|
606
623
|
- spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
|
607
624
|
- spec/services/mount_method/operation_preparers/resolver_type_setter_spec.rb
|
608
|
-
- spec/services/mount_method/operation_preparers/
|
625
|
+
- spec/services/mount_method/operation_preparers/resource_klass_setter_spec.rb
|
609
626
|
- spec/services/mount_method/operation_sanitizer_spec.rb
|
610
627
|
- spec/services/mount_method/option_sanitizer_spec.rb
|
611
628
|
- spec/services/mount_method/option_sanitizers/array_checker_spec.rb
|