Skip to content

Add email metrics section and update tooling - #126

Open
atongen wants to merge 1 commit into
mainfrom
email-metrics
Open

Add email metrics section and update tooling#126
atongen wants to merge 1 commit into
mainfrom
email-metrics

Conversation

@atongen

@atongen atongen commented Aug 7, 2026

Copy link
Copy Markdown
Member

Part of: https://dripcom.atlassian.net/browse/GG-1778

Docs

New Metrics section (source/includes/rest/_metrics.md), registered in includes_rest_api between forms and orders. One endpoint, GET /v2/:account_id/metrics/email. The two flags were never two APIs: workflow_metrics_api only gated the workflow_ids parameter, so it is documented as an argument plus the workflow_placement response field it enables. Content derives from the controller, jbuilder views, MetricsAPILimits, and email_metrics_api_spec.yaml. Error bodies are copied verbatim.

Toolchain

The repo could not bundle install on any Ruby before this: .tool-versions pinned 2.7.6 while nokogiri ~> 1.18.9 requires >= 3.1, and middleman 4.3.11 cannot run on 3.x (cannot load such file -- webrick). Fixed with the minimum viable upgrade, middleman 4.3.11 to 4.5.1, plus pins for net-ftp (no longer stdlib) and haml ~> 5.2 (6+ makes Haml::Filters a class). redcarpet 3.5.1 and rouge 2.0.7 are held deliberately, since those two decide every byte of rendered markdown and highlighting.

Adds flake.nix (two devShells: full dev, and a minimal ci), a Makefile, and GitHub Actions running nix develop .#ci --command make check.

Cleanup

Deletes .travis.yml (dead), Vagrantfile, deploy.sh, CHANGELOG.md, script/release (folded into make deploy), and .tool-versions. Prunes .gitignore from 25 to 10 lines, tidies config.rb, fixes font-selection.json mode. make deploy now depends on clean, because middleman build --clean guts build/.git while leaving the directory behind, which makes middleman deploy skip its git init and fail.

Verification

built bytes vs. live bytes

The build was validated against the artifact currently serving developer.drip.com, namely origin/gh-pages commit 13d8aff, extracted with git archive as an oracle.

Building the pre-metrics source on the new toolchain and diffing recursively against it:

diff -r oracle/ build-baseline/ no output
sha of every file, both trees 170af66c2f17b7b7a0a26513de7c70fed593606d

Byte-identical across every file: HTML, CSS, JS, fonts, images. The rouge and redcarpet holds mean the upgrade changed nothing that ships.

With the metrics doc restored, index.html is the only file that differs, and it is a pure insertion of 358 lines added and 0 removed, in exactly 2 hunks:

396a397,407 TOC entry
4265a4277,4623 Metrics section body

misc

I tried to detach this repo as a fork from ringcentral, but it was not possible because it has children of it's own.

forks_count : 2
  amarno/api-docs            last pushed 2019-06-11
  thomcchester/api-docs      last pushed 2018-10-03

We'd probably have to open a github support ticket to push this along further.

@atongen atongen self-assigned this Aug 7, 2026
@atongen
atongen requested a lite review from Copilot August 7, 2026 19:36
@atongen
atongen marked this pull request as ready for review August 7, 2026 19:37
@atongen
atongen requested a review from a team August 7, 2026 19:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new REST docs section for email metrics and modernizes the repository toolchain/build/deploy workflow to resolve Ruby/gem compatibility issues and standardize local + CI builds.

Changes:

  • Add “Metrics” REST documentation (GET /v2/:account_id/metrics/email) and register it in the REST includes manifest.
  • Upgrade the Middleman/Ruby toolchain and introduce Nix + Makefile-based workflows for local development and CI builds.
  • Remove legacy tooling/config (Travis, Vagrant, old deploy/release scripts) and tidy repo configuration files.

Reviewed changes

Copilot reviewed 14 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Vagrantfile Removes legacy Vagrant-based dev environment.
source/index.html.md Registers the new REST metrics include in the docs manifest.
source/includes/rest/_metrics.md Adds full documentation for the email metrics endpoint, examples, limits, and errors.
script/release Removes legacy release script in favor of Makefile/Nix workflow.
README.md Updates project onboarding/editing/toolchain/CI/deploy docs for Nix + Makefile.
Makefile Adds standardized targets for serve/build/check/preview/deploy/clean.
Gemfile.lock Updates dependency lockfile for the upgraded Ruby/Middleman toolchain and new pins.
Gemfile Bumps Ruby and Middleman requirements; pins haml/net-ftp for compatibility.
font-selection.json Restores/tidies font selection metadata (mode/content update).
flake.nix Adds Nix flake defining dev + CI shells and build dependencies.
flake.lock Locks nixpkgs input for reproducible Nix environments.
deploy.sh Removes legacy deploy script (superseded by Middleman deploy + Makefile).
config.rb Tidies build/deploy/server configuration comments and structure.
CHANGELOG.md Removes legacy upstream changelog not maintained for this repo.
.travis.yml Removes deprecated Travis CI configuration.
.tool-versions Removes asdf tool version pin (superseded by Nix flake).
.gitignore Simplifies ignore rules and adds bundler/Nix-related paths.
.github/workflows/ci.yml Adds GitHub Actions CI that builds via Nix + Makefile and uploads the built site artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
3. `cd slate`
4. Initialize and start Slate. You can either do this locally, or with Vagrant:
- Blockquoted lines (`> To fetch a workflow:`) become the annotation above a code sample.
- Consecutive ` ```shell `, ` ```ruby `, ` ```javascript ` blocks render as language tabs.
<tbody>
<tr>
<td><code>email_id</code></td>
<td>A read-only Drip generated unique id used to identify each email record.</td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants