Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Commit

Permalink
Merge pull request #36 from PrisisForks/master
Browse files Browse the repository at this point in the history
	remove namespace from config-get | added new tests for config-set wit…
  • Loading branch information
prisis committed Aug 25, 2015
2 parents 96a3387 + e90b84e commit bbe0cb5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All Notable changes to `sass-config-manager` will be documented in this file

## 3.1.0 Release
- Remove namespace from config-get
- Added new tests for config-set with a namespace

## 3.0.0 Release

### Added
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "growcss-sass-config-manager",
"version": "3.0.1",
"version": "3.1.0",
"homepage": "http://growcss.com/",
"authors": [
"Daniel Bannert <d.bannert@anolilab.de>"
Expand Down
2 changes: 0 additions & 2 deletions dist/_config-manager.scss
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ $config-namespace: "" !default;
//
// @return {*} The value of the configuration path
@function config-get($key, $default: false) {
$key: $config-namespace + $key;

@if $default {
@if config-map-has($config-default, $key) {
@return config-map-get($config-default, $key);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "growcss-sass-config-manager",
"version": "3.0.1",
"version": "3.1.0",
"description": "A dot-syntax configuration (Map) library for Sass (mixin / function).",
"author": {
"name": "Daniel Bannert",
Expand Down
2 changes: 0 additions & 2 deletions src/scss/functions/_config-get.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
//
// @return {*} The value of the configuration path
@function config-get($key, $default: false) {
$key: $config-namespace + $key;

@if $default {
@if config-map-has($config-default, $key) {
@return config-map-get($config-default, $key);
Expand Down
2 changes: 0 additions & 2 deletions tests/specs/_config-manager.scss
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ $config-namespace: "" !default;
//
// @return {*} The value of the configuration path
@function config-get($key, $default: false) {
$key: $config-namespace + $key;

@if $default {
@if config-map-has($config-default, $key) {
@return config-map-get($config-default, $key);
Expand Down
17 changes: 17 additions & 0 deletions tests/specs/scss/functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@
$expect: ("bar": "foo", "color": #fff);

@include assert-equal($config-attr, $expect, "Check if map is correct.");

@include config-reset("bar");
@include config-reset("color");
}

// Testing namespace set functions
@include test("config-set [function] Set a single key with namespace.") {
$config-namespace: "test-" !global;

@include config-set("bar", "foo");
@include config-set("color", #fff);

$expect: ("test-bar": "foo", "test-color": #fff);

$config-namespace: "" !global;

@include assert-equal($config-attr, $expect, "Check if map is correct.");
}

// Testing set functions
Expand Down

0 comments on commit bbe0cb5

Please sign in to comment.