bookingsync_application 4.0.0 → 4.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69bbf06bf6b0d5019e8a74c788ba53fcbd4528488421c5dadfe5bffa56b3eb0f
4
- data.tar.gz: 3573d286fffa5374a6b1a90c70893269d46e04bb2f7ef031c05128ad340a555a
3
+ metadata.gz: e5be4272ac4036866f6f64525357c1a5ce9ccddb2a24352c20e8b9bb72ab34a6
4
+ data.tar.gz: 42f68b7b2478bcef2250015d735962dcc748e345835742e63a8aa91aa45b3294
5
5
  SHA512:
6
- metadata.gz: 42fdbc73fb6b158a0856f474aa7f773f56b85893029b77ed3914fd6962fcc3f1b9fc5bd3818731f8f5584073e2d6d468c3421996f006cce9e22176589cfdbb57
7
- data.tar.gz: 1d834f4f16e0adb580589a903cc1143180d47919a80adad3c31b8cf13b3a60ab5cde6d824612cc84e02db70cbf543e7b56ba0ecf603eb520c79ee650810d6452
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
@@ -3,7 +3,7 @@ module BookingsyncApplication
3
3
  module CommonBase
4
4
  def self.included(base)
5
5
  base.class_eval do
6
- force_ssl
6
+ force_ssl if Rails.version < "6.1"
7
7
 
8
8
  before_action :authenticate_account!
9
9
  after_action :allow_bookingsync_iframe
@@ -1,3 +1,3 @@
1
1
  module BookingsyncApplication
2
- VERSION = "4.0.0"
2
+ VERSION = "4.2.0"
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync_application
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Nowicki
8
8
  - Mariusz Pietrzyk
9
9
  - Piotr Marciniak
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-04-02 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
@@ -204,7 +204,7 @@ homepage: https://github.com/BookingSync/bookingsync_application
204
204
  licenses:
205
205
  - MIT
206
206
  metadata: {}
207
- post_install_message:
207
+ post_install_message:
208
208
  rdoc_options: []
209
209
  require_paths:
210
210
  - lib
@@ -212,15 +212,15 @@ 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.3
223
- signing_key:
222
+ rubygems_version: 3.3.7
223
+ signing_key:
224
224
  specification_version: 4
225
225
  summary: A Rails engine to simplify building BookingSync Applications
226
226
  test_files: []