sasspectations 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +8 -0
- data/lib/sasspectations.rb +3 -1
- data/lib/sasspectations/output_formatter.rb +1 -1
- data/lib/sasspectations/runner.rb +3 -1
- data/lib/sasspectations/version.rb +1 -1
- data/lib/tasks/sasspectations.rake +12 -13
- metadata +6 -6
data/Rakefile
CHANGED
@@ -1,2 +1,10 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
load File.expand_path('../lib/tasks/sasspectations.rake', __FILE__)
|
3
|
+
|
4
|
+
namespace :sasspectations do
|
5
|
+
task :examples do
|
6
|
+
Rake::Task['sasspectations'].invoke('examples/spec/scss')
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
task :default => ['sasspectations:examples']
|
data/lib/sasspectations.rb
CHANGED
@@ -21,7 +21,9 @@ module Sasspectations
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def specs_path_glob
|
24
|
-
|
24
|
+
raise Sasspectations::SpecsNotFound unless File.exists?(@root_path)
|
25
|
+
|
26
|
+
Pathname.new(@root_path).join('**', '*_spec.scss')
|
25
27
|
end
|
26
28
|
|
27
29
|
end
|
@@ -2,20 +2,19 @@ $:.unshift(File.expand_path('../..', __FILE__)) unless $:.include? File.expand_p
|
|
2
2
|
|
3
3
|
require 'sasspectations'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
path = Pathname.new(Dir.pwd).join(args[:path] || '.').to_s
|
9
|
-
runner = Sasspectations::Runner.new(path)
|
5
|
+
desc 'Run SCSS specs'
|
6
|
+
task :sasspectations, :path do |t, args|
|
7
|
+
path = Pathname.new(Dir.pwd).join(args[:path] || 'spec/scss').to_s
|
10
8
|
|
11
|
-
|
12
|
-
|
13
|
-
# matter what, so it doesn't seem to be a problem, but may want to
|
14
|
-
# reconsider this later
|
15
|
-
#
|
9
|
+
runner = Sasspectations::Runner.new(path)
|
10
|
+
begin
|
16
11
|
parser = Sasspectations::ResultParser.new(runner.render)
|
17
|
-
|
18
|
-
|
19
|
-
exit 1
|
12
|
+
rescue Sasspectations::SpecsNotFound
|
13
|
+
puts 'Path provided is not valid, please check your path and try again.'
|
14
|
+
exit 1
|
20
15
|
end
|
16
|
+
|
17
|
+
output_formatter = Sasspectations::OutputFormatter.new(parser.tap(&:parse))
|
18
|
+
output_formatter.display
|
19
|
+
exit 1 if parser.failed?
|
21
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sasspectations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sass
|
17
|
-
requirement: &
|
17
|
+
requirement: &70145301411620 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 3.2.5
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70145301411620
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: colorize
|
28
|
-
requirement: &
|
28
|
+
requirement: &70145301411060 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 0.5.8
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70145301411060
|
37
37
|
description: Spec runner for Sass
|
38
38
|
email:
|
39
39
|
- ajaswa@gmail.com
|