graphql_devise 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1a520284d1b06d637b6a5438d34a0c1fc0a150643f7915afe7c62af88749a42
4
- data.tar.gz: c4db3a40a6513306c51937a70a1cee0960b26ed7d25e73c9c1d4bdea8f1da4d1
3
+ metadata.gz: cd40a4f584377ba8e3cbac60b40a6cc5451ca9ed9cbaaf2d958f07e6d684b36b
4
+ data.tar.gz: ff5087145891c784cce89cf304dad94adc919ffc926f7db9030c15914e97bcec
5
5
  SHA512:
6
- metadata.gz: ea8cf460d52cf99b4113faf028541b57d8f1930ece55da23e7c6e78116d08ee20e5ccd9279fe87229e550d9f8d3f316864c015499c7d648b866a500b739b01d0
7
- data.tar.gz: ae14da2bec687cb822b05e5a78a68123e9df6b581a38f793817ec80203b8dadd3b48c2af38337ae1f0f0dd957626dc4a0b018f14b3faff7f8a6bd12da1f58239
6
+ metadata.gz: 6d0415cf1b11e0b5f80966710fbe8b15ad373dfaea322e4acbb5bea7020cdf8ae85fe2fe2a47b3a236677f1a49e1a9ad2440de1ba65135020839e85e295fa263
7
+ data.tar.gz: b7d62d5a5607462f9486b5403370c3f62898b009d1519fb1ddc302d1d8d5ea2e6e601e1fb71510ab17f47c5414e091a2e0ca955782288eafad42637ade300f03
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --order random
data/.travis.yml CHANGED
@@ -47,13 +47,19 @@ jobs:
47
47
  rvm: 2.7.1
48
48
  - gemfile: gemfiles/rails6.0_graphql_edge.gemfile
49
49
  rvm: 2.6.6
50
- env: SKIP_COVERALLS=true
50
+ env:
51
+ - SKIP_COVERALLS=true
52
+ - EAGER_LOAD=true
51
53
  - gemfile: gemfiles/rails6.0_graphql_edge.gemfile
52
54
  rvm: 2.7.1
53
- env: SKIP_COVERALLS=true
55
+ env:
56
+ - SKIP_COVERALLS=true
57
+ - EAGER_LOAD=true
54
58
  - gemfile: gemfiles/rails_edge_graphql_edge.gemfile
55
59
  rvm: 2.7.1
56
- env: SKIP_COVERALLS=true
60
+ env:
61
+ - SKIP_COVERALLS=true
62
+ - EAGER_LOAD=true
57
63
  exclude:
58
64
  - gemfile: gemfiles/rails4.2_graphql1.8.gemfile
59
65
  rvm: 2.7.1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## [v0.11.2](https://github.com/graphql-devise/graphql_devise/tree/v0.11.2) (2020-05-06)
3
+ ## [v0.11.3](https://github.com/graphql-devise/graphql_devise/tree/v0.11.3) (2020-05-22)
4
+
5
+ [Full Changelog](https://github.com/graphql-devise/graphql_devise/compare/v0.11.2...v0.11.3)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Default `change\_headers\_on\_each\_request` to false [\#76](https://github.com/graphql-devise/graphql_devise/issues/76)
10
+ - Replace the auth model concern on generator execution [\#53](https://github.com/graphql-devise/graphql_devise/issues/53)
11
+ - Generator. Use our modules, change defaults [\#91](https://github.com/graphql-devise/graphql_devise/pull/91) ([mcelicalderon](https://github.com/mcelicalderon))
12
+
13
+ ## [v0.11.2](https://github.com/graphql-devise/graphql_devise/tree/v0.11.2) (2020-05-07)
4
14
 
5
15
  [Full Changelog](https://github.com/graphql-devise/graphql_devise/compare/v0.11.1...v0.11.2)
6
16
 
data/README.md CHANGED
@@ -193,16 +193,12 @@ class User < ApplicationRecord
193
193
  :confirmable
194
194
 
195
195
  # including after calling the `devise` method is important.
196
- # include DeviseTokenAuth::Concerns::User # is also valid (generator includes this one).
197
196
  include GraphqlDevise::Concerns::Model
198
197
  end
199
198
  ```
200
199
 
201
200
  The install generator can do this for you if you specify the `user_class` option.
202
201
  See [Installation](#installation) for details.
203
- The generator will include a different module in your model, `DeviseTokenAuth::Concerns::User` which is also correct,
204
- we just made an alias on our namespace for consistency and possible extension.
205
- Generators have to be updated to generate our module.
206
202
 
207
203
  ### Customizing Email Templates
208
204
  The approach of this gem is a bit different from DeviseTokenAuth. We have placed our templates in `app/views/graphql_devise/mailer`,
@@ -226,7 +222,6 @@ In our example our model is `User`, so it would look like this:
226
222
  # app/controllers/my_controller.rb
227
223
 
228
224
  class MyController < ApplicationController
229
- # include DeviseTokenAuth::Concerns::SetUserByToken # is also valid (generator includes this one).
230
225
  include GraphqlDevise::Concerns::SetUserByToken
231
226
 
232
227
  before_action :authenticate_user!
@@ -239,9 +234,6 @@ end
239
234
 
240
235
  The install generator can do this for you because it executes DTA installer.
241
236
  See [Installation](#Installation) for details.
242
- The generator will include a different module in your model, `DeviseTokenAuth::Concerns::SetUserByToken` which is also correct,
243
- we just made an alias on our namespace for consistency and possible extension.
244
- Generators have to be updated to generate our module.
245
237
 
246
238
  ### Making Requests
247
239
  Here is a list of the available mutations and queries assuming your mounted model is `User`.
@@ -290,10 +282,10 @@ as comments. You can also use
290
282
  **[DTA's docs](https://devise-token-auth.gitbook.io/devise-token-auth/config/initialization)** as a reference.
291
283
  In this section the most important configurations will be highlighted.
292
284
 
293
- - **change_headers_on_each_request:** This configurations defaults to `true`. This means that tokens will change on
294
- each request you make, and the new values will be returned in the headers. So your client needs to handle this.
295
- Setting this to `false` will allow you to store the credentials for as long as the token life_span permits. And
296
- you can send the same credentials in each request.
285
+ - **change_headers_on_each_request:** This configurations defaults to `false`. This will allow you to store the
286
+ credentials for as long as the token life_span permits. And you can send the same credentials in each request.
287
+ Setting this to `true` means that tokens will change on each request you make, and the new values will be returned
288
+ in the headers. So your client needs to handle this.
297
289
  - **batch_request_buffer_throttle:** When change_headers_on_each_request is set to true, you might still want your
298
290
  credentials to be valid more than once as you might send parallel request. The duration you set here will
299
291
  determine how long the same credentials work after the first request is received.
@@ -10,57 +10,67 @@ module GraphqlDevise
10
10
  end
11
11
 
12
12
  def execute_dta_installer
13
+ # Necessary in case of a re-run of the generator, for DTA to detect concerns already included
14
+ if File.exist?(File.expand_path("app/models/#{user_class.underscore}.rb", destination_root))
15
+ gsub_file(
16
+ "app/models/#{user_class.underscore}.rb",
17
+ 'GraphqlDevise::Concerns::Model',
18
+ 'DeviseTokenAuth::Concerns::User'
19
+ )
20
+ end
21
+ gsub_file(
22
+ 'app/controllers/application_controller.rb',
23
+ 'GraphqlDevise::Concerns::SetUserByToken',
24
+ 'DeviseTokenAuth::Concerns::SetUserByToken'
25
+ )
26
+
13
27
  generate 'devise_token_auth:install', "#{user_class} #{mount_path}"
14
28
  end
15
29
 
16
30
  def mount_resource_route
17
31
  routes_file = 'config/routes.rb'
18
- routes_path = File.join(destination_root, routes_file)
19
- gem_helper = 'mount_graphql_devise_for'
20
- gem_route = "#{gem_helper} '#{user_class}', at: '#{mount_path}'"
32
+ gem_route = "mount_graphql_devise_for '#{user_class}', at: '#{mount_path}'"
21
33
  dta_route = "mount_devise_token_auth_for '#{user_class}', at: '#{mount_path}'"
22
- file_start = 'Rails.application.routes.draw do'
23
-
24
- if File.exist?(routes_path)
25
- current_route = parse_file_for_line(routes_path, gem_route)
26
34
 
27
- if current_route.present?
28
- say_status('skipped', "Routes already exist for #{user_class} at #{mount_path}")
29
- else
30
- current_dta_route = parse_file_for_line(routes_path, dta_route)
35
+ if file_contains_str?(routes_file, gem_route)
36
+ gsub_file(routes_file, /^\s+#{Regexp.escape(dta_route + "\n")}/i, '')
31
37
 
32
- if current_dta_route.present?
33
- replace_line(routes_path, dta_route, gem_route)
34
- else
35
- insert_text_after_line(routes_path, file_start, gem_route)
36
- end
37
- end
38
+ say_status('skipped', "Routes already exist for #{user_class} at #{mount_path}")
38
39
  else
39
- say_status('skipped', "#{routes_file} not found. Add \"#{gem_route}\" to your routes file.")
40
+ gsub_file(routes_file, /#{Regexp.escape(dta_route)}/i, gem_route)
40
41
  end
41
42
  end
42
43
 
43
- private
44
+ def replace_model_concern
45
+ gsub_file(
46
+ "app/models/#{user_class.underscore}.rb",
47
+ /^\s+include DeviseTokenAuth::Concerns::User/,
48
+ ' include GraphqlDevise::Concerns::Model'
49
+ )
50
+ end
44
51
 
45
- def insert_text_after_line(filename, line, str)
46
- gsub_file(filename, /(#{Regexp.escape(line)})/mi) do |match|
47
- "#{match}\n #{str}"
48
- end
52
+ def replace_controller_concern
53
+ gsub_file(
54
+ 'app/controllers/application_controller.rb',
55
+ /^\s+include DeviseTokenAuth::Concerns::SetUserByToken/,
56
+ ' include GraphqlDevise::Concerns::SetUserByToken'
57
+ )
49
58
  end
50
59
 
51
- def replace_line(filename, old_line, new_line)
52
- gsub_file(filename, /(#{Regexp.escape(old_line)})/mi, " #{new_line}")
60
+ def set_change_headers_on_each_request_false
61
+ gsub_file(
62
+ 'config/initializers/devise_token_auth.rb',
63
+ '# config.change_headers_on_each_request = true',
64
+ 'config.change_headers_on_each_request = false'
65
+ )
53
66
  end
54
67
 
55
- def parse_file_for_line(filename, str)
56
- match = false
68
+ private
69
+
70
+ def file_contains_str?(filename, regex_str)
71
+ path = File.join(destination_root, filename)
57
72
 
58
- File.open(filename) do |f|
59
- f.each_line do |line|
60
- match = line if line =~ /(#{Regexp.escape(str)})/mi
61
- end
62
- end
63
- match
73
+ File.read(path) =~ /(#{Regexp.escape(regex_str)})/i
64
74
  end
65
75
  end
66
76
  end
@@ -1,3 +1,3 @@
1
1
  module GraphqlDevise
2
- VERSION = '0.11.2'.freeze
2
+ VERSION = '0.11.3'.freeze
3
3
  end
@@ -1,351 +0,0 @@
1
-  (0.0ms) SELECT sqlite_version(*)
2
- ↳ bin/rails:14
3
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
4
- ↳ bin/rails:14
5
-  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
6
- ↳ bin/rails:14
7
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8
- ↳ bin/rails:14
9
- Migrating to CreateUsers (20190815114303)
10
-  (0.0ms) begin transaction
11
- ↳ bin/rails:14
12
-  (0.4ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
13
- ↳ db/migrate/20190815114303_create_users.rb:3
14
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190815114303"]]
15
- ↳ bin/rails:14
16
-  (0.5ms) commit transaction
17
- ↳ bin/rails:14
18
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
19
- ↳ bin/rails:14
20
-  (0.0ms) begin transaction
21
- ↳ bin/rails:14
22
- ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-08-24 17:25:07.126983"], ["updated_at", "2019-08-24 17:25:07.126983"]]
23
- ↳ bin/rails:14
24
-  (0.8ms) commit transaction
25
- ↳ bin/rails:14
26
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
27
- ↳ bin/rails:14
28
-  (0.2ms) SELECT sqlite_version(*)
29
- ↳ bin/rails:14
30
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
31
- ↳ bin/rails:14
32
-  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
33
- ↳ bin/rails:14
34
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
35
- ↳ bin/rails:14
36
- Migrating to CreateUsers (20190815114303)
37
-  (0.1ms) begin transaction
38
- ↳ bin/rails:14
39
-  (0.6ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
40
- ↳ db/migrate/20190815114303_create_users.rb:3
41
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190815114303"]]
42
- ↳ bin/rails:14
43
-  (0.7ms) commit transaction
44
- ↳ bin/rails:14
45
- ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
46
- ↳ bin/rails:14
47
-  (1.9ms) begin transaction
48
- ↳ bin/rails:14
49
- ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-08-24 17:25:59.450692"], ["updated_at", "2019-08-24 17:25:59.450692"]]
50
- ↳ bin/rails:14
51
-  (0.7ms) commit transaction
52
- ↳ bin/rails:14
53
-  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
54
- ↳ bin/rails:14
55
-  (0.1ms) SELECT sqlite_version(*)
56
- ↳ bin/rails:14
57
-  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
58
- ↳ bin/rails:14
59
-  (0.8ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
60
- ↳ bin/rails:14
61
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
62
- ↳ bin/rails:14
63
- Migrating to CreateUsers (20190815114303)
64
-  (0.0ms) begin transaction
65
- ↳ bin/rails:14
66
-  (0.4ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "remember_created_at" datetime, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "failed_attempts" integer DEFAULT 0 NOT NULL, "unlock_token" varchar, "locked_at" datetime, "name" varchar, "email" varchar, "tokens" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
67
- ↳ db/migrate/20190815114303_create_users.rb:3
68
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
69
- ↳ db/migrate/20190815114303_create_users.rb:40
70
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_uid_and_provider" ON "users" ("uid", "provider")
71
- ↳ db/migrate/20190815114303_create_users.rb:41
72
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
73
- ↳ db/migrate/20190815114303_create_users.rb:42
74
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token")
75
- ↳ db/migrate/20190815114303_create_users.rb:43
76
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_unlock_token" ON "users" ("unlock_token")
77
- ↳ db/migrate/20190815114303_create_users.rb:44
78
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190815114303"]]
79
- ↳ bin/rails:14
80
-  (0.8ms) commit transaction
81
- ↳ bin/rails:14
82
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
83
- ↳ bin/rails:14
84
-  (0.1ms) begin transaction
85
- ↳ bin/rails:14
86
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-08-24 18:11:40.272846"], ["updated_at", "2019-08-24 18:11:40.272846"]]
87
- ↳ bin/rails:14
88
-  (0.7ms) commit transaction
89
- ↳ bin/rails:14
90
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
91
- ↳ bin/rails:14
92
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
93
- ↳ bin/rails:14
94
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
95
- ↳ bin/rails:14
96
-  (0.0ms) begin transaction
97
- ↳ bin/rails:14
98
-  (0.0ms) commit transaction
99
- ↳ bin/rails:14
100
-  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
101
- ↳ bin/rails:14
102
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
103
- ↳ bin/rails:14
104
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
105
- ↳ bin/rails:14
106
-  (0.0ms) begin transaction
107
- ↳ bin/rails:14
108
-  (0.0ms) commit transaction
109
- ↳ bin/rails:14
110
-  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
111
- ↳ bin/rails:14
112
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
113
- ↳ bin/rails:14
114
-  (0.0ms) SELECT sqlite_version(*)
115
- ↳ bin/rails:14
116
-  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
117
- ↳ bin/rails:14
118
-  (1.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
119
- ↳ bin/rails:14
120
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
121
- ↳ bin/rails:14
122
- Migrating to CreateUsers (20190815114303)
123
-  (0.0ms) begin transaction
124
- ↳ bin/rails:14
125
-  (0.6ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "remember_created_at" datetime, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "failed_attempts" integer DEFAULT 0 NOT NULL, "unlock_token" varchar, "locked_at" datetime, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "last_sign_in_ip" varchar, "sign_in_count" integer, "name" varchar, "email" varchar, "tokens" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
126
- ↳ db/migrate/20190815114303_create_users.rb:3
127
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
128
- ↳ db/migrate/20190815114303_create_users.rb:46
129
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_uid_and_provider" ON "users" ("uid", "provider")
130
- ↳ db/migrate/20190815114303_create_users.rb:47
131
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
132
- ↳ db/migrate/20190815114303_create_users.rb:48
133
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token")
134
- ↳ db/migrate/20190815114303_create_users.rb:49
135
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_unlock_token" ON "users" ("unlock_token")
136
- ↳ db/migrate/20190815114303_create_users.rb:50
137
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190815114303"]]
138
- ↳ bin/rails:14
139
-  (0.6ms) commit transaction
140
- ↳ bin/rails:14
141
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
142
- ↳ bin/rails:14
143
-  (0.0ms) begin transaction
144
- ↳ bin/rails:14
145
- ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-08-24 20:40:58.132035"], ["updated_at", "2019-08-24 20:40:58.132035"]]
146
- ↳ bin/rails:14
147
-  (0.6ms) commit transaction
148
- ↳ bin/rails:14
149
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
150
- ↳ bin/rails:14
151
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
152
- ↳ bin/rails:14
153
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
154
- ↳ bin/rails:14
155
-  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
156
- ↳ bin/rails:14
157
-  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
158
- ↳ bin/rails:14
159
-  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
160
- ↳ bin/rails:14
161
-  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
162
- ↳ bin/rails:14
163
-  (0.0ms) SELECT sqlite_version(*)
164
- ↳ bin/rails:14
165
-  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
166
- ↳ bin/rails:14
167
-  (0.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
168
- ↳ bin/rails:14
169
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
170
- ↳ bin/rails:14
171
- Migrating to CreateUsers (20190815114303)
172
-  (0.0ms) begin transaction
173
- ↳ bin/rails:14
174
-  (0.4ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "remember_created_at" datetime, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "failed_attempts" integer DEFAULT 0 NOT NULL, "unlock_token" varchar, "locked_at" datetime, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "last_sign_in_ip" varchar, "current_sign_in_ip" varchar, "sign_in_count" integer, "name" varchar, "email" varchar, "tokens" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
175
- ↳ db/migrate/20190815114303_create_users.rb:3
176
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
177
- ↳ db/migrate/20190815114303_create_users.rb:47
178
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_uid_and_provider" ON "users" ("uid", "provider")
179
- ↳ db/migrate/20190815114303_create_users.rb:48
180
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
181
- ↳ db/migrate/20190815114303_create_users.rb:49
182
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token")
183
- ↳ db/migrate/20190815114303_create_users.rb:50
184
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_unlock_token" ON "users" ("unlock_token")
185
- ↳ db/migrate/20190815114303_create_users.rb:51
186
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190815114303"]]
187
- ↳ bin/rails:14
188
-  (0.6ms) commit transaction
189
- ↳ bin/rails:14
190
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
191
- ↳ bin/rails:14
192
-  (0.0ms) begin transaction
193
- ↳ bin/rails:14
194
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-08-24 20:42:15.104018"], ["updated_at", "2019-08-24 20:42:15.104018"]]
195
- ↳ bin/rails:14
196
-  (0.5ms) commit transaction
197
- ↳ bin/rails:14
198
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
199
- ↳ bin/rails:14
200
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
201
- ↳ bin/rails:14
202
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
203
- ↳ bin/rails:14
204
- Migrating to AddAuthAvailableToUsers (20190824215150)
205
-  (0.0ms) begin transaction
206
- ↳ bin/rails:14
207
-  (0.8ms) ALTER TABLE "users" ADD "auth_available" boolean DEFAULT 1 NOT NULL
208
- ↳ /Users/mcelicalderon/dev/graphql_devise/db/migrate/20190824215150_add_auth_available_to_users.rb:3
209
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190824215150"]]
210
- ↳ bin/rails:14
211
-  (0.7ms) commit transaction
212
- ↳ bin/rails:14
213
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
214
- ↳ bin/rails:14
215
-  (0.0ms) begin transaction
216
- ↳ bin/rails:14
217
-  (0.0ms) commit transaction
218
- ↳ bin/rails:14
219
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
220
- ↳ bin/rails:14
221
-  (0.1ms) SELECT sqlite_version(*)
222
- ↳ bin/rails:14
223
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
224
- ↳ bin/rails:14
225
-  (0.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
226
- ↳ bin/rails:14
227
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
228
- ↳ bin/rails:14
229
- Migrating to CreateUsers (20190815114303)
230
-  (0.1ms) begin transaction
231
- ↳ bin/rails:14
232
-  (0.5ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "remember_created_at" datetime, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "failed_attempts" integer DEFAULT 0 NOT NULL, "unlock_token" varchar, "locked_at" datetime, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "last_sign_in_ip" varchar, "current_sign_in_ip" varchar, "sign_in_count" integer, "name" varchar, "email" varchar, "tokens" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
233
- ↳ db/migrate/20190815114303_create_users.rb:3
234
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
235
- ↳ db/migrate/20190815114303_create_users.rb:47
236
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_uid_and_provider" ON "users" ("uid", "provider")
237
- ↳ db/migrate/20190815114303_create_users.rb:48
238
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
239
- ↳ db/migrate/20190815114303_create_users.rb:49
240
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token")
241
- ↳ db/migrate/20190815114303_create_users.rb:50
242
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_unlock_token" ON "users" ("unlock_token")
243
- ↳ db/migrate/20190815114303_create_users.rb:51
244
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190815114303"]]
245
- ↳ bin/rails:14
246
-  (0.9ms) commit transaction
247
- ↳ bin/rails:14
248
- Migrating to AddAuthAvailableToUsers (20190824215150)
249
-  (0.1ms) begin transaction
250
- ↳ bin/rails:14
251
-  (0.5ms) ALTER TABLE "users" ADD "auth_available" boolean DEFAULT 1 NOT NULL
252
- ↳ db/migrate/20190824215150_add_auth_available_to_users.rb:3
253
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190824215150"]]
254
- ↳ bin/rails:14
255
-  (0.7ms) commit transaction
256
- ↳ bin/rails:14
257
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
258
- ↳ bin/rails:14
259
-  (0.1ms) begin transaction
260
- ↳ bin/rails:14
261
- ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-08-24 22:11:59.642446"], ["updated_at", "2019-08-24 22:11:59.642446"]]
262
- ↳ bin/rails:14
263
-  (0.6ms) commit transaction
264
- ↳ bin/rails:14
265
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
266
- ↳ bin/rails:14
267
-  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
268
- ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
269
-  (0.0ms) begin transaction
270
-  (0.0ms) commit transaction
271
-  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
272
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
273
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
274
-  (0.0ms) begin transaction
275
-  (0.0ms) commit transaction
276
-  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
277
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
278
-  (0.3ms) SELECT COUNT(*) FROM "users"
279
-  (0.8ms) SELECT sqlite_version(*)
280
-  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
281
- Migrating to CreateAdmins (20190916012505)
282
-  (0.1ms) begin transaction
283
-  (0.5ms) CREATE TABLE "admins" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "email" varchar, "tokens" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
284
-  (0.1ms) CREATE UNIQUE INDEX "index_admins_on_email" ON "admins" ("email")
285
-  (0.1ms) CREATE UNIQUE INDEX "index_admins_on_uid_and_provider" ON "admins" ("uid", "provider")
286
-  (0.1ms) CREATE UNIQUE INDEX "index_admins_on_reset_password_token" ON "admins" ("reset_password_token")
287
-  (0.1ms) CREATE UNIQUE INDEX "index_admins_on_confirmation_token" ON "admins" ("confirmation_token")
288
- primary::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190916012505"]]
289
-  (0.7ms) commit transaction
290
- ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
291
-  (0.1ms) SELECT sqlite_version(*)
292
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
293
-  (0.9ms) SELECT sqlite_version(*)
294
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
295
- Migrating to CreateGuests (20191013213045)
296
-  (0.1ms) begin transaction
297
-  (0.5ms) CREATE TABLE "guests" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "email" varchar, "tokens" text, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
298
-  (0.4ms) rollback transaction
299
-  (0.7ms) SELECT sqlite_version(*)
300
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
301
- Migrating to CreateGuests (20191013213045)
302
-  (0.1ms) begin transaction
303
-  (1.0ms) CREATE TABLE "guests" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "allow_password_change" boolean DEFAULT 0, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "unconfirmed_email" varchar, "email" varchar, "tokens" text, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
304
-  (0.3ms) CREATE UNIQUE INDEX "index_guests_on_email" ON "guests" ("email")
305
-  (0.1ms) CREATE UNIQUE INDEX "index_guests_on_uid_and_provider" ON "guests" ("uid", "provider")
306
-  (0.1ms) CREATE UNIQUE INDEX "index_guests_on_reset_password_token" ON "guests" ("reset_password_token")
307
-  (0.1ms) CREATE UNIQUE INDEX "index_guests_on_confirmation_token" ON "guests" ("confirmation_token")
308
- primary::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20191013213045"]]
309
-  (1.1ms) commit transaction
310
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
311
-  (0.0ms) SELECT sqlite_version(*)
312
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
313
-  (3.8ms) SELECT sqlite_version(*)
314
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "hi@tomarket.farm"], ["LIMIT", 1]]
315
-  (0.2ms) SELECT COUNT(*) FROM "users"
316
-  (1.9ms) SELECT sqlite_version(*)
317
-  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
318
-  (0.9ms) SELECT sqlite_version(*)
319
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
320
- Migrating to CreateUsersCustomers (20200321121807)
321
-  (0.1ms) begin transaction
322
-  (1.1ms) CREATE TABLE "users_customers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
323
- primary::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20200321121807"]]
324
-  (0.7ms) commit transaction
325
- ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
326
-  (0.1ms) SELECT sqlite_version(*)
327
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
328
-  (0.8ms) SELECT sqlite_version(*)
329
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
330
-  (2.6ms) SELECT sqlite_version(*)
331
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
332
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
333
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
334
-  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
335
- Migrating to CreateUsersCustomers (20200321121807)
336
-  (0.0ms) begin transaction
337
-  (0.4ms) DROP TABLE "users_customers"
338
- primary::SchemaMigration Destroy (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20200321121807"]]
339
-  (0.8ms) commit transaction
340
-  (0.1ms) SELECT sqlite_version(*)
341
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
342
-  (0.9ms) SELECT sqlite_version(*)
343
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
344
- Migrating to CreateUsersCustomers (20200321121807)
345
-  (0.1ms) begin transaction
346
-  (1.2ms) CREATE TABLE "users_customers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar DEFAULT 'email' NOT NULL, "uid" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "email" varchar, "tokens" text, "name" varchar NOT NULL, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
347
- primary::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20200321121807"]]
348
-  (1.0ms) commit transaction
349
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
350
-  (0.1ms) SELECT sqlite_version(*)
351
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC