Sha256: 82f1288e4b6d9da4c15048acc197e1d1e943a7606653e1c0a95db522c8f88b21

Contents?: true

Size: 673 Bytes

Versions: 5

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true

module Cybele
  module Helpers
    module Dotenv
      def configure_dotenv
        # Add dotenv gem
        inject_into_file 'Gemfile',
                         template_content('dotenv/dotenv_Gemfile.erb'),
                         before: "# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'"
        run_bundle

        # Create dotenv files
        files_to_template(
          'dotenv/.env.sample.erb' => '.env.sample',
          'dotenv/.env.local.erb' => '.env.local',
          'dotenv/.env.staging.erb' => '.env.staging',
          'dotenv/.env.production.erb' => '.env.production'
        )
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cybele-2.3.2 lib/cybele/helpers/dotenv.rb
cybele-2.3.1 lib/cybele/helpers/dotenv.rb
cybele-2.2.0 lib/cybele/helpers/dotenv.rb
cybele-2.1.0 lib/cybele/helpers/dotenv.rb
cybele-2.0.0 lib/cybele/helpers/dotenv.rb