brief 1.17.12 → 1.17.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d170a325dbe79ce3163e94ce7ac7186c0be87bf4
4
- data.tar.gz: 02e7a1e5d07f52d51c487dee733fcc42ad868ac3
3
+ metadata.gz: cd742b80c1efe4e5c4978e64b26d05a27e1ecb17
4
+ data.tar.gz: 78af1485d73c93949f568fcdecc6e045f442179f
5
5
  SHA512:
6
- metadata.gz: b3de2eb1990f299af651e84a1fde89b60b73f852961520b9dfbd83efe15bb5b1b618ca56f1e653191311e6bfb607ebacd848f359a9217bf962f6b90151c66e59
7
- data.tar.gz: 416d0d43e957bb395eab38b1db2c981f53d6f4284553987ef121414be645ec4d037a1ffcc0f6606f80d2cbfa30fdb1a6a6b1b5b92752f86f708f3f556a2db40a
6
+ metadata.gz: 8cdaf29e550add6e5969b7c43c3a3b285aacfc7d4e893369dade54d88d638faee46c8a3c82edc53e1b70937cfb76f06098d5356cafa3331e9e7a330d59b432a8
7
+ data.tar.gz: f45302046b57b6faac656e72df8c48f657b207750d304c80f3c67b371136e3d204a035eb1015252347da02af02103eb2802e236fa9d73fc54e4e1b80dd09451d
@@ -52,6 +52,10 @@ module Brief
52
52
  briefcase.present? ? path.relative_path_from(briefcase.docs_path) : path
53
53
  end
54
54
 
55
+ def path_alias
56
+ relative_path.to_s.gsub(relative_path.extname.to_s, '')
57
+ end
58
+
55
59
  def content_hash
56
60
  Digest::MD5.hexdigest(@content.to_s)
57
61
  end
@@ -14,6 +14,8 @@ module Brief::Model::Serializers
14
14
  data: data,
15
15
  extracted: extracted_content_data,
16
16
  path: path.to_s,
17
+ doc_path: doc_path,
18
+ path_alias: path_alias,
17
19
  type: type,
18
20
  group: type.to_s.pluralize,
19
21
  title: document_title,
@@ -30,6 +30,10 @@ describe "The Brief Document" do
30
30
  expect(Brief.page_document.to_html).to be_present
31
31
  end
32
32
 
33
+ it "has a path alias property" do
34
+ expect(Brief.page_document.path_alias).not_to be_empty
35
+ end
36
+
33
37
  it "parses the html" do
34
38
  expect(sample.css("h1").length).to eq(2)
35
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brief
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.12
4
+ version: 1.17.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Soeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-29 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie