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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffb26f7c38c2050a653a96bf9bf1f7b0a4ca49d2
4
- data.tar.gz: 8566d1b46e8860c12d1cd1d0fe16af07f9f1c3f6
3
+ metadata.gz: 42a09eac175995b0371fa0cb1687e9866e48c60c
4
+ data.tar.gz: ac4e563203358e5605e8cca0b5d1a5c1bd4baec5
5
5
  SHA512:
6
- metadata.gz: 8cc45ef2bc146e222d977d4859126e98ad4e8fb3399f204ca1d607d1d84953952f80d314c9b459bed799f7beba6e4192d1e8fe733207444590c06c8dda8e174f
7
- data.tar.gz: 308a26fd70700662b34de22a52690dcfea4381e06558e26636303dbc4a7713744be26e039b5d471dfd67b173bb2e17d8a71a21f6500a9bf2f102ac9104939ae9
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)
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.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.4.5)
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)
@@ -18,6 +18,7 @@ config do
18
18
  end
19
19
 
20
20
  command(:sync) do |*args|
21
+ puts "== Sync command is empty. Define in your brief.rb"
21
22
  end
22
23
 
23
24
  class Brief::Briefcase
@@ -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 "== Adding blueprint assets to sprockets paths"
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
- return @blueprint if @blueprint && !development?
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: !development?)
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
@@ -13,6 +13,7 @@ if ARGV[0] == "console"
13
13
  else
14
14
  require 'commander/import'
15
15
 
16
+ $brief_cli = true
16
17
  $terminal.wrap_at = 120
17
18
 
18
19
  program :name, "Brief"
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.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Brief
2
- VERSION = '1.15.4'
2
+ VERSION = '1.15.5'
3
3
  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.15.4
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-26 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie