rson 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8a3dbfdf1ece2895e5e4f64f69f14c0da4a2e5e
|
4
|
+
data.tar.gz: a06c4f50b047121a4a84b589de3a8e07a417519a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58911f7fcf5a379780a2392b54bd6df58ae99d408eced780daabc39a6c5c3238a96203c2c419a0f9669841d400a01f883e9a573ff9e8ccb7e1119c604a108a4f
|
7
|
+
data.tar.gz: 725f8a9b6f2bccc782ca3686e1d6f76689406e54b7a0210d4d4461c79bb0747094a9e8ef15ce08ba5793a93d4d32ce121aeddd709dd57d25180edcfdd9604b67
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
Ruby Simple Object's Notation
|
3
|
+
=============================
|
4
|
+
|
5
|
+
[![Build Status](https://travis-ci.org/tannevaled/rson.svg?branch=master)](https://travis-ci.org/tannevaled/rson)
|
6
|
+
|
7
|
+
RSON convert a string representation of Ruby simple objects to Ruby objects.
|
8
|
+
It does not use eval() but the parser gem to really parse strings.
|
9
|
+
|
10
|
+
## Supported Types :
|
11
|
+
- Integer
|
12
|
+
- Float
|
13
|
+
- Symbol
|
14
|
+
- String (multi-line)
|
15
|
+
- Nil
|
16
|
+
- TrueClass
|
17
|
+
- FalseClass
|
18
|
+
- Array
|
19
|
+
- Hash
|
20
|
+
|
21
|
+
## Examples
|
22
|
+
|
23
|
+
### Loading from a string
|
24
|
+
```ruby
|
25
|
+
buffer = %q({ a: 1, 2 => true, 'c' => :d })
|
26
|
+
Serializer::RSON.load(buffer:buffer) # => { a: 1, 2 => true, 'c' => :d }
|
27
|
+
```
|
28
|
+
### Loading from a file
|
29
|
+
```ruby
|
30
|
+
Serializer::RSON.load(
|
31
|
+
file_name:'config.rson',
|
32
|
+
file_path:'/etc/some_application'
|
33
|
+
) # => { a: 1, 2 => true, 'c' => :d }
|
34
|
+
```
|
35
|
+
|
36
|
+
## Installation
|
37
|
+
|
38
|
+
```bash
|
39
|
+
gem install rson
|
40
|
+
```
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David DELAVENNAT
|
@@ -72,6 +72,7 @@ executables: []
|
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
|
+
- README.md
|
75
76
|
- lib/serializer/rson.rb
|
76
77
|
- lib/serializer/rson/class.rb
|
77
78
|
- lib/serializer/rson/instance.rb
|