{"id":20279152,"url":"https://github.com/peterhellberg/pinch","last_synced_at":"2025-04-11T06:18:18.156Z","repository":{"id":56888088,"uuid":"1987159","full_name":"peterhellberg/pinch","owner":"peterhellberg","description":"Retrieve a file from inside a zip file, over the network!","archived":false,"fork":false,"pushed_at":"2015-06-09T14:50:40.000Z","size":6379,"stargazers_count":63,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T06:18:13.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://peterhellberg.github.com/pinch","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/peterhellberg.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-02T09:42:09.000Z","updated_at":"2024-11-19T11:31:02.000Z","dependencies_parsed_at":"2022-08-20T15:20:49.911Z","dependency_job_id":null,"html_url":"https://github.com/peterhellberg/pinch","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fpinch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fpinch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fpinch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fpinch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterhellberg","download_url":"https://codeload.github.com/peterhellberg/pinch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351420,"owners_count":21089281,"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-14T13:28:34.615Z","updated_at":"2025-04-11T06:18:18.122Z","avatar_url":"https://github.com/peterhellberg.png","language":"Ruby","readme":"= Pinch\n\nRetrieve a file from inside a zip file, over the network!\n\nPinch makes it possible to download a specific file from within a ZIP file\nover HTTP/1.1 using nothing but the Ruby Standard Library (net/http and zlib)\n\nPinch is the Ruby implementation of an idea that my colleague Edward Patel\nhad a while back.\n\nThe first version was written in Objective-C and we thought it would be cool\nif we could bring that functionality to Ruby :)\n\nThat version is available on https://github.com/epatel/pinch-objc/\n\nI’ve tested Pinch on 1.9.3, 1.9.2, 1.8.7, MacRuby 0.10, JRuby 1.6.4 and rbx-head, YMMV.\n\nThe specs currently blows up on MagLev.\n\n{\u003cimg src=\"https://secure.travis-ci.org/peterhellberg/pinch.png?branch=master\" /\u003e}[http://travis-ci.org/peterhellberg/pinch]\n\n== Installation\n\n    gem install pinch\n\n== Usage example\n\n    require 'pinch'\n\n    data = Pinch.get 'http://peterhellberg.github.io/pinch/test.zip', 'data.json'\n\n    puts data\n\n=== Amazon S3 storage with pre-signed urls\n\nAWS S3 storage verifies url signature against HTTP verb, therefore \nrequiring different pre-signed urls for HEAD and GET requests. \nPatch extends Pinch gem to accept hash or 2 urls, allowing to fetch \nitems stored in zip archives on S3.\n\n    require 'pinch'\n    require 'right_aws'\n    \n    s3 = RightAws::S3Generator.new('...','...')\n    \n    bucket      = s3.bucket('my-bucket')\n    head_ticket = bucket.key('test.zip').head\n    get_ticket  = bucket.key('test.zip').get\n    \n    data=Pinch.get({:head =\u003e head_url, :get =\u003e get_url},'data.json')\n\n== LICENSE\n\nCopyright (c) 2011 Peter Hellberg and Edward Patel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Fpinch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterhellberg%2Fpinch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Fpinch/lists"}