{"id":15107751,"url":"https://github.com/hernanmd/metacellofiledownload","last_synced_at":"2025-08-10T12:09:30.758Z","repository":{"id":71141110,"uuid":"115483431","full_name":"hernanmd/MetacelloFileDownload","owner":"hernanmd","description":"Helpers to download resources in Baseline or Metacello Configurations (Pharo Smalltalk)","archived":false,"fork":false,"pushed_at":"2024-11-23T15:14:00.000Z","size":67,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T15:39:37.656Z","etag":null,"topics":["metacello","metacello-configurations","pharo","pharo-smalltalk","smalltalk"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","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/hernanmd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-12-27T05:05:54.000Z","updated_at":"2024-11-23T15:14:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bd64ab8-93f4-4249-903d-8c7c3bf0eb93","html_url":"https://github.com/hernanmd/MetacelloFileDownload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hernanmd/MetacelloFileDownload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hernanmd%2FMetacelloFileDownload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hernanmd%2FMetacelloFileDownload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hernanmd%2FMetacelloFileDownload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hernanmd%2FMetacelloFileDownload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hernanmd","download_url":"https://codeload.github.com/hernanmd/MetacelloFileDownload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hernanmd%2FMetacelloFileDownload/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269720437,"owners_count":24464286,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["metacello","metacello-configurations","pharo","pharo-smalltalk","smalltalk"],"created_at":"2024-09-25T21:41:24.061Z","updated_at":"2025-08-10T12:09:30.691Z","avatar_url":"https://github.com/hernanmd.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Table of Contents\n\n- [Description](#description)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Resources](#resources)\n  - [If you have one resource file for all OS(es)](#if-you-have-one-resource-file-for-all-os)\n  - [If you have one URL for your resource file for multiple OS(es)](#if-you-have-one-url-for-your-resource-file-for-multiple-os)\n  - [If you have mirror URL's for your resource file](#if-you-have-mirror-urls-for-your-resource-file)\n- [License](#license)\n\n# Description\n\nAdd helper methods to download resources in Baseline or Metacello Configurations in Pharo Smalltalk. The files that you specify will be downloaded and uncompressed without need to write any code.\n\n# Installation\n\nNote: You do not need to install it in your Pharo image unless you want to make modifications to this package. See the [Usage](#usage) section below.\n\n```smalltalk\nEpMonitor disableDuring: [ \n\tMetacello new\n\t\tbaseline: 'MetacelloFileDownload';\n\t\trepository: 'github://hernanmd/MetacelloFileDownload';\n\t\tload ]\n```\n\n# Usage\n\n- You can upload your files anywhere you want.\n- All your files must be already uploaded in .zip or .tar.gz\n- .zip or .tar.gz files will be downloaded and uncompressed in the ```FileSystem workingDirectory``` (check if you have write permissions first).\n- You can add several (mirror) URL's for the same resource file (see examples below).\n\nAdd the following line in the #baseline method of your Configuration/BaselineOf class:\n\n```smalltalk\n\t\"... configuration code ... \"\n\tspec preLoadDoIt: #preLoad.\n\t\"... configuration code ... \"\n```\n\nTo enable bootstrapping add the following two methods to your Configuration/Baseline (instance side)\n\n```smalltalk\nensureMetacelloFileDownload\n\tEpMonitor disableDuring: [\n\t\tMetacello new\n\t\t\tbaseline: 'MetacelloFileDownload';\n\t\t\tonWarningLog;\n\t\t\trepository: 'github://hernanmd/MetacelloFileDownload';\n\t\t\tload ]\n```\n\nAdd the #preLoad method (instance side) in your BaselineOf/ConfigurationOf class:\n\n```smalltalk\npreLoad\n    self ensureMetacelloFileDownload.\n    super preLoad.\n```\n\n## Resources\n\nFinally, in your ConfigurationOf/BaselineOf class (instance side), add a method with selector #platformFilesUrl answering a Collection of download URL's. \n\n### If you have one resource file for all OS\n\n Assuming you have uploaded your resource files named \"file1.zip\" and file1.tar.gz to a \"res\" directory in your repository:\n \n```smalltalk\nplatformFilesUrl\n\n\t^ Array with: 'https://github.com/yourGHUser/yourProject/raw/master/res/file1.zip' ]\n```\n\n### If you have one URL for your resource file for multiple OS\n \n Assuming you have uploaded your resource files named \"file1.zip\" and file1.tar.gz to a \"res\" directory:\n (don't forget the last / before the last URL fragment)\n\n```smalltalk\nplatformFilesUrl\n\n\t^ Array with: (String streamContents: [ : stream |\t\t\n\t\tstream \t\t\t\n\t\t\tnextPutAll: 'https://github.com/yourGHUser/yourProject/raw/master/res/';\n\t\t\tnextPutAll: (\n\t\t\t\tSmalltalk os isWin32 \t\t\t\t\t\n\t\t\t\t\tifTrue: [ 'file1.zip' ]\n\t\t\t\t\tifFalse: [ 'file1.tar.gz' ]) ])\n```\n\n\n### If you have mirror URLs for your resource file\n\nThe same as above, specify the raw URL to your resource files\n\n```smalltalk\nplatformFilesUrl\n\n\t^ Smalltalk os isWin32 \t\t\n\t\t\tifTrue: [ #(\n\t\t\t\t'https://github.com/..../file1.zip'\n\t\t\t\t'http://www.dropbox.com/file1.zip' ) ]\n\t\t\tifFalse: [ #(\n\t\t\t\t'https://github.com/..../file1.tar.gz'\n\t\t\t\t'http://www.dropbox.com/file1.tar.gz') ].\n```\n\nThat's all. Try your Configuration or Baseline script!\n\n# License\n\nThis software is licensed under the MIT License.\n\nCopyright Hernán Morales, 2018-2022.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhernanmd%2Fmetacellofiledownload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhernanmd%2Fmetacellofiledownload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhernanmd%2Fmetacellofiledownload/lists"}