{"id":21519360,"url":"https://github.com/alexwayfer/gem_generator","last_synced_at":"2025-04-09T22:09:24.023Z","repository":{"id":39657669,"uuid":"277577096","full_name":"AlexWayfer/gem_generator","owner":"AlexWayfer","description":"Gem for new gems generation.","archived":false,"fork":false,"pushed_at":"2025-04-01T20:26:02.000Z","size":183,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T22:09:17.104Z","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/AlexWayfer.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":"2020-07-06T15:17:41.000Z","updated_at":"2025-04-01T20:26:05.000Z","dependencies_parsed_at":"2023-02-13T22:16:02.351Z","dependency_job_id":"b2938edc-d495-472a-b9fb-57686792b7bf","html_url":"https://github.com/AlexWayfer/gem_generator","commit_stats":{"total_commits":150,"total_committers":2,"mean_commits":75.0,"dds":0.2733333333333333,"last_synced_commit":"0149f297fa65484890cb926313b703058521e4e4"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fgem_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fgem_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fgem_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fgem_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexWayfer","download_url":"https://codeload.github.com/AlexWayfer/gem_generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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-24T00:57:32.742Z","updated_at":"2025-04-09T22:09:24.004Z","avatar_url":"https://github.com/AlexWayfer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gem Generator\n\n[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/gem_generator?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/gem_generator)\n[![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/gem_generator/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/gem_generator)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/gem_generator.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/gem_generator)\n[![license](https://img.shields.io/github/license/AlexWayfer/gem_generator.svg?style=flat-square)](LICENSE.txt)\n[![Gem](https://img.shields.io/gem/v/gem_generator.svg?style=flat-square)](https://rubygems.org/gems/gem_generator)\n\nGem for new gems generation.\n\nIt was created for myself, but you can suggest options for generation to adopt it for your usage.\n\n## Installation\n\nInstall it globally:\n\n```shell\ngem install gem_generator\n```\n\n## Usage\n\n### With local template\n\n```sh\ngem_generator --namespace=your_github_nickname name_of_a_new_gem path/to/template\n```\n\n### With GitHub template\n\n```sh\ngem_generator --namespace=your_github_nickname name_of_a_new_gem template_github_org/template_github_repo --git\n```\n\nBe aware: `gem_generator` uses `template/` directory from the GitHub repo, not the root one.\n\n### Other options\n\n`gem_generator` inherits [`project_generator`](https://github.com/AlexWayfer/project_generator),\nso please check it's general options, like `--indentation`, or you can use `--help` at any moment.\n\n### Config file\n\nYou can create a config file, `.gem_generator.yaml` (or `.yml`) like this:\n\n```yaml\n## This can be overwriten via `--namespace` CLI option, config just as default\n:namespace: AlexWayfer\n\n## These options have defaults from `git config --get user.*`\n# :author:\n#   :name: Alexander Popov\n#   :email: alex.wayfer@gmail.com\n```\n\nGem Generator will look for it in each directory from current to the root,\nso the common place for it in the home directory, but you can redefine it,\nfor example, in some directory for work projects.\n\n## Template creation\n\nExample of gem template you can see at [AlexWayfer/gem_template](https://github.com/AlexWayfer/gem_template).\n\nAvailable paths:\n\n| Path part  | Example of source             | Example of result                      |\n| ---------- | ----------------------------- | -------------------------------------- |\n| `gem_name` | `gem_name.gemspec`            | `faraday-my_middleware.gemspec`        |\n| `gem_path` | `lib/gem_path/version.rb.erb` | `lib/faraday/my_middleware/version.rb` |\n\nAny `*.erb` file will be rendered via [ERB](https://ruby-doc.org/stdlib/libdoc/erb/rdoc/ERB.html);\nif you want an `*.erb` file as result — name it as `*.erb.erb` (even if there are no tags).\n\nAvailable variables:\n\n| Variable               | Example of result                                          |\n| ---------------------- | ---------------------------------------------------------- |\n| `name`                 | `faraday-my_middleware`                                    |\n| `title`                | `Faraday My Middleware`                                    |\n| `path`                 | `faraday/my_middleware`                                    |\n| `module_name`          | `Faraday::MyMiddleware`                                    |\n| `modules`              | `['Faraday', 'MyMiddleware']`                              |\n| `version_constant`     | `Faraday::MyMiddleware::VERSION`                           |\n| `summary`              | asked from user                                            |\n| `summary_string`       | summary wrapped in `'` or `\"`, depending on `'` inside     |\n| `description`          | by default is `summary` with guaranteed dot at the end     |\n| `indentation`          | `tabs` or `spaces`, as user specified by option            |\n| `github_path`          | `AlexWayfer/faraday-my_middleware`                         |\n| `github_namespace_uri` | `https://github.com/AlexWayfer`                            |\n| `github_uri`           | `https://github.com/AlexWayfer/faraday-my_middleware`      |\n| `author_name`          | `Alexander Popov`                                          |\n| `author_name_string`   | author name wrapped in `'` or `\"`, depending on `'` inside |\n| `author_email`         | `alex.wayfer@gmail.com`                                    |\n\nBy default indentation is `tabs`, but if a template spaces-indented — option will not affect.\nSo, this option only for tabs-indented templates.\n\n### Git templates\n\nYou can create public git-templates and then guide users to call\n`gem_generator gem_name your_org/your_repo --git`, but be aware that `gem_generator` will look\nfor template inside `template/` directory to allow you having out-of-template README,\nspecs (for the template itself), anything else.\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\n\nThen, run `bundle exec rspec` to run the tests.\n\nTo install this gem onto your local machine, run `toys gem install`.\n\nTo release a new version, run `toys gem release %version%`.\nSee how it works [here](https://github.com/AlexWayfer/gem_toys#release).\n\n## Contributing\n\nBug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/gem_generator).\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fgem_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexwayfer%2Fgem_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fgem_generator/lists"}