{"id":18712094,"url":"https://github.com/getappmap/appmap-ruby","last_synced_at":"2025-06-24T02:04:54.748Z","repository":{"id":38307636,"uuid":"167976520","full_name":"getappmap/appmap-ruby","owner":"getappmap","description":"AppMap client library for Ruby","archived":false,"fork":false,"pushed_at":"2025-01-03T14:29:17.000Z","size":5342,"stargazers_count":100,"open_issues_count":18,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-13T15:51:32.148Z","etag":null,"topics":["appmap","ruby"],"latest_commit_sha":null,"homepage":"https://appmap.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getappmap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2019-01-28T14:33:10.000Z","updated_at":"2025-05-17T11:13:16.000Z","dependencies_parsed_at":"2023-12-18T15:27:10.259Z","dependency_job_id":"94d902b6-5d55-402c-832d-87f250b72e23","html_url":"https://github.com/getappmap/appmap-ruby","commit_stats":{"total_commits":714,"total_committers":14,"mean_commits":51.0,"dds":"0.39075630252100846","last_synced_commit":"492ad15bc3cea3a1f98576897bd54ccbf0e8fbb4"},"previous_names":["applandinc/appmap-ruby"],"tags_count":165,"template":false,"template_full_name":null,"purl":"pkg:github/getappmap/appmap-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getappmap%2Fappmap-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getappmap%2Fappmap-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getappmap%2Fappmap-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getappmap%2Fappmap-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getappmap","download_url":"https://codeload.github.com/getappmap/appmap-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getappmap%2Fappmap-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261589912,"owners_count":23181437,"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":["appmap","ruby"],"created_at":"2024-11-07T12:40:49.599Z","updated_at":"2025-06-24T02:04:54.718Z","avatar_url":"https://github.com/getappmap.png","language":"Ruby","readme":"\n- [About](#about)\n- [Usage](#usage)\n- [Development](#development)\n  - [Internal architecture](#internal-architecture)\n  - [Running tests](#running-tests)\n  - [Using fixture apps](#using-fixture-apps)\n    - [`test/fixtures`](#testfixtures)\n    - [`spec/fixtures`](#specfixtures)\n\n# About\n\n`appmap-ruby` is a Ruby Gem for recording\n[AppMaps](https://github.com/applandinc/appmap) of your code.\n\"AppMap\" is a data format which records code structure (modules, classes, and methods), code execution events\n(function calls and returns), and code metadata (repo name, repo URL, commit\nSHA, labels, etc). It's more granular than a performance profile, but it's less\ngranular than a full debug trace. It's designed to be optimal for understanding the design intent and structure of code and key data flows.\n\n# Usage\n\nVisit the [AppMap for Ruby](https://appland.com/docs/reference/appmap-ruby.html) reference page on AppLand.com for a complete reference guide.\n\n# Development\n[![Build Status](https://travis-ci.com/getappmap/appmap-ruby.svg?branch=master)](https://travis-ci.com/getappmap/appmap-ruby)\n\n## Internal architecture\n\n**Configuration**\n\n*appmap.yml* is loaded into an `AppMap::Config`.\n\n**Hooking**\n\nOnce configuration is loaded, `AppMap::Hook` is enabled. \"Hooking\" refers to the process of replacing a method\nwith a \"hooked\" version of the method. The hooked method checks to see if tracing is enabled. If so, it wraps the original\nmethod with calls that record the parameters and return value.\n\n**Builtins**\n\n`Hook` begins by iterating over builtin classes and modules defined in the `Config`. Builtins include code\nlike `openssl` and `net/http`. This code is not dependent on any external libraries being present, and\n`appmap` cannot guarantee that it will be loaded before builtins. Therefore, it's necessary to require it and\nhook it by looking up the classes and modules as constants in the `Object` namespace.\n\n**User code and gems**\n\nAfter hooking builtins, `Hook` attaches a [TracePoint](https://ruby-doc.org/core-2.6/TracePoint.html) to `:begin` events.\nThis TracePoint is notified each time a new class or module is being evaluated. When this happens, `Hook` uses the `Config`\nto determine whether any code within the evaluated file is configured for hooking. If so, a `TracePoint` is attached to\n`:end` events. Each `:end` event is fired when a class or module definition is completed. When this happens, the `Hook` enumerates\nthe public methods of the class or module, hooking the ones that are targeted by the `Config`. Once the `:end` TracePoint leaves\nthe scope of the `:begin`, the `:end` TracePoint is disabled.\n\n## Running tests\n\nBefore running tests, configure `local.appmap` to point to your local `appmap-ruby` directory.\n```\n$ bundle config local.appmap $(pwd)\n```\n\nRun the tests via `rake`:\n```\n$ bundle exec rake test\n```\n\nThe `test` target will build the native extension first, then run the tests. If you need\nto build the extension separately, run\n```\n$ bundle exec rake compile\n```\n\n## Using fixture apps\n\n### `test/fixtures`\n\nThe fixture apps in `test/fixtures` are plain Ruby projects that exercise the basic functionality of the\n`appmap` gem. To develop in a fixture, simply enter the fixture directory and `bundle`.\n\n### `spec/fixtures`\n\nThe fixture apps in `spec/fixtures` are simple Rack, Rails5, and Rails6 apps.\nYou can use them to interactively develop and test the recording features of the `appmap` gem.\nThese fixture apps are more sophisticated than `test/fixtures`, because they include additional\nresources such as a PostgreSQL database. Still, you can simply enter the fixture directory and `bundle`.\n\nIf you don't have PostgreSQL on the local (default) socket, you can export `DATABASE_URL` to\npoint to the database server you want to use. \n\nYou can launch a database like this:\n\n```\n➜ docker-compose -p appmap-ruby up -d\n... stuff\n➜ docker-compose port pg 5432\n0.0.0.0:64479\n➜ export DATABASE_URL=postgres://postgres@localhost:64479\n```\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetappmap%2Fappmap-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetappmap%2Fappmap-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetappmap%2Fappmap-ruby/lists"}