summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-04-24 22:52:43 -0700
committerJohn Keiser <john@johnkeiser.com>2015-05-13 13:42:33 -0700
commitf605a8676c01e0b9b793a7645b814fe177fbd45e (patch)
tree723baca9d97dc2fb129d9994099f192706a4d7a2
parenta379de8207f33938abac36cf415e0d593aa24d59 (diff)
downloadchef-f605a8676c01e0b9b793a7645b814fe177fbd45e.tar.gz
Add specs for many external dependent projects
-rw-r--r--.gitignore1
-rw-r--r--Rakefile3
-rw-r--r--chef.gemspec3
-rw-r--r--external_tests/chef-rewind.gemfile5
-rw-r--r--external_tests/chef-sugar.gemfile6
-rw-r--r--external_tests/chefspec.gemfile7
-rw-r--r--external_tests/foodcritic.gemfile8
-rw-r--r--external_tests/halite.gemfile8
-rw-r--r--external_tests/poise.gemfile7
-rw-r--r--tasks/external_tests.rb29
10 files changed, 74 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index ecba9f4030..6588499305 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@ pkg
*~
# you should check in your Gemfile.lock in applications, and not in gems
+external_tests/*.lock
Gemfile.lock
Gemfile.local
diff --git a/Rakefile b/Rakefile
index e9e345dbf8..d07ee0c247 100644
--- a/Rakefile
+++ b/Rakefile
@@ -22,7 +22,8 @@ require File.dirname(__FILE__) + '/lib/chef/version'
require 'rubygems'
require 'rubygems/package_task'
require 'rdoc/task'
-require './tasks/rspec.rb'
+require_relative 'tasks/rspec'
+require_relative 'tasks/external_tests'
GEM_NAME = "chef"
diff --git a/chef.gemspec b/chef.gemspec
index 2f8fabcec8..a02548c1da 100644
--- a/chef.gemspec
+++ b/chef.gemspec
@@ -46,8 +46,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rack"
s.add_development_dependency "cheffish", "~> 1.1"
- # Rake 10.2 drops Ruby 1.8 support
- s.add_development_dependency "rake", "~> 10.1.0"
+ s.add_development_dependency "rake", "~> 10.1"
s.bindir = "bin"
s.executables = %w( chef-client chef-solo knife chef-shell chef-apply )
diff --git a/external_tests/chef-rewind.gemfile b/external_tests/chef-rewind.gemfile
new file mode 100644
index 0000000000..39f7d6e0e8
--- /dev/null
+++ b/external_tests/chef-rewind.gemfile
@@ -0,0 +1,5 @@
+source 'https://rubygems.org'
+
+gemspec(name: 'chef', path: "../")
+
+gem 'chef-rewind', github: 'thommay/chef-rewind'
diff --git a/external_tests/chef-sugar.gemfile b/external_tests/chef-sugar.gemfile
new file mode 100644
index 0000000000..31ef3bb5b8
--- /dev/null
+++ b/external_tests/chef-sugar.gemfile
@@ -0,0 +1,6 @@
+source 'https://rubygems.org'
+
+gemspec(name: 'chef', path: "../")
+
+gem 'chef-sugar', github: 'sethvargo/chef-sugar'
+gem 'chefspec'
diff --git a/external_tests/chefspec.gemfile b/external_tests/chefspec.gemfile
new file mode 100644
index 0000000000..fb7878afbd
--- /dev/null
+++ b/external_tests/chefspec.gemfile
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+
+gemspec(name: 'chef', path: "../")
+
+gem 'chefspec', github: 'sethvargo/chefspec', group: :development
+gem 'aruba'
+gem 'yard'
diff --git a/external_tests/foodcritic.gemfile b/external_tests/foodcritic.gemfile
new file mode 100644
index 0000000000..7d2261eff3
--- /dev/null
+++ b/external_tests/foodcritic.gemfile
@@ -0,0 +1,8 @@
+source 'https://rubygems.org'
+
+gemspec(name: 'chef', path: "../")
+
+gem 'foodcritic', github: 'acrmp/foodcritic'
+gem 'cucumber'
+gem 'rubocop'
+gem 'simplecov'
diff --git a/external_tests/halite.gemfile b/external_tests/halite.gemfile
new file mode 100644
index 0000000000..cd8cd05668
--- /dev/null
+++ b/external_tests/halite.gemfile
@@ -0,0 +1,8 @@
+source 'https://rubygems.org'
+
+gemspec(name: 'chef', path: "../")
+
+gem 'poise', github: 'poise/poise'
+gem 'halite', github: 'poise/halite'
+gem 'poise-boiler', github: 'poise/poise-boiler'
+gem 'rspec-command', github: 'coderanger/rspec-command'
diff --git a/external_tests/poise.gemfile b/external_tests/poise.gemfile
new file mode 100644
index 0000000000..7d274b7a29
--- /dev/null
+++ b/external_tests/poise.gemfile
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+
+gemspec(name: 'chef', path: "../")
+
+gem 'poise', github: 'poise/poise'
+gem 'halite', github: 'poise/halite'
+gem 'poise-boiler', github: 'poise/poise-boiler'
diff --git a/tasks/external_tests.rb b/tasks/external_tests.rb
new file mode 100644
index 0000000000..2ff991ddf7
--- /dev/null
+++ b/tasks/external_tests.rb
@@ -0,0 +1,29 @@
+task :chef_sugar_spec do
+ gem_path = Bundler.environment.specs['chef-sugar'].first.full_gem_path
+ system("cd #{gem_path} && rake")
+end
+
+task :foodcritic_spec do
+ gem_path = Bundler.environment.specs['foodcritic'].first.full_gem_path
+ system("cd #{gem_path} && rake test")
+end
+
+task :chefspec_spec do
+ gem_path = Bundler.environment.specs['chefspec'].first.full_gem_path
+ system("cd #{gem_path} && rake")
+end
+
+task :chef_rewind_spec do
+ gem_path = Bundler.environment.specs['chef-rewind'].first.full_gem_path
+ system("cd #{gem_path} && rake spec")
+end
+
+task :poise_spec do
+ gem_path = Bundler.environment.specs['poise'].first.full_gem_path
+ system("cd #{gem_path} && rake spec")
+end
+
+task :halite_spec do
+ gem_path = Bundler.environment.specs['halite'].first.full_gem_path
+ system("cd #{gem_path} && rake spec")
+end