{"id":19667237,"url":"https://github.com/willnet/rake_shared_context","last_synced_at":"2025-04-28T23:32:06.969Z","repository":{"id":4032083,"uuid":"5132732","full_name":"willnet/rake_shared_context","owner":"willnet","description":"shared_context for rake tasks","archived":false,"fork":false,"pushed_at":"2020-03-27T07:22:05.000Z","size":33,"stargazers_count":30,"open_issues_count":3,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T11:07:58.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/willnet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-21T10:08:53.000Z","updated_at":"2024-01-20T17:54:27.000Z","dependencies_parsed_at":"2022-09-06T18:01:42.169Z","dependency_job_id":null,"html_url":"https://github.com/willnet/rake_shared_context","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Frake_shared_context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Frake_shared_context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Frake_shared_context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Frake_shared_context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willnet","download_url":"https://codeload.github.com/willnet/rake_shared_context/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224137341,"owners_count":17261999,"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-11T16:31:15.207Z","updated_at":"2024-11-11T16:31:49.197Z","avatar_url":"https://github.com/willnet.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RakeSharedContext\n\n[![Build Status](https://travis-ci.org/willnet/rake_shared_context.png)](https://travis-ci.org/willnet/rake_shared_context)\n[![Gem Version](https://badge.fury.io/rb/rake_shared_context.png)](http://badge.fury.io/rb/rake_shared_context)\n[![Stories in Ready](https://badge.waffle.io/willnet/rake_shared_context.png?label=ready\u0026title=Ready)](https://waffle.io/willnet/rake_shared_context)\n\nshared_context for rake tasks.\n\nThis gem is inspired by [this post](http://robots.thoughtbot.com/post/11957424161/test-rake-tasks-like-a-boss).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'rake_shared_context'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rake_shared_context\n\n## Usage\n\nIf you have `rake reports:generate` like following.\n\n~~~\n# lib/tasks/reports.rake\nnamespace :reports do\n  desc \"Generate report\"\n\n  task :generate =\u003e :environment do\n    ReportGenerator.generate\n  end\nend\n~~~\n\nThen you can write following.\n\n~~~\n# spec/lib/tasks/reports_rake_spec.rb\n\nrequire 'spec_helper'\ndescribe \"reports:generate\" do\n  include_context \"rake\"\n\n  it 'prerequisites should include \"environment\"' do\n    expect(subject.prerequisites).to include('environment')\n  end\n\n  it \"generates the report\" do\n    expect(ReportGenerator).to receive(:generate)\n    subject.invoke\n  end\nend\n~~~\n\n## Details\n\n* It expects that rake files are located under lib/tasks\n* It expects that a argument is passed to `describe` is task name\n\n## Supported versions\n\n* Ruby 1.9.3, 2.0.0, 2.1.x, 2.2.x, 2.3.x, 2.4.x\n* Rspec 2, 3\n\n## Development\n\nTo set up a development environment, do following\n\n```sh\nbundle install\nappraisal install\nbundle exec appraisal rspec-2 rake # test with rspec 2\nbundle exec appraisal rspec-3 rake # test with rspec 3\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillnet%2Frake_shared_context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillnet%2Frake_shared_context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillnet%2Frake_shared_context/lists"}