1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

drop Ruby 1.8, add some extra tests

This commit is contained in:
Thomas Reynolds 2013-10-29 09:43:56 -07:00
parent 9a2c1533e3
commit ca4935361b
12 changed files with 11 additions and 36 deletions

View file

@ -1,5 +1,4 @@
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- jruby-19mode

12
Gemfile
View file

@ -19,17 +19,11 @@ gem "liquid", :require => false
gem "less", "~> 2.3.0", :require => false
gem "stylus", :require => false
# gem "pry", :require => false
# gem "pry-debugger", :require => false
platforms :ruby do
gem "therubyracer"
gem "redcarpet", /^1\.8/.match(RUBY_VERSION) ? "~> 2.0" : "~> 3.0"
end
# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
gem "ruby18_source_location"
gem "redcarpet", "~> 3.0"
gem "pry", :require => false
gem "pry-debugger", :require => false
end
platforms :jruby do

View file

@ -19,7 +19,6 @@ require 'cucumber/rake/task'
Cucumber::Rake::Task.new do |t|
exempt_tags = ["--tags ~@wip"]
exempt_tags << "--tags ~@nojava" if RUBY_PLATFORM == "java"
exempt_tags << "--tags ~@no18" if RUBY_VERSION < "1.9"
exempt_tags << "--tags ~@encoding" unless Object.const_defined?(:Encoding)
exempt_tags << "--tags ~@travishatesme" if ENV["TRAVIS"] == "true"

View file

@ -1,7 +1,6 @@
Feature: Markdown (Kramdown) support
In order to test included Kramdown support
@no18
Scenario: Kramdown smartypants extension
Given a fixture app "markdown-app"
And a file named "config.rb" with:

View file

@ -34,8 +34,9 @@ Feature: Markdown (Redcarpet) support
Then I should see "<sup>"
When I go to "/lax_spacing.html"
Then I should see "<p>hello</p>"
When I go to "/mailto.html"
Then I should see '<h1> <a href="mailto:mail@mail.com">Mail</a></h1>'
@no18
Scenario: Redcarpet 3 extensions
Given a fixture app "markdown-app"
And a file named "config.rb" with:

View file

@ -0,0 +1 @@
# ✉ [Mail](mailto:mail@mail.com)

View file

@ -0,0 +1 @@
<%= page_classes %>

View file

@ -0,0 +1 @@
<%= page_classes %>

View file

@ -0,0 +1 @@
<%= page_classes :numeric_prefix => "haaaaay" %>

View file

@ -3,9 +3,4 @@ source 'https://rubygems.org'
gem "middleman", "~><%= Middleman::VERSION %>"
# For faster file watcher updates on Windows:
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
gem "ruby18_source_location"
end
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]

View file

@ -8,9 +8,4 @@ gem "middleman", "~><%= Middleman::VERSION %>"
gem "middleman-livereload", "~> 3.1.0"
# For faster file watcher updates on Windows:
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
gem "ruby18_source_location"
end
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]

View file

@ -1,14 +1,3 @@
# Required to hack around Padrino blocks within different template types.
require 'rbconfig'
if RUBY_VERSION =~ /1.8/ && RbConfig::CONFIG['ruby_install_name'] == 'ruby'
begin
require 'ruby18_source_location'
rescue LoadError
$stderr.puts "Ruby 1.8 requires the 'ruby18_source_location' gem be added to your Gemfile"
exit(1)
end
end
if !defined?(::Padrino::Helpers)
require 'vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/support_lite'
require 'vendored-middleman-deps/padrino-helpers-0.11.2/lib/padrino-helpers'