Sha256: 1fd5e3e54201a8628eb694b21a410e1bb13224da96f10759f7c35d0b7ae8a180

Contents?: true

Size: 1.46 KB

Versions: 7

Compression:

Stored size: 1.46 KB

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rake/testtask"

namespace(:test) do
  Rake::TestTask.new(:all) do |t|
    t.description = "Run all tests"
    t.libs << "test"
    t.test_files = FileList['test/**/*_test.rb']
  end

  Rake::TestTask.new(:unit) do |t|
    t.description = "Run unit tests"
    t.libs << "test"
    t.test_files = FileList['test/*_test.rb']
  end

  Rake::TestTask.new(:functional) do |t|
    t.description = "Run functional tests"
    t.libs << "test"
    t.test_files = FileList['test/functional/**/*_test.rb']
  end

  Rake::TestTask.new(:integration) do |t|
    t.description = "Run integration tests"
    t.libs << "test"
    t.test_files = FileList['test/integration/**/*_test.rb']
  end
end

desc "Run unit and functional tests"
task :test => %w{test:unit test:functional}

RSpec::Core::RakeTask.new(:spec) do |task|
  task.pattern = "./spec/**/*_spec.rb"
  task.rspec_opts = ['--color']
end

CACERT_PATH = 'lib/adyen/api/cacert.pem'

desc 'Update CA root certificates for the simple SOAP client'
task :update_cacert do
  tmp = '/tmp/cacert.pem.new'
  sh "curl -o #{tmp} http://curl.haxx.se/ca/cacert.pem"
  mv CACERT_PATH, '/tmp/cacert.pem.old'
  cp tmp, CACERT_PATH
end

# # Update the cacert.pem file before each release.
# task :build => :update_cacert do
#   sh "git diff-index --quiet HEAD #{CACERT_PATH} || (git add #{CACERT_PATH} && git commit -m '[API] Update CA root certificates file.')"
# end

task :default => %w{test spec}

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
adyen_jpiqueras-2.5.0 Rakefile
adyen_jpiqueras-2.4.0 Rakefile
adyen_jpiqueras-2.3.0 Rakefile
adyen-2.2.0 Rakefile
adyen-2.1.0 Rakefile
adyen-2.0.0 Rakefile
adyen-2.0.0.pre2 Rakefile