No commit activity in last 3 years
No release in over 3 years
Use in conjunction with `everything-core`.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.5
~> 3.4

Runtime

 Project Readme

Everything::Piece::Find

Gem Version Build Status Code Climate Dependency Status

You'll need everything-core before you can use this.

This adds finder methods to Everything::Piece. This allows you to find pieces within your everything repo by name, instead of by the full path. Check the Usage section below for details.

Installation

Add this line to your application's Gemfile:

gem 'everything-piece-find'

And then execute:

$ bundle

Or install it yourself as:

$ gem install everything-piece-find

Note: If you're using Bundler to automatically include your gems, you can do this in the gemfile:

gem 'everything-piece-find', require: 'everything/piece/find'

Usage

require 'everything'
require 'everything/piece/find'

Now you have access to Everything::Piece.find_by_name and Everything::Piece.find_by_name_recursive. Once you've found the piece, you can use it like normal.

#find_by_name

piece = Everything::Piece.find_by_name('name-of-your-piece')
piece.full_path
# => /your/everything/repo/name-of-your-piece

#find_by_name_recursive

piece_in_nested_sub_folder =
  Everything::Piece.find_by_name_recursive('another-piece-of-yours')
piece_in_nested_sub_folder.full_path
# => /your/everything/repo/and/some/sub/folders/another-piece-of-yours

Development

After 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.

To 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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kyletolle/everything-piece-find. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.