From cbc4e46275797f8440d36675f99be3d8527d99a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Pi=C3=B1era=20Buend=C3=ADa?= Date: Wed, 17 Mar 2021 16:19:06 +0100 Subject: [PATCH] Fourier improvements (#2676) * Move Fourier to projects * Add command to lint the Swift code * Add command to lint fourier's code * Add command to format Swift's code * Update git hook to run fourier * Add tests * Fix the fourier path * Add command to test Tuist --- .github/workflows/fourier.yml | 2 +- .github/workflows/meta-tuist.yml | 8 +-- .github/workflows/tuist.yml | 4 +- .shadowenv.d/fourier.lisp | 2 +- Gemfile | 6 +-- Rakefile | 47 ------------------ bin/fourier => fourier | 2 +- hooks/pre-commit | 4 +- .../cli.rb => projects/fourier/lib/fourier.rb | 15 ++++++ .../fourier/lib/fourier/commands/base.rb | 0 .../fourier/lib/fourier/commands/build.rb | 2 - .../lib/fourier/commands/build/tuist.rb | 0 .../fourier/lib/fourier/commands/edit.rb | 0 .../fourier/lib/fourier/commands/format.rb | 12 +++++ .../fourier/lib/fourier/commands/generate.rb | 0 .../fourier/lib/fourier/commands/github.rb | 0 projects/fourier/lib/fourier/commands/lint.rb | 25 ++++++++++ .../fourier/lib/fourier/commands/test.rb | 7 ++- .../lib/fourier/commands/test/tuist.rb | 0 .../fourier/lib/fourier/constants.rb | 1 + projects/fourier/lib/fourier/services/base.rb | 30 +++++++++++ .../lib/fourier/services/build/tuist/all.rb | 2 +- .../fourier/services/build/tuist/support.rb | 2 +- .../lib/fourier/services/edit/tuist.rb | 2 +- .../fourier/lib/fourier/services/focus.rb | 2 +- .../lib/fourier/services/format/tuist.rb | 24 +++++++++ .../lib/fourier/services/generate/tuist.rb | 2 +- .../services/github/cancel_workflows.rb | 0 .../lib/fourier/services/lint/fourier.rb | 24 +++++++++ .../lib/fourier/services/lint/tuist.rb | 22 ++++++++ .../lib/fourier/services/test/fourier.rb | 26 ++++++++++ .../fourier/services/test/tuist/acceptance.rb | 2 +- .../fourier/services/test/tuist/support.rb | 2 +- .../lib/fourier/services/test/tuist/unit.rb | 2 +- .../lib/fourier/utilities/github_client.rb | 0 .../fourier/lib/fourier/utilities/secrets.rb | 0 .../fourier/lib/fourier/utilities/system.rb | 0 .../fourier/services/build/tuist/all_test.rb | 0 .../services/build/tuist/support_test.rb | 0 .../test/fourier/services/edit/tuist_test.rb | 0 .../test/fourier/services/focus_test.rb | 0 .../fourier/services/format/tuist_test.rb | 32 ++++++++++++ .../fourier/services/generate/tuist_test.rb | 0 .../services/github/cancel_workflows_test.rb | 0 .../fourier/services/lint/fourier_test.rb | 36 ++++++++++++++ .../test/fourier/services/lint/tuist_test.rb | 32 ++++++++++++ .../services/test/tuist/acceptance_test.rb | 10 ++-- .../fourier/services/test/tuist/unit_test.rb | 0 .../fourier/utilities/github_client_test.rb | 2 +- .../fourier/test/test_helper.rb | 1 + {bin => projects/fourier/vendor}/swiftformat | Bin {bin => projects/fourier/vendor}/swiftlint | Bin script/code_style.sh | 19 ------- tools/fourier/lib/fourier.rb | 11 ---- tools/fourier/lib/fourier/commands.rb | 11 ---- tools/fourier/lib/fourier/services.rb | 12 ----- tools/fourier/lib/fourier/services/base.rb | 14 ------ tools/fourier/lib/fourier/services/build.rb | 8 --- .../lib/fourier/services/build/tuist.rb | 11 ---- tools/fourier/lib/fourier/services/edit.rb | 8 --- .../fourier/lib/fourier/services/generate.rb | 8 --- tools/fourier/lib/fourier/services/github.rb | 8 --- tools/fourier/lib/fourier/services/test.rb | 8 --- .../lib/fourier/services/test/tuist.rb | 12 ----- tools/fourier/lib/fourier/utilities.rb | 8 --- .../markdown/docs/contribution/fourier.mdx | 2 +- .../docs/contribution/testing-strategy.mdx | 4 +- 67 files changed, 317 insertions(+), 219 deletions(-) rename bin/fourier => fourier (84%) rename tools/fourier/lib/fourier/cli.rb => projects/fourier/lib/fourier.rb (66%) rename {tools => projects}/fourier/lib/fourier/commands/base.rb (100%) rename {tools => projects}/fourier/lib/fourier/commands/build.rb (78%) rename {tools => projects}/fourier/lib/fourier/commands/build/tuist.rb (100%) rename {tools => projects}/fourier/lib/fourier/commands/edit.rb (100%) create mode 100644 projects/fourier/lib/fourier/commands/format.rb rename {tools => projects}/fourier/lib/fourier/commands/generate.rb (100%) rename {tools => projects}/fourier/lib/fourier/commands/github.rb (100%) create mode 100644 projects/fourier/lib/fourier/commands/lint.rb rename {tools => projects}/fourier/lib/fourier/commands/test.rb (66%) rename {tools => projects}/fourier/lib/fourier/commands/test/tuist.rb (100%) rename {tools => projects}/fourier/lib/fourier/constants.rb (71%) create mode 100644 projects/fourier/lib/fourier/services/base.rb rename {tools => projects}/fourier/lib/fourier/services/build/tuist/all.rb (83%) rename {tools => projects}/fourier/lib/fourier/services/build/tuist/support.rb (84%) rename {tools => projects}/fourier/lib/fourier/services/edit/tuist.rb (83%) rename {tools => projects}/fourier/lib/fourier/services/focus.rb (85%) create mode 100644 projects/fourier/lib/fourier/services/format/tuist.rb rename {tools => projects}/fourier/lib/fourier/services/generate/tuist.rb (89%) rename {tools => projects}/fourier/lib/fourier/services/github/cancel_workflows.rb (100%) create mode 100644 projects/fourier/lib/fourier/services/lint/fourier.rb create mode 100644 projects/fourier/lib/fourier/services/lint/tuist.rb create mode 100644 projects/fourier/lib/fourier/services/test/fourier.rb rename {tools => projects}/fourier/lib/fourier/services/test/tuist/acceptance.rb (90%) rename {tools => projects}/fourier/lib/fourier/services/test/tuist/support.rb (84%) rename {tools => projects}/fourier/lib/fourier/services/test/tuist/unit.rb (83%) rename {tools => projects}/fourier/lib/fourier/utilities/github_client.rb (100%) rename {tools => projects}/fourier/lib/fourier/utilities/secrets.rb (100%) rename {tools => projects}/fourier/lib/fourier/utilities/system.rb (100%) rename {tools => projects}/fourier/test/fourier/services/build/tuist/all_test.rb (100%) rename {tools => projects}/fourier/test/fourier/services/build/tuist/support_test.rb (100%) rename {tools => projects}/fourier/test/fourier/services/edit/tuist_test.rb (100%) rename {tools => projects}/fourier/test/fourier/services/focus_test.rb (100%) create mode 100644 projects/fourier/test/fourier/services/format/tuist_test.rb rename {tools => projects}/fourier/test/fourier/services/generate/tuist_test.rb (100%) rename {tools => projects}/fourier/test/fourier/services/github/cancel_workflows_test.rb (100%) create mode 100644 projects/fourier/test/fourier/services/lint/fourier_test.rb create mode 100644 projects/fourier/test/fourier/services/lint/tuist_test.rb rename {tools => projects}/fourier/test/fourier/services/test/tuist/acceptance_test.rb (76%) rename {tools => projects}/fourier/test/fourier/services/test/tuist/unit_test.rb (100%) rename {tools => projects}/fourier/test/fourier/utilities/github_client_test.rb (92%) rename {tools => projects}/fourier/test/test_helper.rb (99%) rename {bin => projects/fourier/vendor}/swiftformat (100%) rename {bin => projects/fourier/vendor}/swiftlint (100%) delete mode 100755 script/code_style.sh delete mode 100644 tools/fourier/lib/fourier.rb delete mode 100644 tools/fourier/lib/fourier/commands.rb delete mode 100644 tools/fourier/lib/fourier/services.rb delete mode 100644 tools/fourier/lib/fourier/services/base.rb delete mode 100644 tools/fourier/lib/fourier/services/build.rb delete mode 100644 tools/fourier/lib/fourier/services/build/tuist.rb delete mode 100644 tools/fourier/lib/fourier/services/edit.rb delete mode 100644 tools/fourier/lib/fourier/services/generate.rb delete mode 100644 tools/fourier/lib/fourier/services/github.rb delete mode 100644 tools/fourier/lib/fourier/services/test.rb delete mode 100644 tools/fourier/lib/fourier/services/test/tuist.rb delete mode 100644 tools/fourier/lib/fourier/utilities.rb diff --git a/.github/workflows/fourier.yml b/.github/workflows/fourier.yml index 05f3ca054..375663874 100644 --- a/.github/workflows/fourier.yml +++ b/.github/workflows/fourier.yml @@ -34,7 +34,7 @@ jobs: bundle install --jobs 4 --retry 3 - name: Unit tests run: | - bundle exec rake test_fourier + ./fourier test fourier rubocop: name: Rubocop runs-on: ubuntu-latest diff --git a/.github/workflows/meta-tuist.yml b/.github/workflows/meta-tuist.yml index 2ad886f86..dd661061a 100644 --- a/.github/workflows/meta-tuist.yml +++ b/.github/workflows/meta-tuist.yml @@ -43,10 +43,10 @@ jobs: bundle install --jobs 4 --retry 3 - name: Generate Xcode project run: | - ./bin/fourier generate tuist + ./fourier generate tuist - name: Build run: | - ./bin/fourier build tuist all + ./fourier build tuist all test: name: Test with Xcode ${{ matrix.xcode }} runs-on: macos-latest @@ -72,7 +72,7 @@ jobs: bundle install --jobs 4 --retry 3 - name: Generate Xcode project run: | - ./bin/fourier generate tuist + ./fourier generate tuist - name: Test run: | - ./bin/fourier test tuist unit + ./fourier test tuist unit diff --git a/.github/workflows/tuist.yml b/.github/workflows/tuist.yml index 14c22b9cb..c87ede476 100644 --- a/.github/workflows/tuist.yml +++ b/.github/workflows/tuist.yml @@ -51,7 +51,7 @@ jobs: bundle install --jobs 4 --retry 3 - name: Run tests run: | - ./bin/fourier test tuist unit + ./fourier test tuist unit release_build: name: Release build with Xcode ${{ matrix.xcode }} runs-on: macOS-latest @@ -127,4 +127,4 @@ jobs: bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Run tests - run: ./bin/fourier test tuist acceptance features/${{ matrix.feature }}.feature + run: ./fourier test tuist acceptance features/${{ matrix.feature }}.feature diff --git a/.shadowenv.d/fourier.lisp b/.shadowenv.d/fourier.lisp index 71846c895..e629f062c 100644 --- a/.shadowenv.d/fourier.lisp +++ b/.shadowenv.d/fourier.lisp @@ -1 +1 @@ -(env/prepend-to-pathlist "PATH" (expand-path "./bin")) \ No newline at end of file +(env/prepend-to-pathlist "PATH" (expand-path ".")) \ No newline at end of file diff --git a/Gemfile b/Gemfile index ed8371406..a1b353c72 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,8 @@ gem "rubyzip", "~> 2.3.0" gem "ruby-macho", "~> 1.4" gem "cli-ui", "~> 1.4" gem "thor", "~> 1.1" +gem "octokit", "~> 4.20" +gem "zeitwerk", "~> 2.4" group :test do gem "mocha", "~> 1.12" @@ -31,7 +33,3 @@ end group :development, :test do gem "byebug", "~> 11.1" end - -gem "octokit", "~> 4.20" - -gem "zeitwerk", "~> 2.4" diff --git a/Rakefile b/Rakefile index 59667613e..97306de6a 100644 --- a/Rakefile +++ b/Rakefile @@ -19,16 +19,6 @@ require "json" require "zip" require "macho" -desc("Runs the Fourier tests") -Rake::TestTask.new do |t| - t.name = "test_fourier" - t.libs += [File.expand_path("./tools/fourier/test", __dir__)] - test_root = File.expand_path("./tools/fourier/test", __dir__) - t.test_files = FileList[File.join(test_root, "**", "*_test.rb")] - t.verbose = false - t.warning = false -end - desc("Updates swift-doc binary with the latest version available.") task :swift_doc_update do root_dir = File.expand_path(__dir__) @@ -113,31 +103,6 @@ task :xcbeautify_update do File.write(File.join(root_dir, "vendor/.xcbeautify.version"), XCBEAUTIFY_VERSION) end -desc("Formats the code style") -task :style_correct do - system(code_style_path) -end - -desc("Swift format check") -task :swift_format do - Kernel.system(swiftformat_path, "--lint", ".") || abort -end - -desc("Swift lint check") -task :swift_lint do - Kernel.system(swiftlint_path) || abort -end - -desc("Lints the Ruby code style") -task :style_ruby do - system("bundle", "exec", "rubocop") -end - -desc("Corrects the issues with the Ruby style") -task :style_ruby_correct do - system("bundle", "exec", "rubocop", "-a") -end - desc("Builds and archive a release version of tuist and tuistenv for local testing.") task :local_package do package @@ -233,18 +198,6 @@ task :benchmark do ) end -def swiftformat_path - File.expand_path("bin/swiftformat", __dir__) -end - -def swiftlint_path - File.expand_path("bin/swiftlint", __dir__) -end - -def code_style_path - File.expand_path("script/code_style.sh", __dir__) -end - def decrypt_secrets Encrypted::Environment.load_from_ejson("secrets.ejson", private_key: ENV["SECRET_KEY"]) end diff --git a/bin/fourier b/fourier similarity index 84% rename from bin/fourier rename to fourier index 0e57fac61..6af3eb3d0 100755 --- a/bin/fourier +++ b/fourier @@ -9,7 +9,7 @@ require "pathname" require "bundler/setup" # Load fourier's directory -fourier_directory = File.expand_path("../tools/fourier/lib", __dir__) +fourier_directory = File.expand_path("./projects/fourier/lib", __dir__) $LOAD_PATH.unshift(fourier_directory) unless $LOAD_PATH.include?(fourier_directory) # Load Fourier diff --git a/hooks/pre-commit b/hooks/pre-commit index 189a12144..8125248b8 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,3 +1,5 @@ #!/bin/bash -script/code_style.sh +./fourier lint tuist +./fourier lint fourier +./fourier format tuist diff --git a/tools/fourier/lib/fourier/cli.rb b/projects/fourier/lib/fourier.rb similarity index 66% rename from tools/fourier/lib/fourier/cli.rb rename to projects/fourier/lib/fourier.rb index ace5eb734..8fbc776cb 100644 --- a/tools/fourier/lib/fourier/cli.rb +++ b/projects/fourier/lib/fourier.rb @@ -1,6 +1,15 @@ # frozen_string_literal: true + +require "cli/ui" +require "zeitwerk" require "thor" +loader = Zeitwerk::Loader.new +loader.push_dir(__dir__) +loader.inflector.inflect("github_client" => "GitHubClient") +loader.inflector.inflect("github" => "GitHub") +loader.setup + module Fourier class CLI < Thor desc "test", "Run tests" @@ -18,6 +27,12 @@ module Fourier desc "edit", "Edit Tuist's project manifest in Xcode" subcommand "edit", Commands::Edit + desc "lint", "Lint the project's code" + subcommand "lint", Commands::Lint + + desc "format", "Format the project's code" + subcommand "format", Commands::Format + desc "focus TARGET", "Edit Tuist's project focusing on the target TARGET" def focus(target) Services::Focus.call(target: target) diff --git a/tools/fourier/lib/fourier/commands/base.rb b/projects/fourier/lib/fourier/commands/base.rb similarity index 100% rename from tools/fourier/lib/fourier/commands/base.rb rename to projects/fourier/lib/fourier/commands/base.rb diff --git a/tools/fourier/lib/fourier/commands/build.rb b/projects/fourier/lib/fourier/commands/build.rb similarity index 78% rename from tools/fourier/lib/fourier/commands/build.rb rename to projects/fourier/lib/fourier/commands/build.rb index f013deb3b..1904e7067 100644 --- a/tools/fourier/lib/fourier/commands/build.rb +++ b/projects/fourier/lib/fourier/commands/build.rb @@ -2,8 +2,6 @@ module Fourier module Commands class Build < Base - autoload :Tuist, "fourier/commands/build/tuist" - desc "tuist SUBCOMMAND ...ARGS", "Build Tuist" subcommand "tuist", Commands::Build::Tuist end diff --git a/tools/fourier/lib/fourier/commands/build/tuist.rb b/projects/fourier/lib/fourier/commands/build/tuist.rb similarity index 100% rename from tools/fourier/lib/fourier/commands/build/tuist.rb rename to projects/fourier/lib/fourier/commands/build/tuist.rb diff --git a/tools/fourier/lib/fourier/commands/edit.rb b/projects/fourier/lib/fourier/commands/edit.rb similarity index 100% rename from tools/fourier/lib/fourier/commands/edit.rb rename to projects/fourier/lib/fourier/commands/edit.rb diff --git a/projects/fourier/lib/fourier/commands/format.rb b/projects/fourier/lib/fourier/commands/format.rb new file mode 100644 index 000000000..326a0d333 --- /dev/null +++ b/projects/fourier/lib/fourier/commands/format.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +module Fourier + module Commands + class Format < Base + desc "tuist", "Format the source code of the Tuist CLI" + option :fix, desc: "When passed, it fixes the issues", type: :boolean, default: false + def tuist + Services::Format::Tuist.call(fix: options[:fix]) + end + end + end +end diff --git a/tools/fourier/lib/fourier/commands/generate.rb b/projects/fourier/lib/fourier/commands/generate.rb similarity index 100% rename from tools/fourier/lib/fourier/commands/generate.rb rename to projects/fourier/lib/fourier/commands/generate.rb diff --git a/tools/fourier/lib/fourier/commands/github.rb b/projects/fourier/lib/fourier/commands/github.rb similarity index 100% rename from tools/fourier/lib/fourier/commands/github.rb rename to projects/fourier/lib/fourier/commands/github.rb diff --git a/projects/fourier/lib/fourier/commands/lint.rb b/projects/fourier/lib/fourier/commands/lint.rb new file mode 100644 index 000000000..762dfeafe --- /dev/null +++ b/projects/fourier/lib/fourier/commands/lint.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +module Fourier + module Commands + class Lint < Base + desc "tuist", "Lint the source code of the Tuist CLI" + option :fix, desc: "When passed, it fixes the issues", type: :boolean, default: false + def tuist + Services::Lint::Tuist.call(fix: options[:fix]) + end + + desc "fourier", "Lint the source code of the Fourier CLI" + option :fix, desc: "When passed, it fixes the issues", type: :boolean, default: false + def fourier + Services::Lint::Fourier.call(fix: options[:fix]) + end + + desc "all", "Lint all the code in the repository" + option :fix, desc: "When passed, it fixes the issues", type: :boolean, default: false + def all + Services::Lint::Tuist.call(fix: options[:fix]) + Services::Lint::Fourier.call(fix: options[:fix]) + end + end + end +end diff --git a/tools/fourier/lib/fourier/commands/test.rb b/projects/fourier/lib/fourier/commands/test.rb similarity index 66% rename from tools/fourier/lib/fourier/commands/test.rb rename to projects/fourier/lib/fourier/commands/test.rb index 7b7505902..546a7ff82 100644 --- a/tools/fourier/lib/fourier/commands/test.rb +++ b/projects/fourier/lib/fourier/commands/test.rb @@ -2,10 +2,13 @@ module Fourier module Commands class Test < Base - autoload :Tuist, "fourier/commands/test/tuist" - desc "tuist SUBCOMMAND ...ARGS", "Run Tuist tests" subcommand "tuist", Commands::Test::Tuist + + desc "fourier", "Run Fourier tests" + def fourier + Services::Test::Fourier.call + end end end end diff --git a/tools/fourier/lib/fourier/commands/test/tuist.rb b/projects/fourier/lib/fourier/commands/test/tuist.rb similarity index 100% rename from tools/fourier/lib/fourier/commands/test/tuist.rb rename to projects/fourier/lib/fourier/commands/test/tuist.rb diff --git a/tools/fourier/lib/fourier/constants.rb b/projects/fourier/lib/fourier/constants.rb similarity index 71% rename from tools/fourier/lib/fourier/constants.rb rename to projects/fourier/lib/fourier/constants.rb index 2228dbe04..026b9fd5d 100644 --- a/tools/fourier/lib/fourier/constants.rb +++ b/projects/fourier/lib/fourier/constants.rb @@ -2,6 +2,7 @@ module Fourier module Constants ROOT_DIRECTORY = File.expand_path("../../../..", __dir__) + VENDOR_DIRECTORY = File.expand_path("../../vendor", __dir__) REPOSITORY = "tuist/tuist" end end diff --git a/projects/fourier/lib/fourier/services/base.rb b/projects/fourier/lib/fourier/services/base.rb new file mode 100644 index 000000000..49feea31c --- /dev/null +++ b/projects/fourier/lib/fourier/services/base.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +module Fourier + module Services + class Base + def self.call(*args, &block) + new(*args).call(&block) + end + + def call + raise NotImplementedError + end + + def root_directory + Fourier::Constants::ROOT_DIRECTORY + end + + def fourier_directory + File.join(Fourier::Constants::ROOT_DIRECTORY, "projects/fourier") + end + + def tuist_directory + File.join(Fourier::Constants::ROOT_DIRECTORY) + end + + def vendor_path(path) + File.join(Fourier::Constants::VENDOR_DIRECTORY, path) + end + end + end +end diff --git a/tools/fourier/lib/fourier/services/build/tuist/all.rb b/projects/fourier/lib/fourier/services/build/tuist/all.rb similarity index 83% rename from tools/fourier/lib/fourier/services/build/tuist/all.rb rename to projects/fourier/lib/fourier/services/build/tuist/all.rb index 60d7694e3..5901f5e89 100644 --- a/tools/fourier/lib/fourier/services/build/tuist/all.rb +++ b/projects/fourier/lib/fourier/services/build/tuist/all.rb @@ -5,7 +5,7 @@ module Fourier module Tuist class All < Base def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do Utilities::System.tuist("build") end end diff --git a/tools/fourier/lib/fourier/services/build/tuist/support.rb b/projects/fourier/lib/fourier/services/build/tuist/support.rb similarity index 84% rename from tools/fourier/lib/fourier/services/build/tuist/support.rb rename to projects/fourier/lib/fourier/services/build/tuist/support.rb index a57a5b970..200d53eb6 100644 --- a/tools/fourier/lib/fourier/services/build/tuist/support.rb +++ b/projects/fourier/lib/fourier/services/build/tuist/support.rb @@ -5,7 +5,7 @@ module Fourier module Tuist class Support < Base def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do Utilities::System.tuist("build", "TuistSupport") end end diff --git a/tools/fourier/lib/fourier/services/edit/tuist.rb b/projects/fourier/lib/fourier/services/edit/tuist.rb similarity index 83% rename from tools/fourier/lib/fourier/services/edit/tuist.rb rename to projects/fourier/lib/fourier/services/edit/tuist.rb index 5300ab70c..42525ff70 100644 --- a/tools/fourier/lib/fourier/services/edit/tuist.rb +++ b/projects/fourier/lib/fourier/services/edit/tuist.rb @@ -4,7 +4,7 @@ module Fourier module Edit class Tuist < Base def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do Utilities::System.tuist("edit", "--only-current-directory") end end diff --git a/tools/fourier/lib/fourier/services/focus.rb b/projects/fourier/lib/fourier/services/focus.rb similarity index 85% rename from tools/fourier/lib/fourier/services/focus.rb rename to projects/fourier/lib/fourier/services/focus.rb index f4f86c199..2d0627027 100644 --- a/tools/fourier/lib/fourier/services/focus.rb +++ b/projects/fourier/lib/fourier/services/focus.rb @@ -9,7 +9,7 @@ module Fourier end def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do Utilities::System.tuist("focus", target) end end diff --git a/projects/fourier/lib/fourier/services/format/tuist.rb b/projects/fourier/lib/fourier/services/format/tuist.rb new file mode 100644 index 000000000..aeb03aad0 --- /dev/null +++ b/projects/fourier/lib/fourier/services/format/tuist.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +module Fourier + module Services + module Format + class Tuist < Base + attr_reader :fix + + def initialize(fix:) + @fix = fix + end + + def call + Dir.chdir(tuist_directory) do + arguments = [vendor_path("swiftformat"), ".", "--quiet"] + unless fix + arguments << "--lint" + end + Fourier::Utilities::System.system(*arguments) + end + end + end + end + end +end diff --git a/tools/fourier/lib/fourier/services/generate/tuist.rb b/projects/fourier/lib/fourier/services/generate/tuist.rb similarity index 89% rename from tools/fourier/lib/fourier/services/generate/tuist.rb rename to projects/fourier/lib/fourier/services/generate/tuist.rb index e390558a3..85ccd6a81 100644 --- a/tools/fourier/lib/fourier/services/generate/tuist.rb +++ b/projects/fourier/lib/fourier/services/generate/tuist.rb @@ -10,7 +10,7 @@ module Fourier end def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do arguments = ["generate"] arguments << "--open" if open Utilities::System.tuist(*arguments) diff --git a/tools/fourier/lib/fourier/services/github/cancel_workflows.rb b/projects/fourier/lib/fourier/services/github/cancel_workflows.rb similarity index 100% rename from tools/fourier/lib/fourier/services/github/cancel_workflows.rb rename to projects/fourier/lib/fourier/services/github/cancel_workflows.rb diff --git a/projects/fourier/lib/fourier/services/lint/fourier.rb b/projects/fourier/lib/fourier/services/lint/fourier.rb new file mode 100644 index 000000000..755edfead --- /dev/null +++ b/projects/fourier/lib/fourier/services/lint/fourier.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +module Fourier + module Services + module Lint + class Fourier < Base + attr_reader :fix + + def initialize(fix:) + @fix = fix + end + + def call + Dir.chdir(fourier_directory) do + gem_path = Gem.loaded_specs["rubocop"].full_gem_path + executable_path = File.join(gem_path, "exe/rubocop") + arguments = [executable_path] + arguments << "-A" if fix + Utilities::System.system(*arguments) + end + end + end + end + end +end diff --git a/projects/fourier/lib/fourier/services/lint/tuist.rb b/projects/fourier/lib/fourier/services/lint/tuist.rb new file mode 100644 index 000000000..fbdc2e5c7 --- /dev/null +++ b/projects/fourier/lib/fourier/services/lint/tuist.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +module Fourier + module Services + module Lint + class Tuist < Base + attr_reader :fix + + def initialize(fix:) + @fix = fix + end + + def call + Dir.chdir(tuist_directory) do + arguments = [vendor_path("swiftlint"), "--quiet"] + arguments << "autocorrect" if fix + Utilities::System.system(*arguments) + end + end + end + end + end +end diff --git a/projects/fourier/lib/fourier/services/test/fourier.rb b/projects/fourier/lib/fourier/services/test/fourier.rb new file mode 100644 index 000000000..07dd05f0c --- /dev/null +++ b/projects/fourier/lib/fourier/services/test/fourier.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +require "rake/testtask" + +module Fourier + module Services + module Test + class Fourier < Base + def call + Dir.chdir(root_directory) do + lib_directory = File.expand_path("lib", fourier_directory) + test_directory = File.expand_path("test", fourier_directory) + test_paths = Dir.glob(File.join(fourier_directory, "test/**/*_test.rb")) + arguments = [ + "ruby", + "-I#{lib_directory}", + "-I#{test_directory}", + "-e \"ARGV.each {|f| require f}\"", + *test_paths, + ].join(" ") + Utilities::System.system(arguments) + end + end + end + end + end +end diff --git a/tools/fourier/lib/fourier/services/test/tuist/acceptance.rb b/projects/fourier/lib/fourier/services/test/tuist/acceptance.rb similarity index 90% rename from tools/fourier/lib/fourier/services/test/tuist/acceptance.rb rename to projects/fourier/lib/fourier/services/test/tuist/acceptance.rb index 0bdb135c4..012c43b17 100644 --- a/tools/fourier/lib/fourier/services/test/tuist/acceptance.rb +++ b/projects/fourier/lib/fourier/services/test/tuist/acceptance.rb @@ -18,7 +18,7 @@ module Fourier args = ["--format", "pretty"] args << if feature.nil? - File.join(Constants::ROOT_DIRECTORY, "features/") + File.join(tuist_directory, "features/") else feature end diff --git a/tools/fourier/lib/fourier/services/test/tuist/support.rb b/projects/fourier/lib/fourier/services/test/tuist/support.rb similarity index 84% rename from tools/fourier/lib/fourier/services/test/tuist/support.rb rename to projects/fourier/lib/fourier/services/test/tuist/support.rb index f62e3d83b..76d06aad0 100644 --- a/tools/fourier/lib/fourier/services/test/tuist/support.rb +++ b/projects/fourier/lib/fourier/services/test/tuist/support.rb @@ -5,7 +5,7 @@ module Fourier module Tuist class Support < Base def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do Utilities::System.tuist("test", "TuistSupport") end end diff --git a/tools/fourier/lib/fourier/services/test/tuist/unit.rb b/projects/fourier/lib/fourier/services/test/tuist/unit.rb similarity index 83% rename from tools/fourier/lib/fourier/services/test/tuist/unit.rb rename to projects/fourier/lib/fourier/services/test/tuist/unit.rb index 442550de1..3a6a40e38 100644 --- a/tools/fourier/lib/fourier/services/test/tuist/unit.rb +++ b/projects/fourier/lib/fourier/services/test/tuist/unit.rb @@ -5,7 +5,7 @@ module Fourier module Tuist class Unit < Base def call - Dir.chdir(Constants::ROOT_DIRECTORY) do + Dir.chdir(tuist_directory) do Utilities::System.tuist("test") end end diff --git a/tools/fourier/lib/fourier/utilities/github_client.rb b/projects/fourier/lib/fourier/utilities/github_client.rb similarity index 100% rename from tools/fourier/lib/fourier/utilities/github_client.rb rename to projects/fourier/lib/fourier/utilities/github_client.rb diff --git a/tools/fourier/lib/fourier/utilities/secrets.rb b/projects/fourier/lib/fourier/utilities/secrets.rb similarity index 100% rename from tools/fourier/lib/fourier/utilities/secrets.rb rename to projects/fourier/lib/fourier/utilities/secrets.rb diff --git a/tools/fourier/lib/fourier/utilities/system.rb b/projects/fourier/lib/fourier/utilities/system.rb similarity index 100% rename from tools/fourier/lib/fourier/utilities/system.rb rename to projects/fourier/lib/fourier/utilities/system.rb diff --git a/tools/fourier/test/fourier/services/build/tuist/all_test.rb b/projects/fourier/test/fourier/services/build/tuist/all_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/build/tuist/all_test.rb rename to projects/fourier/test/fourier/services/build/tuist/all_test.rb diff --git a/tools/fourier/test/fourier/services/build/tuist/support_test.rb b/projects/fourier/test/fourier/services/build/tuist/support_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/build/tuist/support_test.rb rename to projects/fourier/test/fourier/services/build/tuist/support_test.rb diff --git a/tools/fourier/test/fourier/services/edit/tuist_test.rb b/projects/fourier/test/fourier/services/edit/tuist_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/edit/tuist_test.rb rename to projects/fourier/test/fourier/services/edit/tuist_test.rb diff --git a/tools/fourier/test/fourier/services/focus_test.rb b/projects/fourier/test/fourier/services/focus_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/focus_test.rb rename to projects/fourier/test/fourier/services/focus_test.rb diff --git a/projects/fourier/test/fourier/services/format/tuist_test.rb b/projects/fourier/test/fourier/services/format/tuist_test.rb new file mode 100644 index 000000000..c56e28bc0 --- /dev/null +++ b/projects/fourier/test/fourier/services/format/tuist_test.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +require "test_helper" + +module Fourier + module Services + module Format + class TuistTest < TestCase + def test_calls_system_with_the_right_arguments + # Given + subject = Services::Format::Tuist.new(fix: false) + Utilities::System + .expects(:system) + .with(subject.vendor_path("swiftformat"), ".", "--quiet", "--lint") + + # When/Then + subject.call + end + + def test_calls_system_with_the_right_arguments_when_fix_is_true + # Given + subject = Services::Format::Tuist.new(fix: true) + Utilities::System + .expects(:system) + .with(subject.vendor_path("swiftformat"), ".", "--quiet") + + # When/Then + subject.call + end + end + end + end +end diff --git a/tools/fourier/test/fourier/services/generate/tuist_test.rb b/projects/fourier/test/fourier/services/generate/tuist_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/generate/tuist_test.rb rename to projects/fourier/test/fourier/services/generate/tuist_test.rb diff --git a/tools/fourier/test/fourier/services/github/cancel_workflows_test.rb b/projects/fourier/test/fourier/services/github/cancel_workflows_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/github/cancel_workflows_test.rb rename to projects/fourier/test/fourier/services/github/cancel_workflows_test.rb diff --git a/projects/fourier/test/fourier/services/lint/fourier_test.rb b/projects/fourier/test/fourier/services/lint/fourier_test.rb new file mode 100644 index 000000000..a286478c7 --- /dev/null +++ b/projects/fourier/test/fourier/services/lint/fourier_test.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +require "test_helper" + +module Fourier + module Services + module Lint + class FourierTest < TestCase + def test_calls_system_with_the_right_arguments + # Given + subject = Services::Lint::Fourier.new(fix: false) + gem_path = Gem.loaded_specs["rubocop"].full_gem_path + executable_path = File.join(gem_path, "exe/rubocop") + Utilities::System + .expects(:system) + .with(executable_path) + + # When/Then + subject.call + end + + def test_calls_system_with_the_right_arguments_when_fix_is_true + # Given + subject = Services::Lint::Fourier.new(fix: true) + gem_path = Gem.loaded_specs["rubocop"].full_gem_path + executable_path = File.join(gem_path, "exe/rubocop") + Utilities::System + .expects(:system) + .with(executable_path, "-A") + + # When/Then + subject.call + end + end + end + end +end diff --git a/projects/fourier/test/fourier/services/lint/tuist_test.rb b/projects/fourier/test/fourier/services/lint/tuist_test.rb new file mode 100644 index 000000000..595359faf --- /dev/null +++ b/projects/fourier/test/fourier/services/lint/tuist_test.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +require "test_helper" + +module Fourier + module Services + module Lint + class TuistTest < TestCase + def test_calls_system_with_the_right_arguments + # Given + subject = Services::Lint::Tuist.new(fix: false) + Utilities::System + .expects(:system) + .with(subject.vendor_path("swiftlint"), "--quiet") + + # When/Then + subject.call + end + + def test_calls_system_with_the_right_arguments_when_fix_is_true + # Given + subject = Services::Lint::Tuist.new(fix: true) + Utilities::System + .expects(:system) + .with(subject.vendor_path("swiftlint"), "--quiet", "autocorrect") + + # When/Then + subject.call + end + end + end + end +end diff --git a/tools/fourier/test/fourier/services/test/tuist/acceptance_test.rb b/projects/fourier/test/fourier/services/test/tuist/acceptance_test.rb similarity index 76% rename from tools/fourier/test/fourier/services/test/tuist/acceptance_test.rb rename to projects/fourier/test/fourier/services/test/tuist/acceptance_test.rb index fe5d8a99b..3334fff5a 100644 --- a/tools/fourier/test/fourier/services/test/tuist/acceptance_test.rb +++ b/projects/fourier/test/fourier/services/test/tuist/acceptance_test.rb @@ -20,25 +20,27 @@ module Fourier def test_call_when_no_feature_is_provided # Given + @subject = Acceptance.new(feature: nil) ::Cucumber::Cli::Main .expects(:execute) - .with(["--format", "pretty", File.join(Constants::ROOT_DIRECTORY, "features/")]) + .with(["--format", "pretty", File.join(@subject.tuist_directory, "features/")]) # Then - Acceptance.call(feature: nil) + @subject.call end def test_raises_when_cucumber_returns_unsuncessfully # Given cucumber_error = StandardError.new("cucumber error") + @subject = Acceptance.new(feature: nil) ::Cucumber::Cli::Main .expects(:execute) - .with(["--format", "pretty", File.join(Constants::ROOT_DIRECTORY, "features/")]) + .with(["--format", "pretty", File.join(@subject.tuist_directory, "features/")]) .returns(cucumber_error) # When error = assert_raises(Acceptance::Error) do - Acceptance.call(feature: nil) + @subject.call end # Then diff --git a/tools/fourier/test/fourier/services/test/tuist/unit_test.rb b/projects/fourier/test/fourier/services/test/tuist/unit_test.rb similarity index 100% rename from tools/fourier/test/fourier/services/test/tuist/unit_test.rb rename to projects/fourier/test/fourier/services/test/tuist/unit_test.rb diff --git a/tools/fourier/test/fourier/utilities/github_client_test.rb b/projects/fourier/test/fourier/utilities/github_client_test.rb similarity index 92% rename from tools/fourier/test/fourier/utilities/github_client_test.rb rename to projects/fourier/test/fourier/utilities/github_client_test.rb index 283a7bd98..1fbb12d94 100644 --- a/tools/fourier/test/fourier/utilities/github_client_test.rb +++ b/projects/fourier/test/fourier/utilities/github_client_test.rb @@ -28,7 +28,7 @@ module Fourier environment = {} # Then - assert_raises(Utilities::GitHubClient::TokenNotFound) do + assert_raises(Fourier::Utilities::GitHubClient::TokenNotFound) do Utilities::GitHubClient.new(environment: environment) end end diff --git a/tools/fourier/test/test_helper.rb b/projects/fourier/test/test_helper.rb similarity index 99% rename from tools/fourier/test/test_helper.rb rename to projects/fourier/test/test_helper.rb index d9c7db9a8..2ee659b00 100644 --- a/tools/fourier/test/test_helper.rb +++ b/projects/fourier/test/test_helper.rb @@ -20,6 +20,7 @@ reporter_options = { color: true } Minitest::Reporters.use!([Minitest::Reporters::DefaultReporter.new(reporter_options)]) require "mocha/minitest" + require "fourier" class TestCase < MiniTest::Test diff --git a/bin/swiftformat b/projects/fourier/vendor/swiftformat similarity index 100% rename from bin/swiftformat rename to projects/fourier/vendor/swiftformat diff --git a/bin/swiftlint b/projects/fourier/vendor/swiftlint similarity index 100% rename from bin/swiftlint rename to projects/fourier/vendor/swiftlint diff --git a/script/code_style.sh b/script/code_style.sh deleted file mode 100755 index 4309b94de..000000000 --- a/script/code_style.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -echo "Running SwiftFormat..." -bin/swiftformat . --quiet -if [ $? -ne 0 ] -then - echo "Swiftformat detected issues, please add changes and commit again" - exit 1 -else - echo "Running Swiftlint..."; - bin/swiftlint lint --quiet - if [ $? -ne 0 ] - then - bin/swiftlint autocorrect --quiet - echo "Swiftlint detected issues, please add changes and commit again" - else - echo "Code is formatted and linted correctly. Proceeding with commit..." - exit 0 - fi -fi diff --git a/tools/fourier/lib/fourier.rb b/tools/fourier/lib/fourier.rb deleted file mode 100644 index 7a76a6190..000000000 --- a/tools/fourier/lib/fourier.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -require "cli/ui" - -module Fourier - autoload :CLI, "fourier/cli" - autoload :Commands, "fourier/commands" - autoload :Utilities, "fourier/utilities" - autoload :Services, "fourier/services" - autoload :Constants, "fourier/constants" -end diff --git a/tools/fourier/lib/fourier/commands.rb b/tools/fourier/lib/fourier/commands.rb deleted file mode 100644 index 630f09dba..000000000 --- a/tools/fourier/lib/fourier/commands.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Commands - autoload :Base, "fourier/commands/base" - autoload :Test, "fourier/commands/test" - autoload :Build, "fourier/commands/build" - autoload :Generate, "fourier/commands/generate" - autoload :GitHub, "fourier/commands/github" - autoload :Edit, "fourier/commands/edit" - end -end diff --git a/tools/fourier/lib/fourier/services.rb b/tools/fourier/lib/fourier/services.rb deleted file mode 100644 index 00b37f75a..000000000 --- a/tools/fourier/lib/fourier/services.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - autoload :Base, "fourier/services/base" - autoload :Build, "fourier/services/build" - autoload :Test, "fourier/services/test" - autoload :GitHub, "fourier/services/github" - autoload :Generate, "fourier/services/generate" - autoload :Edit, "fourier/services/edit" - autoload :Focus, "fourier/services/focus" - end -end diff --git a/tools/fourier/lib/fourier/services/base.rb b/tools/fourier/lib/fourier/services/base.rb deleted file mode 100644 index 50fcebf12..000000000 --- a/tools/fourier/lib/fourier/services/base.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - class Base - def self.call(*args, &block) - new(*args).call(&block) - end - - def call - raise NotImplementedError - end - end - end -end diff --git a/tools/fourier/lib/fourier/services/build.rb b/tools/fourier/lib/fourier/services/build.rb deleted file mode 100644 index 4ddd6c943..000000000 --- a/tools/fourier/lib/fourier/services/build.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module Build - autoload :Tuist, "fourier/services/build/tuist" - end - end -end diff --git a/tools/fourier/lib/fourier/services/build/tuist.rb b/tools/fourier/lib/fourier/services/build/tuist.rb deleted file mode 100644 index 656314e3f..000000000 --- a/tools/fourier/lib/fourier/services/build/tuist.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module Build - module Tuist - autoload :All, "fourier/services/build/tuist/all" - autoload :Support, "fourier/services/build/tuist/support" - end - end - end -end diff --git a/tools/fourier/lib/fourier/services/edit.rb b/tools/fourier/lib/fourier/services/edit.rb deleted file mode 100644 index 25ab8bf86..000000000 --- a/tools/fourier/lib/fourier/services/edit.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module Edit - autoload :Tuist, "fourier/services/edit/tuist" - end - end -end diff --git a/tools/fourier/lib/fourier/services/generate.rb b/tools/fourier/lib/fourier/services/generate.rb deleted file mode 100644 index 0a04681e4..000000000 --- a/tools/fourier/lib/fourier/services/generate.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module Generate - autoload :Tuist, "fourier/services/generate/tuist" - end - end -end diff --git a/tools/fourier/lib/fourier/services/github.rb b/tools/fourier/lib/fourier/services/github.rb deleted file mode 100644 index c752d56f1..000000000 --- a/tools/fourier/lib/fourier/services/github.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module GitHub - autoload :CancelWorkflows, "fourier/services/github/cancel_workflows" - end - end -end diff --git a/tools/fourier/lib/fourier/services/test.rb b/tools/fourier/lib/fourier/services/test.rb deleted file mode 100644 index f2b277c20..000000000 --- a/tools/fourier/lib/fourier/services/test.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module Test - autoload :Tuist, "fourier/services/test/tuist" - end - end -end diff --git a/tools/fourier/lib/fourier/services/test/tuist.rb b/tools/fourier/lib/fourier/services/test/tuist.rb deleted file mode 100644 index 62f41ec46..000000000 --- a/tools/fourier/lib/fourier/services/test/tuist.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Services - module Test - module Tuist - autoload :Unit, "fourier/services/test/tuist/unit" - autoload :Support, "fourier/services/test/tuist/support" - autoload :Acceptance, "fourier/services/test/tuist/acceptance" - end - end - end -end diff --git a/tools/fourier/lib/fourier/utilities.rb b/tools/fourier/lib/fourier/utilities.rb deleted file mode 100644 index d60d875c2..000000000 --- a/tools/fourier/lib/fourier/utilities.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -module Fourier - module Utilities - autoload :GitHubClient, "fourier/utilities/github_client" - autoload :Secrets, "fourier/utilities/secrets" - autoload :System, "fourier/utilities/system" - end -end diff --git a/website/markdown/docs/contribution/fourier.mdx b/website/markdown/docs/contribution/fourier.mdx index 8a8b92701..bcb288445 100644 --- a/website/markdown/docs/contribution/fourier.mdx +++ b/website/markdown/docs/contribution/fourier.mdx @@ -16,7 +16,7 @@ By implementing our CLI tool within the repository we can better ensure the inte Before running Fourier, make sure that you have the Ruby version specified in the `.ruby-version` file, and that you have fetched the [Bundler](https://bundler.io) dependencies specified in the `Gemfile` by running `bundle install`. Then, you can run the following command: ``` -./bin/fourier --help +./fourier --help ``` It'll output the list of available commands that you can run. diff --git a/website/markdown/docs/contribution/testing-strategy.mdx b/website/markdown/docs/contribution/testing-strategy.mdx index 1ddc8c08e..d9211cc0f 100644 --- a/website/markdown/docs/contribution/testing-strategy.mdx +++ b/website/markdown/docs/contribution/testing-strategy.mdx @@ -11,11 +11,11 @@ Tuist employs a diverse suite tests that help ensure it works as intended and pr Acceptance tests run the built `tuist` command line against a wide range of [fixtures](https://github.com/tuist/tuist/tree/main/fixtures) and verify its output and results. They are the slowest to run however provide the most coverage. The idea is to **test a few complete scenarios for each major feature**. -Those are written in [Cucumber](https://cucumber.io/docs) and Ruby and can be found in [features](https://github.com/tuist/tuist/tree/main/features). Those are run when calling `./bin/fourier test tuist acceptance`: +Those are written in [Cucumber](https://cucumber.io/docs) and Ruby and can be found in [features](https://github.com/tuist/tuist/tree/main/features). Those are run when calling `./fourier test tuist acceptance`: ```bash # 3 is the line where the definition of the test starts -./bin/fourier test tuist acceptance features/generate-1.feature:3 +./fourier test tuist acceptance features/generate-1.feature:3 ```