Sha256: 87f2dc4faf2d7789691b448a1bb2638745e1abe6d54394272b91f500d753345e

Contents?: true

Size: 1.15 KB

Versions: 9

Compression:

Stored size: 1.15 KB

Contents

options.on('--doc', 'Also generate docs.') do
  process do |files|
    if files.any? { |f| f =~ /lib\/.+\.rb$/ }
      execute "yardoc --no-private"
      execute(%{osascript -e 'tell application "Safari"
        do JavaScript "window.location.reload()" in first document
      end tell'})
    end
  end
end

recipe :ruby

process do |files|
  specs = files.take_and_map do |file|
    case file
    when "spec/spec_helper.rb"
      Dir.glob("spec/**/*_spec.rb")
    when "spec/api/spec_helper.rb"
      Dir.glob("spec/api/*_spec.rb")
    when "lib/adyen/api.rb"
      "spec/api/api_spec.rb"
    when "lib/adyen/api/xml_querier.rb"
      ["spec/api/payment_service_spec.rb", "spec/api/recurring_service_spec.rb"]
    when "lib/adyen/api/simple_soap_client.rb"
      ["spec/api/simple_soap_client_spec.rb", "spec/api/payment_service_spec.rb", "spec/api/recurring_service_spec.rb"]
    when "lib/adyen/api/response.rb"
      ["spec/api/response_spec.rb", "spec/api/payment_service_spec.rb", "spec/api/recurring_service_spec.rb"]
    when %r{lib/adyen/api/templates/(.+)\.rb$}, %r{lib/adyen/api/(.+)\.rb$}
      "spec/api/#{$1}_spec.rb"
    end
  end
  Ruby.run_tests(specs)
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
adyen-1.5.0 .kick
adyen-1.4.1 .kick
adyen-1.4.0 .kick
adyen-1.3.2 .kick
adyen-1.3.1 .kick
adyen-1.3.0 .kick
adyen-1.2.0 .kick
adyen-1.1.0 .kick
adyen-1.0.0 .kick