merge spec fixes onto master
This commit is contained in:
commit
bf03c14518
9 changed files with 48 additions and 44 deletions
51
Gemfile
51
Gemfile
|
@ -1,44 +1,39 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
# Build and doc tools
|
||||
gem 'rake', '~> 10.3.2', require: false
|
||||
gem 'yard', '~> 0.8.0', require: false
|
||||
gem 'rake', '~> 10.3', require: false
|
||||
gem 'yard', '~> 0.8', require: false
|
||||
|
||||
# Test tools
|
||||
gem 'cucumber', '~> 1.3.15'
|
||||
gem 'fivemat', '~> 1.3.1'
|
||||
gem 'aruba', '~> 0.6.0'
|
||||
gem 'pry', '~> 0.10', group: :development
|
||||
gem 'aruba', '~> 0.6'
|
||||
gem 'rspec', '~> 3.0'
|
||||
gem 'simplecov'
|
||||
gem 'contracts', require: false
|
||||
gem 'fivemat', '~> 1.3'
|
||||
gem 'cucumber', '~> 1.3'
|
||||
gem 'contracts', '~> 0.4'
|
||||
|
||||
# Optional middleman dependencies, included for tests
|
||||
gem 'sinatra', require: false
|
||||
gem 'slim', require: false
|
||||
gem 'liquid', require: false
|
||||
gem 'less', '~> 2.3.0', require: false
|
||||
gem 'stylus', require: false
|
||||
gem 'less', '2.3.0', require: false
|
||||
gem 'slim', '>= 2.0', require: false
|
||||
gem 'liquid', '>= 2.6', require: false
|
||||
gem 'stylus', '>= 1.0', require: false
|
||||
gem 'sinatra', '>= 1.4', require: false
|
||||
gem 'redcarpet', '>= 3.1', require: false unless RUBY_ENGINE == 'jruby'
|
||||
gem 'asciidoctor', '>= 0.1', require: false
|
||||
|
||||
platforms :ruby do
|
||||
gem 'therubyracer'
|
||||
gem 'redcarpet', '~> 3.1'
|
||||
gem 'pry', require: false, group: :development
|
||||
# gem 'pry-debugger', require: false, group: :development
|
||||
# gem 'pry-stack_explorer', require: false, group: :development
|
||||
end
|
||||
|
||||
platforms :jruby do
|
||||
gem 'therubyrhino'
|
||||
end
|
||||
# For less, note there is no compatible JS runtime for windows
|
||||
gem 'therubyrhino', '>= 2.0', platforms: :jruby
|
||||
gem 'therubyracer', '>= 0.12', platforms: :ruby
|
||||
|
||||
# Code Quality
|
||||
gem 'codeclimate-test-reporter', group: :test, require: nil
|
||||
gem 'coveralls', require: false
|
||||
gem 'rubocop', require: false
|
||||
gem 'rubocop', '~> 0.24', require: false
|
||||
gem 'simplecov', '0.7.1', require: false
|
||||
gem 'coveralls', '~> 0.7', require: false
|
||||
gem 'codeclimate-test-reporter', '~> 0.3', require: false, group: :test
|
||||
|
||||
# Middleman itself
|
||||
gem 'middleman-core', path: 'middleman-core'
|
||||
gem 'middleman', path: 'middleman'
|
||||
gem 'middleman-cli', path: 'middleman-cli'
|
||||
gem 'middleman-core', path: 'middleman-core'
|
||||
gem 'middleman-compass', github: 'middleman/middleman-compass', require: false
|
||||
gem 'middleman-sprockets', github: 'middleman/middleman-sprockets', require: false
|
||||
gem 'middleman', path: 'middleman'
|
||||
|
|
|
@ -19,6 +19,7 @@ Cucumber::Rake::Task.new do |t|
|
|||
exempt_tags = ['--tags ~@wip']
|
||||
exempt_tags << '--tags ~@nojava' if RUBY_PLATFORM == 'java'
|
||||
exempt_tags << '--tags ~@encoding' unless Object.const_defined?(:Encoding)
|
||||
exempt_tags << '--tags ~@nowindows' if Gem.win_platform?
|
||||
exempt_tags << '--tags ~@travishatesme' if ENV['TRAVIS'] == 'true'
|
||||
t.cucumber_opts = "--color #{exempt_tags.join(' ')} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
|
||||
end
|
||||
|
@ -27,6 +28,7 @@ Cucumber::Rake::Task.new(:cucumber_wip) do |t|
|
|||
exempt_tags = ['--tags @wip']
|
||||
exempt_tags << '--tags ~@nojava' if RUBY_PLATFORM == 'java'
|
||||
exempt_tags << '--tags ~@encoding' unless Object.const_defined?(:Encoding)
|
||||
exempt_tags << '--tags ~@nowindows' if Gem.win_platform?
|
||||
t.cucumber_opts = "--color #{exempt_tags.join(' ')} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
|
||||
end
|
||||
|
||||
|
|
|
@ -19,13 +19,12 @@ module Middleman::Cli
|
|||
# The git task
|
||||
# @param [String] name
|
||||
def git(repo, target='.')
|
||||
require 'rugged'
|
||||
require 'tmpdir'
|
||||
|
||||
path = repository_path(repo)
|
||||
|
||||
Dir.mktmpdir do |dir|
|
||||
Rugged::Repository.clone_at(path, dir)
|
||||
run("git clone #{path} #{dir}")
|
||||
|
||||
source_paths << dir
|
||||
|
||||
|
|
|
@ -21,7 +21,4 @@ Gem::Specification.new do |s|
|
|||
|
||||
# CLI
|
||||
s.add_dependency('thor', ['>= 0.17.0', '< 2.0'])
|
||||
|
||||
# Templates
|
||||
s.add_dependency('rugged', [])
|
||||
end
|
||||
|
|
|
@ -9,8 +9,7 @@ Feature: GZIP assets during build
|
|||
| build/javascripts/test.js.gz |
|
||||
| build/stylesheets/test.css |
|
||||
| build/stylesheets/test.css.gz |
|
||||
When I run `file build/javascripts/test.js.gz`
|
||||
Then the output should contain "gzip"
|
||||
And the file "build/javascripts/test.js.gz" should be gzipped
|
||||
|
||||
Scenario: Preview server doesn't change
|
||||
Given the Server is running at "gzip-app"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@nojava
|
||||
@nojava @nowindows
|
||||
Feature: Compile a complicated Twitter bootstrap app
|
||||
|
||||
Scenario: User drops Twitter Bootstrap source into an app
|
||||
|
|
|
@ -32,7 +32,7 @@ class Middleman::Extensions::RelativeAssets < ::Middleman::Extension
|
|||
|
||||
return unless !full_asset_path.include?('//') && !asset_path.start_with?('data:')
|
||||
|
||||
current_dir = Pathname('/' + request_path).dirname
|
||||
current_dir = Pathname(request_path).dirname
|
||||
Pathname(full_asset_path).relative_path_from(current_dir).to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
MIDDLEMAN_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
|
||||
MIDDLEMAN_BIN_PATH = File.join(MIDDLEMAN_ROOT_PATH, 'bin')
|
||||
ENV['PATH'] = "#{MIDDLEMAN_BIN_PATH}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
|
||||
|
||||
require 'aruba/cucumber'
|
||||
require 'aruba/jruby'
|
||||
require 'middleman-core/step_definitions/middleman_steps'
|
||||
require 'middleman-core/step_definitions/builder_steps'
|
||||
require 'middleman-core/step_definitions/server_steps'
|
||||
|
||||
# Monkeypatch for windows support
|
||||
module ArubaMonkeypatch
|
||||
def detect_ruby(cmd)
|
||||
if cmd.start_with?('middleman ') && Gem.win_platform?
|
||||
"#{current_ruby} #{Dir.pwd}/../middleman-cli/bin/#{cmd}"
|
||||
else
|
||||
cmd.sub(/^ruby(?= )/, current_ruby)
|
||||
end
|
||||
end
|
||||
end
|
||||
World(ArubaMonkeypatch)
|
||||
|
||||
Before do
|
||||
@aruba_timeout_seconds = RUBY_PLATFORM == 'java' ? 120 : 60
|
||||
end
|
||||
|
|
|
@ -71,3 +71,7 @@ end
|
|||
Then /^the file "([^"]*)" should contain '([^']*)'$/ do |file, partial_content|
|
||||
check_file_content(file, partial_content, true)
|
||||
end
|
||||
|
||||
And /the file "(.*)" should be gzipped/ do |file|
|
||||
expect(File.binread(File.join(current_dir, file), 2)).to eq(['1F8B'].pack('H*'))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue