Skip to content

Commit

Permalink
rm files
Browse files Browse the repository at this point in the history
  • Loading branch information
goodviber committed Jan 10, 2025
1 parent 56b5514 commit 6a3e150
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/generators/dfe/analytics/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,10 @@ class InstallGenerator < ::Rails::Generators::Base

def install
create_file 'config/initializers/dfe_analytics.rb', <<~FILE
DfE::Analytics.configure do |config|
#{indent(config_options.map(&:strip).join("\n\n").gsub(/# $/, '#').chomp.chomp, 2)}
end
ActiveSupport.on_load(:active_record) do
include DfE::Analytics::TransactionChanges
end
FILE

create_file 'config/analytics.yml', { 'shared' => {} }.to_yaml
create_file 'config/analytics_hidden_pii.yml', { 'shared' => {} }.to_yaml
create_file 'config/analytics_blocklist.yml', { 'shared' => {} }.to_yaml
end

private

def config_options
DfE::Analytics.config.members.map do |option|
<<~DESC
# #{I18n.t("dfe.analytics.config.#{option}.description").lines.join('# ').chomp}
#
# config.#{option} = #{I18n.t("dfe.analytics.config.#{option}.default")}\n
DESC
end
end
end
end
Expand Down

0 comments on commit 6a3e150

Please sign in to comment.