brief 1.14.2 → 1.14.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/apps/blueprint/config.rb +3 -0
- data/lib/brief/briefcase.rb +22 -1
- data/lib/brief/configuration.rb +2 -1
- data/lib/brief/version.rb +1 -1
- data/spec/fixtures/example/lib/should_be_defined.rb +3 -0
- data/spec/lib/brief/apps_spec.rb +7 -0
- data/spec/lib/brief/briefcase_spec.rb +8 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b274378ab543ef47fe650ee8e460b76b082ad923
|
4
|
+
data.tar.gz: e1a26dc9aeba6e4fa64c2435b604809a347b9bd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6547e89d1f24d62e0bc6d169fff21b67c57c4862a2d8c134fd0e284c6c79fd8a24435f5a15a94f6d8ca4d43b2e65d4cf596817a3ce17a9ddb0e9a8166e537c87
|
7
|
+
data.tar.gz: 4439705a16ca9d2e49fc01e2666d07ca9ebe756e3901565f0776af49e918a0082cf1cd390181d795c0f688587c72e7df17884e2cded9fb6fe2d211fc26bf5954
|
data/apps/blueprint/config.rb
CHANGED
data/lib/brief/briefcase.rb
CHANGED
@@ -25,6 +25,17 @@ module Brief
|
|
25
25
|
@asset_finder = options.fetch(:asset_finder) { method(:find_asset) }
|
26
26
|
|
27
27
|
Brief.cases[root.basename.to_s] ||= self
|
28
|
+
|
29
|
+
load_lib_entries()
|
30
|
+
end
|
31
|
+
|
32
|
+
def load_lib_entries
|
33
|
+
begin
|
34
|
+
etc = Dir[briefcase_lib_path.join("**/*.rb")]
|
35
|
+
etc.each {|f| require(f) } if briefcase_lib_path.exist?
|
36
|
+
rescue
|
37
|
+
|
38
|
+
end
|
28
39
|
end
|
29
40
|
|
30
41
|
# Runs a command
|
@@ -43,6 +54,11 @@ module Brief
|
|
43
54
|
end
|
44
55
|
end
|
45
56
|
|
57
|
+
# runs a command but does not raise an error
|
58
|
+
def run_command!(name, *args)
|
59
|
+
run_command(name, *args) rescue nil
|
60
|
+
end
|
61
|
+
|
46
62
|
# Returns a Hash object which presents some
|
47
63
|
# view of the briefcase. Accepts a params hash
|
48
64
|
# of options that will be passed to the presenter.
|
@@ -91,7 +107,8 @@ module Brief
|
|
91
107
|
docs_path: docs_path.to_s,
|
92
108
|
assets_path: assets_path.to_s,
|
93
109
|
models_path: models_path.to_s,
|
94
|
-
data_path: data_path.to_s
|
110
|
+
data_path: data_path.to_s,
|
111
|
+
lib_path: briefcase_lib_path.to_s
|
95
112
|
}
|
96
113
|
}
|
97
114
|
end
|
@@ -275,6 +292,10 @@ module Brief
|
|
275
292
|
root.join(options.fetch(:data_path) { config.data_path }).expand_path
|
276
293
|
end
|
277
294
|
|
295
|
+
def briefcase_lib_path
|
296
|
+
root.join(options.fetch(:lib_path) { config.lib_path }).expand_path
|
297
|
+
end
|
298
|
+
|
278
299
|
def assets_trail
|
279
300
|
@assets_trail ||= Hike::Trail.new(assets_path).tap do |trail|
|
280
301
|
trail.append_extensions '.svg', '.png', '.pdf', '.jpg', '.gif', '.mov'
|
data/lib/brief/configuration.rb
CHANGED
data/lib/brief/version.rb
CHANGED
data/spec/lib/brief/apps_spec.rb
CHANGED
@@ -19,11 +19,19 @@ describe "The Briefcase" do
|
|
19
19
|
expect(briefcase.settings).not_to be_empty
|
20
20
|
end
|
21
21
|
|
22
|
+
# TODO
|
23
|
+
# This is dependent on the blueprint app
|
24
|
+
# should be refactored
|
22
25
|
it "has a table of contents" do
|
23
26
|
expect(briefcase.table_of_contents).to be_present
|
24
27
|
expect(briefcase.table_of_contents.headings).not_to be_empty
|
25
28
|
end
|
26
29
|
|
30
|
+
it "loads the files defined in the lib folder" do
|
31
|
+
expect(briefcase.briefcase_lib_path.entries).not_to be_empty
|
32
|
+
expect(defined?(ShouldBeDefined)).to be_truthy
|
33
|
+
end
|
34
|
+
|
27
35
|
it "points to a file repository" do
|
28
36
|
expect(briefcase.repository).to be_a(Brief::Repository)
|
29
37
|
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.14.
|
4
|
+
version: 1.14.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-06-
|
11
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -440,6 +440,7 @@ files:
|
|
440
440
|
- spec/fixtures/example/docs/resource.html.md
|
441
441
|
- spec/fixtures/example/docs/user_story.html.md
|
442
442
|
- spec/fixtures/example/docs/wireframe.html.md
|
443
|
+
- spec/fixtures/example/lib/should_be_defined.rb
|
443
444
|
- spec/fixtures/example/models/concept.rb
|
444
445
|
- spec/fixtures/example/models/epic.rb
|
445
446
|
- spec/fixtures/example/models/page.rb
|
@@ -540,6 +541,7 @@ test_files:
|
|
540
541
|
- spec/fixtures/example/docs/resource.html.md
|
541
542
|
- spec/fixtures/example/docs/user_story.html.md
|
542
543
|
- spec/fixtures/example/docs/wireframe.html.md
|
544
|
+
- spec/fixtures/example/lib/should_be_defined.rb
|
543
545
|
- spec/fixtures/example/models/concept.rb
|
544
546
|
- spec/fixtures/example/models/epic.rb
|
545
547
|
- spec/fixtures/example/models/page.rb
|