bullet_train-integrations 1.2.9 → 1.2.11

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: 70cbdc332b987c3270d61c847f4e54740f3d55eb4e7a0154f3eb4c68e89c25e4
4
- data.tar.gz: 3e8ee5970d1a73c20eded5e7987bfd0332dc95d5160a5372904ef06e537d86ea
3
+ metadata.gz: 68a541815a66e8a52625c98f1a76733ca9d2c064c4f3ca857d49226927e109a0
4
+ data.tar.gz: 602abf81e7410155c835044fb9003c1c11c54f6daed40259ba23953883dae14b
5
5
  SHA512:
6
- metadata.gz: 684e8fb69ac6826b9f13ea1627f16540eff0ae0cb171cb1467a6ca56d65728a2befce2cdb8e7eb1482637dd85c599e6ecf58a1c18c81f28b79d27afccf78cf8e
7
- data.tar.gz: 7d440326f3065cbaa7180db3ca52ab471b1e4e873e3e9e592dc18e02b759042477a56253ea9f0e8ca881884addeef617e684ffa9837a0acf55551fd82c5ebbec
6
+ metadata.gz: 3615749e03b544c3d1112acc7dcf3657a5f30f49305d8f47ef5eb0d0d47238e7429843a6c0c0c3d03081e15d9483f921fdc4c479728628f2ff019d7a62737343
7
+ data.tar.gz: f877dde5515be9a1ad7b9c5a0eacf506a496739ea7964cc4114a5a6927d798318953a24ad08ed606fd416ee8ba3e7181c3ca90c51b86b6b38fbe2d721fd0991a
@@ -149,4 +149,22 @@ module Account::Oauth::OmniauthCallbacks::ControllerBase
149
149
  redirect_to new_user_session_path, notice: t("omniauth.user.account_not_found", provider: t(auth.provider))
150
150
  end
151
151
  end
152
+
153
+ private
154
+
155
+ def handle_outstanding_invitation
156
+ # was this user registering to claim an invitation?
157
+ if session[:invitation_uuid].present?
158
+
159
+ # try to find the invitation, if it still exists.
160
+ invitation = Invitation.find_by_uuid(session[:invitation_uuid])
161
+
162
+ # if the invitation was found, claim it for this user.
163
+ invitation&.accept_for(current_user)
164
+
165
+ # remove the uuid from the session.
166
+ session.delete(:invitation_uuid)
167
+
168
+ end
169
+ end
152
170
  end
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Integrations
3
- VERSION = "1.2.9"
3
+ VERSION = "1.2.11"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-28 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.3.7
65
+ rubygems_version: 3.4.1
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Bullet Train Integrations