Rakefile in jenkins_pipeline_builder-0.4.2 vs Rakefile in jenkins_pipeline_builder-0.5.0

- old
+ new

@@ -1,7 +1,7 @@ # -# Copyright (c) 2014 Igor Moochnick +# Copyright (c) 2014 Constant Contact # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -18,19 +18,21 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # -#!/usr/bin/env rake require 'rspec/core/rake_task' require 'yard' +require 'rubocop/rake_task' -RSpec::Core::RakeTask.new(:spec, :tag) do |t, task_args| - t.pattern = ".spec/**/*_spec.rb" - t.verbose = true - t.fail_on_error = false - t.rspec_opts = spec_output 'spec.xml' +RuboCop::RakeTask.new + +RSpec::Core::RakeTask.new(:spec, :tag) do |spec| + spec.pattern = '.spec/**/*_spec.rb' + spec.verbose = true + spec.fail_on_error = false + spec.rspec_opts = spec_output 'spec.xml' end def spec_output(filename) "--color --format documentation --format RspecJunitFormatter --out out/#{filename}" end @@ -56,15 +58,15 @@ end namespace :doc do # This task requires that graphviz is installed locally. For more info: # http://www.graphviz.org/ - desc "Generates the class diagram using the yard generated dot file" + desc 'Generates the class diagram using the yard generated dot file' task :generate_class_diagram do - puts "Generating the dot file..." + puts 'Generating the dot file...' `yard graph --file jenkins_api_client.dot` - puts "Generating class diagram from the dot file..." + puts 'Generating class diagram from the dot file...' `dot jenkins_api_client.dot -Tpng -o jenkins_api_client_class_diagram.png` end end -task default: :unit_tests +task default: [:unit_tests, :rubocop]