Skip to content

Commit 3163265

Browse files
committed
Finish interactive mode.
1 parent b964c1d commit 3163265

File tree

9 files changed

+374
-84
lines changed

9 files changed

+374
-84
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
source 'https://rubygems.org'
22

33
gemspec
4+
5+
# gem "sass", :path => "../sass"
6+
# gem "pry"
7+
# gem "pry-nav"

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ GEM
1010
colored (1.2)
1111
command_line_reporter (3.3.6)
1212
colored (>= 1.2)
13+
diffy (3.1.0)
1314
minitest (5.8.3)
1415
rake (10.4.2)
1516
ruby-terminfo (0.1.1)
@@ -21,6 +22,7 @@ PLATFORMS
2122
DEPENDENCIES
2223
bundler (~> 1.7)
2324
command_line_reporter (~> 3.0)
25+
diffy (~> 3.1.0)
2426
rake (~> 10.0)
2527
ruby-terminfo (~> 0.1.1)
2628
sass (~> 3.4)

lib/sass_spec/cli.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def self.parse
1313
verbose: false,
1414
filter: "",
1515
limit: -1,
16-
unexpected_pass: false,
1716
nuke: false,
1817
only_output_styles: []
1918
}
@@ -103,10 +102,6 @@ def self.parse
103102
options[:nuke] = true
104103
end
105104

106-
opts.on("--unexpected-pass", "When running the todo tests, flag as an error when a test passes which is marked as todo.") do
107-
options[:unexpected_pass] = true
108-
end
109-
110105
opts.on("--silent", "Don't show any logs") do
111106
options[:silent] = true
112107
end

lib/sass_spec/engine_adapter.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def version
8383
Sass::VERSION
8484
end
8585

86+
def language_version
87+
require 'sass/version'
88+
Sass::VERSION[0..2]
89+
end
90+
8691
def compile(sass_filename, style, precision)
8792
require 'sass'
8893
# overloads STDERR

lib/sass_spec/runner.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class SassSpec::Runner
77

88
def initialize(options = {})
99
@options = options
10+
@options[:language_version] = language_version.to_s
1011
end
1112

1213
def get_input_dirs
@@ -48,6 +49,8 @@ def language_version
4849
unless defined?(@language_version)
4950
@language_version = if @options[:language_version]
5051
Gem::Version.new(@options[:language_version])
52+
elsif @options[:engine_adapter].respond_to?(:language_version)
53+
Gem::Version.new(@options[:engine_adapter].language_version)
5154
else
5255
warn "No language version specified. " +
5356
"Using #{SassSpec::MAX_LANGUAGE_VERSION}"

0 commit comments

Comments
 (0)