{"id":13394927,"url":"https://github.com/rubyworks/facets","last_synced_at":"2025-04-13T20:19:10.922Z","repository":{"id":696499,"uuid":"341331","full_name":"rubyworks/facets","owner":"rubyworks","description":"Ruby Facets","archived":false,"fork":false,"pushed_at":"2023-10-19T16:23:03.000Z","size":10487,"stargazers_count":797,"open_issues_count":49,"forks_count":100,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-07-31T17:23:24.038Z","etag":null,"topics":["facets","gem","ruby"],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/facets","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2009-10-18T15:31:57.000Z","updated_at":"2024-07-04T11:08:49.000Z","dependencies_parsed_at":"2024-01-08T17:12:43.332Z","dependency_job_id":"50f591e9-c96a-43c4-ac3c-e01820900911","html_url":"https://github.com/rubyworks/facets","commit_stats":{"total_commits":1516,"total_committers":43,"mean_commits":35.25581395348837,"dds":"0.16490765171503963","last_synced_commit":"12326d4767bd109bdf5f9fa3582797bd88c36d30"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ffacets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ffacets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ffacets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Ffacets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/facets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248775264,"owners_count":21159579,"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":["facets","gem","ruby"],"created_at":"2024-07-30T17:01:36.407Z","updated_at":"2025-04-13T20:19:10.898Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","readme":"# Ruby Facets\n\n[![Gem Version](https://badge.fury.io/rb/facets.svg)](http://badge.fury.io/rb/facets)\n[![Build Status](https://secure.travis-ci.org/rubyworks/facets.svg)](http://travis-ci.org/rubyworks/facets) \u0026nbsp; \u0026nbsp;\n[![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)\n\n\n*\"ALL YOUR BASE ARE BELONG TO RUBY\"*\n\n\n## Introduction\n\nRuby Facets is the premiere collection of general purpose method\nextensions and standard additions for the Ruby programming language.\n\nFacets houses the largest single collection of methods available for\nextending the core capabilities of Ruby's built-in classes and modules.\nThis collection of extension methods are unique by virtue of their atomicity.\nThe methods are stored in individual files so that each can be required\nindependently. This gives developers the potential for much finer control over\nwhich extra methods to bring into their code.\n\nIn addition Facets provides a collection of extensions to Ruby standard library\nplus a small collection of add-on classes and modules. Together these\nlibraries constitute an reliable source of reusable components, suitable\nto a wide variety of usecases.\n\n\n## Resources\n\n* Homepage: http://rubyworks.github.com/facets\n* Report Bugs: http://github.com/rubyworks/facets/issues\n* Mailing List: http://groups.google.com/group/facets-universal/topics\n* Wiki Pages: http://wiki.github.com/rubyworks/facets\n* Source Code: http://github.com/rubyworks/facets\n\n\n## Documentation\n\nFacets has special documentation needs due to its extensive breadth.\nThe documentation generated when installing via RubyGems, or the YARD\ndocs provided by rubydoc.info can be somewhat unwieldy because it\ncombines all of Facets in one large set. When using these resources,\nit is important to remain aware of the source location of particular\nmethods.\n\nFor better organized online documentation, generated to separate core\nextensions from standard libraries, see the [Learn Facets](http://rubyworks.github.com/facets/learn.html) page on the website for links to available documentation.\n\n\n## Installation\n\n### Bundler\n\nIf you are using Bundler with your project, add the facets gem to the project's\nGemfile. Unless you want all of facets loaded be sure to add the `:require =\u003e false`\noption.\n\n    gem \"facets\", require: false\n\n### RubyGems\n\nThe easiest way to install is via RubyGems.\n\n    $ gem install facets\n\n### Setup.rb\n\nFacets can be installed the old-fashioned way using [Setup.rb](http://rubyworks.github.com/setup).\nDownload and unpack the .tar.gz package and run setup.rb, like so:\n\n    $ tar -xvzf facets-2.x.x.tar.gz\n    $ cd facets-2.x.x\n    $ sudo setup.rb\n\nFacets 2.8+ requires Ruby 1.8.7 or higher. Facets 3.0+ requires Ruby 2.0.0 or higher.\n\n\n## Mission\n\nFacets holds to the notion that the more we can *reasonably* integrate into\na common foundation, directed toward general needs, the better that foundation\nwill be able to serve the community. There are a number of advantages here:\n\n* Better Code-reuse\n* Collaborative Improvements\n* Greater Name Consistency\n* One-stop Shop and Installation\n\n\n## Usage\n\n### CORE Library\n\nAt the heart of Ruby Facets is the CORE extensions library. CORE provides\na sizable collection of generally useful methods, along with a few supporting\nclasses, that extend the functionality of Ruby's core classes and modules.\n\nWith the exception of a few *uncommon* extensions, CORE contains anything that\nwill load automatically when issuing:\n\n    require 'facets'\n\nThis loads all the CORE functionality at once. If you plan to use more then a\nhandful of Facets core methods it is recommended that you require the library in\nthis way. However, you can also \"cherry pick\" the CORE library as you prefer.\nAnd for uncommon extensions this must be done. The general require statement for\na core extension library is:\n\n    require 'facets/\u003cclass|module\u003e/\u003cmethod\u003e'\n\nFor example:\n\n    require 'facets/time/stamp'\n\nMost \"atoms\" contain only one method, but exceptions occur when methods\nare closely tied together.\n\nYou can load per-class or per-module groups of core methods by requiring the\nclass or module by name. For example\"\n\n    require 'facets/time'\n\nWill require all the core Time method extensions.\n\nNote that some methods that were part of CORE in 1.8 and earlier are now part\nof MORE libraries. A good example is 'random.rb'. There were separated because\nthey had more specialized use cases, where as CORE extensions are intended as\ngeneral purpose.\n\n#### Method File Names\n\nOperator method redirect files are stored using English names. For instance \n`Proc#*` is `proc/op_mul`.\n\nFor reference, here is the chart.\n\n     +@   =\u003e op_plus\n     -@   =\u003e op_minus\n     +    =\u003e op_add\n     -    =\u003e op_sub\n     **   =\u003e op_pow\n     *    =\u003e op_mul\n     /    =\u003e op_div\n     %    =\u003e op_mod\n     ~    =\u003e op_tilde\n     \u003c=\u003e  =\u003e op_cmp\n     \u003c\u003c   =\u003e op_lshift\n     \u003e\u003e   =\u003e op_rshift\n     \u003c    =\u003e op_lt\n     \u003e    =\u003e op_gt\n     ===  =\u003e op_case\n     ==   =\u003e op_equal\n     =~   =\u003e op_apply\n     \u003c=   =\u003e op_lt_eq\n     \u003e=   =\u003e op_gt_eq\n     |    =\u003e op_or\n     \u0026    =\u003e op_and\n     ^    =\u003e op_xor\n     []=  =\u003e op_store\n     []   =\u003e op_fetch\n\nFacets simply takes the '*' and translates it into a string acceptable to all\nfile systems. Also, if a method ends in '=', '?' or '!' it is simply removed.\n\n\n### MORE Library (aka Standard Library)\n\nOn top of the extensive CORE library, Facets provides extensions for Ruby's\nstandard library, as well as a small collection of additional modules and\nclasses to supplement it.\n\nUse this library like you would any other 3rd party library.\nThe only difference between Facet's Standard library and other libraries\nis the lack of any enclosing `Facets::` namespace.\n\nWhen using Facets extended versions of Ruby's standard libraries,\nthe libraries have to loaded individually. However you do not need\nto load Ruby's library first, as the Facets' library will do that\nautomatically.\n\nFor example, normally one load Ruby's OpenStruct class via:\n\n    require 'ostruct'\n\nTo load 'ostruct.rb' plus Facets extensions for it simply use:\n\n    require 'facets/ostruct'\n\nFor details pertaining to the functionality of each feature,\nplease see the API documentation.\n\n\n## Contribute\n\nThis project thrives on contribution!\n\nIf you have any extension methods, classes or modules that you think have\nvery general applicability and would like to see them included in\nthis project, don't hesitate to submit. Also, if you have better versions\nof any thing already included or simply have a patch, they are more than\nwelcome. We want Ruby Facets to be of the highest quality.\n\n\n## Development\n\nFacets uses the [Lemon](http://rubyworks.github.com/lemon) testing framework\nto handle unit testing, while [QED](http://rubyworks.github.com/qed) specifications\nprovide tested documentation.\n\nFacets uses [Detroit](http://detroit.github.com) and [Rulebow](http://rubyworks.github.com/rulebow)\nbuild tools. Detroit is a life-cycle tool and Rulebow is a continuous integration tool. These\ntools, via the `Assembly` and `Rulebook` scripts respectively, sometimes use other tools such\nas [Mast](http://rubyworks.github.com/mast) and [Indexer](http://rubyworks.github.com/indexer).\nIn addition we support [Rake](https://ruby.github.io/rake/) and [Guard](http://guardgem.org/)\nbuild tools, which most developers are familiar with.\nNote, that while these build tools can be easy circumvented, the Mast and Indexer tools are\nnecessary to prepare Facets for release.\n\n\n## Authors\n\nMuch of this collection was written and/or inspired by a variety of great Ruby\ndevelopers. Fortunately nearly all utilized works were copyrighted under the same\nopen licenses, the Ruby License or the more liberal BSD and MIT licenses. In the\none or two exceptions the copyright notice has been included with the source code.\nWe have since received permission from the various authors to normalize the licensing\nto a single license. For this purpose we have chosen the BSD 2 Clause License.\nThis is the license Ruby itself now uses, so it seemed the most appropriate choice.\nIt is also almost identical to the MIT license. Any code file not specifically labeled\notherwise shall fall under the this license (which is BSD 2-clause).\n\nIn all cases, every effort has been made to give credit where credit is due.\nYou will find these acknowledgments embedded in the source code. You can see\nthem in \"CREDIT:\" and/or \"@author\" lines. \nAlso see the [Contributors page](https://github.com/rubyworks/facets/wiki/Contributors)\non the Wiki for a list of all contributing Rubyists. If anyone is missing from\nthe list, please let us know so we can correct. Thanks.\n\nThis collection was put together by, and much of it written by [trans](https://github.com/trans).\nIf need be, he can be reached via email at transfire at gmail.com.\n\n\n## License\n\nThe collection PER COLLECTION is licensed as follows:\n\n    Ruby Facets\n    Copyright (c) 2005 Rubyworks\n\n    Distributed under the terms of the BSD-2 License (same as Ruby license).\n\nThe BSD 2 Clause License is a simple open source license. The complete text of the\nlicense accompany this document (see the enclosed LICENSE file).\n\nAcknowledgments and Copyrights for particular snippets of borrowed code\nare given in their respective source. At this point, all licensing has been normalized\nfor all included code. Original authors have given permission for inclusion of their\ncode under such license, with appropriate credit citations.\n\n\n## \"ALL YOUR BASE ARE BELONG TO RUBY!\"\n\nRuby Facets, Copyright (c) 2005 Rubyworks\n\nDo you Ruby? (http://ruby-lang.org)\n\n","funding_links":[],"categories":["Developer Tools","Ruby","Core Extensions"],"sub_categories":["Ruby Core Extensions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Ffacets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Ffacets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Ffacets/lists"}