Skip to content

Commit

Permalink
Merge 4e7124a into 1329ee2
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmantis committed Oct 11, 2015
2 parents 1329ee2 + 4e7124a commit 117cc35
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .kitchen.appveyor.yml
@@ -0,0 +1,7 @@
---
driver:
name: localhost
clean_up_on_destroy: false

platforms:
- name: windows
5 changes: 2 additions & 3 deletions .kitchen.travis.yml
@@ -1,8 +1,7 @@
---
driver:
name: digitalocean
name: localhost
clean_up_on_destroy: false

platforms:
- name: macosx
driver:
name: localhost
6 changes: 4 additions & 2 deletions .travis.yml
@@ -1,19 +1,21 @@
language: objective-c

branches:
only:
- master

install:
- curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -P chefdk
- chef exec bundle install --without=development integration

before_script:
# Pending ENV support in Kitchen's Rake tasks and not just the CLI
- cp .kitchen.travis.yml .kitchen.local.yml
- echo -e $DIGITALOCEAN_SSH_KEY_BODY > ~/.ssh/id_rsa

script:
- chef exec rake && chef exec kitchen test

after_script:
- chef exec kitchen destroy

env:
global:
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -23,7 +23,6 @@ group :test do
gem 'coveralls'
gem 'fauxhai'
gem 'test-kitchen'
gem 'kitchen-digitalocean', '>= 0.8.0'
gem 'kitchen-localhost'
gem 'kitchen-vagrant'
gem 'winrm-transport'
Expand Down
4 changes: 3 additions & 1 deletion README.md
@@ -1,12 +1,14 @@
Box Sync Cookbook
=================
[![Cookbook Version](https://img.shields.io/cookbook/v/box-sync.svg)][cookbook]
[![Build Status](https://img.shields.io/travis/RoboticCheese/box-sync-chef.svg)][travis]
[![OS X Build Status](https://img.shields.io/travis/RoboticCheese/box-sync-chef.svg)][travis]
[![Windows Build Status](https://img.shields.io/appveyor/ci/RoboticCheese/box-sync-chef.svg)][appveyor]
[![Code Climate](https://img.shields.io/codeclimate/github/RoboticCheese/box-sync-chef.svg)][codeclimate]
[![Coverage Status](https://img.shields.io/coveralls/RoboticCheese/box-sync-chef.svg)][coveralls]

[cookbook]: https://supermarket.chef.io/cookbooks/box-sync
[travis]: https://travis-ci.org/RoboticCheese/box-sync-chef
[appveyor]: https://ci.appveyor.com/project/RoboticCheese/box-sync-chef
[codeclimate]: https://codeclimate.com/github/RoboticCheese/box-sync-chef
[coveralls]: https://coveralls.io/r/RoboticCheese/box-sync-chef

Expand Down
17 changes: 17 additions & 0 deletions appveyor.yml
@@ -0,0 +1,17 @@
branches:
only:
- master

cache:
- '%TEMP%\verifier\gems'

install:
- cinst chefdk
- SET PATH=C:\opscode\chefdk\bin;%PATH%

build_script:
- chef exec bundle install --without=development integration
- copy .kitchen.appveyor.yml .kitchen.local.yml

test_script:
- chef exec bundle exec kitchen test
5 changes: 3 additions & 2 deletions spec/libraries/provider_box_sync_app_mac_os_x_spec.rb
Expand Up @@ -5,8 +5,9 @@

describe Chef::Provider::BoxSyncApp::MacOsX do
let(:name) { 'default' }
let(:new_resource) { Chef::Resource::BoxSyncApp.new(name, nil) }
let(:provider) { described_class.new(new_resource, nil) }
let(:run_context) { ChefSpec::SoloRunner.new.converge.run_context }
let(:new_resource) { Chef::Resource::BoxSyncApp.new(name, run_context) }
let(:provider) { described_class.new(new_resource, run_context) }

describe '.provides?' do
let(:platform) { nil }
Expand Down
5 changes: 3 additions & 2 deletions spec/libraries/provider_box_sync_app_spec.rb
Expand Up @@ -5,8 +5,9 @@

describe Chef::Provider::BoxSyncApp do
let(:name) { 'default' }
let(:new_resource) { Chef::Resource::BoxSyncApp.new(name, nil) }
let(:provider) { described_class.new(new_resource, nil) }
let(:run_context) { ChefSpec::SoloRunner.new.converge.run_context }
let(:new_resource) { Chef::Resource::BoxSyncApp.new(name, run_context) }
let(:provider) { described_class.new(new_resource, run_context) }

describe '#whyrun_supported?' do
it 'returns true' do
Expand Down
8 changes: 5 additions & 3 deletions spec/libraries/provider_box_sync_app_windows_spec.rb
Expand Up @@ -5,8 +5,9 @@

describe Chef::Provider::BoxSyncApp::Windows do
let(:name) { 'default' }
let(:new_resource) { Chef::Resource::BoxSyncApp.new(name, nil) }
let(:provider) { described_class.new(new_resource, nil) }
let(:run_context) { ChefSpec::SoloRunner.new.converge.run_context }
let(:new_resource) { Chef::Resource::BoxSyncApp.new(name, run_context) }
let(:provider) { described_class.new(new_resource, run_context) }

describe '.provides?' do
let(:platform) { nil }
Expand Down Expand Up @@ -99,8 +100,9 @@

describe '#download_path' do
it 'returns a path under the Chef cache dir' do
res = provider.send(:download_path)
expected = "#{Chef::Config[:file_cache_path]}/Box Sync.exe"
expect(provider.send(:download_path)).to eq(expected)
expect(res).to eq(expected)
end
end
end
1 change: 0 additions & 1 deletion test/integration/uninstall/serverspec/spec_helper.rb

This file was deleted.

10 changes: 10 additions & 0 deletions test/integration/uninstall/serverspec/spec_helper.rb
@@ -0,0 +1,10 @@
# Encoding: UTF-8

require 'serverspec'

if RUBY_PLATFORM.match(/mswin|mingw32|windows/)
set :os, family: 'windows'
set :backend, :cmd
else
set :backend, :exec
end

0 comments on commit 117cc35

Please sign in to comment.