{"id":15405914,"url":"https://github.com/elia/spectator","last_synced_at":"2025-04-17T05:57:20.724Z","repository":{"id":66505108,"uuid":"1888659","full_name":"elia/spectator","owner":"elia","description":"Watches specs for a Rails (2 or 3) project","archived":false,"fork":false,"pushed_at":"2014-12-11T14:53:17.000Z","size":914,"stargazers_count":14,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-13T23:43:35.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://elia.schito.me/spectator/","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/elia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-13T12:59:55.000Z","updated_at":"2023-01-02T19:45:15.000Z","dependencies_parsed_at":"2023-02-20T12:45:55.971Z","dependency_job_id":null,"html_url":"https://github.com/elia/spectator","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fspectator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fspectator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fspectator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fspectator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elia","download_url":"https://codeload.github.com/elia/spectator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249319201,"owners_count":21250496,"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-10-01T16:18:55.462Z","updated_at":"2025-04-17T05:57:20.379Z","avatar_url":"https://github.com/elia.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spectator\n\n[![Code Climate](http://img.shields.io/codeclimate/github/kabisaict/flow.svg)](https://codeclimate.com/github/elia/spectator)\n\n_Test driven development red-green cycle for simple people!_\n\n## The gist\n\nSpectator is a simple watcher for your specs:\n- it will execute a spec each time a file (spec or implementation) is modified or created (_really catches new files!_)\n- it **does not** starts your whole suite at start, nor when a spec passes or fails (as autospec tends to do)\n- _if you ask_ it runs the whole spec suite\n\n\u003e Started as a custom [Watchr](https://github.com/mynyml/watchr) script **Spectator** has grown up to a tiny gem!\n\n### Compatibility\n\nWorks with RSpec-1 and RSpec-2 (looks for a `.rspec` file in the project root).\n\n\n## Usage\n\nLaunch `spectator` in a terminal and go back to code!\n\nThe normal behavior is similar to `autotest --fast-start --no-full-after-failed`\nbut gives the user a bit more control over execution. By hitting CTRL+C (or CMD+. on OSX)\nyou get the following prompt:\n\n    ^C (Interrupted with CTRL+C)\n    --- What to do now? (q=quit, a=all-specs):\n\nType `q` and `ENTER` (or `CTRL+C` again) to quit.\n\nType `a` and `ENTER` (or `CTRL+C` again) to execute the whole suite of specs.\n\n\n## Advanced Configuration\n\nIf you want to override some path matching:\n\n**`BASE_DIR_REGEXP`:**\n\nThe glob that expanded will list the directories that contains the code. **Default:**\n\n\n**`SPEC_DIR_REGEXP`:**\n\nThe glob that expanded will list the directories that contains the specs. **Default:**\n\n**`RSPEC_COMMAND`:**\n\nThe full command that will run your specs. **Default:** `bundle exec rspec` (or `bundle exec spec` for RSpec 1.x)\n\n\n### Examples\n\n#### Inline ENV variables\n\n```shell\n# this will match lib/opal/parser.rb to spec/cli/parser.rb\nBASE_DIR_REGEXP='lib/opal' SPEC_DIR_REGEXP='spec/cli' spectator\n```\n\n\n#### Exported ENV variables\n\n```shell\nBASE_DIR_REGEXP: '(?:opal/corelib|stdlib|spec)'\nSPEC_DIR_REGEXP: '(?:spec/corelib/core|spec/stdlib/\\w+/spec)'\nRSPEC_COMMAND: 'bundle exec ./bin/opal-mspec'\nspectator\n```\n\n\n#### With a `.spectator.rb` script file\n\nThis file can be present in each project folder or in your home directory if you want to share general settings.\nWhen files are present in both folders the one in the home directory will be loaded first.\n\n```ruby\n# contents of \".spectator.rb\" file\n\nENV['BASE_DIR_REGEXP']  = '(?:opal/corelib|stdlib|spec)'\nENV['SPEC_DIR_REGEXP:'] = '(?:spec/corelib/core|spec/stdlib/\\w+/spec)'\nENV['RSPEC_COMMAND']    = 'bundle exec ./bin/opal-mspec'\n\nrequire 'spectator/success_notifier'\n\nmodule Spectator\n  class SuccessNotifier\n    def notify(success)\n      fork { exec \"say #{say_message(success)}\" }\n      super\n    end\n\n    def say_message(success)\n      success ? 'All right' : 'Ouch'\n    end\n  end\nend\n```\n\n\n## License\n\nCopyright © 2011-2014 Elia Schito, released under the [MIT license](https://github.com/elia/spectator/blob/master/MIT-LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Fspectator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felia%2Fspectator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Fspectator/lists"}