{"id":16746883,"url":"https://github.com/ohbarye/automaildoc","last_synced_at":"2025-04-10T13:43:48.076Z","repository":{"id":56842687,"uuid":"102172195","full_name":"ohbarye/automaildoc","owner":"ohbarye","description":"📧 Generate email preview from your mail spec","archived":false,"fork":false,"pushed_at":"2018-03-25T13:06:53.000Z","size":29,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T23:13:10.420Z","etag":null,"topics":["automation","documentation","gem","mail","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/automaildoc","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/ohbarye.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}},"created_at":"2017-09-02T04:19:02.000Z","updated_at":"2021-02-12T01:18:43.000Z","dependencies_parsed_at":"2022-09-01T06:31:48.726Z","dependency_job_id":null,"html_url":"https://github.com/ohbarye/automaildoc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbarye%2Fautomaildoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbarye%2Fautomaildoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbarye%2Fautomaildoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohbarye%2Fautomaildoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohbarye","download_url":"https://codeload.github.com/ohbarye/automaildoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248226389,"owners_count":21068194,"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":["automation","documentation","gem","mail","ruby"],"created_at":"2024-10-13T02:08:34.066Z","updated_at":"2025-04-10T13:43:48.059Z","avatar_url":"https://github.com/ohbarye.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automaildoc\n\n[![Gem Version](https://badge.fury.io/rb/automaildoc.svg)](https://badge.fury.io/rb/automaildoc)\n[![Build Status](https://travis-ci.org/ohbarye/automaildoc.svg?branch=master)](https://travis-ci.org/ohbarye/automaildoc)\n\nAutomaildoc is a gem to generate a list of about mails from your mail spec.\n\n![image](https://user-images.githubusercontent.com/1811616/30522089-771f2474-9c05-11e7-8f9f-ed8f828c18b8.png)\n\nThis gem, idea, design all are completely inspired by the awesome predecessor, https://github.com/r7kamura/autodoc.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'automaildoc', group: :test\n```\n\nAnd then execute:\n\n```console\n$ bundle\n```\n\nOr install it yourself as:\n\n```console\n$ gem install automaildoc\n```\n\n## Usage\n\n1. Add a `automaildoc` tag to your mail spec.\n\n```ruby\nRSpec.describe 'Sign up mail', automaildoc: true do\n  let!(:user) { create(:user) }\n  let!(:mail) { SignupMailer.mail(user) }\n\n  it 'should send to a user' do\n    expect(mail.to).to eq user\n  end\nend\n```\n\n2. Run rspec test with `AUTOMAILDOC`\n\n```console\n$ AUTOMAILDOC=1 bundle exec rspec\n```\n\nThat's it. Then Automaildoc generates an HTML file to `./doc/mails`. The file should be what you've wanted.\n\n![automaildoc](https://user-images.githubusercontent.com/1811616/29994112-c6dacbc6-9002-11e7-812f-a346d415d6c4.gif)\n\n### Example\n\nYou can see `spec/dummy/doc/toc.html` in this repository, which is auto-generated one from mail specs in `spec/mails`.\n\n### Custom description\n\nYou can write descriptions with let(:description).\n\n```ruby\ndescribe 'Sign up mail', automaildoc: true do\n  let(:description) { 'Sign up mail for newly signed up user' }\n\n  # examples follow\nend\n```\n\n### Configuration\n\n- path - [String] location to put files (default: `./doc/mails`)\n- html_template - [String] ERB template for a mail (default: `./automaildoc/templates/mail.html.erb`)\n- toc_html_template - [String] ERB template for table of content (default: `./automaildoc/templates/toc.html.erb`)\n\n```ruby\nAutomaildoc.configuration.path = \"doc/mails\"\nAutomaildoc.configuration.html_template = File.read(File.expand_path(\"../automaildoc/templates/mail.html.erb\", __FILE__))\nAutomaildoc.configuration.toc_html_template = File.read(File.expand_path(\"../automaildoc/templates/toc.html.erb\", __FILE__))\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ohbarye/automaildoc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohbarye%2Fautomaildoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohbarye%2Fautomaildoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohbarye%2Fautomaildoc/lists"}