├── .editorconfig ├── .github └── workflows │ ├── documentation-coverage.yaml │ ├── documentation.yaml │ ├── rubocop.yaml │ ├── test-coverage.yaml │ ├── test-external.yaml │ └── test.yaml ├── .gitignore ├── .rubocop.yml ├── bake-test-external.gemspec ├── bake └── test │ └── external.rb ├── config ├── external.yaml └── sus.rb ├── gems.rb ├── guides ├── getting-started │ └── readme.md └── links.yaml ├── lib └── bake │ └── test │ ├── external.rb │ └── external │ ├── controller.rb │ └── version.rb ├── license.md ├── readme.md ├── release.cert └── test └── bake └── test ├── external.rb └── external └── controller.rb /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 2 6 | 7 | [*.{yml,yaml}] 8 | indent_style = space 9 | indent_size = 2 10 | -------------------------------------------------------------------------------- /.github/workflows/documentation-coverage.yaml: -------------------------------------------------------------------------------- 1 | name: Documentation Coverage 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | env: 9 | CONSOLE_OUTPUT: XTerm 10 | COVERAGE: PartialSummary 11 | 12 | jobs: 13 | validate: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | - uses: ruby/setup-ruby@v1 19 | with: 20 | ruby-version: "3.4" 21 | bundler-cache: true 22 | 23 | - name: Validate coverage 24 | timeout-minutes: 5 25 | run: bundle exec bake decode:index:coverage lib 26 | -------------------------------------------------------------------------------- /.github/workflows/documentation.yaml: -------------------------------------------------------------------------------- 1 | name: Documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: 9 | permissions: 10 | contents: read 11 | pages: write 12 | id-token: write 13 | 14 | # Allow one concurrent deployment: 15 | concurrency: 16 | group: "pages" 17 | cancel-in-progress: true 18 | 19 | env: 20 | CONSOLE_OUTPUT: XTerm 21 | BUNDLE_WITH: maintenance 22 | 23 | jobs: 24 | generate: 25 | runs-on: ubuntu-latest 26 | 27 | steps: 28 | - uses: actions/checkout@v4 29 | 30 | - uses: ruby/setup-ruby@v1 31 | with: 32 | ruby-version: "3.4" 33 | bundler-cache: true 34 | 35 | - name: Installing packages 36 | run: sudo apt-get install wget 37 | 38 | - name: Generate documentation 39 | timeout-minutes: 5 40 | run: bundle exec bake utopia:project:static --force no 41 | 42 | - name: Upload documentation artifact 43 | uses: actions/upload-pages-artifact@v3 44 | with: 45 | path: docs 46 | 47 | deploy: 48 | runs-on: ubuntu-latest 49 | 50 | environment: 51 | name: github-pages 52 | url: ${{steps.deployment.outputs.page_url}} 53 | 54 | needs: generate 55 | steps: 56 | - name: Deploy to GitHub Pages 57 | id: deployment 58 | uses: actions/deploy-pages@v4 59 | -------------------------------------------------------------------------------- /.github/workflows/rubocop.yaml: -------------------------------------------------------------------------------- 1 | name: RuboCop 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | env: 9 | CONSOLE_OUTPUT: XTerm 10 | 11 | jobs: 12 | check: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: ruby/setup-ruby@v1 18 | with: 19 | ruby-version: ruby 20 | bundler-cache: true 21 | 22 | - name: Run RuboCop 23 | timeout-minutes: 10 24 | run: bundle exec rubocop 25 | -------------------------------------------------------------------------------- /.github/workflows/test-coverage.yaml: -------------------------------------------------------------------------------- 1 | name: Test Coverage 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | env: 9 | CONSOLE_OUTPUT: XTerm 10 | COVERAGE: PartialSummary 11 | 12 | jobs: 13 | test: 14 | name: ${{matrix.ruby}} on ${{matrix.os}} 15 | runs-on: ${{matrix.os}}-latest 16 | 17 | strategy: 18 | matrix: 19 | os: 20 | - ubuntu 21 | - macos 22 | 23 | ruby: 24 | - "3.4" 25 | 26 | steps: 27 | - uses: actions/checkout@v4 28 | - uses: ruby/setup-ruby@v1 29 | with: 30 | ruby-version: ${{matrix.ruby}} 31 | bundler-cache: true 32 | 33 | - name: Run tests 34 | timeout-minutes: 5 35 | run: bundle exec bake test 36 | 37 | - uses: actions/upload-artifact@v4 38 | with: 39 | include-hidden-files: true 40 | if-no-files-found: error 41 | name: coverage-${{matrix.os}}-${{matrix.ruby}} 42 | path: .covered.db 43 | 44 | validate: 45 | needs: test 46 | runs-on: ubuntu-latest 47 | 48 | steps: 49 | - uses: actions/checkout@v4 50 | - uses: ruby/setup-ruby@v1 51 | with: 52 | ruby-version: "3.4" 53 | bundler-cache: true 54 | 55 | - uses: actions/download-artifact@v4 56 | 57 | - name: Validate coverage 58 | timeout-minutes: 5 59 | run: bundle exec bake covered:validate --paths */.covered.db \; 60 | -------------------------------------------------------------------------------- /.github/workflows/test-external.yaml: -------------------------------------------------------------------------------- 1 | name: Test External 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | env: 9 | CONSOLE_OUTPUT: XTerm 10 | 11 | jobs: 12 | test: 13 | name: ${{matrix.ruby}} on ${{matrix.os}} 14 | runs-on: ${{matrix.os}}-latest 15 | 16 | strategy: 17 | matrix: 18 | os: 19 | - ubuntu 20 | - macos 21 | 22 | ruby: 23 | - "3.1" 24 | - "3.2" 25 | - "3.3" 26 | - "3.4" 27 | 28 | steps: 29 | - uses: actions/checkout@v4 30 | - uses: ruby/setup-ruby@v1 31 | with: 32 | ruby-version: ${{matrix.ruby}} 33 | bundler-cache: true 34 | 35 | - name: Run tests 36 | timeout-minutes: 10 37 | run: bundle exec bake test:external 38 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | env: 9 | CONSOLE_OUTPUT: XTerm 10 | 11 | jobs: 12 | test: 13 | name: ${{matrix.ruby}} on ${{matrix.os}} 14 | runs-on: ${{matrix.os}}-latest 15 | continue-on-error: ${{matrix.experimental}} 16 | 17 | strategy: 18 | matrix: 19 | os: 20 | - ubuntu 21 | - macos 22 | 23 | ruby: 24 | - "3.1" 25 | - "3.2" 26 | - "3.3" 27 | - "3.4" 28 | 29 | experimental: [false] 30 | 31 | include: 32 | - os: ubuntu 33 | ruby: truffleruby 34 | experimental: true 35 | - os: ubuntu 36 | ruby: jruby 37 | experimental: true 38 | - os: ubuntu 39 | ruby: head 40 | experimental: true 41 | 42 | steps: 43 | - uses: actions/checkout@v4 44 | - uses: ruby/setup-ruby@v1 45 | with: 46 | ruby-version: ${{matrix.ruby}} 47 | bundler-cache: true 48 | 49 | - name: Run tests 50 | timeout-minutes: 10 51 | run: bundle exec bake test 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle/ 2 | /pkg/ 3 | /gems.locked 4 | /.covered.db 5 | /external 6 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | AllCops: 2 | DisabledByDefault: true 3 | 4 | Layout/IndentationStyle: 5 | Enabled: true 6 | EnforcedStyle: tabs 7 | 8 | Layout/InitialIndentation: 9 | Enabled: true 10 | 11 | Layout/IndentationWidth: 12 | Enabled: true 13 | Width: 1 14 | 15 | Layout/IndentationConsistency: 16 | Enabled: true 17 | EnforcedStyle: normal 18 | 19 | Layout/BlockAlignment: 20 | Enabled: true 21 | 22 | Layout/EndAlignment: 23 | Enabled: true 24 | EnforcedStyleAlignWith: start_of_line 25 | 26 | Layout/BeginEndAlignment: 27 | Enabled: true 28 | EnforcedStyleAlignWith: start_of_line 29 | 30 | Layout/ElseAlignment: 31 | Enabled: true 32 | 33 | Layout/DefEndAlignment: 34 | Enabled: true 35 | 36 | Layout/CaseIndentation: 37 | Enabled: true 38 | 39 | Layout/CommentIndentation: 40 | Enabled: true 41 | 42 | Layout/EmptyLinesAroundClassBody: 43 | Enabled: true 44 | 45 | Layout/EmptyLinesAroundModuleBody: 46 | Enabled: true 47 | 48 | Style/FrozenStringLiteralComment: 49 | Enabled: true 50 | 51 | Style/StringLiterals: 52 | Enabled: true 53 | EnforcedStyle: double_quotes 54 | -------------------------------------------------------------------------------- /bake-test-external.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "lib/bake/test/external/version" 4 | 5 | Gem::Specification.new do |spec| 6 | spec.name = "bake-test-external" 7 | spec.version = Bake::Test::External::VERSION 8 | 9 | spec.summary = "Run external test suites to check for breakage." 10 | spec.authors = ["Samuel Williams", "Akshay Birajdar", "Hiroaki Osawa"] 11 | spec.license = "MIT" 12 | 13 | spec.cert_chain = ["release.cert"] 14 | spec.signing_key = File.expand_path("~/.gem/release.pem") 15 | 16 | spec.homepage = "https://github.com/ioquatix/bake-test-external" 17 | 18 | spec.metadata = { 19 | "documentation_uri" => "https://ioquatix.github.io/bake-test-external/", 20 | "funding_uri" => "https://github.com/sponsors/ioquatix/", 21 | "source_code_uri" => "https://github.com/ioquatix/bake-test-external.git", 22 | } 23 | 24 | spec.files = Dir.glob(["{bake,lib}/**/*", "*.md"], File::FNM_DOTMATCH, base: __dir__) 25 | 26 | spec.required_ruby_version = ">= 3.1" 27 | 28 | spec.add_dependency "bake" 29 | end 30 | -------------------------------------------------------------------------------- /bake/test/external.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2022-2025, by Samuel Williams. 5 | # Copyright, 2022, by Akshay Birajdar. 6 | # Copyright, 2022, by Hiroaki Osawa. 7 | 8 | def initialize(context) 9 | super 10 | 11 | require "bake/test/external" 12 | require "bundler" 13 | require "yaml" 14 | end 15 | 16 | DEFAULT_EXTERNALS_PATH = "config/external.yaml" 17 | 18 | # Run external tests. 19 | # 20 | # @parameter input [Hash] The input hash containing external repository configurations. 21 | # @parameter gemspec [String | Nil] The input gemspec path. 22 | def external(input: nil, gemspec: nil) 23 | # Prepare the project for testing, e.g. build native extensions, etc. 24 | context["before_test"]&.call 25 | 26 | input ||= default_input 27 | gemspec ||= controller.find_gemspec 28 | 29 | input&.each do |key, config| 30 | config = config.transform_keys(&:to_sym) 31 | config[:env] ||= {} 32 | 33 | Bundler.with_unbundled_env do 34 | controller.clone_and_test(gemspec.name, key, config) 35 | end 36 | end 37 | end 38 | 39 | # Clone external repositories. 40 | # 41 | # @parameter input [Hash] The input hash containing external repository configurations. 42 | # @parameter gemspec [String | Nil] The input gemspec path. 43 | def clone(input: nil, gemspec: nil) 44 | input ||= default_input 45 | gemspec ||= controller.find_gemspec 46 | 47 | input&.each do |key, config| 48 | config = config.transform_keys(&:to_sym) 49 | config[:env] ||= {} 50 | 51 | controller.clone_repository(gemspec.name, key, config) 52 | end 53 | end 54 | 55 | private 56 | 57 | def controller 58 | @controller ||= Bake::Test::External::Controller.new 59 | end 60 | 61 | def default_input 62 | if File.exist?(DEFAULT_EXTERNALS_PATH) 63 | YAML.load_file(DEFAULT_EXTERNALS_PATH) 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /config/external.yaml: -------------------------------------------------------------------------------- 1 | sus: 2 | url: https://github.com/ioquatix/sus 3 | command: bundle exec bake test:external 4 | # rack: 5 | # url: https://github.com/rack/rack 6 | # command: bundle exec bake test:external 7 | -------------------------------------------------------------------------------- /config/sus.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2024-2025, by Samuel Williams. 5 | 6 | require "covered/sus" 7 | include Covered::Sus 8 | -------------------------------------------------------------------------------- /gems.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2022-2024, by Samuel Williams. 5 | 6 | source "https://rubygems.org" 7 | 8 | gemspec 9 | 10 | group :maintenance, optional: true do 11 | gem "bake-gem" 12 | gem "bake-modernize" 13 | 14 | gem "utopia-project" 15 | end 16 | 17 | group :test do 18 | gem "sus" 19 | gem "covered" 20 | gem "decode" 21 | gem "rubocop" 22 | 23 | gem "bake-test" 24 | end 25 | -------------------------------------------------------------------------------- /guides/getting-started/readme.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | This guide will help you get started with `bake-test-external` and show you how to use it in your project. 4 | 5 | ## Installation 6 | 7 | Add the gem to your project: 8 | 9 | ```bash 10 | $ bundle add bake-test-external 11 | ``` 12 | 13 | ## Core Concepts 14 | 15 | `bake-test-external` is a gem for executing external (downstream) tests. It allows you to run the test suite of a dependent project to ensure that your changes haven't broken anything. This is particularly useful when you have a gem that is used by other projects. 16 | 17 | `bake-test-external` will clone the configured repositories, inject your current gem into the fetched gemfile, and run the given command. This has the effect of running their test suite with your latest code. You can use this as part of your test suite to receive feedback that a downstream dependent codebase is okay or broken because of a change you've made. 18 | 19 | ## Usage 20 | 21 | Add a file `config/external.yaml` to your project, and add entries like: 22 | 23 | ```yaml 24 | sus: 25 | url: https://github.com/ioquatix/sus 26 | command: bundle exec bake test 27 | ``` 28 | 29 | To run the external tests: 30 | 31 | ```bash 32 | $ bake test:external 33 | ``` 34 | 35 | ### Custom Environment Variables 36 | 37 | You can specify custom environment variables to be set when running the external tests: 38 | 39 | ```yaml 40 | sus: 41 | url: https://github.com/ioquatix/sus 42 | command: bundle exec bake test 43 | env: 44 | RUBYOPT: -W0 45 | ``` 46 | 47 | ### Custom Gemfile 48 | 49 | You can specify a custom gemfile to be used when running the external tests: 50 | 51 | ```yaml 52 | sus: 53 | url: https://github.com/ioquatix/sus 54 | command: bundle exec bake test 55 | gemfile: path/to/gemfile 56 | ``` 57 | 58 | ### Custom Branch 59 | 60 | You can specify a custom branch to be checked out when running the external tests: 61 | 62 | ```yaml 63 | sus: 64 | url: https://github.com/ioquatix/sus 65 | command: bundle exec bake test 66 | branch: my-feature-branch 67 | ``` 68 | -------------------------------------------------------------------------------- /guides/links.yaml: -------------------------------------------------------------------------------- 1 | getting-started: 2 | order: 0 3 | -------------------------------------------------------------------------------- /lib/bake/test/external.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2024-2025, by Samuel Williams. 5 | 6 | require_relative "external/version" 7 | require_relative "external/controller" 8 | -------------------------------------------------------------------------------- /lib/bake/test/external/controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2024-2025, by Samuel Williams. 5 | 6 | require "fileutils" 7 | require "pathname" 8 | 9 | module Bake 10 | module Test 11 | module External 12 | class Controller 13 | DEFAULT_COMMAND = "bake test" 14 | 15 | def initialize(root = nil) 16 | @root = Pathname.new(root || Dir.pwd) 17 | end 18 | 19 | private def system!(*command, **options) 20 | system(*command, **options, exception: true) 21 | end 22 | 23 | def find_gemspec(pattern = "*.gemspec") 24 | paths = @root.glob(pattern) 25 | 26 | if paths.size > 1 27 | raise "Multiple gemspecs found: #{paths}, please specify one!" 28 | end 29 | 30 | if path = paths.first 31 | return ::Gem::Specification.load(path.to_s) 32 | end 33 | end 34 | 35 | def clone_and_test(name, key, config) 36 | $stderr.puts "Cloning external repository #{key}..." 37 | path = clone_repository(name, key, config) 38 | 39 | begin 40 | $stderr.puts "Running external tests #{key}..." 41 | test_repository(path, config) 42 | rescue 43 | $stderr.puts "External tests #{key} failed!" 44 | raise 45 | end 46 | end 47 | 48 | def clone_repository(name, key, config) 49 | url = config[:url] 50 | 51 | path = File.join(@root, "external", key) 52 | 53 | unless File.directory?(path) 54 | FileUtils.mkdir_p path 55 | command = ["git", "clone", "--depth", "1"] 56 | 57 | if branch = config[:branch] 58 | command << "--branch" << branch 59 | end 60 | 61 | if tag = config[:tag] 62 | command << "--tag" << tag 63 | end 64 | 65 | command << url << path 66 | system!(config[:env], *command) 67 | 68 | # I tried using `bundle config --local local.async ../` but it simply doesn't work. 69 | # system!("bundle", "config", "--local", "local.async", __dir__, chdir: path) 70 | 71 | gemfile_path = self.gemfile_path(path, config) 72 | relative_root = @root.relative_path_from(gemfile_path.dirname) 73 | 74 | File.open(gemfile_path, "r+") do |file| 75 | pattern = /gem.*?['"]#{name}['"]/ 76 | lines = file.grep_v(pattern) 77 | 78 | file.seek(0) 79 | file.truncate(0) 80 | file.puts(lines) 81 | file.puts nil, "# Added by external testing:" 82 | file.puts("gem #{name.to_s.dump}, path: #{relative_root.to_s.dump}") 83 | 84 | config[:extra]&.each do |line| 85 | file.puts(line) 86 | end 87 | end 88 | 89 | system!(config[:env], "bundle", "install", chdir: path) 90 | else 91 | # This also sets the config[:env]['BUNDLE_GEMFILE'] if necessary: 92 | self.gemfile_path(path, config) 93 | end 94 | 95 | return path 96 | end 97 | 98 | def test_repository(path, config) 99 | command = config.fetch(:command, DEFAULT_COMMAND) 100 | 101 | Array(command).each do |line| 102 | system!(config[:env], *line, chdir: path) 103 | end 104 | end 105 | 106 | GEMFILE_NAMES = ["Gemfile", "gems.rb"] 107 | 108 | def resolve_gemfile_path(root, config) 109 | if config_path = config[:gemfile] 110 | path = File.join(root, config_path) 111 | 112 | unless File.exist?(path) 113 | raise ArgumentError, "Specified gemfile path does not exist: #{config_path.inspect}!" 114 | end 115 | 116 | # We consider this to be a custom gemfile path: 117 | return false, path 118 | end 119 | 120 | GEMFILE_NAMES.each do |name| 121 | path = File.join(root, name) 122 | 123 | if File.exist?(path) 124 | # We consider this to be a default gemfile path: 125 | return true, path 126 | end 127 | end 128 | 129 | raise ArgumentError, "Could not find gem file in #{root.inspect}!" 130 | end 131 | 132 | def gemfile_path(root, config) 133 | config.fetch(:cached_gemfile_path) do 134 | root = File.expand_path(root, @root) 135 | default, path = self.resolve_gemfile_path(root, config) 136 | 137 | # Custom gemfile paths should be set explicitly: 138 | unless default 139 | config[:env]["BUNDLE_GEMFILE"] = path 140 | end 141 | 142 | path = Pathname.new(path) 143 | 144 | config[:cached_gemfile_path] = path 145 | 146 | return path 147 | end 148 | end 149 | end 150 | end 151 | end 152 | end 153 | -------------------------------------------------------------------------------- /lib/bake/test/external/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2022-2024, by Samuel Williams. 5 | 6 | module Bake 7 | module Test 8 | module External 9 | VERSION = "0.6.1" 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright, 2022-2025, by Samuel Williams. 4 | Copyright, 2022, by Akshay Birajdar. 5 | Copyright, 2022, by Hiroaki Osawa. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Bake Test External 2 | 3 | A gem for executing external (downstream) tests. 4 | 5 | [![Development Status](https://github.com/ioquatix/bake-test-external/workflows/Test/badge.svg)](https://github.com/ioquatix/bake-test-external/actions?workflow=Test) 6 | 7 | ## Usage 8 | 9 | Please see the [project documentation](https://ioquatix.github.io/bake-test-external/) for more details. 10 | 11 | - [Getting Started](https://ioquatix.github.io/bake-test-external/guides/getting-started/index) - This guide will help you get started with `bake-test-external` and show you how to use it in your project. 12 | 13 | ## Contributing 14 | 15 | We welcome contributions to this project. 16 | 17 | 1. Fork it. 18 | 2. Create your feature branch (`git checkout -b my-new-feature`). 19 | 3. Commit your changes (`git commit -am 'Add some feature'`). 20 | 4. Push to the branch (`git push origin my-new-feature`). 21 | 5. Create new Pull Request. 22 | 23 | ### Developer Certificate of Origin 24 | 25 | In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed. 26 | 27 | ### Community Guidelines 28 | 29 | This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers. 30 | -------------------------------------------------------------------------------- /release.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11 3 | ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK 4 | CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz 5 | MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd 6 | MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj 7 | bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB 8 | igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2 9 | 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW 10 | sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE 11 | e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN 12 | XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss 13 | RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn 14 | tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM 15 | zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW 16 | xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O 17 | BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs 18 | aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs 19 | aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE 20 | cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl 21 | xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/ 22 | c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp 23 | 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws 24 | JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP 25 | eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt 26 | Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8 27 | voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg= 28 | -----END CERTIFICATE----- 29 | -------------------------------------------------------------------------------- /test/bake/test/external.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2022-2025, by Samuel Williams. 5 | 6 | require "bake" 7 | 8 | let(:context) {Bake::Context.load} 9 | let(:external_path) {File.join(context.root, "external/sus")} 10 | 11 | it "should clone external repository" do 12 | context.call("test:external:clone") 13 | 14 | expect(File.exist?(external_path)).to be == true 15 | end 16 | -------------------------------------------------------------------------------- /test/bake/test/external/controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Released under the MIT License. 4 | # Copyright, 2024-2025, by Samuel Williams. 5 | 6 | require "bake/test/external/controller" 7 | 8 | describe Bake::Test::External::Controller do 9 | let(:root) {File.expand_path("../../../..", __dir__)} 10 | let(:controller) {subject.new(root)} 11 | 12 | it "can find gemspec" do 13 | gemspec = controller.find_gemspec 14 | 15 | expect(gemspec).to be_a(Gem::Specification) 16 | expect(gemspec.name).to be == "bake-test-external" 17 | end 18 | end 19 | --------------------------------------------------------------------------------