gorillib 0.5.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.gitignore +3 -0
  2. data/.gitmodules +3 -0
  3. data/.travis.yml +11 -0
  4. data/Gemfile +2 -16
  5. data/Rakefile +2 -74
  6. data/away/aliasing_spec.rb +180 -0
  7. data/away/confidence.rb +17 -0
  8. data/away/stub_module.rb +33 -0
  9. data/gorillib.gemspec +31 -246
  10. data/lib/gorillib/collection/model_collection.rb +1 -0
  11. data/lib/gorillib/data_munging.rb +0 -1
  12. data/lib/gorillib/hashlike/slice.rb +2 -0
  13. data/lib/gorillib/model/field.rb +2 -2
  14. data/lib/gorillib/model/serialization.rb +9 -4
  15. data/lib/gorillib/model/serialization/csv.rb +1 -0
  16. data/lib/gorillib/model/serialization/lines.rb +2 -0
  17. data/lib/gorillib/model/serialization/tsv.rb +1 -0
  18. data/lib/gorillib/pathname.rb +1 -1
  19. data/lib/gorillib/pathname/utils.rb +6 -0
  20. data/lib/gorillib/string/inflector.rb +1 -1
  21. data/lib/gorillib/system.rb +1 -0
  22. data/lib/gorillib/system/runner.rb +36 -0
  23. data/lib/gorillib/type/ip_address.rb +2 -2
  24. data/lib/gorillib/version.rb +3 -0
  25. data/old/lib/gorillib/hash/indifferent_access.rb +207 -0
  26. data/old/lib/gorillib/hash/tree_merge.rb +4 -0
  27. data/old/lib/gorillib/hashlike/tree_merge.rb +49 -0
  28. data/old/lib/gorillib/metaprogramming/cattr_accessor.rb +79 -0
  29. data/old/lib/gorillib/metaprogramming/mattr_accessor.rb +61 -0
  30. data/old/lib/gorillib/receiver.rb +402 -0
  31. data/old/lib/gorillib/receiver/active_model_shim.rb +32 -0
  32. data/old/lib/gorillib/receiver/acts_as_hash.rb +195 -0
  33. data/old/lib/gorillib/receiver/acts_as_loadable.rb +42 -0
  34. data/old/lib/gorillib/receiver/locale/en.yml +27 -0
  35. data/old/lib/gorillib/receiver/tree_diff.rb +74 -0
  36. data/old/lib/gorillib/receiver/validations.rb +30 -0
  37. data/old/lib/gorillib/receiver_model.rb +21 -0
  38. data/old/lib/gorillib/struct/acts_as_hash.rb +108 -0
  39. data/old/lib/gorillib/struct/hashlike_iteration.rb +0 -0
  40. data/old/spec/gorillib/hash/indifferent_access_spec.rb +391 -0
  41. data/old/spec/gorillib/metaprogramming/cattr_accessor_spec.rb +43 -0
  42. data/old/spec/gorillib/metaprogramming/mattr_accessor_spec.rb +45 -0
  43. data/old/spec/gorillib/receiver/receiver/acts_as_hash_spec.rb +295 -0
  44. data/old/spec/gorillib/receiver_spec.rb +551 -0
  45. data/old/spec/gorillib/struct/acts_as_hash_fuzz_spec.rb +71 -0
  46. data/old/spec/gorillib/struct/acts_as_hash_spec.rb +422 -0
  47. data/spec/gorillib/array/compact_blank_spec.rb +2 -2
  48. data/spec/gorillib/collection_spec.rb +6 -6
  49. data/spec/gorillib/factories_spec.rb +2 -2
  50. data/spec/gorillib/hashlike_spec.rb +2 -1
  51. data/spec/gorillib/model/defaults_spec.rb +3 -3
  52. data/spec/gorillib/model/serialization/csv_spec.rb +35 -0
  53. data/spec/gorillib/model/serialization/tsv_spec.rb +20 -4
  54. data/spec/gorillib/model/serialization_spec.rb +3 -3
  55. data/spec/spec_helper.rb +6 -1
  56. data/spec/support/factory_test_helpers.rb +2 -2
  57. data/spec/support/gorillib_test_helpers.rb +4 -4
  58. data/spec/support/hashlike_fuzzing_helper.rb +1 -15
  59. data/spec/support/hashlike_helper.rb +5 -1
  60. data/spec/support/model_test_helpers.rb +12 -1
  61. metadata +192 -168
  62. data/notes/HOWTO.md +0 -22
  63. data/notes/bucket.md +0 -155
  64. data/notes/builder.md +0 -170
  65. data/notes/collection.md +0 -81
  66. data/notes/factories.md +0 -86
  67. data/notes/model-overlay.md +0 -209
  68. data/notes/model.md +0 -135
  69. data/notes/structured-data-classes.md +0 -127
@@ -2,8 +2,8 @@ require 'spec_helper'
2
2
  require 'gorillib/array/compact_blank'
3
3
 
4
4
  describe Array, :simple_spec do
5
- let(:blankish){ mock('blankish', :blank? => true) }
6
- let(:nonblank){ mock('nonblank', :blank? => false) }
5
+ let(:blankish){ double('blankish', :blank? => true) }
6
+ let(:nonblank){ double('nonblank', :blank? => false) }
7
7
 
8
8
  describe '#compact_blank' do
9
9
  it 'omits nils, like #compact' do
@@ -9,7 +9,7 @@ shared_context :collection_spec do
9
9
  # let you access it.
10
10
  let(:collection_with_mock_innards) do
11
11
  coll = described_class.new
12
- coll.send(:instance_variable_set, :@clxn, mock('clxn hash') )
12
+ coll.send(:instance_variable_set, :@clxn, double('clxn hash') )
13
13
  coll.send(:define_singleton_method, :innards){ @clxn }
14
14
  end
15
15
  end
@@ -19,9 +19,9 @@ shared_examples_for 'a collection' do |options={}|
19
19
 
20
20
  context '.receive' do
21
21
  it 'makes a new collection, has it #receive! the cargo, returns it' do
22
- mock_collection = mock('collection')
23
- mock_cargo = mock('cargo')
24
- mock_args = {key_method: mock, item_type: mock}
22
+ mock_collection = double('collection')
23
+ mock_cargo = double('cargo')
24
+ mock_args = {key_method: double, item_type: double}
25
25
  described_class.should_receive(:new).with(mock_args).and_return(mock_collection)
26
26
  mock_collection.should_receive(:receive!).with(mock_cargo)
27
27
  described_class.receive(mock_cargo, mock_args).should == mock_collection
@@ -211,7 +211,7 @@ describe 'collections:', :model_spec, :collection_spec do
211
211
  let(:smurf_collection){ described_class.receive([], key_method: :name, item_type: smurf_class) }
212
212
  let(:test_item){ papa_smurf }
213
213
  let(:test_attrs){ test_item.attributes }
214
- let(:mock_factory){ mf = mock('factory'); mf.stub!(:native? => true) ; mf }
214
+ let(:mock_factory){ mf = double('factory'); mf.stub(:native? => true) ; mf }
215
215
 
216
216
  context '#receive_item' do
217
217
  before do
@@ -257,7 +257,7 @@ describe 'collections:', :model_spec, :collection_spec do
257
257
  subject.update_or_add('truffula', test_attrs).should == updated_item
258
258
  subject.update_or_add('truffula', test_item ).should == test_item
259
259
  end
260
- it 'FIXME: does not behave right on existing bojects' do
260
+ it "returns item" do
261
261
  updated_item = test_item.dup ; updated_item.name = 'truffula'
262
262
  subject.update_or_add('truffula', test_item ).should == updated_item
263
263
  end
@@ -38,7 +38,7 @@ describe '', :model_spec, :factory_spec do
38
38
  Gorillib::Factory(String).should be_a(Gorillib::Factory::StringFactory)
39
39
  end
40
40
  it 'calls Gorillib::Factory.lookup' do
41
- x = mock
41
+ x = double
42
42
  Gorillib::Factory.should_receive(:find).with(x)
43
43
  Gorillib::Factory(x)
44
44
  end
@@ -304,7 +304,7 @@ describe '', :model_spec, :factory_spec do
304
304
  end
305
305
 
306
306
  it "accepts a factory for the keys" do
307
- mock_factory = mock('factory')
307
+ mock_factory = double('factory')
308
308
  mock_factory.should_receive(:receive).with(3).and_return("converted!")
309
309
  factory = described_class.new(:keys => mock_factory)
310
310
  factory.receive( { 3 => 4 } ).should == { 'converted!' => 4 }
@@ -279,7 +279,8 @@ describe Gorillib::Hashlike, :hashlike_spec => true do
279
279
  ({}.methods.map(&:to_sym) -
280
280
  (@hshlike.methods.map(&:to_sym) +
281
281
  HashlikeHelper::OMITTED_METHODS_FROM_HASH +
282
- HashlikeHelper::FANCY_HASHLIKE_METHODS
282
+ HashlikeHelper::FANCY_HASHLIKE_METHODS +
283
+ [:merge_resultset] # simplecov helper method added to Hash
283
284
  )
284
285
  ).should == []
285
286
  end
@@ -58,7 +58,7 @@ describe Gorillib::Model, :model_spec => true do
58
58
  end
59
59
  it "if the default is a value, returns it, dup'd if possible" do
60
60
  ford_39.attribute_default(style_field).should == :sedan
61
- year_val = mock ; dupd_year_val = mock
61
+ year_val = double ; dupd_year_val = double
62
62
  year_val.should_receive(:try_dup).and_return(dupd_year_val)
63
63
  year_field.default = year_val
64
64
  ford_39.attribute_default(year_field).should equal(dupd_year_val)
@@ -74,7 +74,7 @@ describe Gorillib::Model, :model_spec => true do
74
74
  ford_39.attribute_default(year_field).should equal(ford_39)
75
75
  end
76
76
  it "if the default responds_to #call, call it, passing the instance and field name" do
77
- callable = mock ; expected = mock
77
+ callable = double ; expected = double
78
78
  year_field.default = callable
79
79
  callable.should_receive(:respond_to?).with(:call).and_return(true)
80
80
  callable.should_receive(:call).with(ford_39, :year).and_return(expected)
@@ -82,7 +82,7 @@ describe Gorillib::Model, :model_spec => true do
82
82
  ford_39.attribute_default(year_field).should equal(expected)
83
83
  end
84
84
  it "if the default is a proc with args, call it in current context with the model and field name" do
85
- this = self ; expected = mock
85
+ this = self ; expected = double
86
86
  year_field.default = ->(inst, field_name){ [self, inst, field_name, expected] }
87
87
  ford_39.attribute_default(year_field).should == [this, ford_39, :year, expected]
88
88
  end
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'support/model_test_helpers'
3
+
4
+ require 'multi_json'
5
+ #
6
+ require 'gorillib/model'
7
+ require 'gorillib/builder'
8
+ require 'gorillib/model/serialization/csv'
9
+
10
+ describe Gorillib::Model::LoadFromCsv, :model_spec, :builder_spec do
11
+
12
+ context ".load_csv" do
13
+
14
+ let(:expected_engine) do
15
+ {:name=>:Wankel, :carburetor=>:no, :volume=>1, :cylinders=>982, :owner=>"who_am_i"}
16
+ end
17
+
18
+ before :each do
19
+ engine_class.class_eval { include Gorillib::Model::LoadFromCsv }
20
+ csv_file = double('csv_file')
21
+ csv_file.stub(:shift) {}
22
+ csv_file.stub(:each).and_yield(expected_engine.values)
23
+ CSV.should_receive(:open).and_yield(csv_file)
24
+ end
25
+
26
+ it "loads from file" do
27
+ engine_class.load_csv('test').to_wire().first.keep_if{|k,| k != :_type}.should
28
+ eql(expected_engine)
29
+ end
30
+
31
+ it "loads from file with block" do
32
+ expect { |b| engine_class.load_csv('test', &b) }.to yield_with_args(engine_class)
33
+ end
34
+ end
35
+ end
@@ -7,11 +7,27 @@ require 'gorillib/model'
7
7
  require 'gorillib/builder'
8
8
  require 'gorillib/model/serialization/tsv'
9
9
 
10
- describe Gorillib::Model, :model_spec, :builder_spec do
10
+ describe Gorillib::Model::LoadFromTsv, :model_spec, :builder_spec do
11
11
 
12
12
  context ".load_tsv" do
13
- # it "respects blank characters at end of line, so '1\\t2\\t\\t\\t becomes [\"1\",\"2\",\"\",\"\",\"\"]" do
14
- # # make sure
15
- # end
13
+
14
+ let(:expected_engine) do
15
+ {:name=>:Wankel, :carburetor=>:no, :volume=>1, :cylinders=>982, :owner=>"who_am_i"}
16
+ end
17
+
18
+ before :each do
19
+ engine_class.class_eval { include Gorillib::Model::LoadFromTsv }
20
+ engine_class.should_receive(:_each_raw_line).with(:test, {}).
21
+ and_yield(expected_engine.values.join("\t"))
22
+ end
23
+
24
+ it "loads from file" do
25
+ engine_class.load_tsv(:test).to_wire().first.keep_if{|k,| k != :_type}.should
26
+ eql(expected_engine)
27
+ end
28
+
29
+ it "loads from file with block" do
30
+ expect { |b| engine_class.load_tsv(:test, &b) }.to yield_with_args(engine_class)
31
+ end
16
32
  end
17
33
  end
@@ -15,13 +15,13 @@ describe Gorillib::Model, :model_spec, :builder_spec do
15
15
  end
16
16
  let :wired_garage_hash do
17
17
  { :cars => [
18
- {:name=>:wildcat, :make_model=>"Buick Wildcat", :year=>1968, :doors=>2, :engine=>{:name=>" engine", :carburetor=>:stock, :volume=>455, :cylinders=>8, :owner=>nil, :_type => "gorillib.test.engine"}, :_type => "gorillib.test.car"},
19
- {:name=>:ford_39, :make_model=>"Ford Tudor Sedan", :year=>1939, :doors=>2, :engine=>nil, :_type => "gorillib.test.car"}, ], :_type => "gorillib.test.garage" }
18
+ {:name=>:wildcat, :make_model=>"Buick Wildcat", :year=>1968, :doors=>2, :engine=>{:volume=>455, :cylinders=>8, :_type => "gorillib.test.engine"}, :_type => "gorillib.test.car"},
19
+ {:name=>:ford_39, :make_model=>"Ford Tudor Sedan", :year=>1939, :doors=>2, :_type => "gorillib.test.car"}, ], :_type => "gorillib.test.garage" }
20
20
  end
21
21
 
22
22
  describe 'to_json' do
23
23
  it 'recursively serializes' do
24
- MultiJson.load(wildcat.to_json).should == {"name"=>"wildcat","make_model"=>"Buick Wildcat","year"=>1968,"doors"=>2,"engine"=>{"name"=>" engine","carburetor"=>"stock","volume"=>455,"cylinders"=>8,"owner"=>nil,"_type"=>"gorillib.test.engine"},"_type"=>"gorillib.test.car"}
24
+ MultiJson.load(wildcat.to_json).should == {"name"=>"wildcat","make_model"=>"Buick Wildcat","year"=>1968,"doors"=>2,"engine"=>{"volume"=>455,"cylinders"=>8, "_type"=>"gorillib.test.engine"},"_type"=>"gorillib.test.car"}
25
25
  end
26
26
  it 'recursively serializes' do
27
27
  subject.to_json.should == MultiJson.dump(wired_garage_hash)
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,12 @@ require 'rspec/autorun'
3
3
 
4
4
  if ENV['GORILLIB_COV']
5
5
  require 'simplecov'
6
- SimpleCov.start
6
+ SimpleCov.start do
7
+ add_group 'Specs', "spec/"
8
+ add_group 'Library' do |src|
9
+ src.filename =~ %r{/(lib|examples)/}
10
+ end
11
+ end
7
12
  end
8
13
 
9
14
  GORILLIB_ROOT_DIR = File.expand_path(File.join(File.dirname(__FILE__),'..'))
@@ -56,7 +56,7 @@ end
56
56
  # hand it a collection with entries 1, 2, 3 please
57
57
  shared_examples_for :an_enumerable_factory do
58
58
  it "accepts a factory for its items" do
59
- mock_factory = mock('factory')
59
+ mock_factory = double('factory')
60
60
  mock_factory.should_receive(:receive).with(1)
61
61
  mock_factory.should_receive(:receive).with(2)
62
62
  mock_factory.should_receive(:receive).with(3)
@@ -67,7 +67,7 @@ shared_examples_for :an_enumerable_factory do
67
67
  subject.empty_product.should == empty_collection
68
68
  end
69
69
  it "lets you override the empty collection" do
70
- ep = mock; ep.should_receive(:try_dup).and_return 'hey'
70
+ ep = double; ep.should_receive(:try_dup).and_return 'hey'
71
71
  subject = described_class.new(:empty_product => ep)
72
72
  subject.empty_product.should == 'hey'
73
73
  subject = described_class.new(:empty_product => ->{ 'yo' })
@@ -80,7 +80,7 @@ shared_examples_for 'a model' do
80
80
  smurf_class.receive(my_attrs)
81
81
  end
82
82
  it 'complains if the given type is not right' do
83
- mock_factory = mock ; mock_factory.stub(:receive! => {}, :receive => mock, :new => mock_factory)
83
+ mock_factory = double('factory') ; mock_factory.stub(:receive! => {}, :receive => double, :new => mock_factory)
84
84
  mock_factory.should_receive(:<=).and_return(false)
85
85
  smurf_class.should_receive(:warn).with(/factory .* is not a type of Gorillib::Test::Smurf/)
86
86
  smurf_class.receive(:my_field => 12, :acme => 3, :_type => mock_factory)
@@ -103,7 +103,7 @@ shared_examples_for "a model field" do |field_name|
103
103
  subject.read_attribute(field_name).should == mock_val
104
104
  end
105
105
  it "does **not** raise an error if the field does not exist (require 'model/lint' if you want it to)" do
106
- ->{ subject.read_attribute(:fnord) }.should_not raise_error(Gorillib::Model::UnknownFieldError, /unknown field: fnord/)
106
+ expect { subject.read_attribute(:fnord) }.not_to raise_error
107
107
  end
108
108
  end
109
109
 
@@ -116,7 +116,7 @@ shared_examples_for "a model field" do |field_name|
116
116
  subject.write_attribute(field_name, sample_val).should == sample_val
117
117
  end
118
118
  it "does **not** raise an error if the field does not exist (require 'model/lint' if you want it to)" do
119
- ->{ subject.write_attribute(:fnord, 8) }.should_not raise_error(Gorillib::Model::UnknownFieldError, /unknown field: fnord/)
119
+ expect { subject.write_attribute(:fnord, 8) }.not_to raise_error
120
120
  end
121
121
  end
122
122
 
@@ -133,7 +133,7 @@ shared_examples_for "a model field" do |field_name|
133
133
  subject.attribute_set?(field_name).should be_false
134
134
  end
135
135
  it "does **not** raise an error if the field does not exist (require 'model/lint' if you want it to)" do
136
- ->{ subject.attribute_set?(:fnord) }.should_not raise_error(Gorillib::Model::UnknownFieldError, /unknown field: fnord/)
136
+ expect { subject.attribute_set?(:fnord) }.not_to raise_error
137
137
  end
138
138
  end
139
139
 
@@ -66,21 +66,7 @@ module HashlikeFuzzingHelper
66
66
  obj.send(meth, *input)
67
67
  end
68
68
  end
69
-
70
- # workaround: some errors have slightly different strings than Hash does
71
- def err_regex err
72
- err_str = err.to_s
73
- err_str = Regexp.escape(err_str)
74
- if err.is_a?(TypeError)
75
- err_str.gsub!(/nil/, '(nil|NilClass)')
76
- err_str.gsub!(/false/, '(false|FalseClass)')
77
- elsif err.is_a?(ArgumentError)
78
- err_str.gsub!(/arguments(\\ )*\\\(/, 'arguments\s*\(')
79
- err_str.gsub!(/for\\ (\d\\\.\\\.\d)/, 'for [\d\.]+')
80
- end
81
- Regexp.new(err_str)
82
- end
83
-
69
+
84
70
  def behaves_the_same obj_1, obj_2, method_to_test, input
85
71
  input.unshift(1) if [:cycle, :partition].include?(method_to_test) && input.last.is_a?(Proc)
86
72
 
@@ -55,7 +55,11 @@ module HashlikeHelper
55
55
  :nested_under_indifferent_access,
56
56
  :stringify_keys, :stringify_keys!, :symbolize_keys, :symbolize_keys!,
57
57
  :with_indifferent_access, :yaml_initialize,
58
- :extractable_options?, :deep_dup, :reverse_merge, :reverse_merge!, :slice, :slice!, :extract!, :except, :except!, :only, :only!, :deep_merge, :deep_merge!, :deep_compact!, :compact, :compact!, :compact_blank, :compact_blank!
58
+ :extractable_options?, :deep_dup, :reverse_merge, :reverse_merge!,
59
+ :slice, :slice!, :extract!, :except, :except!, :only, :only!,
60
+ :deep_merge, :deep_merge!,
61
+ :deep_compact!, :compact, :compact!, :compact_blank, :compact_blank!,
62
+ :to_wire
59
63
  ]
60
64
  FANCY_HASHLIKE_METHODS.each{|meth| OMITTED_METHODS_FROM_HASH << meth }
61
65
 
@@ -4,7 +4,7 @@ module Meta ; module Gorillib ; module Test ; end ; end ; end
4
4
  shared_context 'model', :model_spec do
5
5
  after(:each){ Gorillib::Test.nuke_constants ; Meta::Gorillib::Test.nuke_constants }
6
6
 
7
- let(:mock_val){ mock('mock value') }
7
+ let(:mock_val){ double('mock value') }
8
8
 
9
9
  let(:smurf_class) do
10
10
  class Gorillib::Test::Smurf
@@ -40,6 +40,17 @@ shared_context 'model', :model_spec do
40
40
  Gorillib::Test::SmurfVillage
41
41
  end
42
42
 
43
+ let(:smurfhouse_class) do
44
+ module Gorillib::Test
45
+ class Smurfhouse
46
+ include Gorillib::Model
47
+ field :shape, Symbol
48
+ field :color, Symbol
49
+ end
50
+ end
51
+ Gorillib::Test::Smurfhouse
52
+ end
53
+
43
54
  end
44
55
 
45
56
  shared_context 'builder', :model_spec, :builder_spec do
metadata CHANGED
@@ -1,138 +1,138 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gorillib
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.2
4
5
  prerelease:
5
- version: 0.5.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Infochimps
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-10-22 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2014-04-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: multi_json
17
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: "1.1"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '1.1'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: json
28
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
29
25
  none: false
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '1.1'
30
+ - !ruby/object:Gem::Dependency
38
31
  name: configliere
39
- requirement: &id003 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
40
33
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
44
37
  version: 0.4.13
45
38
  type: :runtime
46
39
  prerelease: false
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.4.13
46
+ - !ruby/object:Gem::Dependency
49
47
  name: bundler
50
- requirement: &id004 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  none: false
52
- requirements:
50
+ requirements:
53
51
  - - ~>
54
- - !ruby/object:Gem::Version
55
- version: "1.1"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.1'
56
54
  type: :development
57
55
  prerelease: false
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: jeweler
61
- requirement: &id005 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
62
57
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: "1.6"
67
- type: :development
68
- prerelease: false
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.1'
62
+ - !ruby/object:Gem::Dependency
71
63
  name: pry
72
- requirement: &id006 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
73
65
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
78
70
  type: :development
79
71
  prerelease: false
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
82
79
  name: rspec
83
- requirement: &id007 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
84
81
  none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: "2.8"
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '2.8'
89
86
  type: :development
90
87
  prerelease: false
91
- version_requirements: *id007
92
- - !ruby/object:Gem::Dependency
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '2.8'
94
+ - !ruby/object:Gem::Dependency
93
95
  name: rake
94
- requirement: &id008 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
95
97
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
100
102
  type: :development
101
103
  prerelease: false
102
- version_requirements: *id008
103
- - !ruby/object:Gem::Dependency
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
104
111
  name: yard
105
- requirement: &id009 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
106
113
  none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: "0.7"
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0.7'
111
118
  type: :development
112
119
  prerelease: false
113
- version_requirements: *id009
114
- description: "Gorillib: infochimps lightweight subset of ruby convenience methods"
115
- email: coders@infochimps.org
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0.7'
126
+ description: ! 'Gorillib: infochimps lightweight subset of ruby convenience methods'
127
+ email: coders@infochimps.com
116
128
  executables: []
117
-
118
129
  extensions: []
119
-
120
- extra_rdoc_files:
121
- - CHANGELOG.md
122
- - LICENSE.md
123
- - README.md
124
- - TODO.md
125
- - notes/HOWTO.md
126
- - notes/bucket.md
127
- - notes/builder.md
128
- - notes/collection.md
129
- - notes/factories.md
130
- - notes/model-overlay.md
131
- - notes/model.md
132
- - notes/structured-data-classes.md
133
- files:
130
+ extra_rdoc_files: []
131
+ files:
134
132
  - .gitignore
133
+ - .gitmodules
135
134
  - .rspec
135
+ - .travis.yml
136
136
  - .yardopts
137
137
  - CHANGELOG.md
138
138
  - Gemfile
@@ -142,6 +142,9 @@ files:
142
142
  - Rakefile
143
143
  - TODO.md
144
144
  - VERSION
145
+ - away/aliasing_spec.rb
146
+ - away/confidence.rb
147
+ - away/stub_module.rb
145
148
  - examples/benchmark/factories_benchmark.rb
146
149
  - examples/builder/ironfan.rb
147
150
  - examples/hash/slicing_methods.rb
@@ -232,6 +235,8 @@ files:
232
235
  - lib/gorillib/string/inflector.rb
233
236
  - lib/gorillib/string/simple_inflector.rb
234
237
  - lib/gorillib/string/truncate.rb
238
+ - lib/gorillib/system.rb
239
+ - lib/gorillib/system/runner.rb
235
240
  - lib/gorillib/type/boolean.rb
236
241
  - lib/gorillib/type/extended.rb
237
242
  - lib/gorillib/type/ip_address.rb
@@ -240,14 +245,29 @@ files:
240
245
  - lib/gorillib/utils/console.rb
241
246
  - lib/gorillib/utils/edge_cases.rb
242
247
  - lib/gorillib/utils/nuke_constants.rb
243
- - notes/HOWTO.md
244
- - notes/bucket.md
245
- - notes/builder.md
246
- - notes/collection.md
247
- - notes/factories.md
248
- - notes/model-overlay.md
249
- - notes/model.md
250
- - notes/structured-data-classes.md
248
+ - lib/gorillib/version.rb
249
+ - old/lib/gorillib/hash/indifferent_access.rb
250
+ - old/lib/gorillib/hash/tree_merge.rb
251
+ - old/lib/gorillib/hashlike/tree_merge.rb
252
+ - old/lib/gorillib/metaprogramming/cattr_accessor.rb
253
+ - old/lib/gorillib/metaprogramming/mattr_accessor.rb
254
+ - old/lib/gorillib/receiver.rb
255
+ - old/lib/gorillib/receiver/active_model_shim.rb
256
+ - old/lib/gorillib/receiver/acts_as_hash.rb
257
+ - old/lib/gorillib/receiver/acts_as_loadable.rb
258
+ - old/lib/gorillib/receiver/locale/en.yml
259
+ - old/lib/gorillib/receiver/tree_diff.rb
260
+ - old/lib/gorillib/receiver/validations.rb
261
+ - old/lib/gorillib/receiver_model.rb
262
+ - old/lib/gorillib/struct/acts_as_hash.rb
263
+ - old/lib/gorillib/struct/hashlike_iteration.rb
264
+ - old/spec/gorillib/hash/indifferent_access_spec.rb
265
+ - old/spec/gorillib/metaprogramming/cattr_accessor_spec.rb
266
+ - old/spec/gorillib/metaprogramming/mattr_accessor_spec.rb
267
+ - old/spec/gorillib/receiver/receiver/acts_as_hash_spec.rb
268
+ - old/spec/gorillib/receiver_spec.rb
269
+ - old/spec/gorillib/struct/acts_as_hash_fuzz_spec.rb
270
+ - old/spec/gorillib/struct/acts_as_hash_spec.rb
251
271
  - spec/examples/builder/ironfan_spec.rb
252
272
  - spec/extlib/hash_spec.rb
253
273
  - spec/extlib/mash_spec.rb
@@ -282,6 +302,7 @@ files:
282
302
  - spec/gorillib/model/defaults_spec.rb
283
303
  - spec/gorillib/model/lint_spec.rb
284
304
  - spec/gorillib/model/overlay_spec.rb
305
+ - spec/gorillib/model/serialization/csv_spec.rb
285
306
  - spec/gorillib/model/serialization/tsv_spec.rb
286
307
  - spec/gorillib/model/serialization_spec.rb
287
308
  - spec/gorillib/model_spec.rb
@@ -311,97 +332,100 @@ files:
311
332
  - spec/support/matchers/evaluate_to_true.rb
312
333
  - spec/support/model_test_helpers.rb
313
334
  - spec/support/shared_examples/included_module.rb
314
- homepage: https://github.com/infochimps-labs/gorillib
315
- licenses:
335
+ homepage: http://infochimps.com/labs
336
+ licenses:
316
337
  - Apache 2.0
317
338
  post_install_message:
318
339
  rdoc_options: []
319
-
320
- require_paths:
340
+ require_paths:
321
341
  - lib
322
- required_ruby_version: !ruby/object:Gem::Requirement
342
+ required_ruby_version: !ruby/object:Gem::Requirement
323
343
  none: false
324
- requirements:
325
- - - ">="
326
- - !ruby/object:Gem::Version
327
- hash: 4018535107500327818
328
- segments:
344
+ requirements:
345
+ - - ! '>='
346
+ - !ruby/object:Gem::Version
347
+ version: '0'
348
+ segments:
329
349
  - 0
330
- version: "0"
331
- required_rubygems_version: !ruby/object:Gem::Requirement
350
+ hash: -2332590126612092657
351
+ required_rubygems_version: !ruby/object:Gem::Requirement
332
352
  none: false
333
- requirements:
334
- - - ">="
335
- - !ruby/object:Gem::Version
336
- version: "0"
353
+ requirements:
354
+ - - ! '>='
355
+ - !ruby/object:Gem::Version
356
+ version: '0'
357
+ segments:
358
+ - 0
359
+ hash: -2332590126612092657
337
360
  requirements: []
338
-
339
361
  rubyforge_project:
340
- rubygems_version: 1.8.24
362
+ rubygems_version: 1.8.25
341
363
  signing_key:
342
364
  specification_version: 3
343
365
  summary: include only what you need. No dependencies, no creep
344
- test_files:
345
- - spec/extlib/mash_spec.rb
366
+ test_files:
367
+ - spec/examples/builder/ironfan_spec.rb
346
368
  - spec/extlib/hash_spec.rb
347
- - spec/support/gorillib_test_helpers.rb
348
- - spec/support/hashlike_helper.rb
349
- - spec/support/shared_examples/included_module.rb
350
- - spec/support/hashlike_fuzzing_helper.rb
351
- - spec/support/matchers/be_hash_eql.rb
352
- - spec/support/matchers/be_array_eql.rb
353
- - spec/support/matchers/enumerate_method.rb
354
- - spec/support/matchers/evaluate_to_true.rb
355
- - spec/support/model_test_helpers.rb
356
- - spec/support/factory_test_helpers.rb
357
- - spec/support/hashlike_via_delegation.rb
358
- - spec/support/hashlike_struct_helper.rb
359
- - spec/gorillib/model_spec.rb
369
+ - spec/extlib/mash_spec.rb
370
+ - spec/gorillib/array/compact_blank_spec.rb
371
+ - spec/gorillib/array/extract_options_spec.rb
372
+ - spec/gorillib/array/hashify_spec.rb
373
+ - spec/gorillib/array/simple_statistics_spec.rb
360
374
  - spec/gorillib/builder_spec.rb
361
- - spec/gorillib/numeric/clamp_spec.rb
362
- - spec/gorillib/string/human_spec.rb
363
- - spec/gorillib/string/inflections_spec.rb
364
- - spec/gorillib/string/inflector_test_cases.rb
365
- - spec/gorillib/string/constantize_spec.rb
366
- - spec/gorillib/string/truncate_spec.rb
367
- - spec/gorillib/metaprogramming/class_attribute_spec.rb
368
- - spec/gorillib/metaprogramming/singleton_class_spec.rb
369
- - spec/gorillib/metaprogramming/delegation_spec.rb
370
- - spec/gorillib/hashlike_spec.rb
371
- - spec/gorillib/exception/raisers_spec.rb
372
- - spec/gorillib/utils/capture_output_spec.rb
373
375
  - spec/gorillib/collection_spec.rb
374
- - spec/gorillib/type/extended_spec.rb
375
- - spec/gorillib/type/ip_address_spec.rb
376
- - spec/gorillib/hash/zip_spec.rb
377
- - spec/gorillib/hash/reverse_merge_spec.rb
378
- - spec/gorillib/hash/slice_spec.rb
379
- - spec/gorillib/hash/keys_spec.rb
376
+ - spec/gorillib/configurable_spec.rb
377
+ - spec/gorillib/datetime/parse_spec.rb
378
+ - spec/gorillib/datetime/to_flat_spec.rb
379
+ - spec/gorillib/enumerable/sum_spec.rb
380
+ - spec/gorillib/exception/raisers_spec.rb
381
+ - spec/gorillib/factories_spec.rb
380
382
  - spec/gorillib/hash/compact_spec.rb
381
383
  - spec/gorillib/hash/deep_compact_spec.rb
382
384
  - spec/gorillib/hash/deep_merge_spec.rb
383
- - spec/gorillib/datetime/parse_spec.rb
384
- - spec/gorillib/datetime/to_flat_spec.rb
385
+ - spec/gorillib/hash/keys_spec.rb
386
+ - spec/gorillib/hash/reverse_merge_spec.rb
387
+ - spec/gorillib/hash/slice_spec.rb
388
+ - spec/gorillib/hash/zip_spec.rb
389
+ - spec/gorillib/hashlike/behave_same_as_hash_spec.rb
385
390
  - spec/gorillib/hashlike/deep_hash_spec.rb
386
391
  - spec/gorillib/hashlike/hashlike_behavior_spec.rb
387
392
  - spec/gorillib/hashlike/hashlike_via_accessors_spec.rb
388
- - spec/gorillib/hashlike/behave_same_as_hash_spec.rb
389
- - spec/gorillib/configurable_spec.rb
390
- - spec/gorillib/factories_spec.rb
391
- - spec/gorillib/model/serialization/tsv_spec.rb
392
- - spec/gorillib/model/lint_spec.rb
393
+ - spec/gorillib/hashlike_spec.rb
394
+ - spec/gorillib/logger/log_spec.rb
395
+ - spec/gorillib/metaprogramming/class_attribute_spec.rb
396
+ - spec/gorillib/metaprogramming/delegation_spec.rb
397
+ - spec/gorillib/metaprogramming/singleton_class_spec.rb
393
398
  - spec/gorillib/model/defaults_spec.rb
394
- - spec/gorillib/model/serialization_spec.rb
399
+ - spec/gorillib/model/lint_spec.rb
395
400
  - spec/gorillib/model/overlay_spec.rb
396
- - spec/gorillib/pathname_spec.rb
397
- - spec/gorillib/enumerable/sum_spec.rb
398
- - spec/gorillib/object/try_spec.rb
401
+ - spec/gorillib/model/serialization/csv_spec.rb
402
+ - spec/gorillib/model/serialization/tsv_spec.rb
403
+ - spec/gorillib/model/serialization_spec.rb
404
+ - spec/gorillib/model_spec.rb
405
+ - spec/gorillib/numeric/clamp_spec.rb
399
406
  - spec/gorillib/object/blank_spec.rb
400
407
  - spec/gorillib/object/try_dup_spec.rb
401
- - spec/gorillib/array/compact_blank_spec.rb
402
- - spec/gorillib/array/simple_statistics_spec.rb
403
- - spec/gorillib/array/extract_options_spec.rb
404
- - spec/gorillib/array/hashify_spec.rb
405
- - spec/gorillib/logger/log_spec.rb
408
+ - spec/gorillib/object/try_spec.rb
409
+ - spec/gorillib/pathname_spec.rb
410
+ - spec/gorillib/string/constantize_spec.rb
411
+ - spec/gorillib/string/human_spec.rb
412
+ - spec/gorillib/string/inflections_spec.rb
413
+ - spec/gorillib/string/inflector_test_cases.rb
414
+ - spec/gorillib/string/truncate_spec.rb
415
+ - spec/gorillib/type/extended_spec.rb
416
+ - spec/gorillib/type/ip_address_spec.rb
417
+ - spec/gorillib/utils/capture_output_spec.rb
406
418
  - spec/spec_helper.rb
407
- - spec/examples/builder/ironfan_spec.rb
419
+ - spec/support/factory_test_helpers.rb
420
+ - spec/support/gorillib_test_helpers.rb
421
+ - spec/support/hashlike_fuzzing_helper.rb
422
+ - spec/support/hashlike_helper.rb
423
+ - spec/support/hashlike_struct_helper.rb
424
+ - spec/support/hashlike_via_delegation.rb
425
+ - spec/support/matchers/be_array_eql.rb
426
+ - spec/support/matchers/be_hash_eql.rb
427
+ - spec/support/matchers/enumerate_method.rb
428
+ - spec/support/matchers/evaluate_to_true.rb
429
+ - spec/support/model_test_helpers.rb
430
+ - spec/support/shared_examples/included_module.rb
431
+ has_rdoc: