Sha256: f1762383e26febdf4ab35ef903e7860c438ff3f9163ac6368ad84a678379a6f1

Contents?: true

Size: 577 Bytes

Versions: 29

Compression:

Stored size: 577 Bytes

Contents

require 'handsome_fencer/circle_c_i/crypto'
module HandsomeFencer
  module CircleCI

    class ObfuscatedEnvFilesGenerator < Rails::Generators::Base

      class_option :environment, type: :string, default: 'deploy'

      source_root File.expand_path('templates', __dir__)
      desc "obfuscate .env files inside .circleci directory"

      def obfuscate_env_files

        environment = options[:environment]

        @cipher = HandsomeFencer::CircleCI::Crypto.new(dkfile: environment)
        @cipher.obfuscate('.circleci', "#{environment}.env")
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
handsome_fencer-circle_c_i-0.1.22 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.21 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.20 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.19 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.17 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.15 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.12 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.11 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.10 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb