diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 1bfa996..3ea0854 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -3,7 +3,7 @@ name: Rubocop on: pull_request: branches: - - '*' + - "*" push: branches: - master @@ -13,14 +13,14 @@ jobs: name: Ruocop Action runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - name: Bundle - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - - name: Run Rubocop - run: bin/rubocop + - uses: actions/checkout@master + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Bundle + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + - name: Run Rubocop + run: rubocop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7fd73c9..659108b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: pull_request: branches: - - '*' + - "*" push: branches: - master @@ -13,14 +13,14 @@ jobs: name: Rspec Test Action runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - name: Bundle - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - - name: Run Rspec - run: bin/rspec + - uses: actions/checkout@master + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Bundle + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + - name: Run Rspec + run: rspec diff --git a/Gemfile b/Gemfile index 0e6ca2e..4e706eb 100644 --- a/Gemfile +++ b/Gemfile @@ -3,12 +3,12 @@ source 'https://rubygems.org' group :development do - gem 'rubocop', '~> 0.76.0' + gem 'brakeman' + gem 'rubocop' end group :test do - gem 'json', '~> 2.2' - gem 'pry', '~> 0.12.2' - gem 'rspec', '~> 3.9.0' - gem 'webmock', '~> 3.7', '>= 3.7.6' + gem 'pry' + gem 'rspec' + gem 'webmock' end diff --git a/Gemfile.lock b/Gemfile.lock index 63b65b0..9fdc123 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,13 +4,13 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.0) + brakeman (4.7.1) coderay (1.1.2) crack (0.4.3) safe_yaml (~> 1.0.0) diff-lcs (1.3) hashdiff (1.0.0) - jaro_winkler (1.5.3) - json (2.2.0) + jaro_winkler (1.5.4) method_source (0.9.2) parallel (1.18.0) parser (2.6.5.0) @@ -52,11 +52,11 @@ PLATFORMS ruby DEPENDENCIES - json (~> 2.2) - pry (~> 0.12.2) - rspec (~> 3.9.0) - rubocop (~> 0.76.0) - webmock (~> 3.7, >= 3.7.6) + brakeman + pry + rspec + rubocop + webmock BUNDLED WITH - 2.0.2 + 1.17.3 diff --git a/bin/rspec b/bin/rspec deleted file mode 100755 index 58d85dd..0000000 --- a/bin/rspec +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'rspec' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path('bundle', __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rspec-core', 'rspec') diff --git a/bin/rubocop b/bin/rubocop deleted file mode 100755 index 66a026a..0000000 --- a/bin/rubocop +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'rubocop' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path('bundle', __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rubocop', 'rubocop') diff --git a/spec/github_check_run_service_spec.rb b/spec/github_check_run_service_spec.rb index 300de70..7fb5dac 100644 --- a/spec/github_check_run_service_spec.rb +++ b/spec/github_check_run_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require './spec/spec_helper' describe GithubCheckRunService do @@ -15,5 +17,4 @@ describe GithubCheckRunService do output = service.run expect(output).to be_a(Hash) end - end diff --git a/spec/report_adapter_spec.rb b/spec/report_adapter_spec.rb index 5efe47d..42bf2ed 100644 --- a/spec/report_adapter_spec.rb +++ b/spec/report_adapter_spec.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require './spec/spec_helper' describe ReportAdapter do - let(:brakeman_report) { + let(:brakeman_report) do JSON(File.read('./spec/fixtures/input.json')) - } + end let(:adapter) { ReportAdapter } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 79d7889..d37a172 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'webmock/rspec' require 'json' require 'pry'