# desc ‘Explaining what the task does’ namespace :radissh do

task install: :environment do
  source = File.join(Gem.loaded_specs['radissh'].full_gem_path, 'lib', 'initializers', 'radissh.rb')
  target = File.join(Rails.root, 'config', 'initializers', 'radissh.rb')
  if File.exists? target
    puts "#{target} already exists."
  else
    FileUtils.cp_r source, target
    puts "#{target} file created."
    puts 'Create an account at https://radissh.com'
    puts 'Add a new project'
    puts 'Collect testimonials'
    puts 'Update your API KEY at config/initializers/radissh.rb'
    puts 'Use the helper <%= render_radissh %> to display your widget'
  end
end

end