{"id":18265950,"url":"https://github.com/knapsackpro/rails-app-with-knapsack_pro","last_synced_at":"2025-07-12T08:32:45.818Z","repository":{"id":36939607,"uuid":"41246975","full_name":"KnapsackPro/rails-app-with-knapsack_pro","owner":"KnapsackPro","description":"Example of Ruby on Rails app with knapsack_pro gem. See the gem https://github.com/KnapsackPro/knapsack_pro-ruby","archived":false,"fork":false,"pushed_at":"2025-05-29T14:53:42.000Z","size":626,"stargazers_count":2,"open_issues_count":0,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-29T15:59:55.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/KnapsackPro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-08-23T11:27:06.000Z","updated_at":"2025-05-29T14:53:46.000Z","dependencies_parsed_at":"2023-01-17T07:21:40.640Z","dependency_job_id":"2997fd34-7d18-4b41-a41d-b9ec701a221c","html_url":"https://github.com/KnapsackPro/rails-app-with-knapsack_pro","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/KnapsackPro/rails-app-with-knapsack_pro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack_pro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack_pro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack_pro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack_pro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KnapsackPro","download_url":"https://codeload.github.com/KnapsackPro/rails-app-with-knapsack_pro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack_pro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264962222,"owners_count":23689765,"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":[],"created_at":"2024-11-05T11:20:52.906Z","updated_at":"2025-07-12T08:32:45.793Z","avatar_url":"https://github.com/KnapsackPro.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails app with knapsack_pro gem\n\n[![Circle CI](https://circleci.com/gh/KnapsackPro/rails-app-with-knapsack_pro.svg)](https://circleci.com/gh/KnapsackPro/rails-app-with-knapsack_pro)\n[![Knapsack Pro Parallel CI builds for RSpec - Queue Mode - GitHub Actions](https://img.shields.io/badge/Knapsack%20Pro-Parallel%20/%20RSpec%20--%20Queue%20Mode%20--%20GitHub%20Actions-%230074ff)](https://knapsackpro.com/dashboard/organizations/54/projects/205/test_suites/815/builds)\n\nThis is example Ruby on Rails app with knapsack_pro gem. Knapsack Pro splits tests across CI nodes and makes sure that tests will run comparable time on each node.\n\n__You can read more about [knapsack_pro gem here](https://github.com/KnapsackPro/knapsack_pro-ruby). You will find there info how to set up your test suite and how to do it on your favorite CI server.__\n\n\n## How to load knapsack_pro rake tasks\n\nSee [Rakefile](Rakefile).\n\n\n## Parallel rspec test suite with knapsack_pro\n\n### How to set up knapsack_pro\n\nSee [spec/spec_helper.rb](spec/spec_helper.rb)\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:rspec\n\n    # Run this on second CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:rspec\n\nSee [.circleci/config.yml](.circleci/config.yml) to see how we set up CircleCI.\n\n\n## Parallel cucumber test suite with knapsack_pro\n\n### How to set up knapsack_pro\n\nSee [features/support/knapsack_pro.rb](features/support/knapsack_pro.rb)\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:cucumber\n\n    # Run this on second CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:cucumber\n\nSee [.circleci/config.yml](.circleci/config.yml) to see how we set up CircleCI.\n\n\n## Parallel minitest test suite with knapsack_pro\n\n### How to set up knapsack_pro\n\nSee [test/test_helper.rb](test/test_helper.rb)\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:minitest\n\n    # Run this on second CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:minitest\n\nSee [.circleci/config.yml](.circleci/config.yml) to see how we set up CircleCI.\n\n## Parallel test-unit test suite with knapsack_pro\n\n### How to set up knapsack_pro\n\nSee [test-unit/test_helper.rb](test-unit/test_helper.rb)\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:test_unit\n\n    # Run this on second CI server\n    $ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:test_unit\n\nSee [.circleci/config.yml](.circleci/config.yml) to see how we set up CircleCI.\n\n\n\n# Development of this project\n\nEnsure you created databases:\n\n```\n$ rake db:create db:migrate\n$ TEST_ENV_NUMBER=1 rake db:create db:migrate\n$ TEST_ENV_NUMBER=2 rake db:create db:migrate\n```\n\nIn `bin` directory are files:\n\n* `bin/knapsack_pro_rspec`\n* `bin/knapsack_pro_minitest`\n* `bin/knapsack_pro_test_unit`\n* `bin/knapsack_pro_cucumber`\n\nThey exist for test reason when you want to run this project on local machine. In that case the `KNAPSACK_PRO_ENDPOINT` is pointed to staging which is reserved only for Knapsack Pro developers.\n\n## RSpec dry run\n\n```\n$ mkdir -p tmp/knapsack_pro/rspec\n\n$ bundle exec rspec --dry-run --format json --out tmp/knapsack_pro/rspec/dry_run.json spec\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknapsackpro%2Frails-app-with-knapsack_pro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknapsackpro%2Frails-app-with-knapsack_pro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknapsackpro%2Frails-app-with-knapsack_pro/lists"}