lib/generators/socials/devise_generator.rb
# Update the application.rb to load the socials_keys on initialize
Update the application.rb to load the socials_keys on initialize
Update the application . rb to load the socials_keys on initialize
def update_application_rb
        inject_into_file 'config/application.rb', after: "class Application < Rails::Application\n" do <<-'RUBY'
    # It setup your social apps
    social_keys = File.join(Rails.root, 'config', 'social_keys.yml')
    CONFIG = HashWithIndifferentAccess.new(YAML::load(IO.read(social_keys)))[Rails.env]
    unless CONFIG.nil?
      CONFIG.each do |k,v|
        ENV[k.upcase] ||= v
      end
    end
          RUBY
        end
        puts 'Just updated your config/initializers/application.rb to config the environment'.colorize(:light_blue)
      end
def update_application_rb inject_into_file 'config/application.rb' , after : "class Application < Rails::Application\n" do <<-'RUBY' 

    # It setup your social apps
    social_keys = File.join(Rails.root, 'config', 'social_keys.yml')
    CONFIG = HashWithIndifferentAccess.new(YAML::load(IO.read(social_keys)))[Rails.env]

    unless CONFIG.nil?
      CONFIG.each do |k,v|
        ENV[k.upcase] ||= v
      end
    end

           RUBY end puts 'Just updated your config/initializers/application.rb to config the environment' . colorize ( :light_blue ) end
Update the application.rb to load the socials_keys on initialize
Update the application . rb to load the socials_keys on initialize