diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c02cbf1..b79c582 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,5 +19,3 @@ jobs: bundler-cache: true - name: Runs tests run: bundle exec rake test - env: - TEST: true diff --git a/Gemfile b/Gemfile index ad1e4e3..ebb1564 100644 --- a/Gemfile +++ b/Gemfile @@ -6,8 +6,8 @@ gem "middleman-core", git: "https://github.com/middleman/middleman.git" gemspec # Build and doc tools -gem 'rake', '~> 10.3', require: false -gem 'yard', '~> 0.8', require: false +gem 'rake', '~> 13.1', require: false +gem 'yard', '~> 0.9', require: false # Test tools gem 'pry', '~> 0.10', group: :development @@ -15,13 +15,10 @@ gem 'aruba', '~> 1.0.0' gem 'rspec', '~> 3.0' gem 'cucumber', '~> 2.0' gem 'capybara', '~> 2.5.0' -gem 'haml', '< 6' -gem 'slim', '< 5' +gem 'haml', RUBY_VERSION > '3.0' ? '< 7' : '< 6' +gem 'slim', '>= 3', '< 5' gem 'kramdown' gem "redcarpet" -# Code Quality -gem "cane", require: false - # For old Rubies gem 'nokogiri', '~> 1.12.0' diff --git a/README.md b/README.md index 79ab63c..fc27a7d 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs ## Donate -[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3) +[Click here to lend your support to Middleman](https://github.com/sponsors/tdreyno) ## License @@ -205,6 +205,4 @@ Copyright (c) 2012-2014 Benjamin Hollis. MIT Licensed, see [LICENSE] for details [middleman]: http://middlemanapp.com [gem]: https://rubygems.org/gems/middleman-syntax [travis]: http://travis-ci.org/middleman/middleman-syntax -[gemnasium]: https://gemnasium.com/middleman/middleman-syntax -[codeclimate]: https://codeclimate.com/github/middleman/middleman-syntax [LICENSE]: https://github.com/middleman/middleman-syntax/blob/master/LICENSE.md diff --git a/Rakefile b/Rakefile index df9d58d..cdb49fc 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,4 @@ -require 'bundler' -Bundler::GemHelper.install_tasks - +require 'bundler/gem_tasks' require 'cucumber/rake/task' Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t| @@ -9,23 +7,7 @@ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t| t.cucumber_opts = "--color --tags ~@wip #{exempt_tags} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}" end -require 'rake/clean' - task :test => ["cucumber"] - -begin - require 'cane/rake_task' - - desc "Run cane to check quality metrics" - Cane::RakeTask.new(:quality) do |cane| - cane.no_style = true - cane.no_doc = true - cane.abc_glob = "lib/middleman-syntax/**/*.rb" - end -rescue LoadError - # warn "cane not available, quality task not provided." -end - task :default => :test desc "Build HTML documentation" diff --git a/lib/middleman-syntax/haml_monkey_patch.rb b/lib/middleman-syntax/haml_monkey_patch.rb index 5e0bea8..ccc6de2 100644 --- a/lib/middleman-syntax/haml_monkey_patch.rb +++ b/lib/middleman-syntax/haml_monkey_patch.rb @@ -21,8 +21,14 @@ def render(code) module Haml class Filters class Code < Base - extend HamlMonkeyPatch + include HamlMonkeyPatch + + def compile(node) + [:static, render(node.value[:text])] + end end + + register :code, Code end end else diff --git a/middleman-syntax.gemspec b/middleman-syntax.gemspec index 860c172..6ffe6f0 100644 --- a/middleman-syntax.gemspec +++ b/middleman-syntax.gemspec @@ -1,6 +1,4 @@ -# -*- encoding: utf-8 -*- -$:.push File.expand_path("../lib", __FILE__) -require "middleman-syntax/version" +require "./lib/middleman-syntax/version" Gem::Specification.new do |s| s.name = "middleman-syntax"