middleman-core 4.0.0.alpha.4 → 4.0.0.alpha.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: 5db48d5aece00a632a9abf5221484e4243768c24
4
- data.tar.gz: ca012a5e8145471140495048a9e89cecba5e7371
3
+ metadata.gz: 9570d8f9765585574f06e78f6d773db42228ac92
4
+ data.tar.gz: 46eb43196b0dcaa048639ae53b220fb464ec16af
5
5
  SHA512:
6
- metadata.gz: 1d8f21f528ba7b8d4fe101adc84137789a58650fdf96f8ae4bd6136507dad9b29c703aaae6e9b728f73098444d55a7a3408afdb3d482bab7b4ba792133cfbe67
7
- data.tar.gz: 137b34399f69fe0085a5ccb13074abd1bef0a8d1b0e05391a30f87cc7ec2a364b6de1b453e2e504effff5b7993300b486d1185a7994b6e93ed42a46fa26633e1
6
+ metadata.gz: acdd4d200e34be9c4e88cf3a7da30584e3a3e1af3b58d67643d63fb9b8af12aa738ebb55840b09acecc97cf2aa3d131ed3b4a6fa3a3f3046190cc8388260f3ac
7
+ data.tar.gz: a8be04d81b41429ab43de894afb886877506e035283dc1a36c507d538a65139dbc5dd7536b79e13b0d9adbc24feeef557743f1803746dfb0fe01c559aa890219
@@ -146,9 +146,9 @@ module Middleman
146
146
  # Get the URL path for an on-disk file
147
147
  # @param [String] file
148
148
  # @return [String]
149
- Contract IsA['Middleman::SourceFile'] => String
149
+ Contract Or[Pathname, IsA['Middleman::SourceFile']] => String
150
150
  def file_to_path(file)
151
- relative_path = file[:relative_path].to_s
151
+ relative_path = file.is_a?(Pathname) ? file.to_s : file[:relative_path].to_s
152
152
 
153
153
  # Replace a file name containing automatic_directory_matcher with a folder
154
154
  unless @app.config[:automatic_directory_matcher].nil?
@@ -339,7 +339,7 @@ module Middleman
339
339
  valid_updated = updated_files.select { |f| f[:types].include?(callback[:type]) }
340
340
  valid_removed = removed_files.select { |f| f[:types].include?(callback[:type]) }
341
341
 
342
- callback[:proc].call(valid_updated, valid_removed)
342
+ callback[:proc].call(valid_updated, valid_removed) unless valid_updated.empty? && valid_removed.empty?
343
343
  end
344
344
  end
345
345
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '4.0.0.alpha.4' unless const_defined?(:VERSION)
4
+ VERSION = '4.0.0.alpha.5' 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.0.0.alpha.4
4
+ version: 4.0.0.alpha.5
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: 2014-12-24 00:00:00.000000000 Z
13
+ date: 2014-12-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler