everything-piece-find 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29c7dd53ef57a66c1cfa8ee070ca6fa28a08b9be
4
- data.tar.gz: a7d34ef285b00ffd0a0a7f5778b0280b6571f60b
3
+ metadata.gz: 7dcb7c56558c6f6009079dd21f3252e6f2aa1ccf
4
+ data.tar.gz: 2287b5a8527b4aa461087145aa6c2b6e37579781
5
5
  SHA512:
6
- metadata.gz: 118e803eedf1de96346dd31a68c26bd93f39d886a2f9a3635a7eb85337032f14dcdd8403a2b9d4b78305a8ec06cd9f7226fc88400a3d32265c0af43ed63d4755
7
- data.tar.gz: e27a877130beebd1fa93350bf2fc371095504508bd4ca5b737ebe5d457d4d1bded22925a00af200899fa1979f94d525de6e4a6f616bcaa31576c499b94c58b75
6
+ metadata.gz: 65d87209dc1fe294759f95f0412fc9092316ef75fe11a09dc4044910293dd0c7933b14d41ab7162a2829e4763521884962827bf960ad307915f0235fcd5f7f31
7
+ data.tar.gz: 316df3a2b4d0090887508900cc0ab6834c4cfdb479dcd81bf15c7fbc57dfe3c3b8a1d7eff4c81a0a9995aa74c32d167722f61fc65e5d0a90d09a7a6ed000affc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ - Make #find_by_name and #find_by_name_recursive class methods on
6
+ Everything::Piece, as was intended, instead of them being instance methods.
7
+ - Update changelog with new usage examples
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  - Use more descriptive error messages in #find_by_name
data/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
  You'll need [everything-core](https://github.com/kyletolle/everything-core)
8
8
  before you can use this.
9
9
 
10
- This adds a `#find_by_name` to `Everything::Piece`. This allows you to find a
11
- piece within your `everything` repo by name, instead of by the full path. This
12
- only works for pieces at the root of your everything repo.
10
+ This adds finder methods to `Everything::Piece`. This allows you to find pieces
11
+ within your `everything` repo by name, instead of by the full path. Check the
12
+ Usage section below for details.
13
13
 
14
14
  ## Installation
15
15
 
@@ -32,10 +32,27 @@ Or install it yourself as:
32
32
  ```
33
33
  require 'everything'
34
34
  require 'everything-piece-find'
35
+ ```
36
+
37
+ Now you have access to `Everything::Piece.find_by_name` and
38
+ `Everything::Piece.find_by_name_recursive`. Once you've found the piece, you can
39
+ use it like normal.
35
40
 
41
+ ### #find_by_name
42
+
43
+ ```
36
44
  piece = Everything::Piece.find_by_name('name-of-your-piece')
45
+ piece.full_path
46
+ # => /your/everything/repo/name-of-your-piece
47
+ ```
48
+
49
+ ### #find_by_name_recursive
37
50
 
38
- # Now you can use the piece as you normally would.
51
+ ```
52
+ piece_in_nested_sub_folder =
53
+ Everything::Piece.find_by_name_recursive('another-piece-of-yours')
54
+ piece_in_nested_sub_folder.full_path
55
+ # => /your/everything/repo/and/some/sub/folders/another-piece-of-yours
39
56
  ```
40
57
 
41
58
  ## Development
@@ -1,3 +1,3 @@
1
1
  Everything::Piece.class_eval do
2
- include Everything::Piece::Find
2
+ extend Everything::Piece::Find
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module Everything
2
2
  class Piece
3
3
  module Find
4
- VERSION = "0.4.0"
4
+ VERSION = '0.5.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everything-piece-find
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Tolle