web47core 2.2.15 → 2.2.17

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: 8e3b62063f81c04f52de1b3c56a36801555c8294f69e677142754897ec64fd6e
4
- data.tar.gz: e2cad54d84e6155e83819d8ea5691df3f4eeba9625f60ffd52ad9ac996967b97
3
+ metadata.gz: cea55e6cdb8a0620d0823966d23d42cd560f533463adea0ac56859ada94f460a
4
+ data.tar.gz: 63b6fed27581b79c6d7d9a0f3fa0771520955422c0534ef181efd50e92bc7cfc
5
5
  SHA512:
6
- metadata.gz: f080ed702713ff2258b811d91de55e53e92e1fe9e3a04ab762ef9a870f4eceda71e048e80440be2efa709bd2c5768e3f0f47070dce2fdbc0c89ea2be97fc9a0d
7
- data.tar.gz: 62e0a0483e20b47b5c48370f1643a76ad5abc77075033bf76b17b21fdf2642359ff8fb2336c1ab24aadc29e8855dd194e38c65b71376656c0d61869fe66248dd
6
+ metadata.gz: '057486e473ce760a06579ee99a27f585edb72ff5651cc4df0c9e3ac6cce63115ea3b9c928c6b96f8d4167673471fe97b51b6cdeb69a66fce34f243ba63a62270'
7
+ data.tar.gz: 2861256498eb159eb2d5f30bfb272828eafa1341730fc85be2326ba326c5188616249cea13aba3c9f1a2dae0bf758b49f8ff11f477930b6dedb72189fe997d6e
@@ -7,6 +7,7 @@
7
7
  .card-title=SystemConfiguration.environment.titleize
8
8
  .card-tray
9
9
  = edit_link_tag(SystemConfiguration, class_action_path(:edit))
10
+ = replay_link_tag(SystemConfiguration, class_action_path(:sync))
10
11
  .card
11
12
  .card-content.section-data-tables
12
13
  %table.highlight.striped.data-table
@@ -15,7 +16,7 @@
15
16
  =table_header_tag :field
16
17
  =table_header_tag :value
17
18
  %tbody
18
- - SystemConfiguration.allowed_param_names.each do |field|
19
+ - SystemConfiguration.allowed_param_names.sort.each do |field|
19
20
  %tr
20
21
  %td=field
21
22
  %td=mask_system_configuration(field)
@@ -10,15 +10,26 @@ module CoreSystemConfigurationsController
10
10
  # Edit the system configuration
11
11
  #
12
12
  def edit
13
- load_configuration
13
+ system_configuration
14
+ end
15
+
16
+ # @abstract Cause the system configuration to be synced with the switchboard server
17
+ def sync
18
+ raise 'System Configuration not configured to sync' unless SystemConfiguration.switchboard_configured?
19
+
20
+ Cron::SwitchboardSyncConfiguration.perform_later
21
+ flash[:info] = 'System Configuration Refreshing in the Background'
22
+ redirect_to index_path
23
+ rescue StandardError => error
24
+ log_controller_error error, true
25
+ redirect_to index_path
14
26
  end
15
27
 
16
28
  #
17
29
  # Update and log the system configuration changes
18
30
  #
19
31
  def update
20
- # @system_configuration.update_attributes_and_log! @current_admin_user, system_configuration_params
21
- SystemConfiguration.configuration.update! system_configuration_params
32
+ system_configuration.update! system_configuration_params
22
33
  if SystemConfiguration.switchboard_configured?
23
34
  flash[:info] = 'System Configuration Updated, sync job running in the background'
24
35
  Cron::SwitchboardSyncConfiguration.perform_later
@@ -28,7 +39,7 @@ module CoreSystemConfigurationsController
28
39
  redirect_to index_path
29
40
  rescue StandardError => error
30
41
  log_controller_error error
31
- load_configuration
42
+ system_configuration
32
43
  render :edit
33
44
  end
34
45
 
@@ -44,7 +55,7 @@ module CoreSystemConfigurationsController
44
55
  #
45
56
  # Load the current system configuration
46
57
  #
47
- def load_configuration
58
+ def system_configuration
48
59
  @system_configuration = SystemConfiguration.configuration
49
60
  end
50
61
  end
@@ -58,7 +58,7 @@ module AwsConfiguration
58
58
 
59
59
  # We want this to remake itself each time because it is possible that the
60
60
  # => user would change the access keys in between actions. Huh?
61
- @aws_s3_client ||= Aws::S3::Client.new(region: aws_vault_bucket_region,
61
+ @aws_s3_client ||= Aws::S3::Client.new(region: aws_region,
62
62
  access_key_id: aws_access_key_id,
63
63
  secret_access_key: aws_secret_access_key)
64
64
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '2.2.15'
4
+ VERSION = '2.2.17'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web47core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.15
4
+ version: 2.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-29 00:00:00.000000000 Z
11
+ date: 2023-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel