diff options
author | Thom May <thom@chef.io> | 2016-06-08 11:25:56 +0100 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-06-08 11:25:56 +0100 |
commit | 8cd4ab1ad2b48cf92b45cd980279f7d5b836892f (patch) | |
tree | b1226b3f5f56a05ed34bc7d55422be18106b3064 /Rakefile | |
parent | 2dffcfb7ce778efb60834c66aa1e0cd4ec500901 (diff) | |
download | mixlib-authentication-8cd4ab1ad2b48cf92b45cd980279f7d5b836892f.tar.gz |
Chefstyle and modernisev1.4.1
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 50 |
1 files changed, 11 insertions, 39 deletions
@@ -1,46 +1,18 @@ -require 'rubygems' -require 'rubygems/package_task' -require 'rubygems/specification' -require 'date' -require 'rspec/core/rake_task' +require "bundler/gem_tasks" +require "rspec/core/rake_task" -GEM = "mixlib-authentication" -GEM_VERSION = "1.2.1" -AUTHOR = "Opscode, Inc." -EMAIL = "info@opscode.com" -HOMEPAGE = "http://www.opscode.com" -SUMMARY = "Mixes in simple per-request authentication" +RSpec::Core::RakeTask.new(:spec) task :default => :spec -desc "Run specs" -RSpec::Core::RakeTask.new do |t| - t.pattern = 'spec/**/*_spec.rb' - t.rspec_opts = %w(--format documentation --color) -end - -gem_spec = eval(File.read("mixlib-authentication.gemspec")) - -Gem::PackageTask.new(gem_spec) do |pkg| - pkg.gem_spec = gem_spec -end - -desc "install the gem locally" -task :install => [:package] do - sh %{gem install pkg/#{GEM}-#{GEM_VERSION}} -end - -desc "create a gemspec file" -task :make_spec do - File.open("#{GEM}.gemspec", "w") do |file| - file.puts spec.to_ruby +begin + require "chefstyle" + require "rubocop/rake_task" + RuboCop::RakeTask.new(:style) do |task| + task.options += ["--display-cop-names", "--no-color"] end +rescue + puts "chefstyle/rubocop is not available." end -desc "remove build files" -task :clean do - sh %Q{ rm -f pkg/*.gem } -end - -desc "Run the spec and features" -task :test => [ :features, :spec ] +task :ci => [:style, :spec] |