From 0efbeda146548f6c516af0a8a3ad41e9f7e3b593 Mon Sep 17 00:00:00 2001 From: Tom Bates Date: Mon, 22 Apr 2024 15:54:51 +0100 Subject: [PATCH] Added rubocop --- .github/workflows/pull_request.yaml | 9 ++++++--- Fastlane/Configuration.rb | 3 ++- Fastlane/Fastfile | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index dec8c09d..9750999f 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -24,12 +24,15 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 + - name: Install Gems + run: bundle install + + - name: Rubocop + run: bundle exec rubocop + - name: Unit tests env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} LC_ALL: "en_US.UTF-8" LANG: "en_US.UTF-8" run: | - bundle install - bundle exec fastlane unit diff --git a/Fastlane/Configuration.rb b/Fastlane/Configuration.rb index f178bddd..1a8e90c2 100644 --- a/Fastlane/Configuration.rb +++ b/Fastlane/Configuration.rb @@ -2,6 +2,7 @@ require 'yaml' +# Conficuration class to interface with .build.yml class Configuration def initialize(lane_name, yaml) @lane_name = lane_name @@ -37,6 +38,6 @@ def setting(prefix, key) end def lane - @lane || lane_name.split(' ').last + @lane ||= lane_name.split(' ').last end end diff --git a/Fastlane/Fastfile b/Fastlane/Fastfile index a1b076e4..42dc0876 100644 --- a/Fastlane/Fastfile +++ b/Fastlane/Fastfile @@ -1,9 +1,10 @@ # frozen_string_literal: true -require_relative 'Configuration' +require_relative 'configuration' default_platform :ios +# rubocop:disable Metrics/BlockLength platform :ios do desc 'Runs all the tests' lane :unit do @@ -53,3 +54,4 @@ def configuration '.build.yml' ) end +# rubocop:enable Metrics/BlockLength