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.44 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.43 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.42 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.41 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.40 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.39 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.38 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.37 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.34 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.33 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.32 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.31 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.30 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.29 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.28 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.27 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.26 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.25 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.24 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb
handsome_fencer-circle_c_i-0.1.23 lib/generators/handsome_fencer/circle_c_i/obfuscated_env_files_generator.rb