From c14fd72d04231755528b64066987033f3ffb9832 Mon Sep 17 00:00:00 2001 From: Mauro Otonelli Date: Tue, 14 Jul 2015 19:26:59 -0300 Subject: [PATCH 1/3] Remove unused integer/inflections extension. --- middleman-core/lib/middleman-core/application.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/middleman-core/lib/middleman-core/application.rb b/middleman-core/lib/middleman-core/application.rb index f509e943..5fcf8ffc 100644 --- a/middleman-core/lib/middleman-core/application.rb +++ b/middleman-core/lib/middleman-core/application.rb @@ -8,10 +8,6 @@ require 'i18n' # users expect. ::I18n.enforce_available_locales = false -# Use ActiveSupport JSON -require 'active_support/json' -require 'active_support/core_ext/integer/inflections' - # Simple callback library require 'hooks' From 63d6a00ed9dbcf7150fd0c4dbe296bf1cbc4bc5e Mon Sep 17 00:00:00 2001 From: Mauro Otonelli Date: Tue, 14 Jul 2015 19:30:17 -0300 Subject: [PATCH 2/3] Use native Ruby JSON implementation instead of ActiveSupport's. --- middleman-core/lib/middleman-core/core_extensions/data.rb | 4 ++-- .../lib/middleman-core/core_extensions/front_matter.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/data.rb b/middleman-core/lib/middleman-core/core_extensions/data.rb index 4f8a0e50..0f25c223 100644 --- a/middleman-core/lib/middleman-core/core_extensions/data.rb +++ b/middleman-core/lib/middleman-core/core_extensions/data.rb @@ -9,7 +9,7 @@ module Middleman def registered(app) # Data formats require 'yaml' - require 'active_support/json' + require 'json' app.config.define_setting :data_dir, 'data', 'The directory data files are stored in' app.send :include, InstanceMethods @@ -98,7 +98,7 @@ module Middleman if %w(.yaml .yml).include?(extension) data = YAML.load_file(full_path) elsif extension == '.json' - data = ActiveSupport::JSON.decode(full_path.read) + data = JSON.parse(full_path.read) else return end diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index 8499a339..982a6d70 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -5,7 +5,7 @@ require 'pathname' require 'yaml' # Parsing JSON frontmatter -require 'active_support/json' +require 'json' # Extensions namespace module Middleman::CoreExtensions @@ -154,7 +154,7 @@ module Middleman::CoreExtensions begin json = ($1 + $2).sub(';;;', '{').sub(';;;', '}') - data = ActiveSupport::JSON.decode(json).symbolize_keys + data = JSON.parse(json).symbolize_keys rescue => e app.logger.error "JSON Exception parsing #{full_path}: #{e.message}" return false From d18e5ed973eb5d4a3de6bb1bc5a27fb3855d2bfd Mon Sep 17 00:00:00 2001 From: Mauro Otonelli Date: Tue, 14 Jul 2015 21:32:52 -0300 Subject: [PATCH 3/3] Locked aruba to ~> 0.7.4, as 0.8 (latest) breaks the build. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f34fbaec..2740f00c 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem 'yard', '~> 0.8', require: false # Test tools gem 'pry', '~> 0.10', group: :development -gem 'aruba', '~> 0.6' +gem 'aruba', '~> 0.7.4' gem 'rspec', '~> 3.0' gem 'fivemat', '~> 1.3' gem 'cucumber', '~> 1.3'