Rakefile in forj-1.0.3 vs Rakefile in forj-1.0.4

- old
+ new

@@ -13,19 +13,27 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -require 'rubygems' -require 'bundler/setup' +require 'bundler/gem_tasks' require 'rspec/core/rake_task' +require 'rubocop/rake_task' $stdout.sync = true $stderr.sync = true Bundler::GemHelper.install_tasks -task :default => [:spec] +task :default => [:lint, :spec] desc 'Run the specs.' RSpec::Core::RakeTask.new do |t| t.pattern = 'spec/*_spec.rb' + t.rspec_opts = '-f doc' +end + +desc 'Run RuboCop on the project' +RuboCop::RakeTask.new(:lint) do |task| + task.formatters = ['progress'] + task.verbose = true + task.fail_on_error = true end