{"id":13482867,"url":"https://github.com/interagent/pliny","last_synced_at":"2025-05-15T00:11:39.062Z","repository":{"id":16349536,"uuid":"19099484","full_name":"interagent/pliny","owner":"interagent","description":"An opinionated toolkit for writing excellent APIs in Ruby.","archived":false,"fork":false,"pushed_at":"2025-02-10T10:41:12.000Z","size":733,"stargazers_count":800,"open_issues_count":20,"forks_count":74,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-04-23T01:07:19.249Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interagent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2014-04-24T07:22:09.000Z","updated_at":"2025-02-14T15:51:54.000Z","dependencies_parsed_at":"2022-08-07T08:15:20.494Z","dependency_job_id":"f5e283bc-6e55-4887-b754-8697a2a2af2d","html_url":"https://github.com/interagent/pliny","commit_stats":null,"previous_names":["12-oz/pliny"],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interagent%2Fpliny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interagent%2Fpliny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interagent%2Fpliny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interagent%2Fpliny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interagent","download_url":"https://codeload.github.com/interagent/pliny/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249206,"owners_count":22039029,"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-07-31T17:01:06.212Z","updated_at":"2025-05-15T00:11:34.044Z","avatar_url":"https://github.com/interagent.png","language":"Ruby","funding_links":[],"categories":["`API Frameworks`","Writing APIs","Awesome Ruby CLIs","Ruby","API Builder","Gems","API Builder and Discovery","API Frameworks"],"sub_categories":["`Ruby`","Generating","API","Ruby"],"readme":"# Pliny\n\n[![Gem version](http://img.shields.io/gem/v/pliny.svg)](https://rubygems.org/gems/pliny)\n[![Github Actions CI](https://github.com/interagent/pliny/actions/workflows/ruby.yml/badge.svg)](https://github.com/interagent/pliny/actions)\n\n\nPliny helps Ruby developers write and maintain excellent APIs.\n\nIt bundles the best patterns, libraries and practices we've seen after writing a lot of APIs.\n\n\n## Resources\n\n- [Documentation](https://github.com/interagent/pliny/wiki)\n- [Mailing list](https://groups.google.com/group/pliny-talk)\n\n\n## Getting started\n\nInstall gem:\n\n```bash\n$ gem install pliny\n```\n\nAnd initialize your new API app:\n\n```bash\n$ pliny-new myapp\n$ cd myapp \u0026\u0026 bin/setup\n```\n\nPliny bundles [generators](#generators) to help you get started:\n\n```bash\n$ bundle exec pliny-generate model artist\ncreated model file ./lib/models/artist.rb\ncreated migration ./db/migrate/1408995997_create_artists.rb\ncreated test ./spec/models/artist_spec.rb\n\n$ bundle exec pliny-generate mediator artists/creator\ncreated mediator file ./lib/mediators/artists/creator.rb\ncreated test ./spec/mediators/artists/creator_spec.rb\n\n$ bundle exec pliny-generate endpoint artists\ncreated endpoint file ./lib/endpoints/artists.rb\nadd the following to lib/routes.rb:\n  mount Endpoints::Artists\ncreated test ./spec/endpoints/artists_spec.rb\ncreated test ./spec/acceptance/artists_spec.rb\n\n$ bundle exec pliny-generate migration fix_something\ncreated migration ./db/migrate/1395873228_fix_something.rb\n\n$ bundle exec pliny-generate schema artists\ncreated schema file ./schema/schemata/artist.yaml\nrebuilt ./schema/schema.json\n```\n\nTo test your application:\n\n```bash\n$ bundle exec rake\n```\n\nOr to run a single test suite:\n\n```bash\n$ bundle exec rspec spec/acceptance/artists_spec.rb\n```\n\n### Generators\n\n```bash\n$ bundle exec pliny-generate\n```\n\n```\nCommands:\n  pliny-generate endpoint NAME    # Generates an endpoint\n  pliny-generate help [COMMAND]   # Describe available commands or one specific command\n  pliny-generate mediator NAME    # Generates a mediator\n  pliny-generate migration NAME   # Generates a migration\n  pliny-generate model NAME       # Generates a model\n  pliny-generate scaffold NAME    # Generates a scaffold of endpoint, model, schema and serializer\n  pliny-generate schema NAME      # Generates a schema\n  pliny-generate serializer NAME  # Generates a serializer\n```\n\n### Rake tasks\n\nPliny adds common Rake tasks to help maintain your app:\n\n```bash\nrake db:create        # Create the database\nrake db:drop          # Drop the database\nrake db:migrate       # Run database migrations\nrake db:rollback      # Rollback last database migration\nrake db:schema:dump   # Dump the database schema\nrake db:schema:load   # Load the database schema\nrake db:schema:merge  # Merges migrations into schema and removes them\nrake db:seed          # Seed the database with data\nrake db:setup         # Setup the database\nrake schema           # Rebuild schema.json\n```\n\n### Commands\n\nAnd provides the following commands:\n\n```bash\n$ foreman start                             # Starts server\n$ foreman run bin/console                   # IRB/Pry console\n$ foreman run bin/run 'puts \"hello world\"'  # Run automated code\n```\n\n(hint: don't forget `foreman run` in development)\n\n### Updating\n\nUse `pliny-update` to update the Pliny app in the current directory.\n\nThis not only bumps the version dependency, but also applies any changes that happened in the template app (for instance: new initializer, tweaks in the base endpoint, etc).\n\n\n## Development\n\nRun tests:\n\n```\n$ bundle install\n$ createdb pliny-gem-test\n$ rake\n```\n\n## Meta\n\nCreated by Brandur Leach and Pedro Belo.\n\nMIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteragent%2Fpliny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finteragent%2Fpliny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteragent%2Fpliny/lists"}