middleman-core 3.3.1 → 3.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63fc3d78afa6fed4a57268ddfec21d5ab9926c0a
4
- data.tar.gz: feab8c3d4100d3ec74f35ff021ab60fe0b4b994e
3
+ metadata.gz: a5dd3bae964c6e57fa3ed58f5c8ab2896878c95a
4
+ data.tar.gz: 9c5b8c7377aeb46639b747b276bb3199648ba8f9
5
5
  SHA512:
6
- metadata.gz: 9051308cb37134fa86a1e27f999c733a822b20134cc4d9201b9d2e7a4ecb386917eedd699f3599b4212f055c48309d7b8a8cd100895f52b138b7bd6efc4724e5
7
- data.tar.gz: 4d41d515005c2b9aaa3d93b22d85720c81ccb37cca3a972486e887de3b812eea0d697ce924711b8369d80c100be55196d1e5ea03efb23c431e6d8b426688d635
6
+ metadata.gz: e4a6e00d45ffdc0e4b4f0c7c2c5b9e9f37dfa752fd0d87a62be3a3be2de183068c1c90ce52143e22b3f28cce237d89f34dc1fb20d765e41cf16f7043cdc1ee0e
7
+ data.tar.gz: b5b3f19786d889638412fb3d4dec3f4929bdfaa05054e049165de439c03f7a4079e64942ac542ef37f5c5c5ef79fb513fbc3e0f98f3234d0f3bf1679a851f87d
@@ -25,7 +25,6 @@ module Middleman
25
25
 
26
26
  desc 'version', 'Show version'
27
27
  def version
28
- require 'middleman-core/version'
29
28
  say "Middleman #{Middleman::VERSION}"
30
29
  end
31
30
 
@@ -81,6 +80,9 @@ module Middleman
81
80
  end
82
81
  end
83
82
 
83
+ # Require the Middleman version
84
+ require 'middleman-core/version'
85
+
84
86
  # Include the core CLI items
85
87
  require 'middleman-core/cli/init'
86
88
  require 'middleman-core/cli/bundler'
@@ -185,9 +185,7 @@ module Middleman::Cli
185
185
 
186
186
  @app.sitemap.resources.select do |resource|
187
187
  resource.ext == '.css'
188
- end.each do |resource|
189
- @rack.get(URI.escape(resource.destination_path))
190
- end
188
+ end.each(&method(:build_resource))
191
189
 
192
190
  logger.debug '== Checking for Compass sprites'
193
191
 
@@ -210,23 +208,27 @@ module Middleman::Cli
210
208
  end
211
209
 
212
210
  # Loop over all the paths and build them.
213
- resources.each do |resource|
214
- next if @config[:glob] && !File.fnmatch(@config[:glob], resource.destination_path)
211
+ resources.reject do |resource|
212
+ resource.ext == '.css'
213
+ end.each(&method(:build_resource))
215
214
 
216
- output_path = render_to_file(resource)
215
+ ::Middleman::Profiling.report('build')
216
+ end
217
217
 
218
- if should_clean? && output_path.exist?
219
- if RUBY_PLATFORM =~ /darwin/
220
- # handle UTF-8-MAC filename on MacOS
218
+ def build_resource(resource)
219
+ return if @config[:glob] && !File.fnmatch(@config[:glob], resource.destination_path)
221
220
 
222
- @to_clean.delete(output_path.realpath.to_s.encode('UTF-8', 'UTF-8-MAC'))
223
- else
224
- @to_clean.delete(output_path.realpath)
225
- end
221
+ output_path = render_to_file(resource)
222
+
223
+ if should_clean? && output_path.exist?
224
+ if RUBY_PLATFORM =~ /darwin/
225
+ # handle UTF-8-MAC filename on MacOS
226
+
227
+ @to_clean.delete(output_path.realpath.to_s.encode('UTF-8', 'UTF-8-MAC'))
228
+ else
229
+ @to_clean.delete(output_path.realpath)
226
230
  end
227
231
  end
228
-
229
- ::Middleman::Profiling.report('build')
230
232
  end
231
233
 
232
234
  # Render a resource to a file.
@@ -15,7 +15,7 @@ module Middleman
15
15
  # @return [void]
16
16
  def start(opts={})
17
17
  @options = opts
18
- @host = @options[:host] || Socket.gethostname
18
+ @host = @options[:host] || Socket.ip_address_list.find(&:ipv4_private?).ip_address
19
19
  @port = @options[:port] || DEFAULT_PORT
20
20
 
21
21
  mount_instance(new_app)
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '3.3.1' unless const_defined?(:VERSION)
4
+ VERSION = '3.3.2' 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: 3.3.1
4
+ version: 3.3.2
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-04-05 00:00:00.000000000 Z
13
+ date: 2014-04-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler