Sha256: a07c6460b5db5da839ac9e04ebd79a9cf49f0c5d6d822c0e5056bc3b8c7665fd

Contents?: true

Size: 598 Bytes

Versions: 18

Compression:

Stored size: 598 Bytes

Contents

namespace :chillout do
  desc "Check chillout integration"
  task :check do
    Rails.initialize!
    config = Rails.configuration.chillout
    client = Chillout::Client.new(config[:secret], config.reject{|key, value| key == :secret})
    check_result = client.check_api_connection

    if check_result.successful?
      puts "Chillout API available."
    elsif check_result.has_problem_with_authorization?
      puts "Chillout API available, but project couldn't authorize."
    else
      puts "Chillout API not available for given configuration:"
      puts client.config.to_s
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
chillout-0.8.9 lib/chillout/tasks.rb
chillout-0.8.5.1 lib/chillout/tasks.rb
chillout-0.8.8 lib/chillout/tasks.rb
chillout-0.8.7 lib/chillout/tasks.rb
chillout-0.8.6 lib/chillout/tasks.rb
chillout-0.8.5 lib/chillout/tasks.rb
chillout-0.8.4 lib/chillout/tasks.rb
chillout-0.8.3 lib/chillout/tasks.rb
chillout-0.8.2 lib/chillout/tasks.rb
chillout-0.8.1 lib/chillout/tasks.rb
chillout-0.8.0 lib/chillout/tasks.rb
chillout-0.6.0 lib/chillout/tasks.rb
chillout-0.5.4 lib/chillout/tasks.rb
chillout-0.5.3 lib/chillout/tasks.rb
chillout-0.5.2 lib/chillout/tasks.rb
chillout-0.5.1 lib/chillout/tasks.rb
chillout-0.5.0 lib/chillout/tasks.rb
chillout-0.4.1 lib/chillout/tasks.rb