fancy-open-struct 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.9.3"
4
- - "2.0.0"
5
- - jruby-19mode # JRuby in 1.9 mode
3
+ # Rubies 2.1.2
4
+ - 2.1.2
5
+
6
+ # Rubies 2.0.0
7
+ - 2.0.0
8
+
9
+ # Rubies 1.9.x
10
+ - 1.9.3
11
+ - jruby-19mode # JRuby in 1.9 mode
@@ -0,0 +1,9 @@
1
+ 0.2.0
2
+ - Replaced the display_recursive_open_hash method with functionality from the awesome_print gem.
3
+ Note: This fundamentally changes the way how this method operates, and is not backwards compatible.
4
+ - Aliased the display_recursive_open_hash method to the debug_inspect method.
5
+ - Changed method_missing so that it is private
6
+
7
+ 0.1.6
8
+ - This version is a complete drop-in replacement for RecursiveOpenStruct (v 0.4.5) with all of the
9
+ passing tests from RecursiveOpenStruct, and all of the methods (including debugging methods).
data/Gemfile CHANGED
@@ -1,3 +1,2 @@
1
1
  source 'http://rubygems.org'
2
- gemspec
3
-
2
+ gemspec
@@ -4,7 +4,6 @@
4
4
  {<img src="http://allthebadges.io/tomchapin/fancy-open-struct/gemnasium.png" alt="Dependencies" />}[http://allthebadges.io/tomchapin/fancy-open-struct/gemnasium]
5
5
  {<img src="http://allthebadges.io/tomchapin/fancy-open-struct/travis.png" alt="Build Status" />}[http://allthebadges.io/tomchapin/fancy-open-struct/travis]
6
6
  {<img src="http://allthebadges.io/tomchapin/fancy-open-struct/coveralls.png" alt="Coverage" />}[http://allthebadges.io/tomchapin/fancy-open-struct/coveralls]
7
- {<img src="http://allthebadges.io/tomchapin/fancy-open-struct/code_climate.png" alt="Code Climate" />}[http://allthebadges.io/tomchapin/fancy-open-struct/code_climate]
8
7
 
9
8
  FancyOpenStruct is a subclass of OpenStruct, and is a variant of RecursiveOpenStruct.
10
9
 
data/Rakefile CHANGED
@@ -18,8 +18,6 @@ Rake::RDocTask.new do |rdoc|
18
18
  rdoc.rdoc_files.include('lib/**/*.rb')
19
19
  end
20
20
 
21
- task :default => :spec
22
-
23
21
  task :fix_permissions do
24
22
  File.umask 0022
25
23
  filelist = `git ls-files`.split("\n")
@@ -27,4 +25,6 @@ task :fix_permissions do
27
25
  FileUtils.chmod 0755, ['lib', 'spec'], :verbose => true
28
26
  end
29
27
 
30
- task :build => :fix_permissions
28
+ task :build => :fix_permissions
29
+
30
+ task :default => :spec
@@ -1,18 +1,19 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
- require './lib/fancy-open-struct'
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "fancy-open-struct"
7
- s.version = FancyOpenStruct::VERSION
8
- s.authors = ["Thomas H. Chapin"]
9
- s.email = "tchapin@gmail.com"
10
- s.date = Time.now.utc.strftime("%Y-%m-%d")
11
- s.homepage = "http://github.com/tomchapin/fancy-open-struct"
12
- s.licenses = ["MIT"]
13
-
14
- s.summary = "OpenStruct subclass that returns nested hash attributes as FancyOpenStructs"
15
- s.description = <<-QUOTE.gsub(/^ /, '')
3
+ require './lib/fancy-open-struct/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+
7
+ spec.name = "fancy-open-struct"
8
+ spec.version = FancyOpenStruct::VERSION
9
+ spec.authors = ["Thomas H. Chapin"]
10
+ spec.email = "tchapin@gmail.com"
11
+ spec.date = Time.now.utc.strftime("%Y-%m-%d")
12
+ spec.homepage = "http://github.com/tomchapin/fancy-open-struct"
13
+ spec.licenses = ["MIT"]
14
+
15
+ spec.summary = "OpenStruct subclass that returns nested hash attributes as FancyOpenStructs"
16
+ spec.description = <<-QUOTE.gsub(/^ /, '')
16
17
  FancyOpenStruct is a subclass of OpenStruct, and is a variant of RecursiveOpenStruct.
17
18
  This allows you to convert nested hashes into a structure where keys and values can be
18
19
  navigated and modified via dot-syntax, like: foo.bar = :something. This particular gem
@@ -21,24 +22,29 @@ Gem::Specification.new do |s|
21
22
 
22
23
  QUOTE
23
24
 
24
- s.files = `git ls-files`.split("\n")
25
- s.test_files = `git ls-files spec`.split("\n")
26
- s.require_paths = ["lib"]
27
- s.extra_rdoc_files = [
25
+ spec.files = `git ls-files`.split("\n")
26
+ spec.test_files = `git ls-files spec`.split("\n")
27
+ spec.require_paths = ["lib"]
28
+ spec.extra_rdoc_files = [
28
29
  "LICENSE.txt",
30
+ "CHANGELOG",
29
31
  "README.rdoc"
30
32
  ]
31
33
 
32
- s.add_development_dependency "bundler"
33
- s.add_development_dependency "rake"
34
- s.add_development_dependency "rspec"
35
- s.add_development_dependency "rdoc"
36
- s.add_development_dependency "pry"
37
- s.add_development_dependency "coveralls"
38
- s.add_development_dependency "guard"
39
- s.add_development_dependency "guard-rspec"
40
- s.add_development_dependency "guard-bundler"
41
- s.add_development_dependency "simplecov-multi"
34
+ spec.required_ruby_version = '>= 1.9.3'
35
+
36
+ spec.add_dependency "awesome_print"
37
+
38
+ spec.add_development_dependency "bundler"
39
+ spec.add_development_dependency "rake"
40
+ spec.add_development_dependency "rspec"
41
+ spec.add_development_dependency "rdoc"
42
+ spec.add_development_dependency "pry"
43
+ spec.add_development_dependency "coveralls"
44
+ spec.add_development_dependency "guard"
45
+ spec.add_development_dependency "guard-rspec"
46
+ spec.add_development_dependency "guard-bundler"
47
+ spec.add_development_dependency "simplecov-multi"
42
48
 
43
49
  end
44
50
 
@@ -1,13 +1,14 @@
1
1
  require 'ostruct'
2
2
  require 'forwardable'
3
+ require 'awesome_print'
4
+ require 'fancy-open-struct/version'
3
5
 
4
6
  class FancyOpenStruct < OpenStruct
5
- VERSION = "0.1.6"
6
7
 
7
8
  extend Forwardable
8
9
 
9
10
  hash_methods = Hash.instance_methods(false) - (Hash.instance_methods(false) & OpenStruct.instance_methods(false)) - [:[], :[]=]
10
- def_delegators :@table, *hash_methods
11
+ def_instance_delegators :@table, *hash_methods
11
12
 
12
13
  def initialize(hash=nil, args={})
13
14
  @recurse_over_arrays = args.fetch(:recurse_over_arrays, false)
@@ -21,18 +22,6 @@ class FancyOpenStruct < OpenStruct
21
22
  @sub_elements = {}
22
23
  end
23
24
 
24
- def to_h
25
- @table.dup.update(@sub_elements) do |k, oldval, newval|
26
- if newval.kind_of?(self.class)
27
- newval.to_h
28
- elsif newval.kind_of?(Array)
29
- newval.map { |a| a.kind_of?(self.class) ? a.to_h : a }
30
- else
31
- raise "Cached value of unsupported type: #{newval.inspect}"
32
- end
33
- end
34
- end
35
-
36
25
  def new_ostruct_member(name)
37
26
  name = name.to_sym
38
27
  unless self.respond_to?(name)
@@ -52,7 +41,7 @@ class FancyOpenStruct < OpenStruct
52
41
  name
53
42
  end
54
43
 
55
- def recurse_over_array array
44
+ def recurse_over_array(array)
56
45
  array.map do |a|
57
46
  if a.is_a? Hash
58
47
  self.class.new(a, :recurse_over_arrays => true)
@@ -64,54 +53,43 @@ class FancyOpenStruct < OpenStruct
64
53
  end
65
54
  end
66
55
 
67
- def debug_inspect(io = STDOUT, indent_level = 0, recursion_limit = 12)
68
- display_recursive_open_hash(io, @table, indent_level, recursion_limit)
56
+ def to_h
57
+ @table.dup.update(@sub_elements) do |k, oldval, newval|
58
+ if newval.kind_of?(self.class)
59
+ newval.to_h
60
+ elsif newval.kind_of?(Array)
61
+ newval.map { |a| a.kind_of?(self.class) ? a.to_h : a }
62
+ else
63
+ raise "Cached value of unsupported type: #{newval.inspect}"
64
+ end
65
+ end
69
66
  end
70
67
 
71
- def display_recursive_open_hash(io, ostrct_or_hash, indent_level, recursion_limit)
72
-
73
- if recursion_limit <= 0
74
- # protection against recursive structure (like in the tests)
75
- io.puts ' '*indent_level + '(recursion limit reached)'
76
- else
77
- #puts ostrct_or_hash.inspect
78
- if ostrct_or_hash.is_a?(self.class)
79
- ostrct_or_hash = ostrct_or_hash.marshal_dump
80
- end
68
+ alias_method :to_hash, :to_h
81
69
 
82
- # We'll display the key values like this : key = value
83
- # to align display, we look for the maximum key length of the data that will be displayed
84
- # (everything except hashes)
85
- data_indent = ostrct_or_hash \
86
- .reject { |k, v| v.is_a?(self.class) || v.is_a?(Hash) } \
87
- .max { |a, b| a[0].to_s.length <=> b[0].to_s.length }[0].to_s.length
88
- # puts "max length = #{data_indent}"
70
+ def debug_inspect(options = {})
71
+ # Refer to the "Awesome Print" gem documentation for information about which options are available
72
+ # The awesome_print gem can be found at https://rubygems.org/gems/awesome_print
73
+ ap(@table, options)
74
+ end
89
75
 
90
- ostrct_or_hash.each do |key, value|
91
- if value.is_a?(self.class) || value.is_a?(Hash)
92
- io.puts ' '*indent_level + key.to_s + '.'
93
- display_recursive_open_hash(io, value, indent_level + 1, recursion_limit - 1)
94
- else
95
- io.puts ' '*indent_level + key.to_s + ' '*(data_indent - key.to_s.length) + ' = ' + value.inspect
96
- end
97
- end
98
- end
76
+ alias_method :display_recursive_open_hash, :debug_inspect
99
77
 
100
- true
78
+ # Hash getter method which translates the key to a Symbol
79
+ def [](key)
80
+ @table[key.to_sym]
101
81
  end
102
82
 
103
- def [](*args)
104
- len = args.length
105
- raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1) if len != 1
106
- @table[args[0].to_sym]
83
+ # Hash setter method which translates the key to a Symbol and also creates
84
+ # a getter method (OpenStruct member) for accessing the key/value later via dot syntax
85
+ def []=(key, value)
86
+ modifiable[new_ostruct_member(key.to_sym)] = value
107
87
  end
108
88
 
109
- def []=(*args)
110
- len = args.length
111
- raise ArgumentError, "wrong number of arguments (#{len} for 2)", caller(1) if len != 2
112
- modifiable[new_ostruct_member(args[0].to_sym)] = args[1]
113
- end
89
+ private
114
90
 
91
+ # Dynamically handle any attempts to get or set values via dot syntax
92
+ # if the OpenStruct member methods haven't already been created
115
93
  def method_missing(mid, *args) # :nodoc:
116
94
  mname = mid.id2name
117
95
  len = args.length
@@ -0,0 +1,5 @@
1
+ require 'ostruct'
2
+
3
+ class FancyOpenStruct < OpenStruct
4
+ VERSION = "0.2.0"
5
+ end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require 'spec_helper'
2
2
  require 'fancy-open-struct'
3
3
 
4
4
  describe FancyOpenStruct do
@@ -47,6 +47,7 @@ describe FancyOpenStruct do
47
47
  end # describe behavior it inherits from OpenStruct
48
48
 
49
49
  describe "improvements on OpenStruct" do
50
+
50
51
  it "can be converted back to a hash" do
51
52
  h = {:asdf => 'John Smith'}
52
53
  fos = FancyOpenStruct.new(h)
@@ -54,32 +55,16 @@ describe FancyOpenStruct do
54
55
  end
55
56
 
56
57
  describe 'hash methods' do
57
- it "handles hash methods for setting values" do
58
- fos = FancyOpenStruct.new
59
- fos['blah'] = "John Smith"
60
- fos[:foo] = "George Washington"
61
- fos.blah.should == "John Smith"
62
- fos.foo.should == "George Washington"
63
- end
64
58
 
65
- it 'converts string hash keys to symbols' do
66
- fos = FancyOpenStruct.new
67
- fos['blah'] = "John Smith"
68
- fos['blah'].should == "John Smith"
69
- fos[:blah].should == "John Smith"
70
- fos.blah.should == "John Smith"
71
- fos.to_h['blah'].should == nil
72
- end
59
+ let(:fos) { FancyOpenStruct.new }
73
60
 
74
61
  it 'forwards all of the basic Hash methods directly to the @table instance variable' do
75
- fos = FancyOpenStruct.new
76
62
  Hash.instance_methods(false).each do |method_name|
77
63
  fos.respond_to?(method_name).should be_true
78
64
  end
79
65
  end
80
66
 
81
67
  it 'recovers gracefully even when the internal hash @table is directly modified via hash methods' do
82
- fos = FancyOpenStruct.new
83
68
  fos.foo = 'bar'
84
69
  fos.to_h.should == {:foo => "bar"}
85
70
  other_hash = {:baz => :qux}
@@ -91,6 +76,33 @@ describe FancyOpenStruct do
91
76
  fos.foo.should == nil
92
77
  fos.baz.should == nil
93
78
  end
79
+
80
+ describe 'The Hash table getter method, []' do
81
+ it 'only accepts one argument' do
82
+ expect { fos[:key1, :key2] }.to raise_error(ArgumentError, /2 for 1/)
83
+ end
84
+
85
+ it "handles hash methods for setting values" do
86
+ fos['blah'] = "John Smith"
87
+ fos[:foo] = "George Washington"
88
+ fos.blah.should == "John Smith"
89
+ fos.foo.should == "George Washington"
90
+ end
91
+
92
+ it 'converts string hash keys to symbols' do
93
+ fos['blah'] = "John Smith"
94
+ fos['blah'].should == "John Smith"
95
+ fos[:blah].should == "John Smith"
96
+ fos.blah.should == "John Smith"
97
+ fos.to_h['blah'].should == nil
98
+ end
99
+ end
100
+
101
+ describe 'The Hash table setter method, []=' do
102
+ it 'only accepts two arguments' do
103
+ expect { fos[:key1, :key2] = :value }.to raise_error(ArgumentError, /3 for 2/)
104
+ end
105
+ end
94
106
  end
95
107
 
96
108
  context 'using strings instead of symbols as hash keys' do
@@ -169,7 +181,6 @@ describe FancyOpenStruct do
169
181
  end
170
182
  end
171
183
 
172
-
173
184
  describe 'recursing over arrays' do
174
185
  let(:blah_list) { [{:foo => '1'}, {:foo => '2'}, 'baz'] }
175
186
  let(:h) { {:blah => blah_list} }
@@ -182,11 +193,11 @@ describe FancyOpenStruct do
182
193
  it { subject.blah[1].foo.should == '2' }
183
194
  it { subject.blah_as_a_hash.should == blah_list }
184
195
  it { subject.blah[2].should == 'baz' }
185
- it "Retains changes acfoss Array lookups" do
196
+ it "Retains changes across Array look-ups" do
186
197
  subject.blah[1].foo = "Dr Scott"
187
198
  subject.blah[1].foo.should == "Dr Scott"
188
199
  end
189
- it "propagates the changes through to .to_h acfoss Array lookups" do
200
+ it "propagates the changes through to .to_h across Array look-ups" do
190
201
  subject.blah[1].foo = "Dr Scott"
191
202
  subject.to_h.should == {
192
203
  :blah => [{:foo => '1'}, {:foo => "Dr Scott"}, 'baz']
@@ -198,7 +209,7 @@ describe FancyOpenStruct do
198
209
  subject { FancyOpenStruct.new(deep_hash, :recurse_over_arrays => true) }
199
210
 
200
211
  it { subject.foo.blah.length.should == 3 }
201
- it "Retains changes acfoss Array lookups" do
212
+ it "Retains changes across Array look-ups" do
202
213
  subject.foo.blah[1].foo = "Dr Scott"
203
214
  subject.foo.blah[1].foo.should == "Dr Scott"
204
215
  end
@@ -211,7 +222,7 @@ describe FancyOpenStruct do
211
222
 
212
223
  it { subject.blah.length.should == 1 }
213
224
  it { subject.blah[0].length.should == 3 }
214
- it "Retains changes acfoss Array lookups" do
225
+ it "Retains changes across Array look-ups" do
215
226
  subject.blah[0][1].foo = "Dr Scott"
216
227
  subject.blah[0][1].foo.should == "Dr Scott"
217
228
  end
@@ -233,68 +244,40 @@ describe FancyOpenStruct do
233
244
 
234
245
  describe "additional features" do
235
246
 
236
- before(:each) do
237
- h1 = {:a => 'a'}
238
- h2 = {:a => 'b', :h1 => h1}
239
- h1[:h2] = h2
240
- @fos = FancyOpenStruct.new(h2)
241
- end
247
+ it "should have a simple way of display complex FancyOpenStruct data" do
248
+ h = {
249
+ :blah => {
250
+ :blargh => 'Brad'
251
+ },
252
+ 'example_string' => {
253
+ :foo => :bar,
254
+ :baz => {'qux' => :zam}
255
+ }
256
+ }
257
+ fos = FancyOpenStruct.new(h)
242
258
 
243
- it "should have a simple way of display" do
244
- @output = <<-QUOTE
245
- a = "b"
246
- h1.
247
- a = "a"
248
- h2.
249
- a = "b"
250
- h1.
251
- a = "a"
252
- h2.
253
- a = "b"
254
- h1.
255
- a = "a"
256
- h2.
257
- a = "b"
258
- h1.
259
- a = "a"
260
- h2.
261
- a = "b"
262
- h1.
263
- a = "a"
264
- h2.
265
- a = "b"
266
- h1.
267
- a = "a"
268
- h2.
269
- (recursion limit reached)
270
- QUOTE
271
- @io = StringIO.new
272
- @fos.debug_inspect(@io)
273
- @io.string.should match /^a = "b"$/
274
- @io.string.should match /^h1\.$/
275
- @io.string.should match /^ a = "a"$/
276
- @io.string.should match /^ h2\.$/
277
- @io.string.should match /^ a = "b"$/
278
- @io.string.should match /^ h1\.$/
279
- @io.string.should match /^ a = "a"$/
280
- @io.string.should match /^ h2\.$/
281
- @io.string.should match /^ a = "b"$/
282
- @io.string.should match /^ h1\.$/
283
- @io.string.should match /^ a = "a"$/
284
- @io.string.should match /^ h2\.$/
285
- @io.string.should match /^ a = "b"$/
286
- @io.string.should match /^ h1\.$/
287
- @io.string.should match /^ a = "a"$/
288
- @io.string.should match /^ h2\.$/
289
- @io.string.should match /^ a = "b"$/
290
- @io.string.should match /^ h1\.$/
291
- @io.string.should match /^ a = "a"$/
292
- @io.string.should match /^ h2\.$/
293
- @io.string.should match /^ a = "b"$/
294
- @io.string.should match /^ h1\.$/
295
- @io.string.should match /^ a = "a"$/
296
- @io.string.should match /^ h2\.$/
297
- @io.string.should match /^ \(recursion limit reached\)$/
259
+ expected_result = "{" + \
260
+ "\n :blah => {" + \
261
+ "\n :blargh => \"Brad\"" + \
262
+ "\n }," + \
263
+ "\n :example_string => {" + \
264
+ "\n :foo => :bar," + \
265
+ "\n :baz => {" + \
266
+ "\n \"qux\" => :zam" + \
267
+ "\n }" + \
268
+ "\n }" + \
269
+ "\n}" + \
270
+ "\n"
271
+
272
+ debug_inspect = capture_stdout do
273
+ fos.debug_inspect(:indent => 1, :plain => true)
274
+ end
275
+ debug_inspect.string.should == expected_result
276
+
277
+ display_recursive_open_hash = capture_stdout do
278
+ fos.display_recursive_open_hash(:indent => 1, :plain => true)
279
+ end
280
+ display_recursive_open_hash.string.should == expected_result
298
281
  end
299
282
 
300
283
  it "creates nested objects via subclass" do
@@ -1,19 +1,16 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
-
4
1
  require 'rspec'
5
2
  require 'pry'
6
3
  require 'simplecov'
7
4
  require 'coveralls'
8
5
 
9
- Coveralls.wear!
10
-
11
6
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
12
7
  SimpleCov::Formatter::HTMLFormatter,
13
8
  Coveralls::SimpleCov::Formatter
14
9
  ]
15
10
  SimpleCov.start
16
11
 
12
+ require 'fancy-open-struct'
13
+
17
14
  # Requires supporting files with custom matchers and macros, etc,
18
15
  # in ./support/ and its subdirectories.
19
16
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -0,0 +1,14 @@
1
+ require 'stringio'
2
+
3
+ module Kernel
4
+
5
+ def capture_stdout
6
+ out = StringIO.new
7
+ $stdout = out
8
+ yield
9
+ return out
10
+ ensure
11
+ $stdout = STDOUT
12
+ end
13
+
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fancy-open-struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-27 00:00:00.000000000 Z
12
+ date: 2014-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: awesome_print
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: bundler
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +208,7 @@ executables: []
192
208
  extensions: []
193
209
  extra_rdoc_files:
194
210
  - LICENSE.txt
211
+ - CHANGELOG
195
212
  - README.rdoc
196
213
  files:
197
214
  - .coveralls.yml
@@ -199,14 +216,17 @@ files:
199
216
  - .gitignore
200
217
  - .rspec
201
218
  - .travis.yml
219
+ - CHANGELOG
202
220
  - Gemfile
203
221
  - LICENSE.txt
204
222
  - README.rdoc
205
223
  - Rakefile
206
224
  - fancy-open-struct.gemspec
207
225
  - lib/fancy-open-struct.rb
226
+ - lib/fancy-open-struct/version.rb
208
227
  - spec/fancy_open_struct_spec.rb
209
228
  - spec/spec_helper.rb
229
+ - spec/support/capture_stdout.rb
210
230
  homepage: http://github.com/tomchapin/fancy-open-struct
211
231
  licenses:
212
232
  - MIT
@@ -219,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
239
  requirements:
220
240
  - - ! '>='
221
241
  - !ruby/object:Gem::Version
222
- version: '0'
242
+ version: 1.9.3
223
243
  required_rubygems_version: !ruby/object:Gem::Requirement
224
244
  none: false
225
245
  requirements:
@@ -235,3 +255,4 @@ summary: OpenStruct subclass that returns nested hash attributes as FancyOpenStr
235
255
  test_files:
236
256
  - spec/fancy_open_struct_spec.rb
237
257
  - spec/spec_helper.rb
258
+ - spec/support/capture_stdout.rb