{"id":23404817,"url":"https://github.com/longboardcat/schwifty","last_synced_at":"2025-04-08T22:47:56.598Z","repository":{"id":56894471,"uuid":"91728975","full_name":"longboardcat/schwifty","owner":"longboardcat","description":"IPFS bindings for Ruby.","archived":false,"fork":false,"pushed_at":"2017-05-18T20:07:01.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T16:03:48.691Z","etag":null,"topics":["ipfs"],"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/longboardcat.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":"2017-05-18T19:11:12.000Z","updated_at":"2017-05-18T20:07:10.000Z","dependencies_parsed_at":"2022-08-20T17:10:18.025Z","dependency_job_id":null,"html_url":"https://github.com/longboardcat/schwifty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longboardcat%2Fschwifty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longboardcat%2Fschwifty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longboardcat%2Fschwifty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longboardcat%2Fschwifty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longboardcat","download_url":"https://codeload.github.com/longboardcat/schwifty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941717,"owners_count":21022037,"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":["ipfs"],"created_at":"2024-12-22T13:15:59.911Z","updated_at":"2025-04-08T22:47:56.577Z","avatar_url":"https://github.com/longboardcat.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# schwifty\n\n[![Build Status](https://travis-ci.org/longboardcat/schwifty.svg?branch=master)](https://travis-ci.org/longboardcat/schwifty)\n\n[ipfs][1] is a distributed file system that is content-addressed and uses keys (hashes) to files\n(objects). This repo uses the hash/object terminology consistent with the rest of ipfs docs.\n\n## Usage\n\n```bash\nschwifty add \u003cfiles\u003e...\nschwifty bootstrap (--clear | \u003cnodes\u003e... | --file=\u003cbootstrap_list_yaml\u003e)\nschwifty get \u003cfiles_or_hashes\u003e...\nschwifty gc\nschwifty -h | --help\nschwifty --version\n```\n\n## Hash Files\n\nBecause ipfs does not have a typical Unix file system structure, we keep track of files added using\nthe `ipfs add` operation. This task is entrusted to two files, one of which any client code needs to\ninteract with and the other for garbage collection purposes. Both of these files are in `.yaml` form.\n\nFor the examples below, we'll use the convention in `bin/console` where `client = IPFS::Client`.\n\n### Objects File: `ipfs_objects.yaml`\n\nIt's your job read and manipulate this file and pass it between steps of your build/test pipeline.\nThe objects file contains a mapping of filename : hash\n\n`client.add('spec/samples/files/file1')`\n\n```yaml\n---\nspec/samples/files/file1: QmXMSyJvaz912Wi6533MegwUn4mJ4kQikaBZpAdeFwoWkj\n```\n\n`client.get('spec/samples/files/file1')` will download the file to the current directory.\nBoth `add` and `get` can take multiple files.\n\n### Pinned Objects File: `~/.ipfs/ipfs_pinned_objects.yaml`\n\nA hash : timestamp is written in this file every time `ipfs add` is run. `ipfs add` pins objects by\ndefault. You aren't expected to interact with this file, but it may help in debugging purposes.\n\n```yaml\n---\nQmb1CkJmfpwmyLvuPMMRKKpYPuiwUMW9V1WdbFLVZgAdpL: 2016-06-01 01:04:49 UTC\nQmZXYwLpuGd8kR51FU5f8U5M8M1LHPSUxMeFBtrNWwJGdE: 2016-05-31 12:41:19 UTC\n```\n\nGarbage collection (GC) follows these rules:\n1. Check for disk space. If disk space is below the threshold (0.85), do not GC.\n2. Run `ipfs repo gc` to remove all unpinned objects.\n3. Check for disk space. If disk space is above the threshold, go to step 4.\n4. Unpin one third of objects from the Pinned Objects File.\n5. Run `ipfs repo gc` to remove the unpinned objects.\n6. Back to step 3.\n\nThere's no backoff in the GC unpin rate in step 4, and the gem doesn't know how much disk space will\nbe freed every call. The 1/3 of hashes removed each time does get smaller though.\n\n### Bootstrapping\n\nWe recommend checking in an approved bootstrap list that, in tandem with the CLI, bootstraps nodes\nvia a configuration managed provisioning tool (like Ansible). The CLI supports bootstrapping via\na `.yaml` file with hostname : multiaddr/peerID formats. See `ipfs bootstrap` and `ipfs id` docs\nfor more info.\n\n```yaml\n---\nhostname1: /ip4/127.0.0.1/tcp/4001/ipfs/QaowiA9HvLCinkCLwRFauHkAZUP3DQDogku98r9BctEhgc\nhostname2: /ip4/192.112.0.101/tcp/4001/ipfs/QmcpER9AOSUinkCLwRFi8zkAZU73DQDogkF98r9BctEhgc\n```\n\n[1]: https://ipfs.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongboardcat%2Fschwifty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongboardcat%2Fschwifty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongboardcat%2Fschwifty/lists"}