diff options
-rw-r--r-- | .rubocop.yml | 6 | ||||
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | Rakefile | 6 | ||||
-rw-r--r-- | spec/unit/plugins/darwin/system_profiler_output.rb | 1 |
5 files changed, 14 insertions, 1 deletions
diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..bb40a25f --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,6 @@ +AllCops: + Exclude: + - "spec/data/**/*" + - "vendor/**/*" + - "pkg/**/*" + - "spec/unit/plugins/darwin/system_profiler_output.rb" diff --git a/.travis.yml b/.travis.yml index cb194cd9..4788d07b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,5 +16,6 @@ rvm: - 2.2 script: + - bundle exec chefstyle - bundle exec rake spec - bundle exec ohai @@ -8,6 +8,7 @@ group :development do gem "sigar", :platform => "ruby" gem 'plist' + gem "chefstyle", "= 0.1.0" # gem 'pry-byebug' # gem 'pry-stack_explorer' end @@ -16,3 +16,9 @@ rescue LoadError end task :default => :spec + +require "chefstyle" +require "rubocop/rake_task" +RuboCop::RakeTask.new(:style) do |task| + task.options += ["--display-cop-names", "--no-color"] +end diff --git a/spec/unit/plugins/darwin/system_profiler_output.rb b/spec/unit/plugins/darwin/system_profiler_output.rb index ffacfde2..e18d3f57 100644 --- a/spec/unit/plugins/darwin/system_profiler_output.rb +++ b/spec/unit/plugins/darwin/system_profiler_output.rb @@ -1,4 +1,3 @@ -# encoding: utf-8 module SystemProfilerOutput Mini = <<end_output |