{"id":15405682,"url":"https://github.com/zverok/dokaz","last_synced_at":"2025-04-15T16:56:36.414Z","repository":{"id":33982307,"uuid":"37731483","full_name":"zverok/dokaz","owner":"zverok","description":"Use your documentation as a specification: parse and evaluate ruby code from markdown","archived":false,"fork":false,"pushed_at":"2023-02-12T12:13:15.000Z","size":98,"stargazers_count":35,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T22:41:51.007Z","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":"h2non/filetype","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zverok.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-06-19T15:54:42.000Z","updated_at":"2025-01-09T16:26:11.000Z","dependencies_parsed_at":"2024-10-19T11:21:38.091Z","dependency_job_id":null,"html_url":"https://github.com/zverok/dokaz","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.052631578947368474","last_synced_commit":"28b5187cc51d541a9f4afd60b1a92b8df34ded83"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdokaz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdokaz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdokaz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdokaz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zverok","download_url":"https://codeload.github.com/zverok/dokaz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116137,"owners_count":21215140,"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:10.543Z","updated_at":"2025-04-15T16:56:36.394Z","avatar_url":"https://github.com/zverok.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dokaz\n\nDokaz (До́каз) means \"proof\" in Ukrainian.\n\n**Dokaz** gem allows you to check all code inside your documentation, and\nsee what it outputs.\n\nIt just finds all pieces of \u003cpre\u003e```ruby\u003c/pre\u003e-marked code in your .md\nfiles, tries to run it and shows you the consequences.\n\n## Install\n\nJust as usual -- by adding `gem 'dokaz'` to your Gemfile then running\n`bundle install`.\n\nOr `[sudo] gem install dokaz`\n\n## Usage\n\n```\ndokaz --help\n\nUsage: dokaz [patterns] [options]\n\nPatterns:\n  File.md             one file\n  File.md:15          only block around line 15\n  folder/*.md         all files in folder\n\nOptions:\n  -r, --require      Additional files to require, comma-separated\n  -f, --format       Output format (\"spec\" or \"show[case]\")\n      --help         Shows this message\n```\n\nDokaz respects `.dokaz` file in local folder, which should be just its\noptions, each on newline.\n\n## Output formats\n\n* \"spec\" -- simple \"does it work?\" check:\n\n\u003cimg src=\"https://raw.github.com/zverok/dokaz/master/screenshots/spec.png\" alt=\"--format spec\"/\u003e\n\n* \"showcase\" or just \"show\" -- pretty copy-pasteable output of what\n  sample code returns and prints:\n\n\u003cimg src=\"https://raw.github.com/zverok/dokaz/master/screenshots/showcase.png\" alt=\"--format showcase\"/\u003e\n\nYou can just insert it back into your docs.\n\n## Using it for your project's README\n\n* Add to project's Gemfile (preferably to `:dev` group) `gem 'dokaz'`\n* Create file for example `spec/dokaz_helpers.rb`, containing all\n  initialization code to include your project files\n* Create file `.dokaz`, containing:\n```\nREADME.md\n--require ./spec/dokaz_helpers.rb\n```\n* Run `bundle exec dokaz`\n\n## Using it for your project's GitHub wiki\n\n* Do the same as above\n* Clone your project's wiki to some directory (outside your project's directory!):\n  `git clone git:github.com/myusername/myproject.wiki.git`\n* At your project's directory, run `bundle exec dokaz /path/to/cloned/wiki/*.md`\n\n## Known issues\n\n* ridiculously simple, naïve and not tested; though, works for me;\n* all code from all blocks is evaluated in same context (so, if block\n  from one documentation file defines some class or variable, it is\n  visible to all other blocks). Typically, it is reasonable behaviour,\n  yet can produce unwanted effects when your docs demonstrate some\n  metaprogramming or do some serious side-effects.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzverok%2Fdokaz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzverok%2Fdokaz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzverok%2Fdokaz/lists"}