diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b5ad1f..e42dce97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ master === +* Update activesupport to 5.x and padrino to 0.14.x * Only SassC from now on. * Add `--dry-run` to run a build, but skip outputting to disk. * Incremental builds: `--track-dependencies` and `--only-changed` flags (#2220) diff --git a/Gemfile.lock b/Gemfile.lock index f1987268..19b3433d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ PATH remote: middleman-core specs: middleman-core (5.0.0.rc.1) - activesupport (>= 4.2, < 5.2) + activesupport (~> 5.2) addressable (~> 2.3) backports (~> 3.11) bundler @@ -23,7 +23,7 @@ PATH listen (~> 3.0) memoist (~> 0.14) oj (~> 3.7) - padrino-helpers (~> 0.13.0) + padrino-helpers (~> 0.14.4) parallel rack (>= 1.4.5, < 3) rgl (~> 0.5.3) @@ -35,7 +35,7 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (5.1.6.1) + activesupport (5.2.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -135,13 +135,12 @@ GEM nio4r (2.3.1) nokogiri (1.9.1) mini_portile2 (~> 2.4.0) - oj (3.7.5) - padrino-helpers (0.13.3.4) + oj (3.7.6) + padrino-helpers (0.14.4) i18n (~> 0.6, >= 0.6.7) - padrino-support (= 0.13.3.4) + padrino-support (= 0.14.4) tilt (>= 1.4.1, < 3) - padrino-support (0.13.3.4) - activesupport (>= 3.1) + padrino-support (0.14.4) parallel (1.12.1) parser (2.5.3.0) ast (~> 2.4.0) diff --git a/middleman-cli/features/preview_server-hook.feature b/middleman-cli/features/preview_server-hook.feature index 15f6cba0..78b5e167 100644 --- a/middleman-cli/features/preview_server-hook.feature +++ b/middleman-cli/features/preview_server-hook.feature @@ -2,7 +2,7 @@ Feature: Run preview server before hook Scenario: When run Given a fixture app "preview-server-hook-app" - And the default aruba timeout is 30 seconds + And the default aruba exit timeout is 30 seconds When I run `middleman server --server-name localhost --bind-address 127.0.0.1` interactively And I stop middleman if the output contains: """ diff --git a/middleman-cli/features/preview_server.feature b/middleman-cli/features/preview_server.feature index 89dfae8f..1bf1f88e 100644 --- a/middleman-cli/features/preview_server.feature +++ b/middleman-cli/features/preview_server.feature @@ -6,7 +6,7 @@ Feature: Run the preview server Background: Given a fixture app "preview-server-app" - And the default aruba timeout is 30 seconds + And the default aruba exit timeout is 30 seconds Scenario: Start the server with defaults When I run the interactive middleman server diff --git a/middleman-core/lib/middleman-core/sources/source_watcher.rb b/middleman-core/lib/middleman-core/sources/source_watcher.rb index 1dbc992f..9d475a40 100644 --- a/middleman-core/lib/middleman-core/sources/source_watcher.rb +++ b/middleman-core/lib/middleman-core/sources/source_watcher.rb @@ -142,7 +142,7 @@ module Middleman return nil if p.absolute? && !p.to_s.start_with?(@directory.to_s) destination_dir = @options[:destination_dir] - if destination_dir.present? && p.to_s.start_with?(destination_dir) + if !destination_dir.nil? && !destination_dir.empty? && p.to_s.start_with?(destination_dir) path_without_destination_dir = p.to_s[destination_dir.to_s.length + 1..-1] p = Pathname(path_without_destination_dir) end diff --git a/middleman-core/lib/middleman-core/template_context.rb b/middleman-core/lib/middleman-core/template_context.rb index e3510e1c..a09004d1 100644 --- a/middleman-core/lib/middleman-core/template_context.rb +++ b/middleman-core/lib/middleman-core/template_context.rb @@ -120,8 +120,8 @@ module Middleman # @param [Hash] options # @param [Proc] block A block will be evaluated to return internal contents. # @return [String] - Contract Any, Or[Symbol, String], Hash => String, Maybe[Proc] => String - def render(_, name, options_hash = ::Middleman::EMPTY_HASH, &block) + Contract Any, Or[Symbol, String], Hash, Hash, Maybe[Proc] => String + def render(_, name, options_hash, locals, &block) name = name.to_s partial_file = locate_partial(name, false) || locate_partial(name, true) @@ -137,7 +137,7 @@ module Middleman partial_file.read else opts = options_hash.dup - locs = opts.delete(:locals) + locs = locals render_file(partial_file, locs, opts, &block) end @@ -214,7 +214,7 @@ module Middleman # @param [Hash] opts Template options. # @param [Proc] block A block will be evaluated to return internal contents. # @return [String] The resulting content string. - Contract IsA['Middleman::SourceFile'], Hash, Hash, Maybe[Proc] => String + # Contract IsA['Middleman::SourceFile'], Hash, Hash, Maybe[Proc] => String def render_file(file, locs, opts, &block) _render_with_all_renderers(file[:relative_path].to_s, locs, self, opts, &block) end diff --git a/middleman-core/middleman-core.gemspec b/middleman-core/middleman-core.gemspec index a6bd34e2..77d2df16 100644 --- a/middleman-core/middleman-core.gemspec +++ b/middleman-core/middleman-core.gemspec @@ -29,8 +29,8 @@ Gem::Specification.new do |s| s.add_dependency('rgl', ['~> 0.5.3']) # Helpers - s.add_dependency('activesupport', ['>= 4.2', '< 5.2']) - s.add_dependency('padrino-helpers', ['~> 0.13.0']) + s.add_dependency('activesupport', ['~> 5.2']) + s.add_dependency('padrino-helpers', ['~> 0.14.4']) s.add_dependency('addressable', ['~> 2.3']) s.add_dependency('memoist', ['~> 0.14']) s.add_dependency('backports', ['~> 3.11'])