diff options
author | Thom May <thom@may.lt> | 2016-01-12 20:47:14 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-01-12 20:47:14 +0000 |
commit | 922c1b31b94cf9019c94d135e95c8ada3003bcae (patch) | |
tree | 1a21816b9d0cdd10e7a1cdfa2b51e1a5ccaeed60 | |
parent | b9ee1e1850e3b79d8a81dbe74cdfe409f4728e9e (diff) | |
parent | dceb4661c1b11c0e0930301d7e7694a15d3a448f (diff) | |
download | ohai-922c1b31b94cf9019c94d135e95c8ada3003bcae.tar.gz |
Merge pull request #703 from chef/tm/chefstyle
Enable ChefStyle per RFC 64
-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 |