From b2ffbc3b04b1fd9bebd2c7a61519a2089a6b30f4 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 12:20:35 +1100 Subject: [PATCH 1/8] Left over from #77 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32a8e3f..8763e93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Fixed homepage URL in gemspec ([#77]) + [Unreleased]: https://github.com/envato/unwrappr/compare/v0.4.0...HEAD +[#77]: https://github.com/envato/unwrappr/pull/77 ## [0.4.0] 2020-04-14 ### Changed From 02b75bbe3718f645a61b5ec1f838444d3ff02fa2 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 13:55:15 +1100 Subject: [PATCH 2/8] CI/Test with GitHub Actions --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .travis.yml | 8 -------- CHANGELOG.md | 2 ++ README.md | 2 +- 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..20a1bc3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + strategy: + fail-fast: false + matrix: + ruby: [2.5, 2.6, 2.7] + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 791492b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -sudo: false -language: ruby -rvm: - - 2.5.8 - - 2.6.6 - - 2.7.1 -before_install: - - gem update --system diff --git a/CHANGELOG.md b/CHANGELOG.md index 8763e93..2c03fdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed +- Moved CI to GitHub Actions ([#78]) - Fixed homepage URL in gemspec ([#77]) [Unreleased]: https://github.com/envato/unwrappr/compare/v0.4.0...HEAD [#77]: https://github.com/envato/unwrappr/pull/77 +[#78]: https://github.com/envato/unwrappr/pull/78 ## [0.4.0] 2020-04-14 ### Changed diff --git a/README.md b/README.md index 65aafc2..03f115f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ to get regular dependency updates into production. - Vulnerability advisory information using [bundler-audit](https://github.com/rubysec/bundler-audit) - Links to the home page, source code and change log (where available) of each gem -## Development status [![Build Status](https://travis-ci.org/envato/unwrappr.svg?branch=master)](https://travis-ci.org/envato/unwrappr) +## Development status [![CI Status](https://github.com/envato/unwrappr/workflows/ci/badge.svg)](https://github.com/envato/unwrappr/actions) `unwrappr` is used in many projects around [Envato][envato] However, it is still undergoing development and features are likely to change From 7020ed8257519b0039fa44531783a98100b42a3f Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 14:03:53 +1100 Subject: [PATCH 3/8] Layout/EmptyLinesAroundAttributeAccessor --- lib/unwrappr/gem_change.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/unwrappr/gem_change.rb b/lib/unwrappr/gem_change.rb index 6c27635..9a51f24 100644 --- a/lib/unwrappr/gem_change.rb +++ b/lib/unwrappr/gem_change.rb @@ -18,6 +18,7 @@ def initialize( end attr_reader :name, :head_version, :base_version, :line_number + def_delegators :@lock_file_diff, :filename, :sha def added? From 8f4ffcdd645c6c64ce6ab9313de2c2e589ed1597 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 14:04:51 +1100 Subject: [PATCH 4/8] Style/GlobalStdStream --- lib/unwrappr/git_command_runner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unwrappr/git_command_runner.rb b/lib/unwrappr/git_command_runner.rb index b662f5d..79ec566 100644 --- a/lib/unwrappr/git_command_runner.rb +++ b/lib/unwrappr/git_command_runner.rb @@ -80,7 +80,7 @@ def git def log_options {}.tap do |opt| - opt[:log] = Logger.new(STDOUT) if ENV['DEBUG'] + opt[:log] = Logger.new($stdout) if ENV['DEBUG'] end end From 2d93913bfa8208157d65f80ca82c9a0d599f6118 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 14:06:10 +1100 Subject: [PATCH 5/8] Style/RedundantRegexpEscape & Style/RedundantRegexpCharacterClass --- lib/unwrappr/lock_file_diff.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unwrappr/lock_file_diff.rb b/lib/unwrappr/lock_file_diff.rb index 3d6aa3f..6a75f24 100644 --- a/lib/unwrappr/lock_file_diff.rb +++ b/lib/unwrappr/lock_file_diff.rb @@ -63,7 +63,7 @@ def extract_gem_and_change_type(line) # '+ websocket-driver (0.6.5)' # Careful not to match this (note the wider indent): # '+ websocket-extensions (>= 0.1.0)' - pattern = /^(?[\+\-]) (?[\S]+) \(\d/ + pattern = /^(?[+\-]) (?\S+) \(\d/ match = pattern.match(line) return match[:gem_name], match[:change_type] unless match.nil? end From 09c88ce16707f9aefc18121938cf4b5e93aac123 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 14:07:26 +1100 Subject: [PATCH 6/8] Lint/ConstantDefinitionInBlock --- spec/lib/unwrappr/ruby_gems_spec.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spec/lib/unwrappr/ruby_gems_spec.rb b/spec/lib/unwrappr/ruby_gems_spec.rb index ddc9ef1..58265c1 100644 --- a/spec/lib/unwrappr/ruby_gems_spec.rb +++ b/spec/lib/unwrappr/ruby_gems_spec.rb @@ -41,14 +41,12 @@ module Unwrappr end context 'runtime error' do - class UnknownError < StandardError; end - before do - allow(Faraday).to receive(:get).and_raise(UnknownError) + allow(Faraday).to receive(:get).and_raise(StandardError) end - it 'returns nil' do - expect { subject }.to raise_error(instance_of(UnknownError)) + it 'is re-raised' do + expect { subject }.to raise_error(instance_of(StandardError)) end end end From 7ce9b6c439e2f0d2b542c3e949d61bb1aef96195 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 14:08:58 +1100 Subject: [PATCH 7/8] Enable new rules to quieten output --- .rubocop.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index d6ab369..8fead32 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,9 @@ --- AllCops: - TargetRubyVersion: 2.5 Exclude: - 'spike/*.rb' + NewCops: enable + TargetRubyVersion: 2.5 Gemspec/RequiredRubyVersion: Enabled: false From f44ff19291ce1e44ffd9d0d25fe1d6afa8512c09 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Thu, 17 Dec 2020 14:13:29 +1100 Subject: [PATCH 8/8] Update CI Badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03f115f..64ac0ef 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ to get regular dependency updates into production. - Vulnerability advisory information using [bundler-audit](https://github.com/rubysec/bundler-audit) - Links to the home page, source code and change log (where available) of each gem -## Development status [![CI Status](https://github.com/envato/unwrappr/workflows/ci/badge.svg)](https://github.com/envato/unwrappr/actions) +## Development status [![CI Status](https://github.com/envato/unwrappr/workflows/CI/badge.svg)](https://github.com/envato/unwrappr/actions?query=workflow%3ACI) `unwrappr` is used in many projects around [Envato][envato] However, it is still undergoing development and features are likely to change