{"id":13463289,"url":"https://github.com/thoughtbot/appraisal","last_synced_at":"2025-05-10T11:06:23.040Z","repository":{"id":44163498,"uuid":"1072713","full_name":"thoughtbot/appraisal","owner":"thoughtbot","description":"A Ruby library for testing your library against different versions of dependencies.","archived":false,"fork":false,"pushed_at":"2024-10-25T18:18:02.000Z","size":394,"stargazers_count":1291,"open_issues_count":15,"forks_count":109,"subscribers_count":41,"default_branch":"main","last_synced_at":"2025-05-10T11:06:17.802Z","etag":null,"topics":["appraisal","gemfile","ruby","rubygems","testing","thoughtbot"],"latest_commit_sha":null,"homepage":"https://thoughtbot.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoughtbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-11-11T20:50:44.000Z","updated_at":"2025-05-09T15:30:55.000Z","dependencies_parsed_at":"2022-09-13T15:31:59.858Z","dependency_job_id":"f19bfd9d-4424-4b15-bf5d-d606065efb8a","html_url":"https://github.com/thoughtbot/appraisal","commit_stats":{"total_commits":273,"total_committers":70,"mean_commits":3.9,"dds":0.6227106227106227,"last_synced_commit":"b200e636903700098bef25f4f51dbc4c46e4c04c"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fappraisal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fappraisal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fappraisal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fappraisal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtbot","download_url":"https://codeload.github.com/thoughtbot/appraisal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253405024,"owners_count":21903113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appraisal","gemfile","ruby","rubygems","testing","thoughtbot"],"created_at":"2024-07-31T13:00:49.940Z","updated_at":"2025-05-10T11:06:23.000Z","avatar_url":"https://github.com/thoughtbot.png","language":"Ruby","readme":"Appraisal\n=========\n\nFind out what your Ruby gems are worth.\n\nSynopsis\n--------\n\nAppraisal integrates with bundler and rake to test your library against\ndifferent versions of dependencies in repeatable scenarios called \"appraisals.\"\nAppraisal is designed to make it easy to check for regressions in your library\nwithout interfering with day-to-day development using Bundler.\n\nInstallation\n------------\n\nIn your package's `.gemspec`:\n\n    s.add_development_dependency \"appraisal\"\n\nNote that gems must be bundled in the global namespace. Bundling gems to a\nlocal location or vendoring plugins is not supported. If you do not want to\npollute the global namespace, one alternative is\n[RVM's Gemsets](http://rvm.io/gemsets).\n\nSetup\n-----\n\nSetting up appraisal requires an `Appraisals` file (similar to a `Gemfile`) in\nyour project root, named \"Appraisals\" (note the case), and some slight changes\nto your project's `Rakefile`.\n\nAn `Appraisals` file consists of several appraisal definitions. An appraisal\ndefinition is simply a list of gem dependencies. For example, to test with a\nfew versions of Rails:\n\n    appraise \"rails-3\" do\n      gem \"rails\", \"3.2.14\"\n    end\n\n    appraise \"rails-4\" do\n      gem \"rails\", \"4.0.0\"\n    end\n\nThe dependencies in your `Appraisals` file are combined with dependencies in\nyour `Gemfile`, so you don't need to repeat anything that's the same for each\nappraisal. If something is specified in both the Gemfile and an appraisal, the\nversion from the appraisal takes precedence.\n\nUsage\n-----\n\nOnce you've configured the appraisals you want to use, you need to install the\ndependencies for each appraisal:\n\n    $ bundle exec appraisal install\n\nThis will resolve, install, and lock the dependencies for that appraisal using\nbundler. Once you have your dependencies set up, you can run any command in a\nsingle appraisal:\n\n    $ bundle exec appraisal rails-3 rake test\n\nThis will run `rake test` using the dependencies configured for Rails 3. You can\nalso run each appraisal in turn:\n\n    $ bundle exec appraisal rake test\n\nIf you want to use only the dependencies from your Gemfile, just run `rake\ntest` as normal. This allows you to keep running with the latest versions of\nyour dependencies in quick test runs, but keep running the tests in older\nversions to check for regressions.\n\nIn the case that you want to run all the appraisals by default when you run\n`rake`, you can override your default Rake task by put this into your Rakefile:\n\n    if !ENV[\"APPRAISAL_INITIALIZED\"] \u0026\u0026 !ENV[\"TRAVIS\"]\n      task :default =\u003e :appraisal\n    end\n\n(Appraisal sets `APPRAISAL_INITIALIZED` environment variable when it runs your\nprocess. We put a check here to ensure that `appraisal rake` command should run\nyour real default task, which usually is your `test` task.)\n\nNote that this may conflict with your CI setup if you decide to split the test\ninto multiple processes by Appraisal and you are using `rake` to run tests by\ndefault.\n\n### Commands\n\n```bash\nappraisal clean                  # Remove all generated gemfiles and lockfiles from gemfiles folder\nappraisal generate               # Generate a gemfile for each appraisal\nappraisal help [COMMAND]         # Describe available commands or one specific command\nappraisal install                # Resolve and install dependencies for each appraisal\nappraisal list                   # List the names of the defined appraisals\nappraisal update [LIST_OF_GEMS]  # Remove all generated gemfiles and lockfiles, resolve, and install dependencies again\nappraisal version                # Display the version and exit\n```\n\nUnder the hood\n--------------\n\nRunning `appraisal install` generates a Gemfile for each appraisal by combining\nyour root Gemfile with the specific requirements for each appraisal. These are\nstored in the `gemfiles` directory, and should be added to version control to\nensure that the same versions are always used.\n\nWhen you prefix a command with `appraisal`, the command is run with the\nappropriate Gemfile for that appraisal, ensuring the correct dependencies\nare used.\n\nRemoving Gems using Appraisal\n-------\n\nIt is common while managing multiple Gemfiles for dependencies to become deprecated and no\nlonger necessary, meaning they need to be removed from the Gemfile for a specific `appraisal`.\nTo do this, use the `remove_gem` declaration within the necessary `appraise` block in your\n`Appraisals` file.\n\n### Example Usage\n\n**Gemfile**\n```ruby\ngem 'rails', '~\u003e 4.2'\n\ngroup :test do\n  gem 'rspec', '~\u003e 4.0'\n  gem 'test_after_commit'\nend\n```\n\n**Appraisals**\n```ruby\nappraise 'rails-5' do\n  gem 'rails', '~\u003e 5.2'\n\n  group :test do\n    remove_gem 'test_after_commit'\n  end\nend\n```\n\nUsing the `Appraisals` file defined above, this is what the resulting `Gemfile` will look like:\n```ruby\ngem 'rails', '~\u003e 5.2'\n\ngroup :test do\n  gem 'rspec', '~\u003e 4.0'\nend\n```\n\nCustomization\n-------------\n\nIt is possible to customize the generated Gemfiles by adding a `customize_gemfiles` block to\nyour `Appraisals` file. The block must contain a hash of key/value pairs. Currently supported\ncustomizations include:\n- heading: a string that by default adds \"# This file was generated by Appraisal\" to the top of each Gemfile, (the string will be commented for you)\n- single_quotes: a boolean that controls if strings are single quoted in each Gemfile, defaults to false\n\nYou can also provide variables for substitution in the heading, based on each appraisal. Currently supported variables:\n- `%{appraisal}`: Becomes the name of each appraisal, e.g. `rails-3`\n- `%{gemfile}`: Becomes the filename of each gemfile, e.g. `rails-3.gemfile`\n- `%{gemfile_path}`: Becomes the full path of each gemfile, e.g. `/path/to/project/gemfiles/rails-3.gemfile`\n- `%{lockfile}`: Becomes the filename of each lockfile, e.g. `rails-3.gemfile.lock`\n- `%{lockfile_path}`: Becomes the full path of each lockfile, e.g. `/path/to/project/gemfiles/rails-3.gemfile.lock`\n- `%{relative_gemfile_path}`: Becomes the relative path of each gemfile, e.g. `gemfiles/rails-3.gemfile`\n- `%{relative_lockfile_path}`: Becomes the relative path of each lockfile, e.g. `gemfiles/rails-3.gemfile.lock`\n\n### Example Usage\n\n**Appraisals**\n```ruby\ncustomize_gemfiles do\n  {\n    single_quotes: true,\n    heading: \u003c\u003c~HEADING\n      frozen_string_literal: true\n\n      `%{gemfile}` has been generated by Appraisal, do NOT modify it or `%{lockfile}` directly!\n      Make the changes to the \"%{appraisal}\" block in `Appraisals` instead. See the conventions at https://example.com/\n    HEADING\n  }\nend\n\nappraise \"rails-3\" do\n  gem \"rails\", \"3.2.14\"\nend\n```\n\nUsing the `Appraisals` file defined above, this is what the resulting `Gemfile` will look like:\n```ruby\n# frozen_string_literal: true\n\n# `rails-3.gemfile` has been generated by Appraisal, do NOT modify it or `rails-3.gemfile.lock` directly!\n# Make the changes to the \"rails-3\" block in `Appraisals` instead. See the conventions at https://example.com/\n\ngem 'rails', '3.2.14'\n```\n\nVersion Control\n---------------\n\nWhen using Appraisal, we recommend you check in the Gemfiles that Appraisal\ngenerates within the gemfiles directory, but exclude the lockfiles there\n(`*.gemfile.lock`.) The Gemfiles are useful when running your tests against a\ncontinuous integration server.\n\nCircle CI Integration\n---------------------\n\nIn Circle CI you can override the default testing behaviour to customize your\ntesting. Using this feature you can configure appraisal to execute your tests.\n\nIn order to this you can put the following configuration in your circle.yml file:\n\n```yml\ndependencies:\n  post:\n    - bundle exec appraisal install\ntest:\n  pre:\n    - bundle exec appraisal rake db:create\n    - bundle exec appraisal rake db:migrate\n  override:\n    - bundle exec appraisal rspec\n```\n\nNotice that we are running an rspec suite. You can customize your testing\ncommand in the `override` section and use your favourite one.\n\nCredits\n-------\n\n![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)\n\nAppraisal is maintained and funded by [thoughtbot, inc][thoughtbot]\n\nThank you to all [the contributors][contributors]\n\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\n[thoughtbot]: http://thoughtbot.com/community\n[contributors]: https://github.com/thoughtbot/appraisal/contributors\n\nLicense\n-------\n\nAppraisal is Copyright © 2010-2013 Joe Ferris and thoughtbot, inc. It is free\nsoftware, and may be redistributed under the terms specified in the MIT-LICENSE\nfile.\n","funding_links":[],"categories":["Package \u0026 Dependency Management","Testing","Ruby","1. language"],"sub_categories":["Bundler Tools","1.1 ruby"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fappraisal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtbot%2Fappraisal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fappraisal/lists"}