summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--Rakefile20
2 files changed, 15 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 4d116b7..a0ad733 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,9 +11,11 @@ before_install:
- bundle --version
- gem --version
rvm:
- - 2.1
- - 2.2
+ - 2.1.10
+ - 2.2.5
+ - 2.3.1
script:
- bundle exec chefstyle
- bundle exec rake spec
+ - bundle exec rake features
diff --git a/Rakefile b/Rakefile
index 99d9307..57cd178 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,16 +1,8 @@
-require "rake"
-require "rubygems/package_task"
+require "bundler/gem_tasks"
require "rdoc/task"
-require "yaml"
require "rspec/core/rake_task"
require "cucumber/rake/task"
-gemspec = eval(IO.read("mixlib-log.gemspec"))
-
-Gem::PackageTask.new(gemspec) do |pkg|
- pkg.gem_spec = gemspec
-end
-
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end
@@ -30,3 +22,13 @@ end
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format pretty"
end
+
+begin
+ require "chefstyle"
+ require "rubocop/rake_task"
+ RuboCop::RakeTask.new(:style) do |task|
+ task.options += ["--display-cop-names", "--no-color"]
+ end
+rescue LoadError
+ puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
+end