serialy-sassy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d5088f483c6c40961220fa1b82514f45f7a6919
4
- data.tar.gz: fb331f1a9bad259ee412a241fc321aa8b20b3536
3
+ metadata.gz: 12675ec6e4fd027eb45d0534ea64b1625a2c5135
4
+ data.tar.gz: 044a601c779569b6b300340ac20da463cc229a97
5
5
  SHA512:
6
- metadata.gz: d2b5de0099371aae48da36739751dd388ce721e61f82722fecb28e97291dfc80688902f48bfdb3be816b73b8a97e4a0f49e54325c28205159952445dbccc0e74
7
- data.tar.gz: 982861a8adb79b14b3df7f762a87a638ed0e507d573fd63ebd0be08766ee3e8e165d5d9cbe7ad1b6a441231dd6c70b7e674e08e7127d3b16bb7cd63e42f4a144
6
+ metadata.gz: b5d25e0ea0de0b46032291495c997716ce4e9646dc1e356c5fea86e84bf9c3d443c6180deb962b170b72b01ae44e73dd99337916e1f57d89e6b31ef7abff7e2b
7
+ data.tar.gz: 2d079a10097a410bac07880294d014cda449a1331fba336b0bac33c60e5c446d048059a9c3fc1d35aebd05df4aad3ba032f78f50c069db9574c50ac98c5ae222
data/Gemfile.lock ADDED
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ serialy-sassy (0.0.2)
5
+ multi_json (~> 1.10.1)
6
+ sassy_hash (~> 0.1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ diff-lcs (1.2.5)
12
+ multi_json (1.10.1)
13
+ rake (10.3.2)
14
+ rspec (3.0.0)
15
+ rspec-core (~> 3.0.0)
16
+ rspec-expectations (~> 3.0.0)
17
+ rspec-mocks (~> 3.0.0)
18
+ rspec-core (3.0.4)
19
+ rspec-support (~> 3.0.0)
20
+ rspec-expectations (3.0.4)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.0.0)
23
+ rspec-mocks (3.0.4)
24
+ rspec-support (~> 3.0.0)
25
+ rspec-support (3.0.4)
26
+ sass (3.4.5)
27
+ sassy_hash (0.1.0)
28
+ sass (~> 3.3rc2)
29
+
30
+ PLATFORMS
31
+ ruby
32
+
33
+ DEPENDENCIES
34
+ bundler (~> 1.7)
35
+ rake (~> 10.0)
36
+ rspec (= 3.0.0)
37
+ serialy-sassy!
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
- # Serialy::Sassy
1
+ # Serialy Sassy
2
+ Serialy Sass is a set of sass functions two to be exact that will deserialize json or yaml into a sass map
2
3
 
3
4
  Usage:
4
5
 
6
+ `require 'serialy/sassy'`
7
+
5
8
  ```scss
6
9
  $json : json('foo.json');
7
10
  $yaml : yaml('foo.yml');
@@ -23,10 +26,6 @@ Or install it yourself as:
23
26
 
24
27
  $ gem install serialy-sassy
25
28
 
26
- ## Usage
27
-
28
- TODO: Write usage instructions here
29
-
30
29
  ## Contributing
31
30
 
32
31
  1. Fork it ( https://github.com/[my-github-username]/serialy-sassy/fork )
@@ -1,5 +1,5 @@
1
1
  module Serialy
2
2
  module Sassy
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/lib/serialy/sassy.rb CHANGED
@@ -7,7 +7,7 @@ module Serialy
7
7
  module Sassy
8
8
 
9
9
  def self.declare(*args)
10
- Sass::Script::Functions.declare(*args).inspect
10
+ Sass::Script::Functions.declare(*args)
11
11
  end
12
12
 
13
13
  def self.map(hash)
@@ -18,6 +18,7 @@ module Serialy
18
18
  def json(filename)
19
19
  filename = filename.value
20
20
  json_data = JSON.parse(File.read(filename))
21
+
21
22
  self.map(SassyHash[json_data])
22
23
  end
23
24
 
@@ -32,7 +33,7 @@ module Serialy
32
33
 
33
34
  declare(:yaml, [:filename])
34
35
  end
35
- #include Sassy
36
+
36
37
  Sass::Script::Functions.send(:include, Serialy::Sassy)
37
38
  end
38
39
 
@@ -20,6 +20,6 @@ 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_dependency 'sassy_hash', '~> 0.0.6'
23
+ spec.add_dependency 'sassy_hash', '~> 0.1.0'
24
24
  spec.add_dependency 'multi_json', '~> 1.10.1'
25
25
  end
@@ -1,7 +1,7 @@
1
1
  $json : json('spec/fixtures/test.json');
2
2
  $colors : map-get($json, 'colors');
3
3
  @each $color in $colors {
4
- .#{$color} {
4
+ .foo {
5
5
  color: $color;
6
6
  }
7
7
  }
@@ -1,7 +1,7 @@
1
1
  $data : yaml('spec/fixtures/test.yml');
2
2
  $colors : map-get($data, 'colors');
3
3
  @each $color in $colors {
4
- .#{$color} {
4
+ .foo {
5
5
  color: $color;
6
6
  }
7
7
  }
@@ -12,7 +12,7 @@ describe 'Serily Sassy' do
12
12
 
13
13
  it "should load json data into a sass map" do
14
14
  css = compile(json_sass)
15
- expect(".green {\n color: green; }\n\n.red {\n color: red; }\n\n.orange {\n color: orange; }\n").to eq(css)
15
+ expect(".foo {\n color: green; }\n\n.foo {\n color: red; }\n\n.foo {\n color: orange; }\n").to eq(css)
16
16
  end
17
17
  end
18
18
  describe :yaml do
@@ -26,7 +26,7 @@ describe 'Serily Sassy' do
26
26
 
27
27
  it "should load json data into a sass map" do
28
28
  css = compile(yaml_sass)
29
- expect(".green {\n color: green; }\n\n.red {\n color: red; }\n\n.orange {\n color: orange; }\n").to eq(css)
29
+ expect(".foo {\n color: green; }\n\n.foo {\n color: red; }\n\n.foo {\n color: orange; }\n").to eq(css)
30
30
  end
31
31
  end
32
32
  end
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.1
4
+ version: 0.0.2
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-02 00:00:00.000000000 Z
11
+ date: 2014-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.6
47
+ version: 0.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.6
54
+ version: 0.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: multi_json
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
77
  - Gemfile
78
- - LICENSE
78
+ - Gemfile.lock
79
79
  - LICENSE.txt
80
80
  - README.md
81
81
  - Rakefile
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Scott Davis
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-