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
data/.gitignore CHANGED
@@ -53,5 +53,8 @@ pkg
53
53
  Gemfile.lock
54
54
  .rvmrc
55
55
  .rbenv-version
56
+ .rbenv-gemsets
57
+ .ruby-version
58
+ .buildpath
56
59
 
57
60
  .rbx
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "notes"]
2
+ path = notes
3
+ url = git://github.com/infochimps-labs/gorillib.wiki.git
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.9.2
5
+ - jruby-19mode # JRuby in 1.9 mode
6
+ - rbx-19mode
7
+
8
+ bundler_args: --without docs support
9
+
10
+ notifications:
11
+ email: false
data/Gemfile CHANGED
@@ -1,18 +1,6 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'multi_json', ">= 1.1"
4
- gem 'json'
5
- gem 'configliere', '>= 0.4.13'
6
-
7
- # Only gems that you want listed as development dependencies in the gemspec
8
- group :development do
9
- gem 'bundler', "~> 1.1"
10
- gem 'jeweler', ">= 1.6", :require => false
11
- gem 'pry'
12
- gem 'rspec', ">= 2.8", :require => false
13
- gem 'rake', :require => false
14
- gem 'yard', ">= 0.7", :require => false
15
- end
3
+ gemspec
16
4
 
17
5
  group :docs do
18
6
  gem 'redcarpet', ">= 2.1", :platform => [:ruby]
@@ -22,12 +10,10 @@ end
22
10
  # Gems for testing and coverage
23
11
  group :test do
24
12
  gem 'simplecov', ">= 0.5", :platform => [:ruby_19], :require => false
25
- gem 'json'
26
13
  end
27
14
 
28
15
  # Gems you would use if hacking on this gem (rather than with it)
29
16
  group :support do
30
- gem 'pry'
31
17
  # gem 'perftools.rb', :platform => [:mri]
32
18
  #
33
19
  gem 'guard', ">= 1.0", :platform => [:ruby_19]
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ require 'bundler/gem_tasks'
2
+
1
3
  require 'rubygems' unless defined?(Gem)
2
4
  require 'bundler/setup'
3
5
  Bundler.setup(:default, :development)
@@ -21,77 +23,3 @@ require 'yard'
21
23
  YARD::Rake::YardocTask.new do
22
24
  Bundler.setup(:default, :development, :docs)
23
25
  end
24
-
25
- # <<<<<<< HEAD
26
- require 'jeweler'
27
- Jeweler::Tasks.new do |gem|
28
- Bundler.setup(:default, :development, :test)
29
- gem.name = 'gorillib'
30
- gem.homepage = 'https://github.com/infochimps-labs/gorillib'
31
- gem.license = 'Apache 2.0'
32
- gem.email = 'coders@infochimps.org'
33
- gem.authors = ['Infochimps']
34
-
35
- gem.summary = %Q{include only what you need. No dependencies, no creep}
36
- gem.description = %Q{Gorillib: infochimps lightweight subset of ruby convenience methods}
37
-
38
- ignores = File.readlines(".gitignore").grep(/^[^#]\S+/).map{|s| s.chomp }
39
- dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
40
- gem.files = dotfiles + Dir["**/*"].
41
- reject{|f| f =~ %r{^(vendor|coverage|old|away)/} }.
42
- reject{|f| File.directory?(f) }.
43
- reject{|f| ignores.any?{|i| File.fnmatch(i, f) || File.fnmatch(i+'/**/*', f) || File.fnmatch(i+'/*', f) } }
44
- gem.test_files = gem.files.grep(/^spec\//)
45
- gem.extra_rdoc_files = [gem.files.grep(/^notes\//), gem.files.grep(/\.md$/)].flatten.uniq
46
- gem.require_paths = ['lib']
47
- end
48
- Jeweler::RubygemsDotOrgTasks.new
49
- # =======
50
- # Bundler::GemHelper.install_tasks
51
- #
52
- # # require 'jeweler'
53
- # # Jeweler::Tasks.new do |gem|
54
- # # # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
55
- # # gem.name = "gorillib"
56
- # # gem.homepage = "http://infochimps.com/labs"
57
- # # gem.license = "MIT"
58
- # # gem.summary = %Q{include only what you need. No dependencies, no creep}
59
- # # gem.description = %Q{Gorillib: infochimps lightweight subset of ruby convenience methods}
60
- # # gem.email = "coders@infochimps.org"
61
- # # gem.authors = ["Infochimps"]
62
- #
63
- # # ignores = File.readlines(".gitignore").grep(/^[^#]\S+/).map{|s| s.chomp }
64
- # # dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
65
- # # gem.files = dotfiles + Dir["**/*"].
66
- # # reject{|f| f =~ %r{^(vendor|coverage)/} }.
67
- # # reject{|f| File.directory?(f) }.
68
- # # reject{|f| ignores.any?{|i| File.fnmatch(i, f) || File.fnmatch(i+'/**/*', f) || File.fnmatch(i+'/*', f) } }
69
- # # gem.test_files = gem.files.grep(/^spec\//)
70
- # # gem.require_paths = ['lib']
71
- # # end
72
- # # Jeweler::RubygemsDotOrgTasks.new
73
- #
74
- # require 'rspec/core'
75
- # require 'rspec/core/rake_task'
76
- # RSpec::Core::RakeTask.new(:spec) do |spec|
77
- # Bundler.setup(:default, :development, :test)
78
- # spec.pattern = FileList['spec/**/*_spec.rb']
79
- # end
80
- #
81
- # # RSpec::Core::RakeTask.new(:rcov) do |spec|
82
- # # Bundler.setup(:default, :development, :test)
83
- # # spec.pattern = 'spec/**/*_spec.rb'
84
- # # spec.rcov = true
85
- # # spec.rcov_opts = %w[ --exclude .rvm --no-comments --text-summary]
86
- # # end
87
- #
88
- # require 'yard'
89
- # YARD::Rake::YardocTask.new do
90
- # Bundler.setup(:default, :development, :docs)
91
- # end
92
- #
93
- # # App-specific tasks
94
- # Dir[File.dirname(__FILE__)+'/lib/tasks/**/*.rake'].sort.each{|f| load f }
95
- #
96
- # task :default => :spec
97
- # >>>>>>> 0e8b5729b159c7aa8c596c4d5bc1757f7562e71b
@@ -0,0 +1,180 @@
1
+ require 'spec_helper'
2
+ require 'gorillib/metaprogramming/aliasing'
3
+
4
+ module BarMethodAliaser
5
+ def self.included(foo_class)
6
+ foo_class.class_eval do
7
+ include BarMethods
8
+ alias_method_chain :bar, :baz
9
+ end
10
+ end
11
+ end
12
+
13
+ module BarMethods
14
+ def bar_with_baz
15
+ bar_without_baz << '_with_baz'
16
+ end
17
+
18
+ def quux_with_baz!
19
+ quux_without_baz! << '_with_baz'
20
+ end
21
+
22
+ def quux_with_baz?
23
+ false
24
+ end
25
+
26
+ def quux_with_baz=(v)
27
+ send(:quux_without_baz=, v) << '_with_baz'
28
+ end
29
+
30
+ def duck_with_orange
31
+ duck_without_orange << '_with_orange'
32
+ end
33
+ end
34
+
35
+ describe 'metaprogramming', :metaprogramming_spec => true do
36
+ before do
37
+ Object.const_set :FooClassWithBarMethod, Class.new{ def bar() 'bar' end }
38
+ @instance = FooClassWithBarMethod.new
39
+ end
40
+
41
+ after do
42
+ Object.instance_eval { remove_const :FooClassWithBarMethod }
43
+ end
44
+
45
+ describe 'alias_method_chain' do
46
+
47
+ it 'does not have an effect if already provided by another library.' unless ENV['QUIET_RSPEC']
48
+
49
+ it 'creates a with_ and without_ method that chain' do
50
+ @instance.should respond_to(:bar)
51
+ feature_aliases = [:bar_with_baz, :bar_without_baz]
52
+
53
+ feature_aliases.each do |method|
54
+ @instance.should_not respond_to(method)
55
+ end
56
+ @instance.bar.should == 'bar'
57
+
58
+ FooClassWithBarMethod.class_eval{ include BarMethodAliaser }
59
+ feature_aliases.each do |method|
60
+ @instance.should respond_to(method)
61
+ end
62
+ @instance.bar.should == 'bar_with_baz'
63
+ @instance.bar_without_baz.should == 'bar'
64
+ end
65
+
66
+ it 'with bang' do
67
+ FooClassWithBarMethod.class_eval do
68
+ def quux!; 'quux' end
69
+ end
70
+
71
+ @instance.should_not respond_to(:quux_with_baz!)
72
+ FooClassWithBarMethod.class_eval do
73
+ include BarMethodAliaser
74
+ alias_method_chain :quux!, :baz
75
+ end
76
+ @instance.should respond_to(:quux_with_baz!)
77
+
78
+ @instance.quux!.should == 'quux_with_baz'
79
+ @instance.quux_without_baz!.should == 'quux'
80
+ end
81
+
82
+ it 'with same names between predicates and bang methods' do
83
+ FooClassWithBarMethod.class_eval do
84
+ def quux!; 'quux!' end
85
+ def quux?; true end
86
+ def quux=(v); 'quux=' end
87
+ end
88
+
89
+ @instance.should_not respond_to(:quux_with_baz!)
90
+ @instance.should_not respond_to(:quux_with_baz?)
91
+ @instance.should_not respond_to(:quux_with_baz=)
92
+
93
+ FooClassWithBarMethod.class_eval { include BarMethodAliaser }
94
+ @instance.should respond_to(:quux_with_baz!)
95
+ @instance.should respond_to(:quux_with_baz?)
96
+ @instance.should respond_to(:quux_with_baz=)
97
+
98
+ FooClassWithBarMethod.alias_method_chain :quux!, :baz
99
+ @instance.quux!.should == 'quux!_with_baz'
100
+ @instance.quux_without_baz!.should == 'quux!'
101
+
102
+ FooClassWithBarMethod.alias_method_chain :quux?, :baz
103
+ @instance.quux?.should == false
104
+ @instance.quux_without_baz?.should == true
105
+
106
+ FooClassWithBarMethod.alias_method_chain :quux=, :baz
107
+ @instance.send(:quux=, 1234).should == 'quux=_with_baz'
108
+ @instance.send(:quux_without_baz=, 1234).should == 'quux='
109
+ end
110
+
111
+ it 'with_feature_punctuation' do
112
+ FooClassWithBarMethod.class_eval do
113
+ def quux; 'quux' end
114
+ def quux?; 'quux?' end
115
+ include BarMethodAliaser
116
+ alias_method_chain :quux, :baz!
117
+ end
118
+
119
+ @instance.quux_with_baz!.should == 'quux_with_baz'
120
+
121
+ lambda{ FooClassWithBarMethod.alias_method_chain :quux?, :baz! }.should raise_error(NameError)
122
+ end
123
+
124
+ it 'yields target and punctuation' do
125
+ args = nil
126
+ FooClassWithBarMethod.class_eval do
127
+ def quux?; end
128
+ include BarMethods
129
+
130
+ FooClassWithBarMethod.alias_method_chain :quux?, :baz do |target, punctuation|
131
+ args = [target, punctuation]
132
+ end
133
+ end
134
+
135
+ args.should_not be_nil
136
+ args[0].should == 'quux'
137
+ args[1].should == '?'
138
+ end
139
+
140
+ it 'preserves private method status' do
141
+ FooClassWithBarMethod.class_eval do
142
+ def duck; 'duck' end
143
+ include BarMethodAliaser
144
+ private :duck
145
+ alias_method_chain :duck, :orange
146
+ end
147
+
148
+ lambda{ @instance.duck }.should raise_error(NoMethodError)
149
+
150
+ @instance.instance_eval{ duck }.should == 'duck_with_orange'
151
+ FooClassWithBarMethod.should be_private_method_defined(:duck)
152
+ end
153
+
154
+ it 'preserves protected method status' do
155
+ FooClassWithBarMethod.class_eval do
156
+ def duck; 'duck' end
157
+ include BarMethodAliaser
158
+ protected :duck
159
+ alias_method_chain :duck, :orange
160
+ end
161
+
162
+ lambda{ @instance.duck }.should raise_error(NoMethodError)
163
+
164
+ @instance.instance_eval{ duck }.should == 'duck_with_orange'
165
+ FooClassWithBarMethod.should be_protected_method_defined(:duck)
166
+ end
167
+
168
+ it 'preserves public method status' do
169
+ FooClassWithBarMethod.class_eval do
170
+ def duck; 'duck' end
171
+ include BarMethodAliaser
172
+ public :duck
173
+ alias_method_chain :duck, :orange
174
+ end
175
+
176
+ @instance.duck.should == 'duck_with_orange'
177
+ FooClassWithBarMethod.should be_public_method_defined(:duck)
178
+ end
179
+ end
180
+ end
@@ -0,0 +1,17 @@
1
+ module Kernel
2
+ def assert(value, message="Assertion failed", error=StandardError)
3
+ raise error, message, caller unless value
4
+ end
5
+ end
6
+
7
+ class NullObject
8
+ def method_missing(*args, &block)
9
+ self
10
+ end
11
+
12
+ def nil?; true; end
13
+ end
14
+
15
+ def Maybe(value)
16
+ value.nil? ? NullObject.new : value
17
+ end
@@ -0,0 +1,33 @@
1
+ # spec/spec_helper_lite.rb
2
+
3
+ # Conditionally creates empty or "stub" modules only if
4
+ # a) they are not already defined; and
5
+ # b) they are not auto-loadable.
6
+ #
7
+ # From http://objectsonrails.com/#sec-7-1
8
+ #
9
+ # @example Faking out ActiveModel
10
+ # # ...
11
+ # require_relative '../spec_helper_lite'
12
+ # stub_module 'ActiveModel::Conversion'
13
+ # stub_module 'ActiveModel::Naming'
14
+ # require_relative '../../app/models/post'
15
+ # # ...
16
+ #
17
+ def stub_module(full_name)
18
+ # Uses #const_get to attempt to reference the given module. If the module is
19
+ # defined, or if calling #const_get causes it to be auto-loaded, the method
20
+ # does nothing more. But if #const_get fails to turn up the module, it defines
21
+ # an anonymous empty module to act as a placeholder.
22
+ full_name.to_s.split(/::/).inject(Object) do |context, name|
23
+ begin
24
+ context.const_get(name)
25
+ rescue NameError
26
+ context.const_set(name, Module.new)
27
+ end
28
+ end
29
+ end
30
+
31
+
32
+ # refute
33
+ # does_not_allow
data/gorillib.gemspec CHANGED
@@ -1,254 +1,39 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'gorillib/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "gorillib"
8
- s.version = "0.5.0"
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'gorillib'
8
+ gem.version = Gorillib::VERSION
9
+ gem.authors = %w[ Infochimps ]
10
+ gem.email = 'coders@infochimps.com'
11
+ gem.homepage = 'http://infochimps.com/labs'
12
+ gem.licenses = ['Apache 2.0']
13
+ gem.summary = 'include only what you need. No dependencies, no creep'
14
+ gem.description = 'Gorillib: infochimps lightweight subset of ruby convenience methods'
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.test_files = gem.files.grep(/^spec/)
17
+ gem.require_paths = %w[ lib ]
18
+
19
+ if gem.respond_to? :specification_version then
20
+ gem.specification_version = 3
9
21
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Infochimps"]
12
- s.date = "2012-10-22"
13
- s.description = "Gorillib: infochimps lightweight subset of ruby convenience methods"
14
- s.email = "coders@infochimps.org"
15
- s.extra_rdoc_files = [
16
- "CHANGELOG.md",
17
- "LICENSE.md",
18
- "README.md",
19
- "TODO.md",
20
- "notes/HOWTO.md",
21
- "notes/bucket.md",
22
- "notes/builder.md",
23
- "notes/collection.md",
24
- "notes/factories.md",
25
- "notes/model-overlay.md",
26
- "notes/model.md",
27
- "notes/structured-data-classes.md"
28
- ]
29
- s.files = [
30
- ".gitignore",
31
- ".rspec",
32
- ".yardopts",
33
- "CHANGELOG.md",
34
- "Gemfile",
35
- "Guardfile",
36
- "LICENSE.md",
37
- "README.md",
38
- "Rakefile",
39
- "TODO.md",
40
- "VERSION",
41
- "examples/benchmark/factories_benchmark.rb",
42
- "examples/builder/ironfan.rb",
43
- "examples/hash/slicing_methods.rb",
44
- "examples/model/simple.rb",
45
- "gorillib.gemspec",
46
- "lib/gorillib.rb",
47
- "lib/gorillib/array/compact_blank.rb",
48
- "lib/gorillib/array/deep_compact.rb",
49
- "lib/gorillib/array/extract_options.rb",
50
- "lib/gorillib/array/hashify.rb",
51
- "lib/gorillib/array/simple_statistics.rb",
52
- "lib/gorillib/array/wrap.rb",
53
- "lib/gorillib/base.rb",
54
- "lib/gorillib/builder.rb",
55
- "lib/gorillib/collection.rb",
56
- "lib/gorillib/collection/model_collection.rb",
57
- "lib/gorillib/configurable.rb",
58
- "lib/gorillib/data_munging.rb",
59
- "lib/gorillib/datetime/parse.rb",
60
- "lib/gorillib/datetime/to_flat.rb",
61
- "lib/gorillib/deprecated/array/average.rb",
62
- "lib/gorillib/deprecated/array/random.rb",
63
- "lib/gorillib/deprecated/array/sorted_median.rb",
64
- "lib/gorillib/deprecated/array/sorted_percentile.rb",
65
- "lib/gorillib/deprecated/array/sorted_sample.rb",
66
- "lib/gorillib/deprecated/metaprogramming/aliasing.rb",
67
- "lib/gorillib/enumerable/sum.rb",
68
- "lib/gorillib/exception/raisers.rb",
69
- "lib/gorillib/factories.rb",
70
- "lib/gorillib/hash/compact.rb",
71
- "lib/gorillib/hash/deep_compact.rb",
72
- "lib/gorillib/hash/deep_dup.rb",
73
- "lib/gorillib/hash/deep_merge.rb",
74
- "lib/gorillib/hash/keys.rb",
75
- "lib/gorillib/hash/mash.rb",
76
- "lib/gorillib/hash/reverse_merge.rb",
77
- "lib/gorillib/hash/slice.rb",
78
- "lib/gorillib/hash/zip.rb",
79
- "lib/gorillib/hashlike.rb",
80
- "lib/gorillib/hashlike/compact.rb",
81
- "lib/gorillib/hashlike/deep_compact.rb",
82
- "lib/gorillib/hashlike/deep_dup.rb",
83
- "lib/gorillib/hashlike/deep_hash.rb",
84
- "lib/gorillib/hashlike/deep_merge.rb",
85
- "lib/gorillib/hashlike/hashlike_via_accessors.rb",
86
- "lib/gorillib/hashlike/keys.rb",
87
- "lib/gorillib/hashlike/reverse_merge.rb",
88
- "lib/gorillib/hashlike/slice.rb",
89
- "lib/gorillib/logger/log.rb",
90
- "lib/gorillib/metaprogramming/class_attribute.rb",
91
- "lib/gorillib/metaprogramming/concern.rb",
92
- "lib/gorillib/metaprogramming/delegation.rb",
93
- "lib/gorillib/metaprogramming/remove_method.rb",
94
- "lib/gorillib/metaprogramming/singleton_class.rb",
95
- "lib/gorillib/model.rb",
96
- "lib/gorillib/model/active_model_conversion.rb",
97
- "lib/gorillib/model/active_model_naming.rb",
98
- "lib/gorillib/model/active_model_shim.rb",
99
- "lib/gorillib/model/base.rb",
100
- "lib/gorillib/model/defaults.rb",
101
- "lib/gorillib/model/doc_string.rb",
102
- "lib/gorillib/model/errors.rb",
103
- "lib/gorillib/model/factories.rb",
104
- "lib/gorillib/model/field.rb",
105
- "lib/gorillib/model/fixup.rb",
106
- "lib/gorillib/model/lint.rb",
107
- "lib/gorillib/model/named_schema.rb",
108
- "lib/gorillib/model/overlay.rb",
109
- "lib/gorillib/model/positional_fields.rb",
110
- "lib/gorillib/model/schema_magic.rb",
111
- "lib/gorillib/model/serialization.rb",
112
- "lib/gorillib/model/serialization/csv.rb",
113
- "lib/gorillib/model/serialization/json.rb",
114
- "lib/gorillib/model/serialization/lines.rb",
115
- "lib/gorillib/model/serialization/tsv.rb",
116
- "lib/gorillib/model/validate.rb",
117
- "lib/gorillib/numeric/clamp.rb",
118
- "lib/gorillib/object/blank.rb",
119
- "lib/gorillib/object/try.rb",
120
- "lib/gorillib/object/try_dup.rb",
121
- "lib/gorillib/pathname.rb",
122
- "lib/gorillib/pathname/utils.rb",
123
- "lib/gorillib/serialization/to_wire.rb",
124
- "lib/gorillib/some.rb",
125
- "lib/gorillib/string/constantize.rb",
126
- "lib/gorillib/string/human.rb",
127
- "lib/gorillib/string/inflections.rb",
128
- "lib/gorillib/string/inflector.rb",
129
- "lib/gorillib/string/simple_inflector.rb",
130
- "lib/gorillib/string/truncate.rb",
131
- "lib/gorillib/type/boolean.rb",
132
- "lib/gorillib/type/extended.rb",
133
- "lib/gorillib/type/ip_address.rb",
134
- "lib/gorillib/type/url.rb",
135
- "lib/gorillib/utils/capture_output.rb",
136
- "lib/gorillib/utils/console.rb",
137
- "lib/gorillib/utils/edge_cases.rb",
138
- "lib/gorillib/utils/nuke_constants.rb",
139
- "notes/HOWTO.md",
140
- "notes/bucket.md",
141
- "notes/builder.md",
142
- "notes/collection.md",
143
- "notes/factories.md",
144
- "notes/model-overlay.md",
145
- "notes/model.md",
146
- "notes/structured-data-classes.md",
147
- "spec/examples/builder/ironfan_spec.rb",
148
- "spec/extlib/hash_spec.rb",
149
- "spec/extlib/mash_spec.rb",
150
- "spec/gorillib/array/compact_blank_spec.rb",
151
- "spec/gorillib/array/extract_options_spec.rb",
152
- "spec/gorillib/array/hashify_spec.rb",
153
- "spec/gorillib/array/simple_statistics_spec.rb",
154
- "spec/gorillib/builder_spec.rb",
155
- "spec/gorillib/collection_spec.rb",
156
- "spec/gorillib/configurable_spec.rb",
157
- "spec/gorillib/datetime/parse_spec.rb",
158
- "spec/gorillib/datetime/to_flat_spec.rb",
159
- "spec/gorillib/enumerable/sum_spec.rb",
160
- "spec/gorillib/exception/raisers_spec.rb",
161
- "spec/gorillib/factories_spec.rb",
162
- "spec/gorillib/hash/compact_spec.rb",
163
- "spec/gorillib/hash/deep_compact_spec.rb",
164
- "spec/gorillib/hash/deep_merge_spec.rb",
165
- "spec/gorillib/hash/keys_spec.rb",
166
- "spec/gorillib/hash/reverse_merge_spec.rb",
167
- "spec/gorillib/hash/slice_spec.rb",
168
- "spec/gorillib/hash/zip_spec.rb",
169
- "spec/gorillib/hashlike/behave_same_as_hash_spec.rb",
170
- "spec/gorillib/hashlike/deep_hash_spec.rb",
171
- "spec/gorillib/hashlike/hashlike_behavior_spec.rb",
172
- "spec/gorillib/hashlike/hashlike_via_accessors_spec.rb",
173
- "spec/gorillib/hashlike_spec.rb",
174
- "spec/gorillib/logger/log_spec.rb",
175
- "spec/gorillib/metaprogramming/class_attribute_spec.rb",
176
- "spec/gorillib/metaprogramming/delegation_spec.rb",
177
- "spec/gorillib/metaprogramming/singleton_class_spec.rb",
178
- "spec/gorillib/model/defaults_spec.rb",
179
- "spec/gorillib/model/lint_spec.rb",
180
- "spec/gorillib/model/overlay_spec.rb",
181
- "spec/gorillib/model/serialization/tsv_spec.rb",
182
- "spec/gorillib/model/serialization_spec.rb",
183
- "spec/gorillib/model_spec.rb",
184
- "spec/gorillib/numeric/clamp_spec.rb",
185
- "spec/gorillib/object/blank_spec.rb",
186
- "spec/gorillib/object/try_dup_spec.rb",
187
- "spec/gorillib/object/try_spec.rb",
188
- "spec/gorillib/pathname_spec.rb",
189
- "spec/gorillib/string/constantize_spec.rb",
190
- "spec/gorillib/string/human_spec.rb",
191
- "spec/gorillib/string/inflections_spec.rb",
192
- "spec/gorillib/string/inflector_test_cases.rb",
193
- "spec/gorillib/string/truncate_spec.rb",
194
- "spec/gorillib/type/extended_spec.rb",
195
- "spec/gorillib/type/ip_address_spec.rb",
196
- "spec/gorillib/utils/capture_output_spec.rb",
197
- "spec/spec_helper.rb",
198
- "spec/support/factory_test_helpers.rb",
199
- "spec/support/gorillib_test_helpers.rb",
200
- "spec/support/hashlike_fuzzing_helper.rb",
201
- "spec/support/hashlike_helper.rb",
202
- "spec/support/hashlike_struct_helper.rb",
203
- "spec/support/hashlike_via_delegation.rb",
204
- "spec/support/matchers/be_array_eql.rb",
205
- "spec/support/matchers/be_hash_eql.rb",
206
- "spec/support/matchers/enumerate_method.rb",
207
- "spec/support/matchers/evaluate_to_true.rb",
208
- "spec/support/model_test_helpers.rb",
209
- "spec/support/shared_examples/included_module.rb"
210
- ]
211
- s.homepage = "https://github.com/infochimps-labs/gorillib"
212
- s.licenses = ["Apache 2.0"]
213
- s.require_paths = ["lib"]
214
- s.rubygems_version = "1.8.24"
215
- s.summary = "include only what you need. No dependencies, no creep"
216
- 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/type/ip_address_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/factories_spec.rb", "spec/gorillib/model/serialization/tsv_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/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/array/hashify_spec.rb", "spec/gorillib/logger/log_spec.rb", "spec/spec_helper.rb", "spec/examples/builder/ironfan_spec.rb"]
217
-
218
- if s.respond_to? :specification_version then
219
- s.specification_version = 3
220
-
221
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
222
- s.add_runtime_dependency(%q<multi_json>, [">= 1.1"])
223
- s.add_runtime_dependency(%q<json>, [">= 0"])
224
- s.add_runtime_dependency(%q<configliere>, [">= 0.4.13"])
225
- s.add_development_dependency(%q<bundler>, ["~> 1.1"])
226
- s.add_development_dependency(%q<jeweler>, [">= 1.6"])
227
- s.add_development_dependency(%q<pry>, [">= 0"])
228
- s.add_development_dependency(%q<rspec>, [">= 2.8"])
229
- s.add_development_dependency(%q<rake>, [">= 0"])
230
- s.add_development_dependency(%q<yard>, [">= 0.7"])
22
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0')
23
+ gem.add_runtime_dependency('multi_json', [">= 1.1"])
24
+ gem.add_runtime_dependency('configliere', [">= 0.4.13"])
231
25
  else
232
- s.add_dependency(%q<multi_json>, [">= 1.1"])
233
- s.add_dependency(%q<json>, [">= 0"])
234
- s.add_dependency(%q<configliere>, [">= 0.4.13"])
235
- s.add_dependency(%q<bundler>, ["~> 1.1"])
236
- s.add_dependency(%q<jeweler>, [">= 1.6"])
237
- s.add_dependency(%q<pry>, [">= 0"])
238
- s.add_dependency(%q<rspec>, [">= 2.8"])
239
- s.add_dependency(%q<rake>, [">= 0"])
240
- s.add_dependency(%q<yard>, [">= 0.7"])
26
+ gem.add_dependency('multi_json', [">= 1.1"])
27
+ gem.add_dependency('configliere', [">= 0.4.13"])
241
28
  end
242
29
  else
243
- s.add_dependency(%q<multi_json>, [">= 1.1"])
244
- s.add_dependency(%q<json>, [">= 0"])
245
- s.add_dependency(%q<configliere>, [">= 0.4.13"])
246
- s.add_dependency(%q<bundler>, ["~> 1.1"])
247
- s.add_dependency(%q<jeweler>, [">= 1.6"])
248
- s.add_dependency(%q<pry>, [">= 0"])
249
- s.add_dependency(%q<rspec>, [">= 2.8"])
250
- s.add_dependency(%q<rake>, [">= 0"])
251
- s.add_dependency(%q<yard>, [">= 0.7"])
30
+ gem.add_dependency('multi_json', [">= 1.1"])
31
+ gem.add_dependency('configliere', [">= 0.4.13"])
252
32
  end
253
- end
254
33
 
34
+ gem.add_development_dependency('bundler', ["~> 1.1"])
35
+ gem.add_development_dependency('pry', [">= 0"])
36
+ gem.add_development_dependency('rspec', [">= 2.8"])
37
+ gem.add_development_dependency('rake', [">= 0"])
38
+ gem.add_development_dependency('yard', [">= 0.7"])
39
+ end