{"id":18265960,"url":"https://github.com/knapsackpro/rails-app-with-knapsack","last_synced_at":"2025-04-04T21:32:21.382Z","repository":{"id":31336503,"uuid":"34899146","full_name":"KnapsackPro/rails-app-with-knapsack","owner":"KnapsackPro","description":"Example of Ruby on Rails app with knapsack gem. Knapsack is a free gem, see https://github.com/ArturT/knapsack","archived":false,"fork":false,"pushed_at":"2024-06-06T15:06:11.000Z","size":146,"stargazers_count":2,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-06T17:40:15.612Z","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}},"created_at":"2015-05-01T10:57:25.000Z","updated_at":"2024-06-06T17:40:15.613Z","dependencies_parsed_at":"2024-06-05T17:29:40.437Z","dependency_job_id":null,"html_url":"https://github.com/KnapsackPro/rails-app-with-knapsack","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnapsackPro%2Frails-app-with-knapsack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KnapsackPro","download_url":"https://codeload.github.com/KnapsackPro/rails-app-with-knapsack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223159616,"owners_count":17097503,"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:54.577Z","updated_at":"2024-11-05T11:20:55.253Z","avatar_url":"https://github.com/KnapsackPro.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails app with knapsack\n\n[![Circle CI](https://circleci.com/gh/KnapsackPro/rails-app-with-knapsack.svg)](https://circleci.com/gh/KnapsackPro/rails-app-with-knapsack)\n\nThis is example Ruby on Rails app with knapsack gem. Knapsack splits tests across CI nodes and makes sure that tests will run comparable time on each node.\n\n__You can read more about free [knapsack gem here](https://github.com/ArturT/knapsack). 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 rake tasks\n\nSee [Rakefile](Rakefile).\n\n\n## Parallel rspec test suite with knapsack\n\n### How to set up knapsack\n\nSee [spec/spec_helper.rb](spec/spec_helper.rb)\n\n### Step 1\n\nFirst generate only once a report `knapsack_rspec_report.json` on your CI with command:\n\n    $ KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec\n\nAdd the report into your repository and commit.\n\n### Step 2\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=0 bundle exec rake knapsack:rspec\n\n    # Run this on second CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=1 bundle exec rake knapsack: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\n\n### How to set up knapsack\n\nSee [features/support/knapsack.rb](features/support/knapsack.rb)\n\n### Step 1\n\nFirst generate only once a report `knapsack_cucumber_report.json` on your CI with command:\n\n    $ KNAPSACK_GENERATE_REPORT=true bundle exec cucumber features\n\nAdd the report into your repository and commit.\n\n### Step 2\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=0 bundle exec rake knapsack:cucumber\n\n    # Run this on second CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=1 bundle exec rake knapsack: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\n\n### How to set up knapsack\n\nSee [test/test_helper.rb](test/test_helper.rb)\n\n### Step 1\n\nFirst generate only once a report `knapsack_minitest_report.json` on your CI with command:\n\n    $ KNAPSACK_GENERATE_REPORT=true bundle exec rake test\n\nAdd the report into your repository and commit.\n\n### Step 2\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=0 bundle exec rake knapsack:minitest\n\n    # Run this on second CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=1 bundle exec rake knapsack:minitest\n\nSee [.circleci/config.yml](.circleci/config.yml) to see how we set up CircleCI.\n\n\n## Parallel spinach test suite with knapsack\n\n### How to set up knapsack\n\nSee [spinach_features/support/env.rb](spinach_features/support/env.rb)\n\n### Step 1\n\nFirst generate only once a report `knapsack_spinach_report.json` on your CI with command:\n\n    $ KNAPSACK_GENERATE_REPORT=true bundle exec spinach -f spinach_features\n\nAdd the report into your repository and commit.\n\n### Step 2\n\nYou can use below command on CI to run tests:\n\n    # Run this on first CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=0 KNAPSACK_TEST_FILE_PATTERN=\"spinach_features/**{,/*/**}/*.feature\" bundle exec rake \"knapsack:spinach[-f spinach_features]\"\n\n    # Run this on second CI server\n    $ CI_NODE_TOTAL=2 CI_NODE_INDEX=1 KNAPSACK_TEST_FILE_PATTERN=\"spinach_features/**{,/*/**}/*.feature\" bundle exec rake \"knapsack:spinach[-f spinach_features]\"\n\nSee [.circleci/config.yml](.circleci/config.yml) to see how we set up CircleCI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknapsackpro%2Frails-app-with-knapsack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknapsackpro%2Frails-app-with-knapsack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknapsackpro%2Frails-app-with-knapsack/lists"}