everything-core 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/everything/piece.rb +4 -0
- data/lib/everything/version.rb +1 -1
- data/spec/everything/piece_spec.rb +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aca9092f34828f75505f2d3c36a03bd20845114
|
4
|
+
data.tar.gz: 7dfbd73bc6f5a5009f5abe169359067bca9b0b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7d1b41ee152d93d758cfa0cbe2b082cb07c11d39dfcdc45063bf7f756d669d95d31d8678b5e4c14a13408779f9dfc91ee9aa8f85854c84da6e03d8ea9738cb3
|
7
|
+
data.tar.gz: 64dd8236c33db109b282af925f74b60acb51045ff30cdf3a80b2c501c489b7a36212c812ee65fbcd2d12b3ce5aa143131505046158fffdedc98fb50bcb07ca5d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -60,6 +60,7 @@ require 'everything'
|
|
60
60
|
piece_path = File.join(Everything.path, 'your-piece-here')
|
61
61
|
piece = Everything::Piece.new(piece_path)
|
62
62
|
|
63
|
+
piece.name # => 'your-piece-here'
|
63
64
|
piece.title # => "Your Piece Here"
|
64
65
|
piece.body # => "The rest of the body of your file...\n\n"
|
65
66
|
piece['categories'] # Returns the value for the `categories` metadata key
|
data/lib/everything/piece.rb
CHANGED
data/lib/everything/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
describe Everything::Piece do
|
2
2
|
let(:given_full_path) do
|
3
|
-
'some/fake/path/here'
|
3
|
+
'some/fake/path/here-is-our-piece'
|
4
4
|
end
|
5
5
|
let(:piece) do
|
6
6
|
described_class.new(given_full_path)
|
@@ -63,6 +63,16 @@ describe Everything::Piece do
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
describe '#name' do
|
67
|
+
let(:expected_name) do
|
68
|
+
'here-is-our-piece'
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'is the last part of the path' do
|
72
|
+
expect(piece.name).to eq(expected_name)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
66
76
|
describe '#public?' do
|
67
77
|
let(:metadata_double) do
|
68
78
|
instance_double(Everything::Piece::Metadata)
|