{"id":13531601,"url":"https://github.com/sue445/faraday-mashify","last_synced_at":"2025-12-24T12:34:47.441Z","repository":{"id":45097632,"uuid":"445809014","full_name":"sue445/faraday-mashify","owner":"sue445","description":"Faraday middleware for wrapping responses into Hashie::Mash","archived":false,"fork":false,"pushed_at":"2025-03-24T14:43:03.000Z","size":62,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T15:37:12.042Z","etag":null,"topics":["faraday","faradaymiddleware"],"latest_commit_sha":null,"homepage":"https://sue445.github.io/faraday-mashify","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/sue445.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-01-08T12:09:52.000Z","updated_at":"2025-03-24T14:43:04.000Z","dependencies_parsed_at":"2024-01-14T01:53:58.965Z","dependency_job_id":"2716a36d-b289-42c2-8da8-4d030791a4d9","html_url":"https://github.com/sue445/faraday-mashify","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":0.1470588235294118,"last_synced_commit":"085e2246923a0ded5131649d73b2abb37d3340e6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Ffaraday-mashify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Ffaraday-mashify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Ffaraday-mashify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Ffaraday-mashify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sue445","download_url":"https://codeload.github.com/sue445/faraday-mashify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813789,"owners_count":21165633,"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":["faraday","faradaymiddleware"],"created_at":"2024-08-01T07:01:04.261Z","updated_at":"2025-12-24T12:34:47.374Z","avatar_url":"https://github.com/sue445.png","language":"Ruby","funding_links":[],"categories":["Middleware"],"sub_categories":[],"readme":"# Faraday Mashify\n\n[![CI](https://github.com/sue445/faraday-mashify/actions/workflows/ci.yaml/badge.svg)](https://github.com/sue445/faraday-mashify/actions/workflows/ci.yaml)\n[![Gem](https://img.shields.io/gem/v/faraday-mashify.svg?style=flat-square)](https://rubygems.org/gems/faraday-mashify)\n[![License](https://img.shields.io/github/license/sue445/faraday-mashify.svg?style=flat-square)](LICENSE.md)\n\nFaraday middleware for wrapping responses into [Hashie::Mash](https://github.com/hashie/hashie#mash).\n\nThis very specific middleware has been extracted from the [faraday_middleware](https://github.com/lostisland/faraday_middleware) project.\n\nThis is fully compatible with [FaradayMiddleware::Mashify](https://github.com/lostisland/faraday_middleware/blob/main/lib/faraday_middleware/response/mashify.rb)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'faraday-mashify'\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself as:\n\n```shell\ngem install faraday-mashify\n```\n\n## Usage\n```bash\ncurl http://www.example.com/api/me\n{\"name\":\"sue445\"}\n```\n\n```ruby\nrequire 'faraday/mashify'\n\nconnection =\n  Faraday.new(url: 'http://www.example.com') do |conn|\n    conn.response :mashify\n    conn.response :json\n  end\n\nresponse = connection.get('/api/me').body\n\nresponse[:name]\n#=\u003e \"sue445\"\n\nresponse['name']\n#=\u003e \"sue445\"\n\nresponse.name\n#=\u003e \"sue445\"\n```\n\n### Customize response class\nIf you want to customize the response class, pass `mash_class` to `conn.response :mashify`. (default is `Hashie::Mash`)\n\ne.g.\n\n```ruby\nclass MyHash \u003c Hashie::Mash\nend\n\nconnection =\n  Faraday.new(url: 'http://www.example.com') do |conn|\n    conn.response :mashify, mash_class: MyHash\n    conn.response :json\n  end\n\nresponse = connection.get('/api/me').body\n\nresponse.class\n#=\u003e MyHash\n```\n\n## Migrate from faraday_middleware\nPlease do the following\n\n1. `gem \"faraday_middleware\"` -\u003e `gem \"faraday-mashify\"` in `Gemfile`\n2. `require \"faraday_middleware\"` -\u003e `require \"faraday/mashify\"`\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\n\nThen, run `bin/test` to run the tests.\n\nTo install this gem onto your local machine, run `rake build`.\n\nTo release a new version, make a commit with a message such as \"Bumped to 0.0.2\" and then run `rake release`.\nSee how it works [here](https://bundler.io/guides/creating_gem.html#releasing-the-gem).\n\n## Contributing\n\nBug reports and pull requests are welcome on [GitHub](https://github.com/sue445/faraday-mashify).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsue445%2Ffaraday-mashify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsue445%2Ffaraday-mashify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsue445%2Ffaraday-mashify/lists"}