gorillib 0.4.2pre → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,14 +1,17 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gem 'multi_json', ">= 1.1"
4
+ gem 'json'
5
+ gem 'configliere', '>= 0.4.13'
4
6
 
5
7
  # Only gems that you want listed as development dependencies in the gemspec
6
8
  group :development do
7
9
  gem 'bundler', "~> 1.1"
10
+ gem 'jeweler', ">= 1.6", :require => false
11
+ gem 'pry'
12
+ gem 'rspec', ">= 2.8", :require => false
8
13
  gem 'rake', :require => false
9
14
  gem 'yard', ">= 0.7", :require => false
10
- gem 'rspec', ">= 2.8", :require => false
11
- gem 'jeweler', ">= 1.6", :require => false
12
15
  end
13
16
 
14
17
  group :docs do
data/Rakefile CHANGED
@@ -22,6 +22,7 @@ YARD::Rake::YardocTask.new do
22
22
  Bundler.setup(:default, :development, :docs)
23
23
  end
24
24
 
25
+ # <<<<<<< HEAD
25
26
  require 'jeweler'
26
27
  Jeweler::Tasks.new do |gem|
27
28
  Bundler.setup(:default, :development, :test)
@@ -44,3 +45,52 @@ Jeweler::Tasks.new do |gem|
44
45
  gem.require_paths = ['lib']
45
46
  end
46
47
  Jeweler::RubygemsDotOrgTasks.new
48
+ # =======
49
+ # Bundler::GemHelper.install_tasks
50
+ #
51
+ # # require 'jeweler'
52
+ # # Jeweler::Tasks.new do |gem|
53
+ # # # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
54
+ # # gem.name = "gorillib"
55
+ # # gem.homepage = "http://infochimps.com/labs"
56
+ # # gem.license = "MIT"
57
+ # # gem.summary = %Q{include only what you need. No dependencies, no creep}
58
+ # # gem.description = %Q{Gorillib: infochimps lightweight subset of ruby convenience methods}
59
+ # # gem.email = "coders@infochimps.org"
60
+ # # gem.authors = ["Infochimps"]
61
+ #
62
+ # # ignores = File.readlines(".gitignore").grep(/^[^#]\S+/).map{|s| s.chomp }
63
+ # # dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
64
+ # # gem.files = dotfiles + Dir["**/*"].
65
+ # # reject{|f| f =~ %r{^(vendor|coverage)/} }.
66
+ # # reject{|f| File.directory?(f) }.
67
+ # # reject{|f| ignores.any?{|i| File.fnmatch(i, f) || File.fnmatch(i+'/**/*', f) || File.fnmatch(i+'/*', f) } }
68
+ # # gem.test_files = gem.files.grep(/^spec\//)
69
+ # # gem.require_paths = ['lib']
70
+ # # end
71
+ # # Jeweler::RubygemsDotOrgTasks.new
72
+ #
73
+ # require 'rspec/core'
74
+ # require 'rspec/core/rake_task'
75
+ # RSpec::Core::RakeTask.new(:spec) do |spec|
76
+ # Bundler.setup(:default, :development, :test)
77
+ # spec.pattern = FileList['spec/**/*_spec.rb']
78
+ # end
79
+ #
80
+ # # RSpec::Core::RakeTask.new(:rcov) do |spec|
81
+ # # Bundler.setup(:default, :development, :test)
82
+ # # spec.pattern = 'spec/**/*_spec.rb'
83
+ # # spec.rcov = true
84
+ # # spec.rcov_opts = %w[ --exclude .rvm --no-comments --text-summary]
85
+ # # end
86
+ #
87
+ # require 'yard'
88
+ # YARD::Rake::YardocTask.new do
89
+ # Bundler.setup(:default, :development, :docs)
90
+ # end
91
+ #
92
+ # # App-specific tasks
93
+ # Dir[File.dirname(__FILE__)+'/lib/tasks/**/*.rake'].sort.each{|f| load f }
94
+ #
95
+ # task :default => :spec
96
+ # >>>>>>> 0e8b5729b159c7aa8c596c4d5bc1757f7562e71b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2pre
1
+ 0.4.2
data/gorillib.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gorillib"
8
- s.version = "0.4.2pre"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2012-08-18"
12
+ s.date = "2012-09-06"
13
13
  s.description = "Gorillib: infochimps lightweight subset of ruby convenience methods"
14
14
  s.email = "coders@infochimps.org"
15
15
  s.extra_rdoc_files = [
@@ -43,6 +43,8 @@ Gem::Specification.new do |s|
43
43
  "lib/gorillib/builder.rb",
44
44
  "lib/gorillib/collection.rb",
45
45
  "lib/gorillib/collection/model_collection.rb",
46
+ "lib/gorillib/configurable.rb",
47
+ "lib/gorillib/data_munging.rb",
46
48
  "lib/gorillib/datetime/parse.rb",
47
49
  "lib/gorillib/datetime/to_flat.rb",
48
50
  "lib/gorillib/deprecated/array/average.rb",
@@ -118,14 +120,6 @@ Gem::Specification.new do |s|
118
120
  "lib/gorillib/utils/console.rb",
119
121
  "lib/gorillib/utils/edge_cases.rb",
120
122
  "lib/gorillib/utils/nuke_constants.rb",
121
- "notes/HOWTO.md",
122
- "notes/bucket.md",
123
- "notes/builder.md",
124
- "notes/collection.md",
125
- "notes/factories.md",
126
- "notes/model-overlay.md",
127
- "notes/model.md",
128
- "notes/structured-data-classes.md",
129
123
  "spec/examples/builder/ironfan_spec.rb",
130
124
  "spec/extlib/hash_spec.rb",
131
125
  "spec/extlib/mash_spec.rb",
@@ -134,6 +128,7 @@ Gem::Specification.new do |s|
134
128
  "spec/gorillib/array/simple_statistics_spec.rb",
135
129
  "spec/gorillib/builder_spec.rb",
136
130
  "spec/gorillib/collection_spec.rb",
131
+ "spec/gorillib/configurable_spec.rb",
137
132
  "spec/gorillib/datetime/parse_spec.rb",
138
133
  "spec/gorillib/datetime/to_flat_spec.rb",
139
134
  "spec/gorillib/enumerable/sum_spec.rb",
@@ -183,39 +178,50 @@ Gem::Specification.new do |s|
183
178
  "spec/support/matchers/be_hash_eql.rb",
184
179
  "spec/support/matchers/enumerate_method.rb",
185
180
  "spec/support/matchers/evaluate_to_true.rb",
186
- "spec/support/model_test_helpers.rb"
181
+ "spec/support/model_test_helpers.rb",
182
+ "spec/support/shared_examples/included_module.rb"
187
183
  ]
188
184
  s.homepage = "https://github.com/infochimps-labs/gorillib"
189
185
  s.licenses = ["Apache 2.0"]
190
186
  s.require_paths = ["lib"]
191
187
  s.rubygems_version = "1.8.24"
192
188
  s.summary = "include only what you need. No dependencies, no creep"
193
- s.test_files = ["spec/examples/builder/ironfan_spec.rb", "spec/extlib/hash_spec.rb", "spec/extlib/mash_spec.rb", "spec/gorillib/array/compact_blank_spec.rb", "spec/gorillib/array/extract_options_spec.rb", "spec/gorillib/array/simple_statistics_spec.rb", "spec/gorillib/builder_spec.rb", "spec/gorillib/collection_spec.rb", "spec/gorillib/datetime/parse_spec.rb", "spec/gorillib/datetime/to_flat_spec.rb", "spec/gorillib/enumerable/sum_spec.rb", "spec/gorillib/exception/raisers_spec.rb", "spec/gorillib/hash/compact_spec.rb", "spec/gorillib/hash/deep_compact_spec.rb", "spec/gorillib/hash/deep_merge_spec.rb", "spec/gorillib/hash/keys_spec.rb", "spec/gorillib/hash/reverse_merge_spec.rb", "spec/gorillib/hash/slice_spec.rb", "spec/gorillib/hash/zip_spec.rb", "spec/gorillib/hashlike/behave_same_as_hash_spec.rb", "spec/gorillib/hashlike/deep_hash_spec.rb", "spec/gorillib/hashlike/hashlike_behavior_spec.rb", "spec/gorillib/hashlike/hashlike_via_accessors_spec.rb", "spec/gorillib/hashlike_spec.rb", "spec/gorillib/logger/log_spec.rb", "spec/gorillib/metaprogramming/class_attribute_spec.rb", "spec/gorillib/metaprogramming/delegation_spec.rb", "spec/gorillib/metaprogramming/singleton_class_spec.rb", "spec/gorillib/model/defaults_spec.rb", "spec/gorillib/model/factories_spec.rb", "spec/gorillib/model/lint_spec.rb", "spec/gorillib/model/overlay_spec.rb", "spec/gorillib/model/serialization_spec.rb", "spec/gorillib/model_spec.rb", "spec/gorillib/numeric/clamp_spec.rb", "spec/gorillib/object/blank_spec.rb", "spec/gorillib/object/try_dup_spec.rb", "spec/gorillib/object/try_spec.rb", "spec/gorillib/pathname_spec.rb", "spec/gorillib/string/constantize_spec.rb", "spec/gorillib/string/human_spec.rb", "spec/gorillib/string/inflections_spec.rb", "spec/gorillib/string/inflector_test_cases.rb", "spec/gorillib/string/truncate_spec.rb", "spec/gorillib/type/extended_spec.rb", "spec/gorillib/utils/capture_output_spec.rb", "spec/spec_helper.rb", "spec/support/factory_test_helpers.rb", "spec/support/gorillib_test_helpers.rb", "spec/support/hashlike_fuzzing_helper.rb", "spec/support/hashlike_helper.rb", "spec/support/hashlike_struct_helper.rb", "spec/support/hashlike_via_delegation.rb", "spec/support/matchers/be_array_eql.rb", "spec/support/matchers/be_hash_eql.rb", "spec/support/matchers/enumerate_method.rb", "spec/support/matchers/evaluate_to_true.rb", "spec/support/model_test_helpers.rb"]
189
+ s.test_files = ["spec/extlib/mash_spec.rb", "spec/extlib/hash_spec.rb", "spec/support/gorillib_test_helpers.rb", "spec/support/hashlike_helper.rb", "spec/support/shared_examples/included_module.rb", "spec/support/hashlike_fuzzing_helper.rb", "spec/support/matchers/be_hash_eql.rb", "spec/support/matchers/be_array_eql.rb", "spec/support/matchers/enumerate_method.rb", "spec/support/matchers/evaluate_to_true.rb", "spec/support/model_test_helpers.rb", "spec/support/factory_test_helpers.rb", "spec/support/hashlike_via_delegation.rb", "spec/support/hashlike_struct_helper.rb", "spec/gorillib/model_spec.rb", "spec/gorillib/builder_spec.rb", "spec/gorillib/numeric/clamp_spec.rb", "spec/gorillib/string/human_spec.rb", "spec/gorillib/string/inflections_spec.rb", "spec/gorillib/string/inflector_test_cases.rb", "spec/gorillib/string/constantize_spec.rb", "spec/gorillib/string/truncate_spec.rb", "spec/gorillib/metaprogramming/class_attribute_spec.rb", "spec/gorillib/metaprogramming/singleton_class_spec.rb", "spec/gorillib/metaprogramming/delegation_spec.rb", "spec/gorillib/hashlike_spec.rb", "spec/gorillib/exception/raisers_spec.rb", "spec/gorillib/utils/capture_output_spec.rb", "spec/gorillib/collection_spec.rb", "spec/gorillib/type/extended_spec.rb", "spec/gorillib/hash/zip_spec.rb", "spec/gorillib/hash/reverse_merge_spec.rb", "spec/gorillib/hash/slice_spec.rb", "spec/gorillib/hash/keys_spec.rb", "spec/gorillib/hash/compact_spec.rb", "spec/gorillib/hash/deep_compact_spec.rb", "spec/gorillib/hash/deep_merge_spec.rb", "spec/gorillib/datetime/parse_spec.rb", "spec/gorillib/datetime/to_flat_spec.rb", "spec/gorillib/hashlike/deep_hash_spec.rb", "spec/gorillib/hashlike/hashlike_behavior_spec.rb", "spec/gorillib/hashlike/hashlike_via_accessors_spec.rb", "spec/gorillib/hashlike/behave_same_as_hash_spec.rb", "spec/gorillib/configurable_spec.rb", "spec/gorillib/model/lint_spec.rb", "spec/gorillib/model/defaults_spec.rb", "spec/gorillib/model/serialization_spec.rb", "spec/gorillib/model/overlay_spec.rb", "spec/gorillib/model/factories_spec.rb", "spec/gorillib/pathname_spec.rb", "spec/gorillib/enumerable/sum_spec.rb", "spec/gorillib/object/try_spec.rb", "spec/gorillib/object/blank_spec.rb", "spec/gorillib/object/try_dup_spec.rb", "spec/gorillib/array/compact_blank_spec.rb", "spec/gorillib/array/simple_statistics_spec.rb", "spec/gorillib/array/extract_options_spec.rb", "spec/gorillib/logger/log_spec.rb", "spec/spec_helper.rb", "spec/examples/builder/ironfan_spec.rb"]
194
190
 
195
191
  if s.respond_to? :specification_version then
196
192
  s.specification_version = 3
197
193
 
198
194
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
199
195
  s.add_runtime_dependency(%q<multi_json>, [">= 1.1"])
196
+ s.add_runtime_dependency(%q<json>, [">= 0"])
197
+ s.add_runtime_dependency(%q<configliere>, [">= 0.4.13"])
200
198
  s.add_development_dependency(%q<bundler>, ["~> 1.1"])
199
+ s.add_development_dependency(%q<jeweler>, [">= 1.6"])
200
+ s.add_development_dependency(%q<pry>, [">= 0"])
201
+ s.add_development_dependency(%q<rspec>, [">= 2.8"])
201
202
  s.add_development_dependency(%q<rake>, [">= 0"])
202
203
  s.add_development_dependency(%q<yard>, [">= 0.7"])
203
- s.add_development_dependency(%q<rspec>, [">= 2.8"])
204
- s.add_development_dependency(%q<jeweler>, [">= 1.6"])
205
204
  else
206
205
  s.add_dependency(%q<multi_json>, [">= 1.1"])
206
+ s.add_dependency(%q<json>, [">= 0"])
207
+ s.add_dependency(%q<configliere>, [">= 0.4.13"])
207
208
  s.add_dependency(%q<bundler>, ["~> 1.1"])
209
+ s.add_dependency(%q<jeweler>, [">= 1.6"])
210
+ s.add_dependency(%q<pry>, [">= 0"])
211
+ s.add_dependency(%q<rspec>, [">= 2.8"])
208
212
  s.add_dependency(%q<rake>, [">= 0"])
209
213
  s.add_dependency(%q<yard>, [">= 0.7"])
210
- s.add_dependency(%q<rspec>, [">= 2.8"])
211
- s.add_dependency(%q<jeweler>, [">= 1.6"])
212
214
  end
213
215
  else
214
216
  s.add_dependency(%q<multi_json>, [">= 1.1"])
217
+ s.add_dependency(%q<json>, [">= 0"])
218
+ s.add_dependency(%q<configliere>, [">= 0.4.13"])
215
219
  s.add_dependency(%q<bundler>, ["~> 1.1"])
220
+ s.add_dependency(%q<jeweler>, [">= 1.6"])
221
+ s.add_dependency(%q<pry>, [">= 0"])
222
+ s.add_dependency(%q<rspec>, [">= 2.8"])
216
223
  s.add_dependency(%q<rake>, [">= 0"])
217
224
  s.add_dependency(%q<yard>, [">= 0.7"])
218
- s.add_dependency(%q<rspec>, [">= 2.8"])
219
- s.add_dependency(%q<jeweler>, [">= 1.6"])
220
225
  end
221
226
  end
227
+
@@ -0,0 +1,28 @@
1
+ require 'configliere'
2
+ require 'gorillib/builder'
3
+ require 'gorillib/string/inflections'
4
+
5
+ module Gorillib
6
+ module Configurable
7
+ extend Gorillib::Concern
8
+ include Gorillib::Builder
9
+
10
+ module ClassMethods
11
+ def receive(attrs = {}, &blk)
12
+ conf = settings.load_configuration_in_order!(configuration_scope.to_s)
13
+ super(attrs.merge(conf), &blk)
14
+ end
15
+
16
+ def config(name, type, options = {})
17
+ field(name, type, options)
18
+ end
19
+ end
20
+
21
+ included do
22
+ self.class_attribute(:configuration_scope, :settings)
23
+ self.configuration_scope = self.to_s.underscore.to_sym
24
+ self.settings = Configliere::Param.new.use(:commandline, :config_file)
25
+ end
26
+
27
+ end
28
+ end
@@ -0,0 +1,8 @@
1
+ require 'gorillib'
2
+ require 'gorillib/array/wrap'
3
+ require 'gorillib/type/extended'
4
+ require 'gorillib/hash/slice'
5
+ require 'gorillib/pathname'
6
+ require 'gorillib/logger/log'
7
+ require 'gorillib/model'
8
+ require 'gorillib/factories'
@@ -0,0 +1,62 @@
1
+ require 'spec_helper'
2
+ require 'gorillib/configurable'
3
+
4
+ describe Gorillib::Configurable do
5
+ include_context 'included_module'
6
+
7
+ it 'defines a config() method on the class' do
8
+ subject.should respond_to(:config)
9
+ end
10
+
11
+ it 'creates a class attribute :settings' do
12
+ subject.should respond_to(:settings)
13
+ subject.receive.should respond_to(:settings)
14
+ end
15
+
16
+ it 'creates a class attribute :configuration_scope' do
17
+ subject.should respond_to(:configuration_scope)
18
+ subject.receive.should respond_to(:configuration_scope)
19
+ end
20
+
21
+ context 'config' do
22
+ let(:test_field) { :gonads }
23
+ let(:test_default) { 'strife' }
24
+ let(:test_type) { String }
25
+
26
+ before(:each) { subject.config(test_field, test_type, :default => test_default) }
27
+
28
+ # it 'defines a field on settings with optional defaults' do
29
+ # subject.settings.send(test_field).should == test_default
30
+ # end
31
+
32
+ it 'defines a receiver for the given field' do
33
+ subject.receive.send(test_field).should == test_default
34
+ end
35
+
36
+ end
37
+
38
+ context 'receive' do
39
+
40
+ it 'resolves configuration in order' do
41
+ subject.settings.should_receive(:load_configuration_in_order!).and_return({})
42
+ subject.receive
43
+ end
44
+
45
+ before do
46
+ subject.class_eval do
47
+ config :yo_momma, String, :default => 'is so ugly'
48
+ config :she, String
49
+ end
50
+ subject.stub(:settings).and_return(test_settings)
51
+ end
52
+
53
+ let(:creation_attrs) { { yo_momma: 'is so fat', she: 'eats wheat THICKS' } }
54
+ let(:configuration) { { yo_momma: 'is so dumb', she: 'got hit by a parked car' } }
55
+ let(:test_settings) { double :settings, :load_configuration_in_order! => configuration }
56
+
57
+ it 'overrides attributes with configuration settings' do
58
+ subject.receive(creation_attrs).attributes.should include(creation_attrs.merge(configuration))
59
+ end
60
+ end
61
+ end
62
+
data/spec/spec_helper.rb CHANGED
@@ -15,7 +15,8 @@ $LOAD_PATH.unshift(GORILLIB_ROOT_DIR('lib'))
15
15
  $LOAD_PATH.unshift(GORILLIB_ROOT_DIR('spec/support'))
16
16
 
17
17
  require_relative 'support/gorillib_test_helpers'
18
- Dir[GORILLIB_ROOT_DIR('spec/support/matchers/*.rb')].each{|f| require f}
18
+ Dir[GORILLIB_ROOT_DIR('spec/support/matchers/*.rb')].each {|f| require f}
19
+ Dir[GORILLIB_ROOT_DIR('spec/support/shared_examples/*.rb')].each {|f| require f}
19
20
 
20
21
  RSpec.configure do |config|
21
22
  include Gorillib::TestHelpers
@@ -0,0 +1,20 @@
1
+ shared_context 'included_module' do
2
+
3
+ let(:included_module) { described_class }
4
+ let(:klass_name) { 'FakeModel' }
5
+
6
+ def create_fake_model_klass name
7
+ klass = self.class.const_set(name.to_sym, Class.new)
8
+ mod = included_module
9
+ klass.class_eval{ include(mod) }
10
+ klass
11
+ end
12
+
13
+ def remove_fake_model_klass name
14
+ self.class.send(:remove_const, name.to_sym) if self.class.const_defined? name.to_sym
15
+ end
16
+
17
+ subject { create_fake_model_klass(klass_name) }
18
+ after(:each) { remove_fake_model_klass(klass_name) }
19
+
20
+ end
metadata CHANGED
@@ -1,120 +1,126 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gorillib
3
- version: !ruby/object:Gem::Version
4
- version: 0.4.2pre
5
- prerelease: 5
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.4.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Infochimps
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-18 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2012-09-06 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: multi_json
16
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &id001 !ruby/object:Gem::Requirement
17
18
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '1.1'
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "1.1"
22
23
  type: :runtime
23
24
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: json
28
+ requirement: &id002 !ruby/object:Gem::Requirement
25
29
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '1.1'
30
- - !ruby/object:Gem::Dependency
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
38
+ name: configliere
39
+ requirement: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.4.13
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
31
49
  name: bundler
32
- requirement: !ruby/object:Gem::Requirement
50
+ requirement: &id004 !ruby/object:Gem::Requirement
33
51
  none: false
34
- requirements:
52
+ requirements:
35
53
  - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '1.1'
54
+ - !ruby/object:Gem::Version
55
+ version: "1.1"
38
56
  type: :development
39
57
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '1.1'
46
- - !ruby/object:Gem::Dependency
47
- name: rake
48
- requirement: !ruby/object:Gem::Requirement
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: jeweler
61
+ requirement: &id005 !ruby/object:Gem::Requirement
49
62
  none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: "1.6"
54
67
  type: :development
55
68
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: yard
64
- requirement: !ruby/object:Gem::Requirement
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
+ name: pry
72
+ requirement: &id006 !ruby/object:Gem::Requirement
65
73
  none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0.7'
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
70
78
  type: :development
71
79
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0.7'
78
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
79
82
  name: rspec
80
- requirement: !ruby/object:Gem::Requirement
83
+ requirement: &id007 !ruby/object:Gem::Requirement
81
84
  none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '2.8'
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: "2.8"
86
89
  type: :development
87
90
  prerelease: false
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
95
- name: jeweler
96
- requirement: !ruby/object:Gem::Requirement
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
+ name: rake
94
+ requirement: &id008 !ruby/object:Gem::Requirement
97
95
  none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '1.6'
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: "0"
102
100
  type: :development
103
101
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
+ name: yard
105
+ requirement: &id009 !ruby/object:Gem::Requirement
105
106
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '1.6'
110
- description: ! 'Gorillib: infochimps lightweight subset of ruby convenience methods'
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: "0.7"
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *id009
114
+ description: "Gorillib: infochimps lightweight subset of ruby convenience methods"
111
115
  email: coders@infochimps.org
112
116
  executables: []
117
+
113
118
  extensions: []
114
- extra_rdoc_files:
119
+
120
+ extra_rdoc_files:
115
121
  - LICENSE.md
116
122
  - README.md
117
- files:
123
+ files:
118
124
  - .gitignore
119
125
  - .rspec
120
126
  - .yardopts
@@ -141,6 +147,8 @@ files:
141
147
  - lib/gorillib/builder.rb
142
148
  - lib/gorillib/collection.rb
143
149
  - lib/gorillib/collection/model_collection.rb
150
+ - lib/gorillib/configurable.rb
151
+ - lib/gorillib/data_munging.rb
144
152
  - lib/gorillib/datetime/parse.rb
145
153
  - lib/gorillib/datetime/to_flat.rb
146
154
  - lib/gorillib/deprecated/array/average.rb
@@ -216,14 +224,6 @@ files:
216
224
  - lib/gorillib/utils/console.rb
217
225
  - lib/gorillib/utils/edge_cases.rb
218
226
  - lib/gorillib/utils/nuke_constants.rb
219
- - notes/HOWTO.md
220
- - notes/bucket.md
221
- - notes/builder.md
222
- - notes/collection.md
223
- - notes/factories.md
224
- - notes/model-overlay.md
225
- - notes/model.md
226
- - notes/structured-data-classes.md
227
227
  - spec/examples/builder/ironfan_spec.rb
228
228
  - spec/extlib/hash_spec.rb
229
229
  - spec/extlib/mash_spec.rb
@@ -232,6 +232,7 @@ files:
232
232
  - spec/gorillib/array/simple_statistics_spec.rb
233
233
  - spec/gorillib/builder_spec.rb
234
234
  - spec/gorillib/collection_spec.rb
235
+ - spec/gorillib/configurable_spec.rb
235
236
  - spec/gorillib/datetime/parse_spec.rb
236
237
  - spec/gorillib/datetime/to_flat_spec.rb
237
238
  - spec/gorillib/enumerable/sum_spec.rb
@@ -282,88 +283,95 @@ files:
282
283
  - spec/support/matchers/enumerate_method.rb
283
284
  - spec/support/matchers/evaluate_to_true.rb
284
285
  - spec/support/model_test_helpers.rb
286
+ - spec/support/shared_examples/included_module.rb
285
287
  homepage: https://github.com/infochimps-labs/gorillib
286
- licenses:
288
+ licenses:
287
289
  - Apache 2.0
288
290
  post_install_message:
289
291
  rdoc_options: []
290
- require_paths:
292
+
293
+ require_paths:
291
294
  - lib
292
- required_ruby_version: !ruby/object:Gem::Requirement
295
+ required_ruby_version: !ruby/object:Gem::Requirement
293
296
  none: false
294
- requirements:
295
- - - ! '>='
296
- - !ruby/object:Gem::Version
297
- version: '0'
298
- required_rubygems_version: !ruby/object:Gem::Requirement
297
+ requirements:
298
+ - - ">="
299
+ - !ruby/object:Gem::Version
300
+ hash: -2648422057706542462
301
+ segments:
302
+ - 0
303
+ version: "0"
304
+ required_rubygems_version: !ruby/object:Gem::Requirement
299
305
  none: false
300
- requirements:
301
- - - ! '>='
302
- - !ruby/object:Gem::Version
303
- version: '0'
306
+ requirements:
307
+ - - ">="
308
+ - !ruby/object:Gem::Version
309
+ version: "0"
304
310
  requirements: []
311
+
305
312
  rubyforge_project:
306
313
  rubygems_version: 1.8.24
307
314
  signing_key:
308
315
  specification_version: 3
309
316
  summary: include only what you need. No dependencies, no creep
310
- test_files:
311
- - spec/examples/builder/ironfan_spec.rb
312
- - spec/extlib/hash_spec.rb
317
+ test_files:
313
318
  - spec/extlib/mash_spec.rb
314
- - spec/gorillib/array/compact_blank_spec.rb
315
- - spec/gorillib/array/extract_options_spec.rb
316
- - spec/gorillib/array/simple_statistics_spec.rb
319
+ - spec/extlib/hash_spec.rb
320
+ - spec/support/gorillib_test_helpers.rb
321
+ - spec/support/hashlike_helper.rb
322
+ - spec/support/shared_examples/included_module.rb
323
+ - spec/support/hashlike_fuzzing_helper.rb
324
+ - spec/support/matchers/be_hash_eql.rb
325
+ - spec/support/matchers/be_array_eql.rb
326
+ - spec/support/matchers/enumerate_method.rb
327
+ - spec/support/matchers/evaluate_to_true.rb
328
+ - spec/support/model_test_helpers.rb
329
+ - spec/support/factory_test_helpers.rb
330
+ - spec/support/hashlike_via_delegation.rb
331
+ - spec/support/hashlike_struct_helper.rb
332
+ - spec/gorillib/model_spec.rb
317
333
  - spec/gorillib/builder_spec.rb
318
- - spec/gorillib/collection_spec.rb
319
- - spec/gorillib/datetime/parse_spec.rb
320
- - spec/gorillib/datetime/to_flat_spec.rb
321
- - spec/gorillib/enumerable/sum_spec.rb
334
+ - spec/gorillib/numeric/clamp_spec.rb
335
+ - spec/gorillib/string/human_spec.rb
336
+ - spec/gorillib/string/inflections_spec.rb
337
+ - spec/gorillib/string/inflector_test_cases.rb
338
+ - spec/gorillib/string/constantize_spec.rb
339
+ - spec/gorillib/string/truncate_spec.rb
340
+ - spec/gorillib/metaprogramming/class_attribute_spec.rb
341
+ - spec/gorillib/metaprogramming/singleton_class_spec.rb
342
+ - spec/gorillib/metaprogramming/delegation_spec.rb
343
+ - spec/gorillib/hashlike_spec.rb
322
344
  - spec/gorillib/exception/raisers_spec.rb
345
+ - spec/gorillib/utils/capture_output_spec.rb
346
+ - spec/gorillib/collection_spec.rb
347
+ - spec/gorillib/type/extended_spec.rb
348
+ - spec/gorillib/hash/zip_spec.rb
349
+ - spec/gorillib/hash/reverse_merge_spec.rb
350
+ - spec/gorillib/hash/slice_spec.rb
351
+ - spec/gorillib/hash/keys_spec.rb
323
352
  - spec/gorillib/hash/compact_spec.rb
324
353
  - spec/gorillib/hash/deep_compact_spec.rb
325
354
  - spec/gorillib/hash/deep_merge_spec.rb
326
- - spec/gorillib/hash/keys_spec.rb
327
- - spec/gorillib/hash/reverse_merge_spec.rb
328
- - spec/gorillib/hash/slice_spec.rb
329
- - spec/gorillib/hash/zip_spec.rb
330
- - spec/gorillib/hashlike/behave_same_as_hash_spec.rb
355
+ - spec/gorillib/datetime/parse_spec.rb
356
+ - spec/gorillib/datetime/to_flat_spec.rb
331
357
  - spec/gorillib/hashlike/deep_hash_spec.rb
332
358
  - spec/gorillib/hashlike/hashlike_behavior_spec.rb
333
359
  - spec/gorillib/hashlike/hashlike_via_accessors_spec.rb
334
- - spec/gorillib/hashlike_spec.rb
335
- - spec/gorillib/logger/log_spec.rb
336
- - spec/gorillib/metaprogramming/class_attribute_spec.rb
337
- - spec/gorillib/metaprogramming/delegation_spec.rb
338
- - spec/gorillib/metaprogramming/singleton_class_spec.rb
339
- - spec/gorillib/model/defaults_spec.rb
340
- - spec/gorillib/model/factories_spec.rb
360
+ - spec/gorillib/hashlike/behave_same_as_hash_spec.rb
361
+ - spec/gorillib/configurable_spec.rb
341
362
  - spec/gorillib/model/lint_spec.rb
342
- - spec/gorillib/model/overlay_spec.rb
363
+ - spec/gorillib/model/defaults_spec.rb
343
364
  - spec/gorillib/model/serialization_spec.rb
344
- - spec/gorillib/model_spec.rb
345
- - spec/gorillib/numeric/clamp_spec.rb
365
+ - spec/gorillib/model/overlay_spec.rb
366
+ - spec/gorillib/model/factories_spec.rb
367
+ - spec/gorillib/pathname_spec.rb
368
+ - spec/gorillib/enumerable/sum_spec.rb
369
+ - spec/gorillib/object/try_spec.rb
346
370
  - spec/gorillib/object/blank_spec.rb
347
371
  - spec/gorillib/object/try_dup_spec.rb
348
- - spec/gorillib/object/try_spec.rb
349
- - spec/gorillib/pathname_spec.rb
350
- - spec/gorillib/string/constantize_spec.rb
351
- - spec/gorillib/string/human_spec.rb
352
- - spec/gorillib/string/inflections_spec.rb
353
- - spec/gorillib/string/inflector_test_cases.rb
354
- - spec/gorillib/string/truncate_spec.rb
355
- - spec/gorillib/type/extended_spec.rb
356
- - spec/gorillib/utils/capture_output_spec.rb
372
+ - spec/gorillib/array/compact_blank_spec.rb
373
+ - spec/gorillib/array/simple_statistics_spec.rb
374
+ - spec/gorillib/array/extract_options_spec.rb
375
+ - spec/gorillib/logger/log_spec.rb
357
376
  - spec/spec_helper.rb
358
- - spec/support/factory_test_helpers.rb
359
- - spec/support/gorillib_test_helpers.rb
360
- - spec/support/hashlike_fuzzing_helper.rb
361
- - spec/support/hashlike_helper.rb
362
- - spec/support/hashlike_struct_helper.rb
363
- - spec/support/hashlike_via_delegation.rb
364
- - spec/support/matchers/be_array_eql.rb
365
- - spec/support/matchers/be_hash_eql.rb
366
- - spec/support/matchers/enumerate_method.rb
367
- - spec/support/matchers/evaluate_to_true.rb
368
- - spec/support/model_test_helpers.rb
369
- has_rdoc:
377
+ - spec/examples/builder/ironfan_spec.rb