README.md in proper_properties-0.0.1 vs README.md in proper_properties-0.0.2
- old
+ new
@@ -1,14 +1,16 @@
+[properties_documentation]: http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)
+
# ProperProperties
[](https://travis-ci.org/tnarik/proper_properties)
[](https://codeclimate.com/github/tnarik/proper_properties)
[](https://coveralls.io/r/tnarik/proper_properties)
[](http://rubygems.org/gems/proper_properties)
[](https://gemnasium.com/tnarik/proper_properties)
-A ruby library to read and write [Java properties files](http://en.wikipedia.org/wiki/.properties), which format is better describe [in the Java documentation](http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader\)).
+A ruby library to read and write [Java properties files](http://en.wikipedia.org/wiki/.properties), which format is better describe [in the Java documentation][properties_documentation].
## Installation
Install via Rubygems or Gemfile
@@ -21,25 +23,27 @@
You can load a valid Java properties file from the file system using a path:
```ruby
properties = ProperProperties.load("path/to/my.properties")
properties[:foo] # => "bar"
+properties['foo'] # => "bar"
```
If have already the content of the properties file at hand than parse the content as:
```ruby
properties = ProperProperties.load("foo=bar")
properties[:foo] # => "bar"
+properties['foo'] # => "bar"
```
## Writing files
-You can write any Hash-like structure as a properties file:
+You can write any Hash-like structure (with symbol or string keys) as a properties file:
```ruby
-hash = {:foo => "bar"}
+hash = {:foo => "bar", "foobar" => "barfoo"}
ProperProperties.write(hash, "path/to/my.properties")
```
Or if you want to omit the file you can receive the content directly:
@@ -91,14 +95,14 @@
5. Create new Pull Request
## Author
- Tnarik Innael (@tnarik)
-- Jonas Thiel (@jonasthiel) : [original project](https://github.com/jnbt/java-properties) from commit [1f2c4b008d69d0eae1084b1adfdea814e2b29899]
+- Jonas Thiel (@jonasthiel) : [original project](https://github.com/jnbt/java-properties) upto [1f2c4b008d69d0eae1084b1adfdea814e2b29899](https://github.com/tnarik/proper_properties/commit/1f2c4b008d69d0eae1084b1adfdea814e2b29899)
## References
-For a proper description about the properties file format have a look at the [Java Plattform documentation](http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader\)).
+For a proper description about the properties file format have a look at the [Java Plattform documentation][properties_documentation].
## License
This gem is released under the MIT License. See the LICENSE.txt file for further details.