brief 1.8.2 → 1.8.3
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/apps/blueprint/models/diagram.rb +22 -0
- data/apps/blueprint/models/milestone.rb +16 -0
- data/apps/blueprint/models/project.rb +16 -0
- data/apps/blueprint/models/release.rb +24 -0
- data/lib/brief/briefcase.rb +10 -1
- data/lib/brief/cli/export.rb +3 -3
- data/lib/brief/repository.rb +4 -0
- data/lib/brief/version.rb +1 -1
- data/spec/fixtures/example/docs/concept.html.md +1 -1
- data/spec/lib/brief/briefcase_spec.rb +8 -0
- data/spec/lib/brief/models/diagram_spec.rb +0 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be0eef8f655a9b9d5ebe02b3b718ddc36d380bb5
|
4
|
+
data.tar.gz: 2926731279f53b37faa4c905839fca50df24673b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 088bf02d1b3cb7399e8a43729da51bb7a42be252ecce8c2ccf704f6e467d00c206d7dcdab579711642bcda7459c3cde624ba8c1007792ce8a2fc643e13d83fe3
|
7
|
+
data.tar.gz: 3e694d6d1114e770ad4792f6e6b685b502340b5d7a8d594213447c0154630e5851184b88624f81fdd4cff4f08c68e1931e3bb46376dc1e131c40d0ea1b4f7ae5
|
data/CHANGELOG.md
CHANGED
@@ -125,3 +125,7 @@ attributes.
|
|
125
125
|
### 1.6.0
|
126
126
|
- Introducing the apps repository for shared model code
|
127
127
|
- Added capability to pull out yaml blocks from the document as deserialized hashes on our models
|
128
|
+
|
129
|
+
### 1.8.3
|
130
|
+
- General improvements to models & documents api
|
131
|
+
- Added support for cache key
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
brief (1.8.
|
4
|
+
brief (1.8.3)
|
5
5
|
activemodel
|
6
6
|
activesupport (>= 4.0)
|
7
7
|
commander (>= 4.2.1)
|
@@ -89,7 +89,7 @@ GEM
|
|
89
89
|
thread_safe (0.3.5)
|
90
90
|
tzinfo (1.2.2)
|
91
91
|
thread_safe (~> 0.1)
|
92
|
-
virtus (1.0.
|
92
|
+
virtus (1.0.5)
|
93
93
|
axiom-types (~> 0.1)
|
94
94
|
coercible (~> 1.0)
|
95
95
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class Brief::Apps::Blueprint::Diagram
|
2
|
+
include Brief::Model
|
3
|
+
|
4
|
+
meta do
|
5
|
+
title
|
6
|
+
subheading
|
7
|
+
status String, :in => "draft published"
|
8
|
+
end
|
9
|
+
|
10
|
+
content do
|
11
|
+
title "h1:first-of-type"
|
12
|
+
|
13
|
+
subheading "h2:first-of-type"
|
14
|
+
|
15
|
+
define_section "Annotations" do
|
16
|
+
each("h2").has(:title => "h3",
|
17
|
+
:paragraphs => "p",
|
18
|
+
:settings => "code")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Brief::Apps::Blueprint::Milestones
|
2
|
+
include Brief::Model
|
3
|
+
|
4
|
+
meta do
|
5
|
+
title
|
6
|
+
number
|
7
|
+
due_date
|
8
|
+
end
|
9
|
+
|
10
|
+
content do
|
11
|
+
title "h1:first-of-type", :hide => true
|
12
|
+
paragraph "p:first-of-type"
|
13
|
+
paragraphs "p"
|
14
|
+
yaml_data "code.yaml:first-of-type", :serialize => :yaml, :hide => true
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Brief::Apps::Blueprint::Project
|
2
|
+
include Brief::Model
|
3
|
+
|
4
|
+
meta do
|
5
|
+
title
|
6
|
+
category
|
7
|
+
tags Array
|
8
|
+
end
|
9
|
+
|
10
|
+
content do
|
11
|
+
paragraph "p:first-of-type"
|
12
|
+
title "h1:first-of-type", :hide => true
|
13
|
+
tagline "h2:first-of-type", :hide => true
|
14
|
+
yaml_data "code.yaml:first-of-type", :serialize => :yaml, :hide => true
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class Brief::Apps::Blueprint::Release
|
2
|
+
include Brief::Model
|
3
|
+
|
4
|
+
meta do
|
5
|
+
title
|
6
|
+
status
|
7
|
+
tags Array
|
8
|
+
end
|
9
|
+
|
10
|
+
content do
|
11
|
+
paragraph "p:first-of-type"
|
12
|
+
paragraps "p"
|
13
|
+
title "h1:first-of-type", :hide => true
|
14
|
+
tagline "h2:first-of-type", :hide => true
|
15
|
+
yaml_data "code.yaml:first-of-type", :serialize => :yaml, :hide => true
|
16
|
+
|
17
|
+
define_section "User Stories" do
|
18
|
+
each("h2").has(:title => "h2",
|
19
|
+
:paragraph => "p:first-of-type",
|
20
|
+
:components => "p:first-of-type strong"
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/brief/briefcase.rb
CHANGED
@@ -29,6 +29,14 @@ module Brief
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def cache_key
|
33
|
+
"#{slug}:#{repository.cache_key}"
|
34
|
+
end
|
35
|
+
|
36
|
+
def slug
|
37
|
+
options.fetch(:slug) { root.basename.to_s.parameterize }
|
38
|
+
end
|
39
|
+
|
32
40
|
def settings
|
33
41
|
@settings ||= settings!
|
34
42
|
end
|
@@ -64,7 +72,8 @@ module Brief
|
|
64
72
|
name: briefcase.folder_name.to_s.titlecase,
|
65
73
|
schema: schema,
|
66
74
|
models: models,
|
67
|
-
settings: settings
|
75
|
+
settings: settings,
|
76
|
+
cache_key: briefcase.cache_key
|
68
77
|
}
|
69
78
|
end
|
70
79
|
|
data/lib/brief/cli/export.rb
CHANGED
@@ -12,10 +12,10 @@ command 'export' do |c|
|
|
12
12
|
|
13
13
|
briefcase = Brief::Briefcase.new(config_path: Pathname(options.config_path))
|
14
14
|
|
15
|
-
|
15
|
+
dump = briefcase.as_full_export()
|
16
16
|
|
17
|
-
output = args.first || "briefcase.json"
|
17
|
+
output = args.first || "#{ briefcase.cache_key }.json"
|
18
18
|
|
19
|
-
Pathname(Dir.pwd).join(output).open("w+") {|fh| fh.write(
|
19
|
+
Pathname(Dir.pwd).join(output).open("w+") {|fh| fh.write(dump.to_json) }
|
20
20
|
end
|
21
21
|
end
|
data/lib/brief/repository.rb
CHANGED
data/lib/brief/version.rb
CHANGED
@@ -7,6 +7,14 @@ describe "The Briefcase" do
|
|
7
7
|
expect(briefcase.root).to be_exist
|
8
8
|
end
|
9
9
|
|
10
|
+
it "has a cache key" do
|
11
|
+
expect(briefcase.cache_key).not_to be_nil
|
12
|
+
end
|
13
|
+
|
14
|
+
it "has a slug" do
|
15
|
+
expect(briefcase.slug).to eq("example")
|
16
|
+
end
|
17
|
+
|
10
18
|
it "points to a file repository" do
|
11
19
|
expect(briefcase.repository).to be_a(Brief::Repository)
|
12
20
|
end
|
File without changes
|
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.8.
|
4
|
+
version: 1.8.3
|
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-03-
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -238,9 +238,13 @@ files:
|
|
238
238
|
- Rakefile
|
239
239
|
- TUTORIAL.md
|
240
240
|
- apps/blueprint/config.rb
|
241
|
+
- apps/blueprint/models/diagram.rb
|
241
242
|
- apps/blueprint/models/epic.rb
|
243
|
+
- apps/blueprint/models/milestone.rb
|
242
244
|
- apps/blueprint/models/page.rb
|
243
245
|
- apps/blueprint/models/persona.rb
|
246
|
+
- apps/blueprint/models/project.rb
|
247
|
+
- apps/blueprint/models/release.rb
|
244
248
|
- apps/blueprint/models/user_story.rb
|
245
249
|
- apps/blueprint/models/wireframe.rb
|
246
250
|
- bin/brief
|
@@ -320,6 +324,7 @@ files:
|
|
320
324
|
- spec/lib/brief/dsl_spec.rb
|
321
325
|
- spec/lib/brief/hashing_spec.rb
|
322
326
|
- spec/lib/brief/model_spec.rb
|
327
|
+
- spec/lib/brief/models/diagram_spec.rb
|
323
328
|
- spec/lib/brief/models/page_spec.rb
|
324
329
|
- spec/lib/brief/models/release_spec.rb
|
325
330
|
- spec/lib/brief/persistence_spec.rb
|
@@ -399,6 +404,7 @@ test_files:
|
|
399
404
|
- spec/lib/brief/dsl_spec.rb
|
400
405
|
- spec/lib/brief/hashing_spec.rb
|
401
406
|
- spec/lib/brief/model_spec.rb
|
407
|
+
- spec/lib/brief/models/diagram_spec.rb
|
402
408
|
- spec/lib/brief/models/page_spec.rb
|
403
409
|
- spec/lib/brief/models/release_spec.rb
|
404
410
|
- spec/lib/brief/persistence_spec.rb
|