true 0.2.0.rc.1 → 0.2.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/CHANGELOG.md +2 -0
- data/lib/compass-true.rb +1 -0
- data/lib/true.rb +7 -3
- data/sass/true/_assert.scss +4 -4
- data/sass/true/_utilities.scss +20 -0
- metadata +35 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: acb303911922a97634919c220c206f88c497210f
|
4
|
+
data.tar.gz: 0a376a1af4a21990323a99d8fb28afb672464174
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 61a91a7d52f619381570811c8c51a8bec51beaf14280b7099910f77055fb36d5e719142772ceeaf012ea6e5916b3421a7ad6c7b85b7d8f7547a32a1af5a248b7
|
7
|
+
data.tar.gz: 463c8e2257e88e7c317e028f1938aa95faa916f1dd9b59441150c27e6fd8a83f5b5d72e1a7c72a4a6ae01e5202f50011477106ad9d95986ec6f7c1a86d59f58d
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,8 @@ True Changelog
|
|
10
10
|
Assertions are always output to the terminal if they fail.
|
11
11
|
- Update to use Sass map variables.
|
12
12
|
- Add `report` function and `report` mixin, for reporting final results.
|
13
|
+
- Only register as a compass extension if compass is present. Compass is
|
14
|
+
no longer an explicit dependency.
|
13
15
|
|
14
16
|
0.1.5 (6/10/13)
|
15
17
|
---------------
|
data/lib/compass-true.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'true'
|
data/lib/true.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
begin
|
2
|
+
require 'compass'
|
3
|
+
Compass::Frameworks.register('true',
|
4
|
+
:stylesheets_directory => File.expand_path(File.join(File.dirname(__FILE__), '..', 'sass')))
|
5
|
+
rescue LoadError
|
6
|
+
# compass not found, don't register with it.
|
7
|
+
end
|
data/sass/true/_assert.scss
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
$fail-message: ''
|
7
7
|
) {
|
8
8
|
$test: map-get($test-results, name);
|
9
|
-
$fail-message: '#{$test}: ' + $fail-message + ' (#{$assert} is not true)';
|
9
|
+
$fail-message: '#{$test}: ' + $fail-message + ' (#{map-to-string($assert)} is not true)';
|
10
10
|
$result: if($assert, pass, fail);
|
11
11
|
@include report-assert($result, $fail-message);
|
12
12
|
}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
$fail-message: ''
|
17
17
|
) {
|
18
18
|
$test: map-get($test-results, name);
|
19
|
-
$fail-message: '#{$test}: ' + $fail-message + ' (#{$assert} is not false)';
|
19
|
+
$fail-message: '#{$test}: ' + $fail-message + ' (#{map-to-string($assert)} is not false)';
|
20
20
|
$result: if(not $assert, pass, fail);
|
21
21
|
@include report-assert($result, $fail-message);
|
22
22
|
}
|
@@ -27,7 +27,7 @@
|
|
27
27
|
$fail-message: ''
|
28
28
|
) {
|
29
29
|
$test: map-get($test-results, name);
|
30
|
-
$fail-message: '#{$test}: ' + $fail-message + ' (#{$
|
30
|
+
$fail-message: '#{$test}: ' + $fail-message + ' (Expected: #{map-to-string($expected)} != Result: #{map-to-string($assert)})';
|
31
31
|
$result: if($assert == $expected, pass, fail);
|
32
32
|
@include report-assert($result, $fail-message);
|
33
33
|
}
|
@@ -38,7 +38,7 @@
|
|
38
38
|
$fail-message: ''
|
39
39
|
) {
|
40
40
|
$test: map-get($test-results, name);
|
41
|
-
$fail-message: '#{$test}: ' + $fail-message + ' (#{$
|
41
|
+
$fail-message: '#{$test}: ' + $fail-message + ' (Expected: #{map-to-string($expected)} == Result: #{map-to-string($assert)})';
|
42
42
|
$result: if($assert != $expected, pass, fail);
|
43
43
|
@include report-assert($result, $fail-message);
|
44
44
|
}
|
data/sass/true/_utilities.scss
CHANGED
@@ -16,3 +16,23 @@
|
|
16
16
|
|
17
17
|
@return $base;
|
18
18
|
}
|
19
|
+
|
20
|
+
// Return a map as a string
|
21
|
+
@function map-to-string(
|
22
|
+
$map
|
23
|
+
) {
|
24
|
+
@if type-of($map) != map {
|
25
|
+
@return $map;
|
26
|
+
} @else {
|
27
|
+
$return: '(';
|
28
|
+
$i: 1;
|
29
|
+
@each $key, $value in $map {
|
30
|
+
$return: $return + '#{$key}: #{$value}';
|
31
|
+
@if $i < length(map-keys($map)) {
|
32
|
+
$return: $return + ', ';
|
33
|
+
}
|
34
|
+
$i: $i + 1;
|
35
|
+
}
|
36
|
+
@return $return + ')';
|
37
|
+
}
|
38
|
+
}
|
metadata
CHANGED
@@ -1,49 +1,41 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
2
|
-
name:
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.rc.
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: 'true'
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0.rc.2
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Eric Meyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sass
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
19
17
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.3.0.rc.1
|
22
20
|
type: :runtime
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: sass
|
26
21
|
prerelease: false
|
27
|
-
|
28
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
29
24
|
- - ~>
|
30
|
-
- !ruby/object:Gem::Version
|
25
|
+
- !ruby/object:Gem::Version
|
31
26
|
version: 3.3.0.rc.1
|
32
|
-
|
33
|
-
|
34
|
-
description: Unit tests for maintaining test-driven Sass/Compass extensions.
|
35
|
-
email:
|
27
|
+
description: Unit tests for maintaining test-driven Sass libraries.
|
28
|
+
email:
|
36
29
|
- eric@oddbird.net
|
37
30
|
executables: []
|
38
|
-
|
39
31
|
extensions: []
|
40
|
-
|
41
|
-
extra_rdoc_files:
|
32
|
+
extra_rdoc_files:
|
42
33
|
- CHANGELOG.md
|
43
34
|
- LICENSE.txt
|
44
35
|
- README.md
|
45
36
|
- lib/true.rb
|
46
|
-
files:
|
37
|
+
files:
|
38
|
+
- lib/compass-true.rb
|
47
39
|
- lib/true.rb
|
48
40
|
- sass/_true.scss
|
49
41
|
- sass/true/_assert.scss
|
@@ -58,35 +50,31 @@ files:
|
|
58
50
|
- README.md
|
59
51
|
homepage: http://eric.andmeyer.com/true
|
60
52
|
licenses: []
|
61
|
-
|
62
53
|
metadata: {}
|
63
|
-
|
64
54
|
post_install_message:
|
65
|
-
rdoc_options:
|
55
|
+
rdoc_options:
|
66
56
|
- --line-numbers
|
67
57
|
- --inline-source
|
68
58
|
- --title
|
69
|
-
-
|
59
|
+
- 'true'
|
70
60
|
- --main
|
71
61
|
- README.md
|
72
|
-
require_paths:
|
62
|
+
require_paths:
|
73
63
|
- lib
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
79
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version:
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '1.2'
|
84
74
|
requirements: []
|
85
|
-
|
86
|
-
rubyforge_project: "true"
|
75
|
+
rubyforge_project: 'true'
|
87
76
|
rubygems_version: 2.0.3
|
88
77
|
signing_key:
|
89
78
|
specification_version: 3
|
90
79
|
summary: Testing framework for Sass libraries.
|
91
80
|
test_files: []
|
92
|
-
|