summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-12 17:36:16 +0000
committerThom May <thom@may.lt>2016-01-12 17:37:01 +0000
commitdceb4661c1b11c0e0930301d7e7694a15d3a448f (patch)
tree1a21816b9d0cdd10e7a1cdfa2b51e1a5ccaeed60
parentb9ee1e1850e3b79d8a81dbe74cdfe409f4728e9e (diff)
downloadohai-tm/chefstyle.tar.gz
Enable ChefStyle per RFC 64tm/chefstyle
-rw-r--r--.rubocop.yml6
-rw-r--r--.travis.yml1
-rw-r--r--Gemfile1
-rw-r--r--Rakefile6
-rw-r--r--spec/unit/plugins/darwin/system_profiler_output.rb1
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
diff --git a/Gemfile b/Gemfile
index 20ed5cd2..d2b8c2a8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -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
diff --git a/Rakefile b/Rakefile
index a2ee35b6..6be0c8eb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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