ruby-conf 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.0
1
+ 2.6.1
data/lib/ruby-conf.rb CHANGED
@@ -188,8 +188,7 @@ module RubyConf
188
188
 
189
189
  str += " " * depth
190
190
  str += "#{key}:"
191
- str += value.is_a?(Config) ? value.__rc_build_string(depth+1) : " #{value}\n"
192
- # str += "\n" unless depth > 0
191
+ str += value.is_a?(Config) ? (value == self ? " [SELF]\n" : value.__rc_build_string(depth+1)) : " #{value}\n"
193
192
  end
194
193
  str
195
194
  end
@@ -204,7 +203,7 @@ module RubyConf
204
203
  "[UNRESOLVED:#{e}]"
205
204
  end
206
205
  str += "#{key}: "
207
- str += value.is_a?(Config) ? "{ #{value.__rc_build_inspect} }" : value.inspect
206
+ str += value.is_a?(Config) ? (value == self ? "[SELF]" : "{ #{value.__rc_build_inspect} }") : value.inspect
208
207
  str
209
208
  }.join(", ")
210
209
  istr
data/ruby-conf.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ruby-conf"
8
- s.version = "2.6.0"
8
+ s.version = "2.6.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Curtis Schofield & Hollin Wilkins & Mason"]
@@ -113,6 +113,7 @@ var_args: var|[nil]
113
113
  valid_args ->(a, b, c){ "all empty > a:#{a} b:#{b} c:#{c}" }
114
114
  broken ->{ raise "oops" }
115
115
  broken_args ->(a, b, c){ raise "oops: a:#{a} b:#{b} c:#{c}" }
116
+ self_referential ->{self}
116
117
  end
117
118
 
118
119
  tos = <<-STR
@@ -120,13 +121,14 @@ var_args: var|[nil]
120
121
 
121
122
  broken: [UNRESOLVED]
122
123
  broken_args: [UNRESOLVED]
124
+ self_referential: [SELF]
123
125
  valid: valid return
124
126
  valid_args: all empty > a: b: c:
125
127
  STR
126
128
 
127
129
  ProcStrings.to_s.should == tos
128
130
  ProcStrings.to_str.should == tos
129
- ProcStrings.inspect.should == '[ProcStrings] broken: "[UNRESOLVED:oops]", broken_args: "[UNRESOLVED:oops: a: b: c:]", valid: "valid return", valid_args: "all empty > a: b: c:"'
131
+ ProcStrings.inspect.should == '[ProcStrings] broken: "[UNRESOLVED:oops]", broken_args: "[UNRESOLVED:oops: a: b: c:]", self_referential: [SELF], valid: "valid return", valid_args: "all empty > a: b: c:"'
130
132
  end
131
133
 
132
134
  it "prints out the config in a human readable way" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-conf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: 2745882013736486446
118
+ hash: -3424616211258386183
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements: