Skip to content

Commit

Permalink
test with updated ruby versions and run cucumber
Browse files Browse the repository at this point in the history
bonus Rakefile updates

Signed-off-by: Thom May <thom@may.lt>
  • Loading branch information
Thom May authored and thommay committed Aug 3, 2016
1 parent 812b0cd commit aaccbd5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Expand Up @@ -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
20 changes: 11 additions & 9 deletions 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
Expand All @@ -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

0 comments on commit aaccbd5

Please sign in to comment.