{"id":29271607,"url":"https://github.com/jrjoacir/require-smasher","last_synced_at":"2026-03-05T03:33:15.949Z","repository":{"id":56891888,"uuid":"144650963","full_name":"jrjoacir/require-smasher","owner":"jrjoacir","description":"A simple way to require ruby files in directories and in its sub-directories, and gems.","archived":false,"fork":false,"pushed_at":"2020-07-11T22:32:31.000Z","size":76,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-11T15:29:16.832Z","etag":null,"topics":["directories","directory","directory-tree","gem","gems","require","ruby","ruby-files"],"latest_commit_sha":null,"homepage":null,"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/jrjoacir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-14T01:10:33.000Z","updated_at":"2020-07-11T22:32:26.000Z","dependencies_parsed_at":"2022-08-20T16:00:54.626Z","dependency_job_id":null,"html_url":"https://github.com/jrjoacir/require-smasher","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/jrjoacir/require-smasher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjoacir%2Frequire-smasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjoacir%2Frequire-smasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjoacir%2Frequire-smasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjoacir%2Frequire-smasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrjoacir","download_url":"https://codeload.github.com/jrjoacir/require-smasher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjoacir%2Frequire-smasher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30108650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:32:43.378Z","status":"ssl_error","status_checked_at":"2026-03-05T03:32:22.667Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["directories","directory","directory-tree","gem","gems","require","ruby","ruby-files"],"created_at":"2025-07-05T00:01:05.241Z","updated_at":"2026-03-05T03:33:15.931Z","avatar_url":"https://github.com/jrjoacir.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RequireSmasher\n[![Build Status](https://travis-ci.com/jrjoacir/require-smasher.svg?branch=master)](https://travis-ci.com/jrjoacir/require-smasher)\n\nLeia esta documentação em [Português do Brasil](README.pt-BR.md).\n\nThis project was born just to solve a problem: require ruby files **recursively** in a directory. However it grew up and learned to solve other simple problems:\n\n- require ruby files recursively in a directory and its sub-directories, trying to resolve interdependent files (`require_dir`)\n- require ruby files recursively in a list of directories and their sub-directories, trying to resolve interdependent files (`require_dirs`)\n- require a gem (`require_gem`)\n- require a list of gems (`require_gems`)\n- require a ruby file (`require_file`)\n- require a list of ruby files (`require_files`)\n- require a **list of gems**, ruby files in a **list of directories** and their sub-directories and a **list of files** with just **one command** (`require_all`)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'require_smasher'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install require_smasher\n\n## Usage\n\n### Require All\n\n```ruby\nrequire_all 'directory_1', 'directory_2/sub-directory', 'gem_1', 'gem_2', 'directory_3/filename_1', 'filename_2'\n```\nThis command will require all ruby files found in directory `directory_1` and its sub-directories, all ruby files in directory `directory_2/sub-directory` and in its sub-directories, gem `gem_1` and gem `gem_2`, and files `directory_3/filename_1.rb` and `filename_2.rb`.\n\n**Note**: the order of elements is not important, because Require Smasher will try to resolve any dependences among them.\n\n### Require Dir\n\n```ruby\nrequire_dir 'directory_1'\n```\nThis command will require all ruby files found in directory `directory_1` and in its sub-directories.\n\n### Require Dirs\n\n```ruby\nrequire_dirs 'directory_1', 'directory_2/sub-directory'\n```\nThis command accept a list of directories and it will require all ruby files found in directory `directory_1` and in its sub-directories, all ruby files in directory `directory_2/sub-directory` and in its sub-directories.\n\n### Require Gem\n\n```ruby\nrequire_gem 'gem'\n```\nThis command will require the informed gem.\n\n### Require Gems\n\n```ruby\nrequire_gems 'gem_1', 'gem_2'\n```\nThis command accept a list of gems and it will require gems `gem_1` and `gem_2`.\n\n### Require File\n\n```ruby\nrequire_file 'filename'\n```\nThis command will require the file `filename.rb`. You don't have to inform Ruby extension file (**rb**), if you want.\n\n### Require Files\n\n```ruby\nrequire_files 'filename_1', 'directory/filename_2', 'directory/filename_3.rb'\n```\nThis command accept a list of files and it will require files `filename_1.rb`, `directory/filename_2.rb` and `directory/filename_3.rb`. You don't have to inform Ruby extension file (**rb**), if you want.\n\n## Development\n\n### Locally\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n### Using Docker and Docker Compose\n\nYou can develop this gem without many installation tools or library using [Docker](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/) features. So, install [Docker](https://docs.docker.com/install/), [Docker Compose](https://docs.docker.com/compose/install/) and follow the next steps.\n\n1 - Build docker containers\n```bash\ndocker-compose build\n```\n\n2 - Ingress on *app* container\n```bash\ndocker-compose run --rm app sh\n```\n\n3 - Execute tests:\nOutside docker container\n```bash\ndocker-compose run --rm app bundle exec rspec\n```\nInside docker container\n```bash\nbundle exec rspec\n```\n4 - Execute Code Analizer\nOutside docker container\n```bash\ndocker-compose run --rm app bundle exec rubocop\n```\nInside docker container\n```bash\nbundle exec rubocop\n```\n\nMore information about *stop*, *start*, *restart*, *run* containers and so on, read [Docker Compose Documentation](https://docs.docker.com/compose/) and [Docker Documentation](https://docs.docker.com/).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/jrjoacir/require-smasher. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the RequireSmasher project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/require_smasher/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrjoacir%2Frequire-smasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrjoacir%2Frequire-smasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrjoacir%2Frequire-smasher/lists"}