hocon 0.1.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +32 -2
- data/lib/hocon/impl/simple_config_document.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 336e47bf6c04b6b8c7d9fe769cfb5a7d80227e5d
|
4
|
+
data.tar.gz: a74955786d95546de69fc8c5bb98634848387a74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ee3d3aaa08eaaf337fd8fd32ecc3b184401b0335a430b544d7ab1d7e691905526c4c727e56be82e0a70bb77556d6cf5effb12359e734e9d9ad796a22b50aaa4
|
7
|
+
data.tar.gz: b8fd8823f59d498714ba09a9f68fe1e069d2861cd393b08c5970b8c1630dc80b1ba5acd5de99a9dd4e6e09775c60ca1746f61139cfa4a03162f82ed8108b353c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
## 0.9.0
|
2
|
+
|
3
|
+
This is a promotion of the 0.1.0 release with one small bug fix:
|
4
|
+
* Fixed bug wherein using the `set_config_value` method with some parsed values would cause a failure due to surrounding whitespace
|
5
|
+
|
6
|
+
## 0.1.0
|
7
|
+
|
8
|
+
This is a feature release containing a large number of changes and improvements
|
9
|
+
|
10
|
+
* Added support for concatenation
|
11
|
+
* Added support for substitutions
|
12
|
+
* Added support for file includes. Other types of includes are not supported
|
13
|
+
* Added the new ConfigDocument API that was recently implemented in the upstream Java library
|
14
|
+
* Improved JSON support
|
15
|
+
* Fixed a large number of small bugs related to various pieces of implementation
|
data/README.md
CHANGED
@@ -7,8 +7,10 @@ This is a port of the [Typesafe Config](https://github.com/typesafehub/config) l
|
|
7
7
|
|
8
8
|
The library provides Ruby support for the [HOCON](https://github.com/typesafehub/config/blob/master/HOCON.md) configuration file format.
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
At present, it supports supports parsing and modification of existing HOCON/JSON files via the `ConfigFactory` class and the `ConfigValueFactory` class, and rendering parsed config objects back to a String.
|
12
|
+
It also supports the parsing and modification of HOCON/JSON files via `ConfigDocumentFactory`.
|
13
|
+
PLEASE NOTE this project is in an experimental state, and in some cases may not work properly, so
|
12
14
|
please be wary when using it. If you find a problem, feel free to open a github issue.
|
13
15
|
|
14
16
|
The implementation is intended to be as close to a line-for-line port as the two languages allow, in hopes of making it fairly easy to port over new changesets from the Java code base over time.
|
@@ -28,6 +30,22 @@ conf = Hocon::ConfigFactory.parse_file("myapp.conf")
|
|
28
30
|
conf_map = conf.root.unwrapped
|
29
31
|
```
|
30
32
|
|
33
|
+
To use the ConfigDocument API
|
34
|
+
|
35
|
+
```rb
|
36
|
+
require 'hocon/parser/config_document_factory'
|
37
|
+
require 'hocon/config_value_factory'
|
38
|
+
|
39
|
+
# The below 4 variables will all be ConfigDocument instances
|
40
|
+
doc = Hocon::Parser::ConfigDocumentFactory.parse_file("myapp.conf")
|
41
|
+
doc2 = doc.set_value("a.b", "[1, 2, 3, 4, 5]")
|
42
|
+
doc3 = doc.remove_value("a")
|
43
|
+
doc4 = doc.set_config_value("a.b", Hocon::ConfigValueFactory.from_any_ref([1, 2, 3, 4, 5]))
|
44
|
+
|
45
|
+
doc_has_value = doc.has_value?("a") # returns boolean
|
46
|
+
orig_doc_text = doc.render # returns string
|
47
|
+
```
|
48
|
+
|
31
49
|
Testing
|
32
50
|
=======
|
33
51
|
|
@@ -35,3 +53,15 @@ Testing
|
|
35
53
|
bundle install
|
36
54
|
bundle exec rspec spec
|
37
55
|
```
|
56
|
+
|
57
|
+
Unsupported Features
|
58
|
+
====================
|
59
|
+
|
60
|
+
This supports many of the same things as the Java library, but there are some notable exceptions. Unsupported features include:
|
61
|
+
|
62
|
+
* Non file includes
|
63
|
+
* Loading resources from the class path or URLs
|
64
|
+
* Properties files
|
65
|
+
* Parsing anything other than files and strings
|
66
|
+
* Duration and size settings
|
67
|
+
* Java system properties
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hocon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Price
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-04-
|
15
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|
@@ -49,6 +49,7 @@ executables: []
|
|
49
49
|
extensions: []
|
50
50
|
extra_rdoc_files: []
|
51
51
|
files:
|
52
|
+
- CHANGELOG.md
|
52
53
|
- LICENSE
|
53
54
|
- README.md
|
54
55
|
- lib/hocon.rb
|
@@ -149,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
150
|
requirements:
|
150
151
|
- - ">="
|
151
152
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
153
|
+
version: 1.9.0
|
153
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
155
|
requirements:
|
155
156
|
- - ">="
|