sting 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/lib/sting/sting_operations.rb +2 -2
- data/lib/sting/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da68de98fcd9fbce26a849c35a5b097a22450557cd24e527eab9092f3c599e8
|
4
|
+
data.tar.gz: df652164022a1a6e0eec2dd72f0decd7abd67ecfca7b10e8c690244bf22d6a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b737ad0f01853e105bc42dba547eb92a8e36d95ec339e6f51b476ebd1ca12bad519575dd8d90237c74fc5f9f965fe6d236812a180664dfac44a3f357153839bc
|
7
|
+
data.tar.gz: 48545f0c95f2b7d91bea94220d4ab9dec740235438edb1856c4219f2539ec9975f1b22f19bebf9da30a0ff6b7d23f50d910a6f1cf5924b5e7179525320169434
|
data/README.md
CHANGED
@@ -4,7 +4,6 @@ Sting - Minimal Settings Library
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/sting.svg)](https://badge.fury.io/rb/sting)
|
5
5
|
[![Build Status](https://travis-ci.com/DannyBen/sting.svg?branch=master)](https://travis-ci.com/DannyBen/sting)
|
6
6
|
[![Maintainability](https://api.codeclimate.com/v1/badges/c8afe395a8f2cf290fec/maintainability)](https://codeclimate.com/github/DannyBen/sting/maintainability)
|
7
|
-
[![Test Coverage](https://api.codeclimate.com/v1/badges/c8afe395a8f2cf290fec/test_coverage)](https://codeclimate.com/github/DannyBen/sting/test_coverage)
|
8
7
|
|
9
8
|
---
|
10
9
|
|
@@ -60,7 +59,7 @@ require 'sting'
|
|
60
59
|
# If you want to use a different name than Sting (optional)
|
61
60
|
Settings = Sting
|
62
61
|
|
63
|
-
# Load some YAML files. If the provided filename does end with '.yml' or
|
62
|
+
# Load some YAML files. If the provided filename does not end with '.yml' or
|
64
63
|
# '.yaml', we will add '.yml' to it.
|
65
64
|
Settings << 'one'
|
66
65
|
Settings << 'two.yml'
|
@@ -81,7 +80,11 @@ p Settings[:host]
|
|
81
80
|
# Access nested values
|
82
81
|
p Settings.server['host']
|
83
82
|
|
84
|
-
# Access
|
83
|
+
# Access nested values safely (get nil if any of the keys does not exist)
|
84
|
+
p Settings[:server, :host]
|
85
|
+
p Settings[:server, :production, :host]
|
86
|
+
|
87
|
+
# Get the hash of all values
|
85
88
|
p Settings.settings
|
86
89
|
|
87
90
|
# Check if a key is defined
|
data/lib/sting/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Minimal, lightweight, multi-YAML settings
|
14
14
|
email: db@dannyben.com
|
@@ -39,8 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
requirements: []
|
42
|
-
|
43
|
-
rubygems_version: 2.7.6
|
42
|
+
rubygems_version: 3.0.4
|
44
43
|
signing_key:
|
45
44
|
specification_version: 4
|
46
45
|
summary: Minimal, lightweight, multi-YAML settings
|