Add ChefSpec and Upgrade Resources

* Add ChefSpec and Berksfile for testing.
* Change License to MIT.
* Remove knife:test in favor of ChefSpec catching syntax errors.
* Upgrade Vagrant to latest resources and add plugins. This required
using an install method as described [here](https://github.com/andrewgross/vagrant-chef-zero/issues/41#issuecomment-41112026)
until vagrant-berkshelf catches up to the lates Vagrant version.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch add_chefspec_and_update_resources
# Changes to be committed:
#	modified:   .travis.yml
#	new file:   Berksfile
#	new file:   Berksfile.lock
#	modified:   CHANGELOG.md
#	modified:   Gemfile
#	modified:   Gemfile.lock
#	modified:   LICENSE.md
#	modified:   README.md
#	deleted:    Rakefile
#	new file:   Vagrantfile
#	modified:   metadata.rb
#	new file:   spec/default_spec.rb
#	new file:   spec/spec_helper.rb
#	deleted:    test/Vagrantfile
#	deleted:    test/chef/knife.rb
#
diff --git a/.travis.yml b/.travis.yml
index 74d8f45..83fcfde 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,4 +5,4 @@ rvm:
   - 1.9.2
   - 1.9.3
 script:
-  - bundle exec rake test:knife
+  - bundle exec rspec spec
diff --git a/Berksfile b/Berksfile
new file mode 100755
index 0000000..9c17ad3
--- /dev/null
+++ b/Berksfile
@@ -0,0 +1,3 @@
+source 'https://api.berkshelf.com/'
+
+metadata
diff --git a/Berksfile.lock b/Berksfile.lock
new file mode 100644
index 0000000..13fca2e
--- /dev/null
+++ b/Berksfile.lock
@@ -0,0 +1,7 @@
+DEPENDENCIES
+  janus
+    path: .
+    metadata: true
+
+GRAPH
+  janus (1.0.0)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f6aa81f..472a5e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+## v1.0.0
+* Add ChefSpec tests
+* Add Berksfile
+* Remove Rakefile and knife:test. ChefSpec will fail if there is a syntax error.
+* Remove vagrant Gem. Vagrant is no longer used as a gem in favor of Vagrant Installer.
+* Upgrade Vagrantfile to version 2 and use Vagrant Plugins.
+* Change License to MIT
+
+## v0.0.4
+* Make sure rake is installed. [GH-3[(https://github.com/pwelch/chef-janus/pull/3)
+
 ## v0.0.3
 * Change janus::default recipe to install Janus to an Array of users.  
 * Fix cookbook file structure.
diff --git a/Gemfile b/Gemfile
old mode 100644
new mode 100755
index 881cf2a..6836c05
--- a/Gemfile
+++ b/Gemfile
@@ -1,10 +1,4 @@
-source :rubygems
+source 'https://rubygems.org'
 
-group :development do
-  gem 'chef'
-  gem 'rake'
-end
-
-group :test do
-  gem 'vagrant', "~> 1.0.5"
-end
+gem 'berkshelf' 
+gem 'chefspec', '~> 3.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index 93bc48a..b0975b5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,72 +1,164 @@
 GEM
-  remote: http://rubygems.org/
+  remote: https://rubygems.org/
   specs:
-    archive-tar-minitar (0.5.2)
-    chef (11.0.0)
-      erubis
-      highline (>= 1.6.9)
-      json (>= 1.4.4, <= 1.6.1)
-      mixlib-authentication (>= 1.3.0)
-      mixlib-cli (~> 1.3.0)
-      mixlib-config (>= 1.1.2)
-      mixlib-log (>= 1.3.0)
-      mixlib-shellout
-      net-ssh (~> 2.2.2)
-      net-ssh-multi (~> 1.1.0)
-      ohai (>= 0.6.0)
+    addressable (2.3.6)
+    berkshelf (3.1.1)
+      addressable (~> 2.3.4)
+      berkshelf-api-client (~> 1.2)
+      buff-config (~> 0.2)
+      buff-extensions (~> 0.4)
+      buff-shell_out (~> 0.1)
+      celluloid (~> 0.16.0.pre)
+      celluloid-io (~> 0.16.0.pre)
+      faraday (~> 0.9.0)
+      minitar (~> 0.5.4)
+      octokit (~> 3.0)
+      retryable (~> 1.3.3)
+      ridley (~> 3.1)
+      solve (~> 1.1)
+      thor (~> 0.18)
+    berkshelf-api-client (1.2.0)
+      faraday (~> 0.9.0)
+    buff-config (0.4.0)
+      buff-extensions (~> 0.3)
+      varia_model (~> 0.1)
+    buff-extensions (0.5.0)
+    buff-ignore (1.1.1)
+    buff-ruby_engine (0.1.0)
+    buff-shell_out (0.1.1)
+      buff-ruby_engine (~> 0.1.0)
+    celluloid (0.16.0.pre)
+      timers (~> 2.0.0)
+    celluloid-io (0.16.0.pre)
+      celluloid (>= 0.16.0.pre)
+      nio4r (>= 1.0.0)
+    chef (11.12.2)
+      chef-zero (~> 2.0, >= 2.0.2)
+      diff-lcs (~> 1.2, >= 1.2.4)
+      erubis (~> 2.7)
+      highline (~> 1.6, >= 1.6.9)
+      json (>= 1.4.4, <= 1.8.1)
+      mime-types (~> 1.16)
+      mixlib-authentication (~> 1.3)
+      mixlib-cli (~> 1.4)
+      mixlib-config (~> 2.0)
+      mixlib-log (~> 1.3)
+      mixlib-shellout (~> 1.4)
+      net-ssh (~> 2.6)
+      net-ssh-multi (~> 1.1)
+      ohai (~> 7.0)
+      pry (~> 0.9)
       rest-client (>= 1.0.4, < 1.7.0)
       yajl-ruby (~> 1.1)
-    childprocess (0.3.8)
-      ffi (~> 1.0, >= 1.0.11)
+    chef-zero (2.0.2)
+      hashie (~> 2.0)
+      json
+      mixlib-log (~> 1.3)
+      rack
+    chefspec (3.4.0)
+      chef (~> 11.0)
+      fauxhai (~> 2.0)
+      rspec (~> 2.14)
+    coderay (1.1.0)
+    dep-selector-libgecode (1.0.0)
+    dep_selector (1.0.3)
+      dep-selector-libgecode (~> 1.0)
+      ffi (~> 1.9)
+    diff-lcs (1.2.5)
     erubis (2.7.0)
-    ffi (1.4.0)
-    highline (1.6.15)
-    i18n (0.6.1)
+    faraday (0.9.0)
+      multipart-post (>= 1.2, < 3)
+    fauxhai (2.1.2)
+      net-ssh
+      ohai
+    ffi (1.9.3)
+    hashie (2.1.1)
+    highline (1.6.21)
+    hitimes (1.2.1)
     ipaddress (0.8.0)
-    json (1.5.5)
-    log4r (1.1.10)
-    mime-types (1.21)
+    json (1.8.1)
+    method_source (0.8.2)
+    mime-types (1.25.1)
+    minitar (0.5.4)
     mixlib-authentication (1.3.0)
       mixlib-log
-    mixlib-cli (1.3.0)
-    mixlib-config (1.1.2)
-    mixlib-log (1.4.1)
-    mixlib-shellout (1.1.0)
-    net-scp (1.0.4)
-      net-ssh (>= 1.99.1)
-    net-ssh (2.2.2)
-    net-ssh-gateway (1.1.0)
-      net-ssh (>= 1.99.1)
-    net-ssh-multi (1.1)
-      net-ssh (>= 2.1.4)
-      net-ssh-gateway (>= 0.99.0)
-    ohai (6.16.0)
+    mixlib-cli (1.5.0)
+    mixlib-config (2.1.0)
+    mixlib-log (1.6.0)
+    mixlib-shellout (1.4.0)
+    multipart-post (2.0.0)
+    net-http-persistent (2.9.4)
+    net-ssh (2.8.0)
+    net-ssh-gateway (1.2.0)
+      net-ssh (>= 2.6.5)
+    net-ssh-multi (1.2.0)
+      net-ssh (>= 2.6.5)
+      net-ssh-gateway (>= 1.2.0)
+    nio4r (1.0.0)
+    octokit (3.1.0)
+      sawyer (~> 0.5.3)
+    ohai (7.0.2)
       ipaddress
+      mime-types (~> 1.16)
       mixlib-cli
-      mixlib-config
+      mixlib-config (~> 2.0)
       mixlib-log
-      mixlib-shellout
-      systemu
+      mixlib-shellout (~> 1.2)
+      systemu (~> 2.5.2)
       yajl-ruby
-    rake (10.0.3)
+    pry (0.9.12.6)
+      coderay (~> 1.0)
+      method_source (~> 0.8)
+      slop (~> 3.4)
+    rack (1.5.2)
     rest-client (1.6.7)
       mime-types (>= 1.16)
+    retryable (1.3.5)
+    ridley (3.1.0)
+      addressable
+      buff-config (~> 0.2)
+      buff-extensions (~> 0.3)
+      buff-ignore (~> 1.1)
+      buff-shell_out (~> 0.1)
+      celluloid (~> 0.16.0.pre)
+      celluloid-io (~> 0.16.0.pre)
+      erubis
+      faraday (~> 0.9.0)
+      hashie (>= 2.0.2)
+      json (>= 1.7.7)
+      mixlib-authentication (>= 1.3.0)
+      net-http-persistent (>= 2.8)
+      retryable
+      semverse (~> 1.1)
+      varia_model (~> 0.3)
+    rspec (2.14.1)
+      rspec-core (~> 2.14.0)
+      rspec-expectations (~> 2.14.0)
+      rspec-mocks (~> 2.14.0)
+    rspec-core (2.14.8)
+    rspec-expectations (2.14.5)
+      diff-lcs (>= 1.1.3, < 2.0)
+    rspec-mocks (2.14.6)
+    sawyer (0.5.4)
+      addressable (~> 2.3.5)
+      faraday (~> 0.8, < 0.10)
+    semverse (1.1.0)
+    slop (3.5.0)
+    solve (1.2.0)
+      dep_selector (~> 1.0)
+      semverse (~> 1.1)
     systemu (2.5.2)
-    vagrant (1.0.6)
-      archive-tar-minitar (= 0.5.2)
-      childprocess (~> 0.3.1)
-      erubis (~> 2.7.0)
-      i18n (~> 0.6.0)
-      json (~> 1.5.1)
-      log4r (~> 1.1.9)
-      net-scp (~> 1.0.4)
-      net-ssh (~> 2.2.2)
-    yajl-ruby (1.1.0)
+    thor (0.19.1)
+    timers (2.0.0)
+      hitimes
+    varia_model (0.3.2)
+      buff-extensions (~> 0.2)
+      hashie (>= 2.0.2)
+    yajl-ruby (1.2.0)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
-  chef
-  rake
-  vagrant (~> 1.0.5)
+  berkshelf
+  chefspec (~> 3.1)
diff --git a/LICENSE.md b/LICENSE.md
index 45d6ccc..1a7ea4c 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,15 +1,25 @@
 # License and Author
 
-Author:: Paul Welch <pwelch2004@gmail.com>
+Author:: Paul Welch <paul@pwelch.net>
+Copyright (c) 2013
 
-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
+MIT License
 
-    http://www.apache.org/licenses/LICENSE-2.0
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
 
-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.
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index 53afd64..4960f59 100644
--- a/README.md
+++ b/README.md
@@ -6,15 +6,11 @@ Installs [Janus](https://github.com/carlhuda/janus) from github using the bootst
 
 # REQUIREMENTS
 
-## Chef
-
-Tested on 10.16
-
 ## Platform
 
 The following platforms have been test with this cookbook:
 
-* ubuntu (10.04/10.10/11.04) 
+* ubuntu (10.04/12.04) 
 
 ## Attributes
 
@@ -22,21 +18,31 @@ The following platforms have been test with this cookbook:
 - `default['janus']['users']`    - list of users
 - `default['janus']['home_dir']` - home directory location
 
+## Development
+
+Development with VM requires [Vagrant](http://vagrantup.com) and [VirtualBox](https://www.virtualbox.org/).
+
+Current versions used in development:
+
+* Vagrant v1.5.3
+* Vagrant-Berkshelf Plugin v2.0.1
+* Vagrant-Omnibus v1.4.1 
+
+## Testing
+
+To run Spec tests:
+```bash
+bundle exec rpsec spec
+```
+
 ## Contributing
 
-1. Fork it
+1. Fork it from the [GitHub Repo](https://github.com/pwelch/chef-janus)
 2. Create your feature branch (`git checkout -b my-new-feature`)
 3. Commit your changes (`git commit -am 'Add some feature'`)
 4. Push to the branch (`git push origin my-new-feature`)
 5. Create new Pull Request
 
-## To Do
-
-* Ensure support on other platforms (MacOSX/RHEL).
-* Change recipe to install Janus as a Chef Definition or LWRP resource.
-* Change installation to skip installing ruby packages if Ruby already
-  installed.
-
 ## Contributors
 
 * **[@nclark](https://github.com/nclark)**     - Updated bootstrap link.
diff --git a/Rakefile b/Rakefile
deleted file mode 100644
index 5ad9ed3..0000000
--- a/Rakefile
+++ /dev/null
@@ -1,19 +0,0 @@
-SANDBOX_PATH = File.join(File.dirname(__FILE__), %w(tmp cookbooks cookbook ))
-
-namespace :test do
-  desc "Runs knife cookbook test"
-  task :knife do
-    Rake::Task['test:prepare_sandbox'].execute
-
-    sh "bundle exec knife cookbook test cookbook -c test/chef/knife.rb -o #{SANDBOX_PATH}/../"
-  end
-
-  desc "Creates a sandbox directory for testing"
-  task :prepare_sandbox do
-    files = %w{*.md *.rb attributes definitions libraries files providers recipes resources templates}
-
-    rm_rf SANDBOX_PATH
-    mkdir_p SANDBOX_PATH
-    cp_r Dir.glob("{#{files.join(',')}}"), SANDBOX_PATH
-  end
-end
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 0000000..6fbff2c
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,38 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+MEMORY = ENV['VAGRANT_MEMORY'] || '384'
+CORES  = ENV['VAGRANT_CORES']  || '1'
+
+Vagrant.configure("2") do |config|
+  config.vm.provider :virtualbox do |vb|
+    vb.customize ["modifyvm", :id, "--memory", MEMORY.to_i]
+    vb.customize ["modifyvm", :id, "--cpus", CORES.to_i]
+  end
+
+  config.vm.box     = "precise64"
+  config.vm.box_url = "http://files.vagrantup.com/precise64.box" 
+
+  config.vm.hostname = "janus-vagrant"
+
+  # Enabling the Berkshelf plugin.
+  # Use Berkshelf
+  config.berkshelf.enabled = true
+
+  # Update Chef Version
+  config.omnibus.chef_version = :latest
+
+  # Update apt-get
+  config.vm.provision :shell, :inline => "apt-get update"
+
+  # Provision with chef-solo
+  config.vm.provision :chef_solo do |chef|
+    chef.json = {
+      'janus' => {
+        'users' => ['vagrant']
+      }
+    }
+
+    chef.run_list = ["recipe[janus::default]"]
+  end
+end
diff --git a/metadata.rb b/metadata.rb
index ebf6ad8..1b98aa2 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -1,10 +1,10 @@
 name             "janus"
 maintainer       "Paul Welch"
-maintainer_email "pwelch2004@gmail.com"
-license          "Apache 2.0"
+maintainer_email "paul@pwelch.net"
+license          "MIT"
 description      "Installs Janus"
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version          "0.0.4"
+version          "1.0.0"
 
 %w{ubuntu debian}.each do |os|
   supports os
diff --git a/spec/default_spec.rb b/spec/default_spec.rb
new file mode 100755
index 0000000..c89419b
--- /dev/null
+++ b/spec/default_spec.rb
@@ -0,0 +1,31 @@
+require 'spec_helper'
+
+describe 'janus::default' do
+  let(:chef_run)          { ChefSpec::Runner.new }
+  let(:chef_run_converge) { chef_run.converge(described_recipe) }
+
+  %w{
+    ack-grep
+    curl
+    exuberant-ctags
+    git-core
+    rake
+    ruby-dev
+    ruby
+    vim
+    vim-nox
+  }.each do |pkg|
+    it "installs the #{pkg} package" do
+      expect(chef_run_converge).to install_package pkg
+    end
+  end
+
+  it "installs the rake gem" do
+    expect(chef_run_converge).to install_gem_package 'rake'
+  end
+
+  it "executes the Janus bootstrap script for the user" do
+    chef_run.node.set.janus.users = ['test']
+    expect(chef_run_converge).to run_execute("curl -Lo- http://bit.ly/janus-bootstrap | bash").with(user: "test")
+  end
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100755
index 0000000..dc9a02f
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,10 @@
+require 'chefspec'
+require 'chefspec/berkshelf'
+require 'fauxhai'
+
+RSpec.configure do |config|
+  config.filter_run :focus => true
+  config.run_all_when_everything_filtered = true
+  config.platform = 'ubuntu'
+  config.version = '12.04'
+end
diff --git a/test/Vagrantfile b/test/Vagrantfile
deleted file mode 100644
index 65fe923..0000000
--- a/test/Vagrantfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-Vagrant::Config.run do |config|
-  # Every Vagrant virtual environment requires a box to build off of.
-  config.vm.box = "lucid64"
-
-  # The url from where the 'config.vm.box' box will be fetched if it
-  # doesn't already exist on the user's system.
-  config.vm.box_url = "http://files.vagrantup.com/lucid64.box"
-
-  # Update apt-get package list on vagrant box
-  config.vm.provision :shell, :inline => "apt-get update -y"
-
-  # Enable provisioning with chef solo, specifying a cookbooks path, roles
-  # path, and data_bags path (all relative to this Vagrantfile), and adding
-  # some recipes and/or roles.
-   config.vm.provision :chef_solo do |chef|
-     chef.cookbooks_path = "../../"
-     chef.add_recipe "chef-janus"
-
-     # Specify custom JSON attributes:
-     chef.json = {
-       :janus => {
-         :users => [ "vagrant" ]
-       }
-     }
-   end
-end
diff --git a/test/chef/knife.rb b/test/chef/knife.rb
deleted file mode 100644
index cfcf549..0000000
--- a/test/chef/knife.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-current_dir = File.dirname(__FILE__)
-
-cache_type 'BasicFile'
-cache_options(:path => "#{current_dir}/../../tmp/checksums")
-
