brief 1.15.4 → 1.15.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/apps/blueprint/config.rb +1 -0
- data/apps/blueprint/extensions/middleman.rb +7 -7
- data/bin/brief +1 -0
- data/lib/brief.rb +3 -0
- data/lib/brief/briefcase.rb +2 -0
- data/lib/brief/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42a09eac175995b0371fa0cb1687e9866e48c60c
|
4
|
+
data.tar.gz: ac4e563203358e5605e8cca0b5d1a5c1bd4baec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b95659f63524a65d93dee8b2480386ca6c88195b76ed62768aa46ce12f82561163f0c442a3204e873e9e4f841376d181282f0c8fc7041037ccc1d1fba41bce89
|
7
|
+
data.tar.gz: 1c3dd72c8a0b4846bd5bd425317601a0d7346a6302d98839c2f0ec5163be963b60acb7bb0ce762fde2b534a2e3d0462a6dfdc70167abc7a017fd04e459967e0e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
brief (1.15.
|
4
|
+
brief (1.15.5)
|
5
5
|
activesupport (> 3.2)
|
6
6
|
commander (~> 4.3)
|
7
7
|
em-websocket (~> 0.5)
|
@@ -19,7 +19,7 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
activesupport (4.2.
|
22
|
+
activesupport (4.2.3)
|
23
23
|
i18n (~> 0.7)
|
24
24
|
json (~> 1.7, >= 1.7.7)
|
25
25
|
minitest (~> 5.1)
|
@@ -95,7 +95,7 @@ GEM
|
|
95
95
|
addressable (~> 2.3.5)
|
96
96
|
faraday (~> 0.8, < 0.10)
|
97
97
|
slop (3.6.0)
|
98
|
-
terminal-table (1.
|
98
|
+
terminal-table (1.5.2)
|
99
99
|
thin (1.6.3)
|
100
100
|
daemons (~> 1.0, >= 1.0.9)
|
101
101
|
eventmachine (~> 1.0)
|
data/apps/blueprint/config.rb
CHANGED
@@ -5,15 +5,17 @@
|
|
5
5
|
def initialize(app, options_hash = {}, &block)
|
6
6
|
super
|
7
7
|
|
8
|
-
app.set(:blueprint_root, options_hash.fetch(:blueprint_root) { ENV['BLUEPRINT_ROOT'] || "./blueprint" })
|
8
|
+
app.set(:blueprint_root, Pathname(options_hash.fetch(:blueprint_root) { ENV['BLUEPRINT_ROOT'] || "./blueprint" }))
|
9
9
|
|
10
10
|
# import the blueprint assets into the sprockets path
|
11
11
|
app.ready do
|
12
|
-
logger.info "==
|
12
|
+
logger.info "== Loading blueprint from #{ blueprint_root }"
|
13
|
+
logger.info "== Appending #{ blueprint.assets_path } to Sprockets paths" if blueprint.assets_path.exist?
|
14
|
+
|
13
15
|
patterns = [
|
14
16
|
'.png', '.gif', '.jpg', '.jpeg', '.svg', # Images
|
15
17
|
'.eot', '.otf', '.svc', '.woff', '.ttf', # Fonts
|
16
|
-
'.js', # Javascript
|
18
|
+
'.js', '.slim', '.erb', '.md', # Javascript
|
17
19
|
].map { |e| File.join(blueprint.assets_path, "**", "*#{e}" ) }
|
18
20
|
|
19
21
|
sprockets.prepend_path(blueprint.assets_path)
|
@@ -33,16 +35,14 @@
|
|
33
35
|
end
|
34
36
|
|
35
37
|
def blueprint
|
36
|
-
|
37
|
-
|
38
|
-
@blueprint = get_briefcase.tap do |b|
|
38
|
+
@blueprint ||= get_briefcase.tap do |b|
|
39
39
|
b.href_builder = ->(uri) {uri = uri.to_s; uri.gsub('brief://','').gsub(/\.\w+$/,'.html').gsub(b.docs_path.to_s,'') }
|
40
40
|
b.asset_finder = ->(asset) { needle = asset.relative_path_from(b.assets_path).to_s; image_path(needle) }
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
44
|
def get_briefcase
|
45
|
-
Brief::Briefcase.new(root: blueprint_root, caching:
|
45
|
+
Brief::Briefcase.new(root: blueprint_root, caching: false)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end if defined?(::Middleman)
|
data/bin/brief
CHANGED
data/lib/brief.rb
CHANGED
@@ -78,7 +78,10 @@ module Brief
|
|
78
78
|
|
79
79
|
def self.load_commands
|
80
80
|
Dir[lib_root.join('brief', 'cli', '**/*.rb')].each { |f| require(f) }
|
81
|
+
create_command_dispatchers
|
82
|
+
end
|
81
83
|
|
84
|
+
def self.create_command_dispatchers
|
82
85
|
# Each Brief::Model can define certain "actions" which can be called on the documents.
|
83
86
|
#
|
84
87
|
# The Brief CLI interface lets users dispatch these actions to the documents specified by the PATH args.
|
data/lib/brief/briefcase.rb
CHANGED
@@ -258,6 +258,8 @@ module Brief
|
|
258
258
|
|
259
259
|
Brief.load_modules_from(models_path) if models_path.exist?
|
260
260
|
Brief::Model.finalize
|
261
|
+
|
262
|
+
Brief.create_command_dispatchers() if $brief_cli
|
261
263
|
end
|
262
264
|
|
263
265
|
# Returns a model name by its human readable description or its type alias
|
data/lib/brief/version.rb
CHANGED
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.15.
|
4
|
+
version: 1.15.5
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|