middleman-core 4.1.5 → 4.1.6

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: 4c11a191bebfe7ff3fc0a2418fc2334f38373f01
4
- data.tar.gz: 45c019a96a431a716864f3ee952614022c6ad374
3
+ metadata.gz: 1f29faf31f921ea85c08f3c81e8c6da2c7a6da73
4
+ data.tar.gz: 3f11d6e9256c1ede7defeadb5354a9f8a585840c
5
5
  SHA512:
6
- metadata.gz: 234bf4823fc4870dd79df4605b8cee91efbe7037b6a2403ce0bb2c2c33f9f4ff736349eae87aecdfbe964a28f0a4ff51434bb7511cb529523a410006904fa855
7
- data.tar.gz: eae2a780c9486f90aa2230a4b8e756e463a330af7088e710d5818e2bcec852d43267fcbce0a4a00f97da1a5717ae59278c606b773b78d789e694c3e4bb7beb74
6
+ metadata.gz: 0592e5ff04f84fc5a5d4b47709d602d3d4e8af423018ae41d68c2bb848db928b28ff516bfa8374d2e62add07875d9372f2ab686029d23a26e35f86e7fb604cc2
7
+ data.tar.gz: 417ff295d39b237122130c249ec40c6c51b99c922960595174ca9606b519727818a3277651ba6e798e5eb797063d2bb499ec4f66747768381a679a074433ac3b
@@ -22,6 +22,10 @@ module Middleman
22
22
  app.subscribe_to_callbacks(&method(:execute_callbacks))
23
23
  end
24
24
 
25
+ def include(mod)
26
+ self.extend(mod)
27
+ end
28
+
25
29
  def helpers(*helper_modules, &block)
26
30
  helper_modules ||= []
27
31
 
@@ -2,6 +2,7 @@
2
2
  require 'listen'
3
3
  require 'middleman-core/contracts'
4
4
  require 'digest'
5
+ require 'set'
5
6
 
6
7
  # Monkey patch Listen silencer so `only` works on directories too
7
8
  module Listen
@@ -49,7 +50,7 @@ module Middleman
49
50
  # Reference to lower level listener
50
51
  attr_reader :listener
51
52
 
52
- IGNORED_DIRECTORIES = %w(.git node_modules .sass-cache).freeze
53
+ IGNORED_DIRECTORIES = Set.new(%w(.git node_modules .sass-cache vendor/bundle .bundle))
53
54
 
54
55
  # Construct a new SourceWatcher
55
56
  #
@@ -167,7 +168,8 @@ module Middleman
167
168
  @listener = ::Listen.to(@directory.to_s, config, &method(:on_listener_change))
168
169
 
169
170
  @listener.ignore(/^\.sass-cache/)
170
- # @listener.only(@only) unless @only.empty?
171
+ @listener.ignore(/^node_modules/)
172
+ @listener.ignore(/^vendor\/bundle/)
171
173
 
172
174
  @listener.start
173
175
  end
@@ -222,7 +224,8 @@ module Middleman
222
224
 
223
225
  Contract Pathname => Bool
224
226
  def should_not_recurse?(p)
225
- IGNORED_DIRECTORIES.include?(p.basename.to_s)
227
+ relative_path = p.relative_path_from(@directory).to_s
228
+ IGNORED_DIRECTORIES.include?(relative_path)
226
229
  end
227
230
 
228
231
  # The `listen` gem callback.
@@ -255,7 +258,8 @@ module Middleman
255
258
  logger.debug "== Change (#{f[:types].inspect}): #{f[:relative_path]}"
256
259
  end
257
260
 
258
- related_updates = ::Middleman::Util.find_related_files(app, (updated_paths + removed_paths)).select(&method(:valid?))
261
+ related_sources = valid_updates.map { |u| u[:full_path] } + removed_paths
262
+ related_updates = ::Middleman::Util.find_related_files(app, related_sources).select(&method(:valid?))
259
263
 
260
264
  related_updates.each do |f|
261
265
  logger.debug "== Possible Change (#{f[:types].inspect}): #{f[:relative_path]}"
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '4.1.5'.freeze unless const_defined?(:VERSION)
4
+ VERSION = '4.1.6'.freeze unless const_defined?(:VERSION)
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.5
4
+ version: 4.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-03-26 00:00:00.000000000 Z
13
+ date: 2016-03-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler