version: "master-{build}"

os: Windows Server 2012
platform:
  - x64

environment:
  matrix:
    - ruby_version: "200"

clone_folder: c:\projects\chef
clone_depth: 1
skip_tags: true
branches:
  only:
    - master
    - 12-stable

cache:
  - C:\Ruby200\lib\ruby\gems\2.0.0
  - C:\Ruby200\bin

install:
  - winrm quickconfig -q
  - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
  - echo %PATH%
  - ruby --version
  - gem install rubygems-pkg/rubygems-update-2.4.6.gem
  - update_rubygems
  - gem --version
  - gem install bundler --quiet --no-ri --no-rdoc
  - bundler --version

build_script:
  - bundle install || bundle install || bundle install

test_script:
  - SET SPEC_OPTS=--format progress
  - bundle exec rake spec

version: "master-{build}"

os: Windows Server 2012
platform:
  - x64

environment:
  matrix:
    - ruby_version: "200"

clone_folder: c:\projects\chef
clone_depth: 1
skip_tags: true
branches:
  only:
    - master
    - 12-stable

cache:
  - C:\Ruby200\lib\ruby\gems\2.0.0
  - C:\Ruby200\bin

install:
  - winrm quickconfig -q
  - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
  - echo %PATH%
  - ruby --version
  - gem install bundler --quiet --no-ri --no-rdoc
  - gem install rubygems-pkg/rubygems-update-2.4.6.gem
  - update_rubygems
  - gem --version
  - bundler --version

build_script:
  - bundle install || bundle install || bundle install

test_script:
  - SET SPEC_OPTS=--format progress
  - bundle exec rake spec

Install bundler before upgrading rubygems
Install bundler before upgrading rubygems

Appveyor builds are timing out attempting to fetch a SRV record from
DNS, https://github.com/rubygems/rubygems/issues/1017

In the default ruby install on appveyor, we have a version of rubygems
that is old and doesn't have the bug, so doing gem install before
upgrading works around the timeout issue.
