{"id":17003829,"url":"https://github.com/cldwalker/local_gem","last_synced_at":"2025-04-12T06:32:41.071Z","repository":{"id":492752,"uuid":"119200","full_name":"cldwalker/local_gem","owner":"cldwalker","description":"Load/require any gem/library simply given its path. Great for nascent gems or for trying the latest code on a gem.","archived":false,"fork":false,"pushed_at":"2012-02-26T15:17:03.000Z","size":172,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T18:53:02.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tagaholic.me/local_gem/","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/cldwalker.png","metadata":{"files":{"readme":"README.rdoc","changelog":"CHANGELOG.rdoc","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-02-01T11:21:59.000Z","updated_at":"2019-08-13T13:57:37.000Z","dependencies_parsed_at":"2022-07-04T20:00:30.146Z","dependency_job_id":null,"html_url":"https://github.com/cldwalker/local_gem","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Flocal_gem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Flocal_gem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Flocal_gem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Flocal_gem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldwalker","download_url":"https://codeload.github.com/cldwalker/local_gem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529916,"owners_count":21119581,"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-10-14T04:32:48.966Z","updated_at":"2025-04-12T06:32:40.182Z","avatar_url":"https://github.com/cldwalker.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Description\n\nYou have the beginnings of a ruby library and you want to access it quick.\nYou don't want to bother making a gemspec for it and uninstalling/reinstalling its gem\nwhile you mess with it. Simply tell LocalGem what paths it should load for\nyour local gem and they will be loaded. Note that it doesn't matter how gem-like\nyour project is ie lib and bin directories etc. LocalGem *only* needs to know\nthe full path to your gem/library.\n\n== Setup\n\nInstall the gem with:\n\n    sudo gem install local_gem\n\nTo setup your local gem paths, give LocalGem a hash of gem names pointing\nto a path or an array of paths to load. You can do this with LocalGem.setup_config\n\n    LocalGem.setup_config do |c|\n      c.gems = {'gem1'=\u003e\"/gem1/path/lib\", 'gem2'=\u003e [\"/gem2/path/lib\", \"/gem2/path/bin\"] }\n    end\n\nOr a config file at either a local local_gem.yml or ~/.local_gem.yml .\nSee local_gem.yml.example for an example config file.\n\n== Usage\n\nThe two main methods that LocalGem provides are local_gem() and local_require()\nwhich map to gem() and require() respectively. Both methods will attempt\nto load local gems that you have defined. If no gem is found than they resort to default gem/require\nbehavior.\n\nThere are 3 ways to use this library, depending on how much you want LocalGem to invade your\nnamespace:\n\n  1. Peace time:\n\n      require 'local_gem'\n      LocalGem.local_gem 'mygem'\n      LocalGem.local_require 'anothergem'\n\n  2. Diplomacy is fading:\n\n      require 'local_gem'\n      include LocalGem\n      local_gem 'mygem'\n      local_require 'anothergem'\n\n  3. You're fscked (Don't worry, they should default to their normal behavior, should being the\n     keyword):\n      \n      require 'local_gem'\n      require 'local_gem/override'\n      gem 'mygem'\n      require 'anothergem'\n\nAll three ways would add my local alias library to $LOAD_PATH. These three ways\nalso apply to local_require().\n\n\n== Motivation\n\nGot tired of installing/uninstalling the latest version of a gem I'm actively working on. This\nalso makes it easy to treat any random directory of ruby files as a gem.\n\n== Links\nhttp://tagaholic.me/2009/02/05/local-gem-loads-your-current-code-now.html\n\n== Limitations\n\nThe override and rcov don't play nicely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldwalker%2Flocal_gem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldwalker%2Flocal_gem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldwalker%2Flocal_gem/lists"}