descope 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +15 -27
- data/.github/workflows/publish-gem.yaml +61 -0
- data/Gemfile +12 -14
- data/Gemfile.lock +46 -101
- data/README.md +56 -19
- data/descope.gemspec +25 -20
- data/examples/ruby/.ruby-version +1 -0
- data/examples/ruby/access_key_app.rb +7 -4
- data/examples/ruby/enchantedlink_app.rb +1 -0
- data/examples/ruby/magiclink_app.rb +1 -0
- data/examples/ruby/management/.ruby-version +1 -0
- data/examples/ruby/management/Gemfile +2 -2
- data/examples/ruby/management/Gemfile.lock +2 -2
- data/examples/ruby/management/access_key_app.rb +2 -0
- data/examples/ruby/management/audit_app.rb +32 -8
- data/examples/ruby/management/authz_app.rb +1 -0
- data/examples/ruby/management/flow_app.rb +1 -0
- data/examples/ruby/management/permission_app.rb +3 -2
- data/examples/ruby/management/role_app.rb +10 -4
- data/examples/ruby/management/tenant_app.rb +1 -0
- data/examples/ruby/management/user_app.rb +1 -0
- data/examples/ruby/oauth_app.rb +1 -0
- data/examples/ruby/otp_app.rb +38 -12
- data/examples/ruby/password_app.rb +8 -7
- data/examples/ruby/saml_app.rb +1 -0
- data/examples/ruby/version_check.rb +17 -0
- data/examples/ruby-on-rails-api/descope/.gitignore +58 -28
- data/examples/ruby-on-rails-api/descope/Gemfile +3 -1
- data/examples/ruby-on-rails-api/descope/Gemfile.lock +121 -90
- data/examples/ruby-on-rails-api/descope/README.md +18 -18
- data/examples/ruby-on-rails-api/descope/app/assets/builds/App.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/App.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/application.css +20131 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/application.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/application.js +40368 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/application.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.js +27979 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.js +27118 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.js +27113 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.js +27131 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.js +27168 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.js +28236 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/application.js +2456 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/application.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/index.js +2453 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/index.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.css +62 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.css.map +7 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.js +27973 -0
- data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.js.map +7 -0
- data/examples/ruby-on-rails-api/descope/package-lock.json +1021 -19307
- data/examples/ruby-on-rails-api/descope/package.json +8 -16
- data/examples/ruby-on-rails-api/descope/yarn.lock +459 -10641
- data/lib/descope/api/v1/auth/otp.rb +21 -14
- data/lib/descope/api/v1/auth.rb +37 -25
- data/lib/descope/api/v1/management/access_key.rb +5 -4
- data/lib/descope/api/v1/management/audit.rb +24 -0
- data/lib/descope/api/v1/management/common.rb +5 -1
- data/lib/descope/api/v1/management/role.rb +22 -6
- data/lib/descope/api/v1/management/user.rb +17 -0
- data/lib/descope/mixins/common.rb +6 -13
- data/lib/descope/mixins/http.rb +1 -1
- data/lib/descope/mixins/validation.rb +21 -6
- data/lib/descope/version.rb +1 -1
- data/spec/integration/lib.descope/api/v1/auth/enchantedlink_spec.rb +81 -0
- data/spec/integration/lib.descope/api/v1/auth/magiclink_spec.rb +49 -0
- data/spec/integration/lib.descope/api/v1/auth/otp_spec.rb +103 -0
- data/spec/integration/lib.descope/api/v1/auth/password_spec.rb +41 -0
- data/spec/integration/lib.descope/api/v1/auth/totp_spec.rb +76 -0
- data/spec/integration/lib.descope/api/v1/management/access_key_spec.rb +62 -0
- data/spec/integration/lib.descope/api/v1/management/audit_spec.rb +52 -0
- data/spec/integration/lib.descope/api/v1/management/authz_spec.rb +187 -0
- data/spec/integration/lib.descope/api/v1/management/flow_spec.rb +44 -0
- data/spec/integration/lib.descope/api/v1/management/permissions_spec.rb +27 -0
- data/spec/integration/lib.descope/api/v1/management/project_spec.rb +29 -0
- data/spec/integration/lib.descope/api/v1/management/roles_spec.rb +116 -0
- data/spec/integration/lib.descope/api/v1/management/user_spec.rb +262 -0
- data/spec/lib.descope/api/v1/auth/otp_spec.rb +176 -18
- data/spec/lib.descope/api/v1/auth_spec.rb +50 -1
- data/spec/lib.descope/api/v1/management/access_key_spec.rb +4 -2
- data/spec/lib.descope/api/v1/management/audit_spec.rb +92 -0
- data/spec/lib.descope/api/v1/management/role_spec.rb +35 -6
- data/spec/lib.descope/api/v1/management/user_spec.rb +40 -0
- data/spec/spec_helper.rb +9 -38
- data/spec/support/client_config.rb +5 -1
- data/spec/support/dummy_class.rb +15 -1
- data/spec/support/utils.rb +1 -1
- metadata +77 -133
- data/examples/ruby-on-rails-api/descope/tmp/pids/.keep +0 -0
- data/examples/ruby-on-rails-api/descope/tmp/storage/.keep +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
3.3.0
|
@@ -3,7 +3,7 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
addressable (2.8.6)
|
5
5
|
public_suffix (>= 2.0.2, < 6.0)
|
6
|
-
descope (1.0.
|
6
|
+
descope (1.0.4)
|
7
7
|
addressable (~> 2.8)
|
8
8
|
jwt (~> 2.7)
|
9
9
|
rest-client (~> 2.1)
|
@@ -16,7 +16,7 @@ GEM
|
|
16
16
|
jwt (2.7.1)
|
17
17
|
mime-types (3.5.2)
|
18
18
|
mime-types-data (~> 3.2015)
|
19
|
-
mime-types-data (3.
|
19
|
+
mime-types-data (3.2024.0206)
|
20
20
|
netrc (0.11.0)
|
21
21
|
public_suffix (5.0.4)
|
22
22
|
rest-client (2.1.0)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require_relative '../version_check'
|
4
5
|
require 'descope'
|
5
6
|
|
6
7
|
@logger = Logger.new($stdout)
|
@@ -13,13 +14,36 @@ require 'descope'
|
|
13
14
|
@client = Descope::Client.new({ project_id: @project_id, management_key: @management_key })
|
14
15
|
|
15
16
|
begin
|
16
|
-
@logger.info('
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
@logger.info('Do you want to to create a new audit event? [y/n] ')
|
18
|
+
create_audit = gets.chomp
|
19
|
+
if create_audit == 'y'
|
20
|
+
@logger.info('Enter the action for the audit event: ')
|
21
|
+
action = gets.chomp
|
22
|
+
@logger.info('Enter the type for the audit event: [info/warn/error] ')
|
23
|
+
type = gets.chomp
|
24
|
+
@logger.info('Enter the actorId for the audit event: ')
|
25
|
+
actor_id = gets.chomp
|
26
|
+
@logger.info('Enter the tenantId for the audit event: ')
|
27
|
+
tenant_id = gets.chomp
|
28
|
+
res = @client.audit_create_event(
|
29
|
+
action: action,
|
30
|
+
type: type,
|
31
|
+
actor_id: actor_id,
|
32
|
+
tenant_id: tenant_id
|
33
|
+
)
|
34
|
+
@logger.info("Audit event created successfully: #{res}")
|
35
|
+
end
|
36
|
+
|
37
|
+
@logger.info('Do you want to search the audit trail? [y/n] ')
|
38
|
+
search_audit = gets.chomp
|
39
|
+
if search_audit == 'y'
|
40
|
+
@logger.info('Enter the text to search: ')
|
41
|
+
text = gets.chomp
|
42
|
+
@logger.info('Enter the from_ts in ISO8601 format (2024-01-01 15:00:00.000) to search: ')
|
43
|
+
from_ts = gets.chomp
|
44
|
+
res = @client.audit_search(text: text, from_ts: from_ts)
|
45
|
+
@logger.info("Audit search result: #{res}")
|
46
|
+
end
|
23
47
|
rescue Descope::AuthException => e
|
24
|
-
@logger.error("Audit
|
48
|
+
@logger.error("Audit action failed #{e}")
|
25
49
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require_relative '../version_check'
|
4
5
|
require 'descope'
|
5
6
|
|
6
7
|
@logger = Logger.new($stdout)
|
@@ -15,7 +16,7 @@ require 'descope'
|
|
15
16
|
begin
|
16
17
|
@logger.info('Going to create a new permission')
|
17
18
|
name = 'My Permission'
|
18
|
-
@client.create_permission(name
|
19
|
+
@client.create_permission(name: name, description: 'Allowed to test')
|
19
20
|
|
20
21
|
rescue Descope::AuthException => e
|
21
22
|
@logger.info("Permission creation failed #{e}")
|
@@ -39,7 +40,7 @@ begin
|
|
39
40
|
# we mean to update.
|
40
41
|
name = 'My Permission'
|
41
42
|
@client.update_permission(
|
42
|
-
name
|
43
|
+
name: name, new_name: 'My Updated Permission', description: 'New Description'
|
43
44
|
)
|
44
45
|
|
45
46
|
rescue Descope::AuthException => e
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require_relative '../version_check'
|
4
5
|
require 'descope'
|
5
6
|
|
6
7
|
@logger = Logger.new($stdout)
|
@@ -15,9 +16,13 @@ require 'descope'
|
|
15
16
|
name = 'My Role'
|
16
17
|
|
17
18
|
begin
|
19
|
+
@logger.info('Creating a new tenant')
|
20
|
+
puts 'Please insert a new tenant name'
|
21
|
+
tenant_name = gets.chomp
|
22
|
+
tenant = @client.create_tenant(name: tenant_name)
|
18
23
|
@logger.info('Going to create a new role')
|
19
24
|
@client.create_role(
|
20
|
-
name
|
25
|
+
name: name, description: 'Allowed to test :)', permission_names: ['SSO Admin'], tenant_id: tenant['id']
|
21
26
|
)
|
22
27
|
rescue Descope::AuthException => e
|
23
28
|
@logger.info("Role creation failed #{e}")
|
@@ -38,10 +43,11 @@ end
|
|
38
43
|
begin
|
39
44
|
@logger.info('Updating newly created role')
|
40
45
|
@client.update_role(
|
41
|
-
name
|
46
|
+
name: name,
|
42
47
|
new_name: 'My Updated Role',
|
43
48
|
description: 'New Description',
|
44
|
-
permission_names: ['User Admin']
|
49
|
+
permission_names: ['User Admin'],
|
50
|
+
tenant_id: tenant['id']
|
45
51
|
)
|
46
52
|
|
47
53
|
rescue Descope::AuthException => e
|
@@ -50,7 +56,7 @@ end
|
|
50
56
|
|
51
57
|
begin
|
52
58
|
@logger.info('Deleting newly created role')
|
53
|
-
@client.delete_role('My Updated Role')
|
59
|
+
@client.delete_role(name: 'My Updated Role', tenant_id: tenant['id'])
|
54
60
|
|
55
61
|
rescue Descope::AuthException => e
|
56
62
|
@logger.error("Role deletion failed #{e}")
|
data/examples/ruby/oauth_app.rb
CHANGED
data/examples/ruby/otp_app.rb
CHANGED
@@ -7,25 +7,51 @@ require 'descope'
|
|
7
7
|
|
8
8
|
@project_id = ENV['DESCOPE_PROJECT_ID']
|
9
9
|
@management_key = ENV['DESCOPE_MANAGEMENT_KEY']
|
10
|
-
|
11
|
-
@logger.info("Initializing Descope API with project_id: #{@project_id} and base_uri: #{@base_uri}")
|
12
|
-
|
13
10
|
@client = Descope::Client.new({ project_id: @project_id, management_key: @management_key })
|
11
|
+
@logger.info("Initializing Descope API with project_id: #{@project_id} and base_uri: #{@client.base_uri}")
|
14
12
|
|
15
13
|
begin
|
16
14
|
@logger.info('Going to signup or in using OTP...')
|
17
|
-
puts 'Please insert email to signup or in:\n'
|
18
|
-
email = gets.chomp
|
19
|
-
masked_email = @client.otp_sign_up_or_in(
|
20
|
-
method: Descope::Mixins::Common::DeliveryMethod::EMAIL, login_id: email
|
21
|
-
)
|
22
15
|
|
23
|
-
puts "Please
|
16
|
+
puts "Please select OTP method: [email, sms, voice]:\n"
|
17
|
+
method = gets.chomp
|
18
|
+
|
19
|
+
case method
|
20
|
+
when 'email'
|
21
|
+
requested_method = Descope::Mixins::Common::DeliveryMethod::EMAIL
|
22
|
+
puts "Please insert the email address you want to use:\n"
|
23
|
+
email = gets.chomp
|
24
|
+
requested_params = { login_id: email }
|
25
|
+
when 'sms'
|
26
|
+
requested_method = Descope::Mixins::Common::DeliveryMethod::SMS
|
27
|
+
@logger.info('Once signed up, we will use the update phone number')
|
28
|
+
puts "Please insert the phone number you want to use:\n"
|
29
|
+
phone = gets.chomp
|
30
|
+
requested_params = { login_id: phone }
|
31
|
+
when 'voice'
|
32
|
+
requested_method = Descope::Mixins::Common::DeliveryMethod::VOICE
|
33
|
+
@logger.info('Once signed up, we will use the update phone number')
|
34
|
+
puts "Please insert the phone number you want to use:\n"
|
35
|
+
phone = gets.chomp
|
36
|
+
requested_params = { login_id: phone }
|
37
|
+
else
|
38
|
+
raise 'Invalid method'
|
39
|
+
end
|
40
|
+
|
41
|
+
@logger.info("Signing up using OTP with #{method}...")
|
42
|
+
if method == 'email'
|
43
|
+
user = { login_id: email, name: 'John Doe', email: email, phone: phone }
|
44
|
+
login_id = email
|
45
|
+
masked_method = @client.otp_sign_up(method: requested_method, user: user, login_id: email, phone: phone)
|
46
|
+
else
|
47
|
+
login_id = phone
|
48
|
+
masked_method = @client.otp_sign_up_or_in(method: requested_method, login_id: phone)
|
49
|
+
end
|
50
|
+
|
51
|
+
puts "Please insert the code you received by #{method} to #{masked_method}:\n"
|
24
52
|
value = gets.chomp
|
25
53
|
|
26
|
-
jwt_response = @client.otp_verify_code(
|
27
|
-
method: Descope::Mixins::Common::DeliveryMethod::EMAIL, login_id: email, code: value
|
28
|
-
)
|
54
|
+
jwt_response = @client.otp_verify_code(method: requested_method, login_id: login_id, code: value)
|
29
55
|
@logger.info('Code is valid')
|
30
56
|
puts "jwt_response: #{jwt_response}"
|
31
57
|
session_token = jwt_response[Descope::Mixins::Common::SESSION_TOKEN_NAME].fetch('jwt')
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require_relative './version_check'
|
4
5
|
require 'descope'
|
5
6
|
|
6
7
|
@logger = Logger.new($stdout)
|
@@ -20,19 +21,19 @@ begin
|
|
20
21
|
puts 'Please insert password to signup with:\n'
|
21
22
|
password = gets.chomp
|
22
23
|
|
23
|
-
jwt_response = @client.password_sign_up(login_id: email, password:)
|
24
|
+
jwt_response = @client.password_sign_up(login_id: email, password: password)
|
24
25
|
@logger.info("Signup successful! jwt_response: #{jwt_response}")
|
25
26
|
puts "=> #{Descope::Mixins::Common::SESSION_TOKEN_NAME}"
|
26
27
|
session_token = jwt_response[Descope::Mixins::Common::SESSION_TOKEN_NAME].fetch('jwt')
|
27
28
|
refresh_token = jwt_response[Descope::Mixins::Common::REFRESH_SESSION_TOKEN_NAME].fetch('jwt')
|
28
29
|
|
29
30
|
@logger.info('Validating email address...')
|
30
|
-
@client.magiclink_update_user_email(login_id: email, email
|
31
|
+
@client.magiclink_update_user_email(login_id: email, email: email, refresh_token: refresh_token)
|
31
32
|
|
32
33
|
puts "Validation email send, please paste the token you received by email:\n"
|
33
34
|
token = gets.chomp
|
34
35
|
jwt_response = @client.magiclink_verify_token(token)
|
35
|
-
@logger.info(
|
36
|
+
@logger.info("Token verified successfully! #{jwt_response}")
|
36
37
|
session_token = jwt_response[Descope::Mixins::Common::SESSION_TOKEN_NAME].fetch('jwt')
|
37
38
|
refresh_token = jwt_response[Descope::Mixins::Common::REFRESH_SESSION_TOKEN_NAME].fetch('jwt')
|
38
39
|
|
@@ -48,7 +49,7 @@ begin
|
|
48
49
|
|
49
50
|
puts "Please insert new password:\n"
|
50
51
|
new_password = gets.chomp
|
51
|
-
@client.password_update(login_id: email, new_password
|
52
|
+
@client.password_update(login_id: email, new_password: new_password, refresh_token: refresh_token)
|
52
53
|
@logger.info('Attempting to sign in with new password...')
|
53
54
|
jwt_response = @client.password_sign_in(login_id: email, password: new_password)
|
54
55
|
session_token = jwt_response[Descope::Mixins::Common::SESSION_TOKEN_NAME].fetch('jwt')
|
@@ -56,15 +57,15 @@ begin
|
|
56
57
|
@logger.info("jwt_response: #{jwt_response}")
|
57
58
|
|
58
59
|
@logger.info('going to validate session...')
|
59
|
-
@client.validate_session(session_token:)
|
60
|
+
@client.validate_session(session_token: session_token)
|
60
61
|
@logger.info('Session validated successfully and all is OK!')
|
61
62
|
|
62
63
|
@logger.info('refreshing the session token...')
|
63
|
-
claims = @client.refresh_session(refresh_token:)
|
64
|
+
claims = @client.refresh_session(refresh_token: refresh_token)
|
64
65
|
@logger.info('going to revalidate the session with the newly refreshed token...')
|
65
66
|
|
66
67
|
new_session_token = claims[Descope::Mixins::Common::SESSION_TOKEN_NAME].fetch('jwt')
|
67
|
-
@client.validate_and_refresh_session(session_token: new_session_token, refresh_token:)
|
68
|
+
@client.validate_and_refresh_session(session_token: new_session_token, refresh_token: refresh_token)
|
68
69
|
@logger.info('Session is also valid for the refreshed token.')
|
69
70
|
|
70
71
|
@logger.info('going to sign out...')
|
data/examples/ruby/saml_app.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
required_version = File.read('.ruby-version').strip
|
4
|
+
|
5
|
+
begin
|
6
|
+
# Check the Ruby version using RUBY_VERSION constant
|
7
|
+
current_version = RUBY_VERSION
|
8
|
+
|
9
|
+
# Compare major, minor and patch versions
|
10
|
+
if current_version.split('.').map(&:to_i) != required_version.split('.').map(&:to_i)
|
11
|
+
raise StandardError, "Script requires Ruby version #{required_version} but found #{current_version}"
|
12
|
+
end
|
13
|
+
rescue StandardError => e
|
14
|
+
puts "Error: #{e}"
|
15
|
+
puts "Script cannot run with incompatible Ruby version. Please install version #{required_version}."
|
16
|
+
exit(1) # Exit with an error code
|
17
|
+
end
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
*.rbc
|
2
|
+
capybara-*.html
|
3
|
+
.rspec
|
4
|
+
/db/*.sqlite3
|
5
|
+
/db/*.sqlite3-journal
|
6
|
+
/db/*.sqlite3-[0-9]*
|
7
|
+
/public/system
|
8
|
+
/coverage/
|
9
|
+
/spec/tmp
|
10
|
+
*.orig
|
11
|
+
rerun.txt
|
12
|
+
pickle-email-*.html
|
13
13
|
|
14
14
|
# Ignore all logfiles and tempfiles.
|
15
15
|
/log/*
|
@@ -17,24 +17,54 @@
|
|
17
17
|
!/log/.keep
|
18
18
|
!/tmp/.keep
|
19
19
|
|
20
|
-
#
|
21
|
-
/
|
22
|
-
|
23
|
-
!/tmp/pids/.keep
|
20
|
+
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
21
|
+
config/initializers/secret_token.rb
|
22
|
+
config/master.key
|
24
23
|
|
25
|
-
#
|
26
|
-
/
|
27
|
-
!/storage/.keep
|
28
|
-
/tmp/storage/*
|
29
|
-
!/tmp/storage/
|
30
|
-
!/tmp/storage/.keep
|
24
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
25
|
+
# config/secrets.yml
|
31
26
|
|
32
|
-
|
27
|
+
# dotenv, dotenv-rails
|
28
|
+
# TODO Comment out these rules if environment variables can be committed
|
29
|
+
.env
|
30
|
+
.env*.local
|
31
|
+
|
32
|
+
## Environment normalization:
|
33
|
+
/.bundle
|
34
|
+
/vendor/bundle
|
35
|
+
|
36
|
+
# these should all be checked in to normalize the environment:
|
37
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
33
38
|
|
34
|
-
#
|
35
|
-
|
39
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
40
|
+
.rvmrc
|
36
41
|
|
37
|
-
|
38
|
-
|
42
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
43
|
+
/vendor/assets/bower_components
|
44
|
+
*.bowerrc
|
45
|
+
bower.json
|
39
46
|
|
40
|
-
|
47
|
+
# Ignore pow environment settings
|
48
|
+
.powenv
|
49
|
+
|
50
|
+
# Ignore Byebug command history file.
|
51
|
+
.byebug_history
|
52
|
+
|
53
|
+
# Ignore node_modules
|
54
|
+
node_modules/
|
55
|
+
|
56
|
+
# Ignore precompiled javascript packs
|
57
|
+
/public/packs
|
58
|
+
/public/packs-test
|
59
|
+
/public/assets
|
60
|
+
|
61
|
+
# Ignore yarn files
|
62
|
+
/yarn-error.log
|
63
|
+
yarn-debug.log*
|
64
|
+
.yarn-integrity
|
65
|
+
|
66
|
+
# Ignore uploaded files in development
|
67
|
+
/storage/*
|
68
|
+
!/storage/.keep
|
69
|
+
/public/uploads
|
70
|
+
/node_modules/
|
@@ -3,7 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
ruby "3.3.0"
|
4
4
|
|
5
5
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
6
|
-
gem "rails", "~> 7.1.3"
|
6
|
+
gem "rails", "~> 7.1.3.2"
|
7
7
|
|
8
8
|
gem 'descope', path: '../../../..'
|
9
9
|
|
@@ -63,5 +63,7 @@ group :development do
|
|
63
63
|
|
64
64
|
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
65
65
|
# gem "spring"
|
66
|
+
gem 'rubocop-rails', '2.24.1', require: false
|
67
|
+
gem "rdoc", ">= 6.6.3.1", require: false
|
66
68
|
end
|
67
69
|
|