{"id":20334950,"url":"https://github.com/mdb/middleman-build-reporter","last_synced_at":"2025-10-14T04:00:20.285Z","repository":{"id":20976432,"uuid":"24265449","full_name":"mdb/middleman-build-reporter","owner":"mdb","description":"Fingerprint your Middleman build with version details.","archived":false,"fork":false,"pushed_at":"2016-01-06T04:45:52.000Z","size":323,"stargazers_count":13,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-08T19:23:57.372Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-20T14:53:59.000Z","updated_at":"2020-02-23T00:34:14.000Z","dependencies_parsed_at":"2022-07-30T03:08:01.918Z","dependency_job_id":null,"html_url":"https://github.com/mdb/middleman-build-reporter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fmiddleman-build-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fmiddleman-build-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fmiddleman-build-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fmiddleman-build-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdb","download_url":"https://codeload.github.com/mdb/middleman-build-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487733,"owners_count":21112188,"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-14T20:38:41.755Z","updated_at":"2025-10-14T04:00:15.040Z","avatar_url":"https://github.com/mdb.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/mdb/middleman-build-reporter.svg?branch=master)](https://travis-ci.org/mdb/middleman-build-reporter)\n[![Code Climate](https://codeclimate.com/github/mdb/middleman-build-reporter/badges/gpa.svg)](https://codeclimate.com/github/mdb/middleman-build-reporter)\n\n# middleman-build-reporter\n\n\u003e Which branch/version/configuration/build has been\n\u003e deployed to which data center/server/environment?\n\nmiddleman-build-reporter is a [Middleman](http://middlemanapp.com) extension\nto help you understand what code has been deployed to an environment, and\nwhether you're viewing cached or stale build artifacts.\n\nFeatures:\n\n1. Generate YAML and/or JSON files reporting build-time/version details for your Middleman app.\n2. Fingerprint each Middleman HTML template with a `\u003c!-- FINGERPRINT --\u003e` comment surfacing build-time/version details.\n\n## Output\n\nmiddleman-build-reporter can output YAML and/or JSON:\n\nThe `build/build.yaml`:\n\n```yaml\nbranch: master\nrevision: 244921c81c9e21a1973659df5f702937b91cfcd4\nbuild_time: 2014-09-20 10:50:55 -0400\nversion: 1.2.3\n```\n\nThe `build/build.json`:\n\n```json\n{\n  \"branch\": \"master\",\n  \"revision\": \"244921c81c9e21a1973659df5f702937b91cfcd4\",\n  \"build_time\": \"2014-09-20 10:50:55 -0400\",\n  \"version\": \"1.2.3\"\n}\n```\n\nmiddleman-build-reporter also offers a `build_reporter_fingerprint` helper to fingerprint HTML templates:\n\n```\n\u003c!--\nFINGERPRINT:\n---\nbranch: master\nrevision: c786c0addcde128a0823c40ebb4a3ab453411f10\nbuild_time: '2014-10-21 07:27:51 -0400'\nversion: 1.2.3\n--\u003e\n```\n\n## Usage\n\nIn your `Gemfile`:\n\n```ruby\ngem 'middleman-build-reporter'\n```\n\nInstall it:\n\n```bash\n$ bundle install\n```\n\nActivate it within your `config.rb`:\n\n```\nactivate :build_reporter\n```\n\nSupported configuration\n\n```ruby\nactivate :build_reporter do |build|\n  # optional; the path to your project repository root\n  # this must be absolute or relative from your build directory\n  # defaults to app root\n  build.repo_root = '../../../'\n\n  # optional; the version of your app\n  # defaults to ''\n  build.version = '1.2.3'\n\n  # optional; the build reporter file name\n  # defaults to 'build'\n  build.reporter_file = 'build'\n\n  # optional; an array of desired build reporter file formats\n  # supported formats: yaml, json\n  # defaults to ['yaml']\n  build.reporter_file_formats = ['yaml', 'json']\nend\n```\n\n## Fingerprinting your HTML templates\n\nUse the `build_reporter_fingerprint` to fingerprint your HTML templates with build/version details:\n\nExample usage in `layouts/layout.erb`:\n\n```html\n\u003cbody\u003e\n  \u003ch1\u003eSome Site\u003c/h1\u003e\n\u003c/body\u003e\n\n\u003c%= build_reporter_fingerprint %\u003e\n```\n\nExample fingerprint HTML comment:\n\n```html\n\u003cbody\u003e\n  \u003ch1\u003eSome Site\u003c/h1\u003e\n\u003c/body\u003e\n\n\u003c!--\nFINGERPRINT:\n---\nbranch: master\nrevision: c786c0addcde128a0823c40ebb4a3ab453411f10\nbuild_time: '2014-10-21 07:27:51 -0400'\nversion: 1.2.3\n--\u003e\n```\n\n## Reporting additional custom build details\n\nAdd any additional build details to a `.build_reporter.yml` file in your project's root.\n\nThe `.build_reporter.yml` can be produced as part of your app's build process, or manually managed.\n\n### Example - custom extended details:\n\nThe `.build_reporter.yml`:\n\n```\n---\nfoo: 'bar'\nbaz: 'bim'\n```\n\nThe output `build/build.yaml`:\n\n```\nbranch: master\nrevision: 244921c81c9e21a1973659df5f702937b91cfcd4\nbuild_time: 2014-09-20 10:50:55 -0400\nversion: 1.2.3\nfoo: bar\nbaz: bim\n```\n\n### Example - using .build_reporter.yml to override built-in middleman-build-reporter details:\n\nThe `.build_reporter.yml` file can also override the values set by `Middleman::BuildReporter::Reporter`.\n\nThe `.build_reporter.yml`:\n\n```\n---\nrevision: 'some_revision'\nbuild_time: 'some_other_time'\n```\n\nThe output `build/build.yaml`:\n\n```\nbranch: master\nrevision: some_revision\nbuild_time: some_other_time\nversion: 1.2.3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fmiddleman-build-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdb%2Fmiddleman-build-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fmiddleman-build-reporter/lists"}