bookingsync_application 4.1.0 → 4.2.0

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: adf8a6bf47f574d1169be3f097ca60043c0e3648e5aeb18f8ec1049d284ae7e1
4
- data.tar.gz: 1b3704c01ebdf593d2f36f5536c18ea635989836edfb57984343c63320533eb6
3
+ metadata.gz: e5be4272ac4036866f6f64525357c1a5ce9ccddb2a24352c20e8b9bb72ab34a6
4
+ data.tar.gz: 42f68b7b2478bcef2250015d735962dcc748e345835742e63a8aa91aa45b3294
5
5
  SHA512:
6
- metadata.gz: 6664a7942ad1095571938e24c5f3776d18cc57c3746348a68fd55ac7721aa6eb4458f7647ca4d047c7754b7d28374bfc458b033f541bd1f2d3e616084ed5cb9e
7
- data.tar.gz: 1eaa1c7bf5077f15ef376148ff3a5dba1934038fe4a739fba807059e37c53a327efb7211c87cbceddd9f4bde5b18d93967b2b2bec812f274f6e0a82925bd0913
6
+ metadata.gz: 89f71f746f62e2057d22c020746f019b771da92d24e8a99aa47181ce1282b8987f847529eb646542cdff5952778faf362ce9fec0fb374c73a2c4290d488a0b2c
7
+ data.tar.gz: 688a02e78d1a6c25acc0236aefb364e487d24d594c47ff9c5ccd5f24e460c3daa4e1c94d8965be75fb2816e797cebfd997c8e4d297fff4e67312b45f5f2e7052
data/README.md CHANGED
@@ -7,7 +7,10 @@ A Rails engine to simplify building BookingSync Applications.
7
7
 
8
8
  ## Requirements
9
9
 
10
- This engine requires Rails `>= 5.0` and Ruby `>= 2.3`.
10
+ For version <= 4.1
11
+ Rails `>= 5.0` and Ruby `>= 2.3`
12
+ For version >= 4.2
13
+ Rails `>= 6.0` and Ruby `>= 3.0`
11
14
 
12
15
  ## Documentation
13
16
 
@@ -13,6 +13,8 @@ module BookingsyncApplication
13
13
  @scope = AuthorizationScope.from_response(response)
14
14
 
15
15
  session[:account_id] = scope.account_id
16
+ session[:accounts_user_id] = scope.accounts_user_id
17
+ session[:user_id] = scope.user_id
16
18
  else
17
19
  render json: response.body, status: response.status and return
18
20
  end
@@ -59,6 +61,14 @@ module BookingsyncApplication
59
61
  auth.fetch("account_id")
60
62
  end
61
63
 
64
+ def accounts_user_id
65
+ auth.fetch("accounts_user_id")
66
+ end
67
+
68
+ def user_id
69
+ auth.fetch("user_id")
70
+ end
71
+
62
72
  def allows_access_for?(required_scopes)
63
73
  required_scopes.any? { |scope| scopes.include?(scope) }
64
74
  end
@@ -1,3 +1,3 @@
1
1
  module BookingsyncApplication
2
- VERSION = "4.1.0"
2
+ VERSION = "4.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync_application
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Nowicki
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-03-29 00:00:00.000000000 Z
13
+ date: 2024-01-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '5.0'
21
+ version: '6.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '5.0'
28
+ version: '6.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: bookingsync-engine
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -130,14 +130,14 @@ dependencies:
130
130
  requirements:
131
131
  - - ">="
132
132
  - !ruby/object:Gem::Version
133
- version: 1.3.6
133
+ version: 1.4.0
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 1.3.6
140
+ version: 1.4.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: vcr
143
143
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +212,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - ">="
214
214
  - !ruby/object:Gem::Version
215
- version: 2.3.8
215
+ version: '3.0'
216
216
  required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
218
  - - ">="
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.0.6
222
+ rubygems_version: 3.3.7
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: A Rails engine to simplify building BookingSync Applications