File: ssl.rake

package info (click to toggle)
ruby-dataobjects-mysql 0.10.17-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 372 kB
  • sloc: ansic: 1,420; ruby: 653; sh: 30; makefile: 13
file content (29 lines) | stat: -rw-r--r-- 861 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace :ssl do

  task :env do
    require ROOT.join('spec', 'spec_helper')
  end

  desc "Check test environment for SSL support."
  task :check => :env do
    ssl_supported, messages = DataObjectsSpecHelpers.test_environment_supports_ssl?

    if DataObjectsSpecHelpers.test_environment_supports_ssl?
      puts
      puts "** SSL successfully configured for the test environment **"
    else
      puts
      puts "** SSL is not configured for the test environment **"
      puts
      puts DataObjectsSpecHelpers.test_environment_ssl_config_errors.join("\n")
      puts
      fail "Run rake ssl:config for instructions on how to configure the test environment."
    end
  end

  desc "Provide instructions on how to configure SSL in your test environment."
  task :config => :env do
    puts DataObjectsSpecHelpers.test_environment_ssl_config
  end

end