summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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