From 4b0fe70070a1d48dc67c1e1078ef32a872e51cc5 Mon Sep 17 00:00:00 2001 From: Jeff Cousens Date: Thu, 8 Mar 2018 16:14:20 -0600 Subject: [PATCH] Maintenance - Decreased RuboCop's `TargetRubyVersion` to 2.1 - Bumped `.ruby-version` to 2.5.0 - Bumped the Travis matrix to 2.2.9, 2.3.6, 2.4.3, and 2.5.0 (new) - Bumped Pry to 0.11 - Bumped Rake to 12 - Bumped VCR to 4 - Removed the Gemnasium badge - Assorted RuboCop fixes --- .rubocop.yml | 2 +- .ruby-version | 2 +- .travis.yml | 7 ++++--- CHANGELOG.md | 13 +++++++++++++ README.md | 1 - spec/spec_helper.rb | 2 +- spec/swagger/diff/rspec_matchers_spec.rb | 4 ++-- spec/swagger/diff/specification_spec.rb | 4 ++-- swagger-diff.gemspec | 10 ++++------ 9 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5fef517..edf39c8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.1 Layout/IndentHeredoc: Enabled: false diff --git a/.ruby-version b/.ruby-version index 005119b..437459c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.4.1 +2.5.0 diff --git a/.travis.yml b/.travis.yml index aea2825..8151ccd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,10 @@ cache: bundler rvm: - 2.0 - 2.1.10 - - 2.2.7 - - 2.3.4 - - 2.4.1 + - 2.2.9 + - 2.3.6 + - 2.4.3 + - 2.5.0 before_install: - gem update --system - rvm @global do gem install bundler diff --git a/CHANGELOG.md b/CHANGELOG.md index e340389..a133f61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Added + +* Added 2.5.0 to the Travis matrix + +### Changed + +* Bumped the Ruby version for development to 2.5.0 +* Bumped the Travis matrix to 2.2.9, 2.3.6, and 2.4.3 +* Bumped the Pry version for development to 0.11 +* Bumped the Rake version for development to 12 +* Bumped the VCR version for development to 4 +* RuboCop fixes + ## [1.1.2] - 2017-09-13 ### Fixed diff --git a/README.md b/README.md index d5cf256..ee6b713 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Build Status](https://travis-ci.org/civisanalytics/swagger-diff.svg?branch=master)](https://travis-ci.org/civisanalytics/swagger-diff) [![Gem Version](https://badge.fury.io/rb/swagger-diff.svg)](http://badge.fury.io/rb/swagger-diff) -[![Dependency Status](https://gemnasium.com/civisanalytics/swagger-diff.svg)](https://gemnasium.com/civisanalytics/swagger-diff) ![Swagger::Diff in action](swagger-diff.gif) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index bb03182..4f60e07 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,4 @@ -$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +$LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'swagger/diff' require 'pry' require 'vcr' diff --git a/spec/swagger/diff/rspec_matchers_spec.rb b/spec/swagger/diff/rspec_matchers_spec.rb index 0625565..3d63c55 100644 --- a/spec/swagger/diff/rspec_matchers_spec.rb +++ b/spec/swagger/diff/rspec_matchers_spec.rb @@ -13,7 +13,7 @@ end it 'should raise Exception with details when incompatible' do - msg = <<-EOM + msg = <<-MESSAGE expected Swagger to be compatible with 'spec/fixtures/dummy.v1.json', found: - missing endpoints - post /b/ @@ -44,7 +44,7 @@ - missing attribute from 200 response: description (in: body, type: string) - put /b/{} - missing attribute from 200 response: description (in: body, type: string) - EOM + MESSAGE expect do expect('spec/fixtures/dummy.v2.json') .to be_compatible_with('spec/fixtures/dummy.v1.json') diff --git a/spec/swagger/diff/specification_spec.rb b/spec/swagger/diff/specification_spec.rb index 6fe2e93..69143f6 100644 --- a/spec/swagger/diff/specification_spec.rb +++ b/spec/swagger/diff/specification_spec.rb @@ -220,11 +220,11 @@ it 'generates a warning' do expect { spec } - .to output(<<-EOW + .to output(<<-WARNING {"swagger"=>"2.0", "info"=>{"title"=>"Swagger Fixture", "version"=>"1.0"}, ... is not a valid Swagger specification: The property '#/paths//a//get' did not contain a required property of 'responses' in schema http://swagger.io/v2/schema.json# - EOW + WARNING ).to_stderr end end diff --git a/swagger-diff.gemspec b/swagger-diff.gemspec index 5dfc9be..853aad5 100644 --- a/swagger-diff.gemspec +++ b/swagger-diff.gemspec @@ -1,6 +1,4 @@ -# coding: utf-8 - -lib = File.expand_path('../lib', __FILE__) +lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'swagger/diff/version' @@ -32,10 +30,10 @@ Gem::Specification.new do |spec| spec.add_dependency 'json-schema', '~> 2.6' spec.add_dependency 'rspec-expectations', '~> 3.3' spec.add_development_dependency 'bundler', '~> 1.9' - spec.add_development_dependency 'rake', '~> 11.1' + spec.add_development_dependency 'pry', '~> 0.11.3' + spec.add_development_dependency 'rake', '~> 12.3' spec.add_development_dependency 'rspec', '~> 3.3' - spec.add_development_dependency 'pry', '~> 0.10.1' spec.add_development_dependency 'rubocop', '~> 0.49.0' - spec.add_development_dependency 'vcr', '~> 3.0' + spec.add_development_dependency 'vcr', '~> 4.0' spec.add_development_dependency 'webmock', '~> 3.0' end