properties-ruby 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/utils/properties.rb +3 -3
- metadata +4 -4
data/lib/utils/properties.rb
CHANGED
@@ -65,7 +65,7 @@ module Utils
|
|
65
65
|
# Extract the key and value.
|
66
66
|
name = line[0..i - 1].strip
|
67
67
|
value = line[i + 1..-1].strip
|
68
|
-
@@logger.
|
68
|
+
@@logger.fine("Property '#{name}=#{value} added.")
|
69
69
|
existing_properties.add_property(name, value)
|
70
70
|
else
|
71
71
|
# Not a key-value pair.
|
@@ -132,7 +132,7 @@ module Utils
|
|
132
132
|
|
133
133
|
@@logger = LogEasy::Logger.get_logger(name)
|
134
134
|
|
135
|
-
REFERENCE_REGEX = /\$\{[
|
135
|
+
REFERENCE_REGEX = /\$\{[^\}]+\}/
|
136
136
|
|
137
137
|
attr_reader :name
|
138
138
|
attr_reader :value
|
@@ -176,7 +176,7 @@ module Utils
|
|
176
176
|
next replacement
|
177
177
|
end if value.instance_of?(String) # Only do this for Strings.
|
178
178
|
# The property has been evaluated. Do not evaluate again.
|
179
|
-
@@logger.
|
179
|
+
@@logger.trace("Final value for '#{name}' is '#{evaluated_value}'.")
|
180
180
|
self.evaluating = false
|
181
181
|
self.evaluated = true
|
182
182
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: properties-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-02-
|
12
|
+
date: 2011-02-28 00:00:00.000000000 +05:30
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: logeasy
|
17
|
-
requirement: &
|
17
|
+
requirement: &24109812 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 0.0.4
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *24109812
|
26
26
|
description: A simple properties file API. Support for Java style properties file.
|
27
27
|
The property files can contain references to other properties using the ${<key_name>}
|
28
28
|
format. Access their values directly using p.prop_name.
|