middleman-core 3.3.9 → 3.3.10

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: acd03e6a3cb9c67f0ac5c926e2f4250d4cd25087
4
- data.tar.gz: ce484d4bb814b019c1504d1949d550b0e5096e73
3
+ metadata.gz: 51f7c09a1eedee6dc4c8d2713418134b37911600
4
+ data.tar.gz: a364a4e6a03a63a4b087606f844d551a987c7aa2
5
5
  SHA512:
6
- metadata.gz: 7e7b7dc0319b62cc5b9de4b4fc843e65b3c06840741ef7ef8dbea9ad5ee2dc1ac48431c2e3fc28ac309ccfa83741d853f514ddd9e76e714afa5ad5b58c8ca1f2
7
- data.tar.gz: 2734a2888c4619db6cd35eb1d278509f18671ac4dd6073934e7a8c67fa87c1eb4636c6082f427fdff28e7642f63a2509c04c6ce99d444640d30fd0542c498665
6
+ metadata.gz: 6da1d3c7f92ea229de1baba5fdf12c4fe272c61549ad6f89cc52c0007cfd4ad2ff7926ce8cbd254c08b40082b1cc9106aaf22f9c6669136dad50f0a25641e166
7
+ data.tar.gz: 16a4cc624110b0b6eb0efb61f4b282e2827fc36e4d85e10198b3dc4c0d0a7ef57d50709acbccc83eefea39c2eef63bc6879aa389d577dd286bd6a62c889fb979
@@ -64,7 +64,7 @@ module Middleman::CoreExtensions
64
64
  data = app.extensions[:frontmatter].data(source_file).first
65
65
 
66
66
  if proxy?
67
- url_data = app.extensions[:frontmatter].data( File.join( app.source_dir, url ).chomp('/') ).first
67
+ url_data = app.extensions[:frontmatter].data(File.join(app.source_dir, url).chomp('/')).first
68
68
  data = data.deep_merge(url_data)
69
69
  end
70
70
 
@@ -23,7 +23,7 @@ module Middleman
23
23
  # If we've already got a matching extension that passed the
24
24
  # version check, bail out.
25
25
  return if registered.key?(name.to_sym) &&
26
- !registered[name.to_sym].is_a?(String)
26
+ !registered[name.to_sym].is_a?(String)
27
27
 
28
28
  registered[name.to_sym] = if block_given?
29
29
  block
@@ -31,7 +31,7 @@ module Middleman
31
31
  mail_addr = el.attr['href'].sub(/\Amailto:/, '')
32
32
  href = obfuscate('mailto') << ':' << obfuscate(mail_addr)
33
33
  content = obfuscate(content) if content == mail_addr
34
- return %Q(<a href="#{href}">#{content}</a>)
34
+ return %(<a href="#{href}">#{content}</a>)
35
35
  end
36
36
 
37
37
  attr = el.attr.dup
@@ -1,4 +1,5 @@
1
1
  require 'redcarpet'
2
+ require 'active_support/core_ext/module/attribute_accessors'
2
3
 
3
4
  module Middleman
4
5
  module Renderers
@@ -61,7 +62,7 @@ module Middleman
61
62
  middleman_app.image_tag(link, title: title, alt: alt_text)
62
63
  else
63
64
  link_string = link.dup
64
- link_string << %Q("#{title}") if title && title.length > 0 && title != alt_text
65
+ link_string << %("#{title}") if title && title.length > 0 && title != alt_text
65
66
  "![#{alt_text}](#{link_string})"
66
67
  end
67
68
  end
@@ -74,7 +75,7 @@ module Middleman
74
75
  middleman_app.link_to(content, link, attributes)
75
76
  else
76
77
  link_string = link.dup
77
- link_string << %Q("#{title}") if title && title.length > 0 && title != alt_text
78
+ link_string << %("#{title}") if title && title.length > 0 && title != alt_text
78
79
  "[#{content}](#{link_string})"
79
80
  end
80
81
  end
@@ -28,7 +28,7 @@ module Middleman
28
28
  end
29
29
 
30
30
  # Setup Slim options to work with partials
31
- ::Slim::Engine.set_default_options(
31
+ ::Slim::Engine.set_options(
32
32
  buffer: '@_out_buf',
33
33
  use_html_safe: true,
34
34
  generator: ::Temple::Generators::RailsOutputBuffer,
@@ -42,7 +42,7 @@ module Middleman
42
42
 
43
43
  ::Slim::Embedded::SassEngine.disable_option_validator!
44
44
  %w(sass scss markdown).each do |engine|
45
- ::Slim::Embedded.default_options[engine.to_sym] = context_hack
45
+ ::Slim::Embedded.options[engine.to_sym] = context_hack
46
46
  end
47
47
  end
48
48
  end
@@ -21,9 +21,9 @@ module Middleman
21
21
  # @return [Boolean]
22
22
  def ignored?
23
23
  @app.ignore_manager.ignored?(path) ||
24
- (!proxy? &&
25
- @app.ignore_manager.ignored?(source_file.sub("#{@app.source_dir}/", ''))
26
- )
24
+ (!proxy? &&
25
+ @app.ignore_manager.ignored?(source_file.sub("#{@app.source_dir}/", ''))
26
+ )
27
27
  end
28
28
  end
29
29
 
@@ -53,7 +53,7 @@ module Middleman
53
53
  proxy_resource
54
54
  end
55
55
 
56
- # rubocop:disable AccessorMethodName
56
+ # rubocop:disable Style/AccessorMethodName
57
57
  def get_source_file
58
58
  if proxy?
59
59
  proxied_to_resource.source_file
@@ -61,16 +61,15 @@ module Middleman
61
61
  super
62
62
  end
63
63
  end
64
+ # rubocop:enable Style/AccessorMethodName
64
65
 
65
66
  def content_type
66
67
  mime_type = super
67
68
  return mime_type if mime_type
68
69
 
69
- if proxy?
70
- proxied_to_resource.content_type
71
- else
72
- nil
73
- end
70
+ return proxied_to_resource.content_type if proxy?
71
+
72
+ nil
74
73
  end
75
74
  end
76
75
 
@@ -66,9 +66,11 @@ module Middleman
66
66
  super(store, path)
67
67
  end
68
68
 
69
+ # rubocop:disable Style/AccessorMethodName
69
70
  def get_source_file
70
71
  nil
71
72
  end
73
+ # rubocop:enable Style/AccessorMethodName
72
74
 
73
75
  def template?
74
76
  true
@@ -24,7 +24,7 @@
24
24
  # page "/admin/*"
25
25
  # end
26
26
 
27
- # Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
27
+ # Proxy pages (https://middlemanapp.com/advanced/dynamic_pages/)
28
28
  # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
29
29
  # :which_fake_page => "Rendering a fake page with a local variable" }
30
30
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '3.3.9' unless const_defined?(:VERSION)
4
+ VERSION = '3.3.10' unless const_defined?(:VERSION)
5
5
  end
@@ -36,7 +36,6 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
36
36
 
37
37
  # The helpers
38
38
  helpers do
39
-
40
39
  # Make all block content html_safe
41
40
  # rubocop:disable Semicolon
42
41
  def content_tag(name, content=nil, options=nil, &block)
@@ -226,12 +226,12 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
226
226
 
227
227
  if lang_suffix
228
228
  super(suffixed_partial_name, maybe_static) ||
229
- super(File.join(locals_dir, suffixed_partial_name), maybe_static) ||
230
- super(partials_path, try_static) ||
231
- super
229
+ super(File.join(locals_dir, suffixed_partial_name), maybe_static) ||
230
+ super(partials_path, try_static) ||
231
+ super
232
232
  else
233
233
  super(partials_path, try_static) ||
234
- super
234
+ super
235
235
  end
236
236
  end
237
237
  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.9
4
+ version: 3.3.10
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: 2015-02-18 00:00:00.000000000 Z
13
+ date: 2015-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler