serialy-sassy 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/lib/serialy/sassy.rb +0 -1
- data/lib/serialy/sassy/version.rb +1 -1
- data/serialy-sassy.gemspec +1 -0
- data/{spec → test}/fixtures/json_test.scss +0 -0
- data/{spec → test}/fixtures/test.json +0 -0
- data/{spec → test}/fixtures/test.yml +0 -0
- data/{spec → test}/fixtures/yaml_test.scss +0 -0
- data/test/test.scss +30 -0
- data/test/true.yml +4 -0
- metadata +28 -14
- data/spec/serily_sassy_spec.rb +0 -32
- data/spec/spec_helper.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec8392b95bace983dc27442b41feb087284a6c54
|
4
|
+
data.tar.gz: 9670c08f1d3b3c704804b28f92bc9c70f68be397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22078f0e744fcbf86d68eba40a9a740039cc80e62055507f07394560b8cc43b510c9b8c9cb05e254a61fb5cee76466c73f7eea2a4fd1b033cb8a6e6c7161892d
|
7
|
+
data.tar.gz: 8ac0fd7d2ba6ecb09929f3461ab6b4e4b7a5be64223d20d8c79d47e451e64e110d7ea657e508d65d583fbfe94ae7d5d14401bfd4cddcaf37cc098eecc024f7bc
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
serialy-sassy (0.0
|
4
|
+
serialy-sassy (1.0.0)
|
5
5
|
multi_json (~> 1.10.1)
|
6
6
|
sassy_hash (~> 0.1.0)
|
7
7
|
|
@@ -26,6 +26,8 @@ GEM
|
|
26
26
|
sass (3.4.5)
|
27
27
|
sassy_hash (0.1.0)
|
28
28
|
sass (~> 3.3rc2)
|
29
|
+
true (1.0.0)
|
30
|
+
sass (~> 3.4)
|
29
31
|
|
30
32
|
PLATFORMS
|
31
33
|
ruby
|
@@ -35,3 +37,4 @@ DEPENDENCIES
|
|
35
37
|
rake (~> 10.0)
|
36
38
|
rspec (= 3.0.0)
|
37
39
|
serialy-sassy!
|
40
|
+
true (~> 1.0.0)
|
data/lib/serialy/sassy.rb
CHANGED
data/serialy-sassy.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "true", '~> 1.0.0'
|
23
24
|
spec.add_dependency 'sassy_hash', '~> 0.1.0'
|
24
25
|
spec.add_dependency 'multi_json', '~> 1.10.1'
|
25
26
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/test.scss
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
@import "true";
|
2
|
+
$json : json('./test/fixtures/test.json');
|
3
|
+
$colors : map-get($json, 'colors');
|
4
|
+
|
5
|
+
@include test-module('Json') {
|
6
|
+
@include test('Read Values') {
|
7
|
+
$expected : (green, red, orange);
|
8
|
+
@each $color in $expected {
|
9
|
+
$i : index($expected, $color);
|
10
|
+
@include assert-equal($color, nth($colors, $i));
|
11
|
+
}
|
12
|
+
@include assert-equal(100, map-get($json, 'number'));
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
$yml : yaml('./test/fixtures/test.json');
|
17
|
+
$colors : map-get($yml, 'colors');
|
18
|
+
|
19
|
+
@include test-module('Yaml') {
|
20
|
+
@include test('Read Values') {
|
21
|
+
$expected : (green, red, orange);
|
22
|
+
@each $color in $expected {
|
23
|
+
$i : index($expected, $color);
|
24
|
+
@include assert-equal($color, nth($colors, $i));
|
25
|
+
}
|
26
|
+
@include assert-equal(100, map-get($json, 'number'));
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
@include report;
|
data/test/true.yml
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serialy-sassy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Davis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: 'true'
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: sassy_hash
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,12 +96,12 @@ files:
|
|
82
96
|
- lib/serialy/sassy.rb
|
83
97
|
- lib/serialy/sassy/version.rb
|
84
98
|
- serialy-sassy.gemspec
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
99
|
+
- test/fixtures/json_test.scss
|
100
|
+
- test/fixtures/test.json
|
101
|
+
- test/fixtures/test.yml
|
102
|
+
- test/fixtures/yaml_test.scss
|
103
|
+
- test/test.scss
|
104
|
+
- test/true.yml
|
91
105
|
homepage: ''
|
92
106
|
licenses:
|
93
107
|
- MIT
|
@@ -113,9 +127,9 @@ signing_key:
|
|
113
127
|
specification_version: 4
|
114
128
|
summary: Deserialize json or yaml file into a sass map
|
115
129
|
test_files:
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
130
|
+
- test/fixtures/json_test.scss
|
131
|
+
- test/fixtures/test.json
|
132
|
+
- test/fixtures/test.yml
|
133
|
+
- test/fixtures/yaml_test.scss
|
134
|
+
- test/test.scss
|
135
|
+
- test/true.yml
|
data/spec/serily_sassy_spec.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path('../../lib/serialy/sassy', __FILE__)
|
2
|
-
$fixture_path = File.expand_path('../fixtures', __FILE__)
|
3
|
-
describe 'Serily Sassy' do
|
4
|
-
describe :json do
|
5
|
-
let(:json_sass) do
|
6
|
-
File.read(File.join($fixture_path, 'json_test.scss'))
|
7
|
-
end
|
8
|
-
|
9
|
-
def compile(sass)
|
10
|
-
Sass::Engine.new(sass, {:syntax => :scss, :output_style => :compressed}).render
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should load json data into a sass map" do
|
14
|
-
css = compile(json_sass)
|
15
|
-
expect(".foo {\n color: green; }\n\n.foo {\n color: red; }\n\n.foo {\n color: orange; }\n").to eq(css)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
describe :yaml do
|
19
|
-
let(:yaml_sass) do
|
20
|
-
File.read(File.join($fixture_path, 'yaml_test.scss'))
|
21
|
-
end
|
22
|
-
|
23
|
-
def compile(sass)
|
24
|
-
Sass::Engine.new(sass, {:syntax => :scss, :output_style => :compressed}).render
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should load json data into a sass map" do
|
28
|
-
css = compile(yaml_sass)
|
29
|
-
expect(".foo {\n color: green; }\n\n.foo {\n color: red; }\n\n.foo {\n color: orange; }\n").to eq(css)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
data/spec/spec_helper.rb
DELETED
File without changes
|