{"id":22313307,"url":"https://github.com/nwops/retrospec","last_synced_at":"2025-07-11T20:05:15.130Z","repository":{"id":47371558,"uuid":"42911673","full_name":"nwops/retrospec","owner":"nwops","description":"A pluggable framework to automate repetitive project file creation","archived":false,"fork":false,"pushed_at":"2021-09-02T03:25:47.000Z","size":95,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T07:04:48.973Z","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwops.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":"2015-09-22T04:38:35.000Z","updated_at":"2020-04-17T02:36:40.000Z","dependencies_parsed_at":"2022-09-16T14:00:53.180Z","dependency_job_id":null,"html_url":"https://github.com/nwops/retrospec","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/nwops/retrospec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwops%2Fretrospec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwops%2Fretrospec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwops%2Fretrospec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwops%2Fretrospec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwops","download_url":"https://codeload.github.com/nwops/retrospec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwops%2Fretrospec/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264890087,"owners_count":23678833,"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-12-03T22:06:55.856Z","updated_at":"2025-07-11T20:05:15.108Z","avatar_url":"https://github.com/nwops.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Retrospec\n\n[![Gem Version](https://badge.fury.io/rb/retrospec.svg)](http://badge.fury.io/rb/retrospec)\n[![Build Status](https://travis-ci.org/nwops/retrospec.png)](https://travis-ci.org/nwops/retrospec)\n\nRetrospec is a framework that allows the automation of repetitive project file creation with just about any kind of programming\nproject through the use of a pluggable architecture.\n\nThe idea originally came from another project that performed the same function but was scoped to puppet module creation\ncalled [puppet-retrospec](https://github.com/nwops/puppet-retrospec.git). The goal of puppet-retrospec was to document\nthe workflow and its best practices inside templates. This idea has now been generalized to cover any kind of project,\ntherefore making it dead simple for anybody to get their project started with a simple command.\n\nThere are two scenarios that this gem can be used for.\n\n1. Initial project creation\n2. Project augmentation\n\nThe first scenario is to aid the creation of the project as many times information is spread across people, teams, blogs,\nforums and is often out of date. By keeping this information in templates we have removed the burden of finding this\ninformation from the user. However, there are many tools in existence today that already help in this area, but they\nare often not customizable.\n\nThe second scenario it to augment an existing project that a user may have already started. When this is the case\nretrospec can \"retrofit\" an existing project with the latest workflow and best practices based on the templates inside\na plugin gem. An existing project also contains information that can be used to automatically generate lots of files beyond just\ninitial module creation. A great example of this is with [puppet-retrospec](https://github.com/nwops/puppet-retrospec.git),\nwhere the goal is to automaticly generate valid unit tests based on the code the author wrote. So as the user writes more\ncode, they can easily create unit test files by just running retrospec.\n\nFurthermore, retrospec is meant to be run multiple times during a project lifecycle in order to augment it with new files.\nBecause of the safe file creation, no file can be overwritten so the only way to overcome this is to manually delete the\nfile and let retrospec recreate it automatically.\n\nThis idea is inspried by a few projects:\n\n- maven archetypes\n- jeweler ruby gem\n- puppet-lint\n\n## Install\n\n`gem install retrospec`\n\n## Known issues\n\nIf you have previously installed the puppet-retrospec gem, there is a conflict with the executable file `retrospec` because\nthis gem also uses an executable file with the same name. As a result I will be moving the legacy puppet-retrospec gem\nto a retrospec plugin that performs the same functionality. But first I have to release this gem and the plugingem in order\nto move the puppet-retrospec to a plugin.\n\n## Usage\n\n### List Available Plugins\n\nBy default the retrospec gem does not do anything but provide a framework for plugins. In order to do anything you will\nneed to install a retrospec plugin. To see a list of plugins use: `retrospec -a` which will query the following [url](https://raw.githubusercontent.com/nwops/retrospec/master/available_plugins.yaml).\n\n### Setting the module path\n\nSetting the module path is the only option that can change the outcome of the plugin. By default it will use the current\ndirectory, but this can be overridden by using the `retrospec -m` option.\n\n### Subcommands\n\nSubcommands are added dynamically to the help screen when installing new retrospec plugins.\nSo just use `retrospec -h` to see the list. The name of the plugin is usually the name of subcommand.\n\n```\nretrospec -h\nA framework to automate your development workflow by generating common files and test patterns.\n\nUsage: retrospec [global options] subcommand [subcommand options]\nAvailable subcommands:\nplugingen\n  -m, --module-path=\u003cs\u003e      The path (relative or absolute) to the module directory (default: /Users/cosman/github/retrospec)\n  -a, --available-plugins    Show an online list of available plugins\n  -v, --version              Print version and exit\n  -h, --help                 Show this message\n```\n\nNote: If you are really good at optimist and can suggest a better way to display subcommands please let me know. I was going\nfor a git like interface but came up short.\n\n### Using subcommands\n\nOnce you find the subcommand you want just run the subcommand like: `retrospec -m tmp/test4 plugingen`. If you\nhave already created your project you don't need to pass the `-m` option if your current working directory\nis the root of your project. So you may find yourself running `retrospec plugin_name` often inside your project.\n\nGetting help with a subcommand is easy as using `retrospec -m tmp/test4 plugin_name -h`\n\n```\n% retrospec -m /tmp/new_retrospec_plugin plugingen -h\nOptions:\n  -n, --name=\u003cs\u003e    The name of the new plugin (default: new_retrospec_plugin)\n  -h, --help        Show this message\n```\n\n### Retrspec config file\n\nRetrospec will read the config file at ~/.retrospec/config.yaml for configs related to retrospec itself or any plugins\nyou install. Since you may be running retrospec over and over it will be annoying to always have to specify this info\nso please refer to the plugin documentation for which options you can save to the config file. At this time there are\nno retrospec config options being read form the config file. By default retrospec will add a simple config to ~/.retrospec\n\n## Plugins\n\nPlease see the following [list](https://raw.githubusercontent.com/nwops/retrospec/master/available_plugins.yaml) for available plugins.\n\n## Plugin development and future plugin ideas\n\nPlease see the [plugin document](plugin_development.md) for creating new retrospec plugins.\n\nSome ideas I have in my head for future plugins that should be created.\n\n- foreman plugin generator\n- foreman hammer cli plugin generator\n- smart-proxy plugin generator\n- nodejs project generator\n- chef module generator\n- ansible module generator\n- saltstack module generator (possibly multiple types of plugins to create here)\n- groovy project generator\n- puppet module generator (in progress)\n\nThe sky is really the limit for what we can create since the usage is limited to any project that contains files.\n\n## Special file extensions\n\n- If a file contains `.sync` the file will be always be synced\n- If a file contains `.retrospec.erb` this tells retrospec that the file should be rendered as an erb file\n\n## Contributing to retrospec\n\n- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.\n- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.\n- Fork the project.\n- Start a feature/bugfix branch.\n- Commit and push until you are happy with your contribution.\n- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.\n- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.\n\n## Copyright\n\nCopyright (c) 2015 Corey Osman. See LICENSE.txt for\nfurther details.\n\n## Paid Support\n\nWant to see new features developed much faster? Contact me about a support contract so I can develop this tool during\nthe day instead of after work. contact: sales@logicminds.biz\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwops%2Fretrospec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwops%2Fretrospec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwops%2Fretrospec/lists"}