Skip to content

Commit

Permalink
Merge c829c25 into 77ac4b9
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmantis committed Apr 27, 2016
2 parents 77ac4b9 + c829c25 commit 7820b88
Show file tree
Hide file tree
Showing 23 changed files with 609 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .gitignore
@@ -0,0 +1,24 @@
.vagrant
Berksfile.lock
berks-cookbooks
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~

# Sublime Text
*.sublime-project
*.sublime-workspace

# Bundler
Gemfile.lock
bin/*
.bundle/*

.kitchen/
.kitchen.local.yml

.env.sh
coverage
6 changes: 6 additions & 0 deletions .kitchen.travis.yml
@@ -0,0 +1,6 @@
---
driver:
name: localhost

platforms:
- name: macosx
22 changes: 22 additions & 0 deletions .kitchen.yml
@@ -0,0 +1,22 @@
---
driver:
name: vagrant

provisioner:
name: chef_zero

platforms:
- name: macosx-10.10
driver:
box: roboticcheese/macosx-10.10
ssh:
insert_key: false

suites:
- name: default
run_list:
- recipe[airmail]
attributes:
mac_app_store:
username: <%= ENV['APPLE_ID_USERNAME'] %>
password: <%= ENV['APPLE_ID_PASSWORD'] %>
15 changes: 15 additions & 0 deletions .travis.yml
@@ -0,0 +1,15 @@
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:
- cp .kitchen.travis.yml .kitchen.local.yml

script:
- chef exec rake
10 changes: 10 additions & 0 deletions Berksfile
@@ -0,0 +1,10 @@
# Encoding: UTF-8

source 'https://supermarket.chef.io'

metadata

group :unit do
cookbook 'resource_airmail_test',
path: 'spec/support/cookbooks/resource_airmail_test'
end
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,6 @@
Airmail Cookbook CHANGELOG
==========================

v0.0.1 (2016-04-27)
-------------------
- Development started
29 changes: 29 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,29 @@
Airmail Contributor Code of Conduct
===================================

As contributors and maintainers of this project, we pledge to respect all
people who contribute through reporting issues, posting feature requests,
updating documentation, submitting pull requests or patches, and other
activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual
language or imagery, derogatory comments or personal attacks, trolling, public
or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct. Project maintainers who do not
follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting one or more of the project
maintainers.

This Code of Conduct is adapted from the
[Contributor Covenant](http://contributor-covenant.org), version 1.0.0,
available [here](http://contributor-covenant.org/version/1/0/0/).
39 changes: 39 additions & 0 deletions Gemfile
@@ -0,0 +1,39 @@
# Encoding: UTF-8

source 'https://rubygems.org'

group :development do
gem 'yard-chef'
gem 'guard'
gem 'guard-foodcritic'
gem 'guard-rspec'
gem 'guard-kitchen'
end

group :test do
gem 'rake'
gem 'rubocop'
gem 'foodcritic'
gem 'rspec'
gem 'chefspec'
gem 'simplecov'
gem 'simplecov-console'
gem 'coveralls'
gem 'fauxhai'
gem 'test-kitchen'
gem 'kitchen-localhost'
gem 'kitchen-vagrant'
end

group :integration do
gem 'serverspec'
end

group :deploy do
gem 'stove'
end

group :production do
gem 'chef', '>= 12.5'
gem 'berkshelf'
end
28 changes: 28 additions & 0 deletions Guardfile
@@ -0,0 +1,28 @@
# Encoding: UTF-8

guard :rspec, all_on_start: true, notification: false do
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { 'spec' }

watch(%r{^recipes/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^attributes/(.+)\.rb$})
watch(%r{^files/(.+)})
watch(%r{^templates/(.+)})
watch(%r{^providers/(.+)\.rb})
watch(%r{^resources/(.+)\.rb})
watch(%r{^libraries/(.+)\.rb})
end

# guard :foodcritic, cookbook_paths: '.', cli: '-t ~FC023 -f any' do
# watch(/^.*\.rb$/)
# end

# guard :kitchen do
# watch(/test\/.+/)
# watch(/^recipes\/(.+)\.rb$/)
# watch(/^attributes\/(.+)\.rb$/)
# watch(/^files\/(.+)/)
# watch(/^templates\/(.+)/)
# watch(/^providers\/(.+)\.rb/)
# watch(/^resources\/(.+)\.rb/)
# end
90 changes: 88 additions & 2 deletions README.md
@@ -1,2 +1,88 @@
# airmail-chef
A Chef cookbook for the Airmail app
Airmail Cookbook
================
[![Cookbook Version](https://img.shields.io/cookbook/v/airmail.svg)][cookbook]
[![Build Status](https://img.shields.io/travis/roboticcheese/airmail-chef.svg)][travis]
[![Code Climate](https://img.shields.io/codeclimate/github/roboticcheese/airmail-chef.svg)][codeclimate]
[![Coverage Status](https://img.shields.io/coveralls/roboticcheese/airmail-chef.svg)][coveralls]

[cookbook]: https://supermarket.chef.io/cookbooks/airmail
[travis]: https://travis-ci.org/roboticcheese/airmail-chef
[codeclimate]: https://codeclimate.com/github/roboticcheese/airmail-chef
[coveralls]: https://coveralls.io/r/roboticcheese/airmail-chef

A Chef cookbook to install the Airmail app.

Requirements
============

This cookbook offers a recipe-based and a resource-based install. Use of the
resource requires that you open a `mac_app_store` resource prior in your Chef
run.

This cookbook requires Chef 12.5 or newer.

Usage
=====

Either add the default recipe to your run_list, or implement the resource in
a recipe of your own.

Recipes
=======

***default***

Opens the Mac App Store and performs a simple install of the app.

Resources
=========

***airmail***

Used to perform installation of the app.

Syntax:

airmail 'default' do
action :install
end

Actions:

| Action | Description |
|------------|-----------------|
| `:install` | Install the app |

Attributes:

| Attribute | Default | Description |
|------------|----------------|----------------------|
| action | `:install` | Action(s) to perform |

Contributing
============

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Add tests for the new feature; ensure they pass (`rake`)
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request

License & Authors
=================
- Author: Jonathan Hartman <j@p4nt5.com>

Copyright 2016, Jonathan Hartman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
23 changes: 23 additions & 0 deletions Rakefile
@@ -0,0 +1,23 @@
# Encoding: UTF-8

require 'rubygems'
require 'bundler/setup'
require 'rubocop/rake_task'
require 'rspec/core/rake_task'
require 'foodcritic'
require 'kitchen/rake_tasks'
require 'stove/rake_task'

RuboCop::RakeTask.new

FoodCritic::Rake::LintTask.new do |f|
f.options = { fail_tags: %w(any) }
end

RSpec::Core::RakeTask.new(:spec)

Kitchen::RakeTasks.new

Stove::RakeTask.new

task default: %w(rubocop foodcritic spec)
95 changes: 95 additions & 0 deletions chefignore
@@ -0,0 +1,95 @@
# Put files/directories that should be ignored in this file when uploading
# or sharing to the community site.
# Lines that start with '# ' are comments.

# OS generated files #
######################
.DS_Store
Icon?
nohup.out
ehthumbs.db
Thumbs.db

# SASS #
########
.sass-cache

# EDITORS #
###########
\#*
.#*
*~
*.sw[a-z]
*.bak
REVISION
TAGS*
tmtags
*_flymake.*
*_flymake
*.tmproj
.project
.settings
mkmf.log

## COMPILED ##
##############
a.out
*.o
*.pyc
*.so
*.com
*.class
*.dll
*.exe
*/rdoc/

# Testing #
###########
.watchr
.rspec
spec/*
spec/fixtures/*
test/*
features/*
Guardfile
Procfile

# SCM #
#######
.git
*/.git
.gitignore
.gitmodules
.gitconfig
.gitattributes
.svn
*/.bzr/*
*/.hg/*
*/.svn/*

# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp

# Cookbooks #
#############
CONTRIBUTING

# Strainer #
############
Colanderfile
Strainerfile
.colander
.strainer

# Vagrant #
###########
.vagrant
Vagrantfile

# Travis #
##########
.travis.yml

0 comments on commit 7820b88

Please sign in to comment.