naught 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +1 -1
  3. data/lib/naught/basic_object.rb +4 -14
  4. data/lib/naught/call_location.rb +131 -0
  5. data/lib/naught/caller_info.rb +128 -0
  6. data/lib/naught/chain_proxy.rb +51 -0
  7. data/lib/naught/conversions.rb +108 -34
  8. data/lib/naught/null_class_builder/command.rb +42 -4
  9. data/lib/naught/null_class_builder/commands/callstack.rb +89 -0
  10. data/lib/naught/null_class_builder/commands/define_explicit_conversions.rb +21 -9
  11. data/lib/naught/null_class_builder/commands/define_implicit_conversions.rb +19 -21
  12. data/lib/naught/null_class_builder/commands/impersonate.rb +13 -1
  13. data/lib/naught/null_class_builder/commands/mimic.rb +75 -31
  14. data/lib/naught/null_class_builder/commands/null_safe_proxy.rb +92 -0
  15. data/lib/naught/null_class_builder/commands/pebble.rb +21 -17
  16. data/lib/naught/null_class_builder/commands/predicates_return.rb +42 -24
  17. data/lib/naught/null_class_builder/commands/singleton.rb +14 -17
  18. data/lib/naught/null_class_builder/commands/traceable.rb +16 -11
  19. data/lib/naught/null_class_builder/commands.rb +10 -8
  20. data/lib/naught/null_class_builder.rb +213 -119
  21. data/lib/naught/stub_strategy.rb +30 -0
  22. data/lib/naught/version.rb +3 -1
  23. data/lib/naught.rb +31 -7
  24. metadata +34 -66
  25. data/.gitignore +0 -23
  26. data/.rspec +0 -2
  27. data/.rubocop.yml +0 -65
  28. data/.travis.yml +0 -24
  29. data/Changelog.md +0 -18
  30. data/Gemfile +0 -25
  31. data/Guardfile +0 -15
  32. data/README.markdown +0 -474
  33. data/Rakefile +0 -15
  34. data/naught.gemspec +0 -22
  35. data/spec/base_object_spec.rb +0 -46
  36. data/spec/basic_null_object_spec.rb +0 -34
  37. data/spec/blackhole_spec.rb +0 -14
  38. data/spec/explicit_conversions_spec.rb +0 -21
  39. data/spec/functions/actual_spec.rb +0 -22
  40. data/spec/functions/just_spec.rb +0 -22
  41. data/spec/functions/maybe_spec.rb +0 -35
  42. data/spec/functions/null_spec.rb +0 -33
  43. data/spec/implicit_conversions_spec.rb +0 -28
  44. data/spec/mimic_spec.rb +0 -123
  45. data/spec/naught/null_object_builder/command_spec.rb +0 -10
  46. data/spec/naught/null_object_builder_spec.rb +0 -31
  47. data/spec/naught_spec.rb +0 -93
  48. data/spec/pebble_spec.rb +0 -77
  49. data/spec/predicate_spec.rb +0 -79
  50. data/spec/singleton_null_object_spec.rb +0 -33
  51. data/spec/spec_helper.rb +0 -15
  52. data/spec/support/convertable_null.rb +0 -4
  53. data/spec/support/jruby.rb +0 -3
  54. data/spec/support/rubinius.rb +0 -3
  55. data/spec/support/ruby_18.rb +0 -3
@@ -1,189 +1,283 @@
1
- require 'naught/basic_object'
2
- require 'naught/conversions'
1
+ require "naught/basic_object"
2
+ require "naught/conversions"
3
+ require "naught/stub_strategy"
3
4
 
4
5
  module Naught
5
- class NullClassBuilder # rubocop:disable ClassLength
6
- # make sure this module exists
7
- module Commands
8
- end
6
+ # Builds customized null object classes via a small DSL
7
+ #
8
+ # @api public
9
+ class NullClassBuilder
10
+ # Namespace for builder command classes
11
+ # @api private
12
+ module Commands; end
13
+
14
+ # The base class for generated null objects
15
+ #
16
+ # @return [Class] base class for generated null objects
17
+ # @example
18
+ # builder.base_class #=> Naught::BasicObject
19
+ attr_accessor :base_class
20
+
21
+ # The inspect implementation for generated null objects
22
+ #
23
+ # @return [Proc] inspect implementation for generated null objects
24
+ # @example
25
+ # builder.inspect_proc.call #=> "<null>"
26
+ attr_accessor :inspect_proc
9
27
 
10
- attr_accessor :base_class, :inspect_proc, :interface_defined
28
+ # Whether a method-missing interface has been defined
29
+ #
30
+ # @return [Boolean] whether a method-missing interface has been defined
31
+ # @example
32
+ # builder.interface_defined #=> false
33
+ attr_accessor :interface_defined
34
+
35
+ # @!method interface_defined?
36
+ # Check if a method-missing interface has been defined
37
+ # @return [Boolean] true if interface is defined
38
+ # @example
39
+ # builder.interface_defined? #=> false
11
40
  alias_method :interface_defined?, :interface_defined
12
41
 
42
+ # Create a new builder with default configuration
43
+ # @api private
13
44
  def initialize
14
45
  @interface_defined = false
15
- @base_class = Naught::BasicObject
16
- @inspect_proc = lambda { '<null>' }
17
- @stub_strategy = :stub_method_returning_nil
46
+ @base_class = Naught::BasicObject
47
+ @inspect_proc = -> { "<null>" }
48
+ @stub_strategy = StubStrategy::ReturnNil
18
49
  define_basic_methods
19
50
  end
20
51
 
21
- def customize(&customization_block)
22
- return unless customization_block
23
- customization_module.module_exec(self, &customization_block)
52
+ # Apply a customization block to this builder
53
+ #
54
+ # @yieldparam builder [NullClassBuilder] builder instance
55
+ # @return [void]
56
+ # @example
57
+ # builder.customize { |b| b.black_hole }
58
+ def customize(&)
59
+ customization_module.module_exec(self, &) if block_given?
24
60
  end
25
61
 
26
- def customization_module
27
- @customization_module ||= Module.new
28
- end
62
+ # Returns the module that holds customization methods
63
+ #
64
+ # @return [Module] module that holds customization methods
65
+ # @example
66
+ # builder.customization_module #=> #<Module:0x...>
67
+ def customization_module = @customization_module ||= Module.new
29
68
 
30
- def null_equivalents
31
- @null_equivalents ||= [nil]
32
- end
69
+ # Returns the list of values treated as null-equivalent
70
+ #
71
+ # @return [Array<Object>] values treated as null-equivalent
72
+ # @example
73
+ # builder.null_equivalents #=> [nil]
74
+ def null_equivalents = @null_equivalents ||= [nil]
33
75
 
34
- def generate_class # rubocop:disable AbcSize
76
+ # Generate the null object class based on queued operations
77
+ #
78
+ # @return [Class] generated null class
79
+ # @example
80
+ # NullClass = builder.generate_class
81
+ def generate_class
35
82
  respond_to_any_message unless interface_defined?
36
- generation_mod = Module.new
37
- customization_mod = customization_module # get a local binding
38
- builder = self
39
83
 
84
+ generation_mod = Module.new
40
85
  apply_operations(operations, generation_mod)
41
86
 
42
- null_class = Class.new(@base_class) do
43
- const_set :GeneratedMethods, generation_mod
44
- const_set :Customizations, customization_mod
45
- const_set :NULL_EQUIVS, builder.null_equivalents
46
- include Conversions
47
- remove_const :NULL_EQUIVS
48
- Conversions.instance_methods.each do |instance_method|
49
- undef_method(instance_method)
50
- end
51
- const_set :Conversions, Conversions
52
-
53
- include NullObjectTag
54
- include generation_mod
55
- include customization_mod
56
- end
57
-
87
+ null_class = build_null_class(generation_mod)
58
88
  apply_operations(class_operations, null_class)
59
89
 
60
90
  null_class
61
91
  end
62
92
 
63
- ############################################################################
64
- # Builder API
65
- #
66
- # See also the contents of lib/naught/null_class_builder/commands
67
- ############################################################################
93
+ # Builder API - see also lib/naught/null_class_builder/commands
68
94
 
95
+ # Configure method stubs to return self (black hole behavior)
96
+ #
97
+ # @see https://github.com/avdi/naught/issues/72
98
+ # @return [void]
99
+ # @example
100
+ # builder.black_hole
69
101
  def black_hole
70
- @stub_strategy = :stub_method_returning_self
102
+ @stub_strategy = StubStrategy::ReturnSelf
103
+ # Prepend marshal methods to avoid infinite recursion with method_missing
104
+ defer_prepend_module do
105
+ define_method(:marshal_dump) { nil }
106
+ define_method(:marshal_load) { |*| nil }
107
+ end
71
108
  end
72
109
 
110
+ # Make null objects respond to any message
111
+ #
112
+ # @return [void]
113
+ # @example
114
+ # builder.respond_to_any_message
73
115
  def respond_to_any_message
74
- defer(:prepend => true) do |subject|
75
- subject.module_eval do
76
- def respond_to?(*)
77
- true
78
- end
79
- end
116
+ defer(prepend: true) do |subject|
117
+ subject.define_method(:respond_to?) { |*, **| true }
80
118
  stub_method(subject, :method_missing)
81
119
  end
82
120
  @interface_defined = true
83
121
  end
84
122
 
85
- def defer(options = {}, &deferred_operation)
86
- list = options[:class] ? class_operations : operations
87
- if options[:prepend]
88
- list.unshift(deferred_operation)
89
- else
90
- list << deferred_operation
91
- end
123
+ # Queue a deferred operation to be applied during class generation
124
+ #
125
+ # @param options [Hash] :class for class-level, :prepend to add at front
126
+ # @yieldparam subject [Module, Class] target of the operation
127
+ # @return [void]
128
+ # @example
129
+ # builder.defer { |subject| subject.define_method(:foo) { "bar" } }
130
+ def defer(options = {}, &operation)
131
+ target = options[:class] ? class_operations : operations
132
+ options[:prepend] ? target.unshift(operation) : target.push(operation)
92
133
  end
93
134
 
94
- def stub_method(subject, name)
95
- send(@stub_strategy, subject, name)
135
+ # Prepend a module generated from the given block
136
+ #
137
+ # @return [void]
138
+ # @example
139
+ # builder.defer_prepend_module { define_method(:foo) { "bar" } }
140
+ def defer_prepend_module(&)
141
+ prepend_modules << Module.new(&)
96
142
  end
97
143
 
98
- def method_missing(method_name, *args, &block)
99
- command_name = command_name_for_method(method_name)
100
- if Commands.const_defined?(command_name)
101
- command_class = Commands.const_get(command_name)
102
- command_class.new(self, *args, &block).call
103
- else
104
- super
105
- end
144
+ # Stub a method using the current stub strategy
145
+ #
146
+ # @param subject [Module, Class] target to define method on
147
+ # @param name [Symbol] method name to stub
148
+ # @return [void]
149
+ # @example
150
+ # builder.stub_method(some_module, :foo)
151
+ def stub_method(subject, name)
152
+ @stub_strategy.apply(subject, name)
106
153
  end
107
154
 
108
- if RUBY_VERSION >= '1.9'
109
- def respond_to_missing?(method_name, include_private = false)
110
- respond_to_definition(method_name, include_private, :respond_to_missing?)
111
- end
112
- else
113
- def respond_to?(method_name, include_private = false)
114
- respond_to_definition(method_name, include_private, :respond_to?)
115
- end
155
+ # Dispatch builder DSL calls to command classes
156
+ # @return [void]
157
+ # @api private
158
+ def method_missing(method_name, *args, &)
159
+ command_class = lookup_command(method_name)
160
+ command_class ? command_class.new(self, *args, &).call : super
116
161
  end
117
162
 
118
- private
119
-
120
- def respond_to_definition(method_name, include_private, respond_to_method_name)
121
- command_name = command_name_for_method(method_name)
122
- Commands.const_defined?(command_name) ||
123
- super_duper(respond_to_method_name, method_name, include_private)
163
+ # Check if builder responds to a DSL command
164
+ #
165
+ # @param method_name [Symbol] method name to check
166
+ # @param include_private [Boolean] whether to include private methods
167
+ # @return [Boolean] true if method_name maps to a known command
168
+ # @api private
169
+ def respond_to_missing?(method_name, include_private = false)
170
+ !lookup_command(method_name).nil? || super
124
171
  rescue NameError
125
- super_duper(respond_to_method_name, method_name, include_private)
172
+ super
126
173
  end
127
174
 
128
- def super_duper(method_name, *args)
129
- self.class.superclass.send(method_name, *args)
175
+ private
176
+
177
+ # Build the null object class with all configured modules
178
+ #
179
+ # @param generation_mod [Module] module containing generated methods
180
+ # @return [Class] the null object class
181
+ # @api private
182
+ def build_null_class(generation_mod)
183
+ customization_mod = customization_module
184
+ null_equivs = null_equivalents
185
+ modules_to_prepend = prepend_modules
186
+
187
+ Class.new(@base_class) do
188
+ const_set :GeneratedMethods, generation_mod
189
+ const_set :Customizations, customization_mod
190
+
191
+ conversions_mod = Module.new { include Conversions }
192
+ Conversions.configure(conversions_mod, null_class: self, null_equivs: null_equivs)
193
+ const_set :Conversions, conversions_mod
194
+
195
+ include NullObjectTag
196
+ include generation_mod
197
+ include customization_mod
198
+
199
+ modules_to_prepend.each { |mod| prepend mod }
200
+ end
130
201
  end
131
202
 
203
+ # Define the basic methods required by all null objects
204
+ #
205
+ # @return [void]
206
+ # @api private
132
207
  def define_basic_methods
133
208
  define_basic_instance_methods
134
209
  define_basic_class_methods
135
210
  end
136
211
 
137
- def apply_operations(operations, module_or_class)
138
- operations.each do |operation|
139
- operation.call(module_or_class)
140
- end
212
+ # Apply deferred operations to the target module or class
213
+ #
214
+ # @param ops [Array<Proc>] operations to apply
215
+ # @param target [Module, Class] target for the operations
216
+ # @return [void]
217
+ # @api private
218
+ def apply_operations(ops, target)
219
+ ops.each { |op| op.call(target) }
141
220
  end
142
221
 
222
+ # Define the basic instance methods for null objects
223
+ #
224
+ # @return [void]
225
+ # @api private
143
226
  def define_basic_instance_methods
227
+ builder = self
144
228
  defer do |subject|
145
- subject.module_exec(@inspect_proc) do |inspect_proc|
146
- define_method(:inspect, &inspect_proc)
147
- def initialize(*)
148
- end
149
- end
229
+ subject.define_method(:inspect, &builder.inspect_proc)
230
+ subject.define_method(:initialize) { |*, **, &| }
150
231
  end
151
232
  end
152
233
 
234
+ # Define the basic class methods for null objects
235
+ #
236
+ # @return [void]
237
+ # @api private
153
238
  def define_basic_class_methods
154
- defer(:class => true) do |subject|
155
- subject.module_eval do
156
- class << self
157
- alias_method :get, :new
158
- end
159
- klass = self
160
- define_method(:class) { klass }
239
+ defer(class: true) do |klass|
240
+ klass.define_singleton_method(:get) do |*args, **kwargs, &block|
241
+ kw = kwargs #: Hash[Symbol, untyped]
242
+ new(*args, **kw, &block)
161
243
  end
244
+ klass.define_method(:class) { klass }
162
245
  end
163
246
  end
164
247
 
165
- def class_operations
166
- @class_operations ||= []
167
- end
248
+ # Returns the list of class-level operations
249
+ #
250
+ # @return [Array<Proc>] class-level operations
251
+ # @api private
252
+ def class_operations = @class_operations ||= []
168
253
 
169
- def operations
170
- @operations ||= []
171
- end
254
+ # Returns the list of instance-level operations
255
+ #
256
+ # @return [Array<Proc>] instance-level operations
257
+ # @api private
258
+ def operations = @operations ||= []
172
259
 
173
- def stub_method_returning_nil(subject, name)
174
- subject.module_eval do
175
- define_method(name) { |*| nil }
176
- end
177
- end
260
+ # Returns the list of modules to prepend
261
+ #
262
+ # @return [Array<Module>] modules to prepend to the null class
263
+ # @api private
264
+ def prepend_modules = @prepend_modules ||= []
178
265
 
179
- def stub_method_returning_self(subject, name)
180
- subject.module_eval do
181
- define_method(name) { |*| self }
182
- end
266
+ # Look up a command class by method name
267
+ #
268
+ # @param method_name [Symbol] method name to look up
269
+ # @return [Class, nil] command class if found, nil otherwise
270
+ # @api private
271
+ def lookup_command(method_name)
272
+ command_name = camelize(method_name)
273
+ Commands.const_get(command_name) if Commands.const_defined?(command_name)
183
274
  end
184
275
 
185
- def command_name_for_method(method_name)
186
- method_name.to_s.gsub(/(?:^|_)([a-z])/) { Regexp.last_match[1].upcase }
187
- end
276
+ # Convert a snake_case method name to CamelCase
277
+ #
278
+ # @param name [Symbol, String] the name to convert
279
+ # @return [String] the CamelCase version
280
+ # @api private
281
+ def camelize(name) = name.to_s.gsub(/(?:^|_)([a-z])/) { ::Regexp.last_match(1).upcase }
188
282
  end
189
283
  end
@@ -0,0 +1,30 @@
1
+ module Naught
2
+ # Strategies for stubbing methods on null objects
3
+ #
4
+ # @api private
5
+ module StubStrategy
6
+ # Stub that returns nil from any method
7
+ module ReturnNil
8
+ # Define a method that returns nil
9
+ #
10
+ # @param subject [Module, Class] target to define method on
11
+ # @param name [Symbol] method name to define
12
+ # @return [void]
13
+ def self.apply(subject, name)
14
+ subject.define_method(name) { |*, **, &| nil }
15
+ end
16
+ end
17
+
18
+ # Stub that returns self from any method (black hole)
19
+ module ReturnSelf
20
+ # Define a method that returns self
21
+ #
22
+ # @param subject [Module, Class] target to define method on
23
+ # @param name [Symbol] method name to define
24
+ # @return [void]
25
+ def self.apply(subject, name)
26
+ subject.define_method(name) { |*, **, &| self }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,5 @@
1
+ # Top-level namespace for Naught
1
2
  module Naught
2
- VERSION = '1.1.0'
3
+ # Gem version
4
+ VERSION = "2.0.0"
3
5
  end
data/lib/naught.rb CHANGED
@@ -1,13 +1,37 @@
1
- require 'naught/version'
2
- require 'naught/null_class_builder'
3
- require 'naught/null_class_builder/commands'
1
+ require "naught/version"
2
+ require "naught/caller_info"
3
+ require "naught/null_class_builder"
4
+ require "naught/null_class_builder/commands"
4
5
 
6
+ # Top-level namespace for Naught null object helpers
7
+ #
8
+ # @example Create a basic null object class
9
+ # NullObject = Naught.build
10
+ # null = NullObject.new
11
+ # null.foo #=> nil
12
+ #
13
+ # @example Create a black hole null object
14
+ # BlackHole = Naught.build(&:black_hole)
15
+ # BlackHole.new.foo.bar.baz #=> <null>
16
+ #
17
+ # @api public
5
18
  module Naught
6
- def self.build(&customization_block)
19
+ # Build a null object class using the builder DSL
20
+ #
21
+ # @example
22
+ # NullObject = Naught.build { |b| b.black_hole }
23
+ #
24
+ # @yieldparam builder [Naught::NullClassBuilder] builder DSL instance
25
+ # @return [Class] generated null class
26
+ def self.build(&)
7
27
  builder = NullClassBuilder.new
8
- builder.customize(&customization_block)
28
+ builder.customize(&)
9
29
  builder.generate_class
10
30
  end
11
- module NullObjectTag
12
- end
31
+
32
+ # Marker module mixed into generated null objects
33
+ module NullObjectTag; end
34
+
35
+ # Marker module for null-safe proxy wrappers
36
+ module NullSafeProxyTag; end
13
37
  end
metadata CHANGED
@@ -1,29 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naught
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avdi Grimm
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2015-09-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '1.3'
18
+ version: '2.0'
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - "~>"
23
+ - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '1.3'
25
+ version: '2.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '12.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '12.0'
27
40
  description: Naught is a toolkit for building Null Objects
28
41
  email:
29
42
  - avdi@avdi.org
@@ -31,58 +44,36 @@ executables: []
31
44
  extensions: []
32
45
  extra_rdoc_files: []
33
46
  files:
34
- - ".gitignore"
35
- - ".rspec"
36
- - ".rubocop.yml"
37
- - ".travis.yml"
38
- - Changelog.md
39
- - Gemfile
40
- - Guardfile
41
47
  - LICENSE.txt
42
- - README.markdown
43
- - Rakefile
44
48
  - lib/naught.rb
45
49
  - lib/naught/basic_object.rb
50
+ - lib/naught/call_location.rb
51
+ - lib/naught/caller_info.rb
52
+ - lib/naught/chain_proxy.rb
46
53
  - lib/naught/conversions.rb
47
54
  - lib/naught/null_class_builder.rb
48
55
  - lib/naught/null_class_builder/command.rb
49
56
  - lib/naught/null_class_builder/commands.rb
57
+ - lib/naught/null_class_builder/commands/callstack.rb
50
58
  - lib/naught/null_class_builder/commands/define_explicit_conversions.rb
51
59
  - lib/naught/null_class_builder/commands/define_implicit_conversions.rb
52
60
  - lib/naught/null_class_builder/commands/impersonate.rb
53
61
  - lib/naught/null_class_builder/commands/mimic.rb
62
+ - lib/naught/null_class_builder/commands/null_safe_proxy.rb
54
63
  - lib/naught/null_class_builder/commands/pebble.rb
55
64
  - lib/naught/null_class_builder/commands/predicates_return.rb
56
65
  - lib/naught/null_class_builder/commands/singleton.rb
57
66
  - lib/naught/null_class_builder/commands/traceable.rb
67
+ - lib/naught/stub_strategy.rb
58
68
  - lib/naught/version.rb
59
- - naught.gemspec
60
- - spec/base_object_spec.rb
61
- - spec/basic_null_object_spec.rb
62
- - spec/blackhole_spec.rb
63
- - spec/explicit_conversions_spec.rb
64
- - spec/functions/actual_spec.rb
65
- - spec/functions/just_spec.rb
66
- - spec/functions/maybe_spec.rb
67
- - spec/functions/null_spec.rb
68
- - spec/implicit_conversions_spec.rb
69
- - spec/mimic_spec.rb
70
- - spec/naught/null_object_builder/command_spec.rb
71
- - spec/naught/null_object_builder_spec.rb
72
- - spec/naught_spec.rb
73
- - spec/pebble_spec.rb
74
- - spec/predicate_spec.rb
75
- - spec/singleton_null_object_spec.rb
76
- - spec/spec_helper.rb
77
- - spec/support/convertable_null.rb
78
- - spec/support/jruby.rb
79
- - spec/support/rubinius.rb
80
- - spec/support/ruby_18.rb
81
69
  homepage: https://github.com/avdi/naught
82
70
  licenses:
83
71
  - MIT
84
- metadata: {}
85
- post_install_message:
72
+ metadata:
73
+ homepage_uri: https://github.com/avdi/naught
74
+ source_code_uri: https://github.com/avdi/naught
75
+ changelog_uri: https://github.com/avdi/naught/blob/master/Changelog.md
76
+ rubygems_mfa_required: 'true'
86
77
  rdoc_options: []
87
78
  require_paths:
88
79
  - lib
@@ -90,37 +81,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
81
  requirements:
91
82
  - - ">="
92
83
  - !ruby/object:Gem::Version
93
- version: '0'
84
+ version: 3.2.0
94
85
  required_rubygems_version: !ruby/object:Gem::Requirement
95
86
  requirements:
96
87
  - - ">="
97
88
  - !ruby/object:Gem::Version
98
89
  version: '0'
99
90
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 2.4.5.1
102
- signing_key:
91
+ rubygems_version: 4.0.5
103
92
  specification_version: 4
104
93
  summary: Naught is a toolkit for building Null Objects
105
- test_files:
106
- - spec/base_object_spec.rb
107
- - spec/basic_null_object_spec.rb
108
- - spec/blackhole_spec.rb
109
- - spec/explicit_conversions_spec.rb
110
- - spec/functions/actual_spec.rb
111
- - spec/functions/just_spec.rb
112
- - spec/functions/maybe_spec.rb
113
- - spec/functions/null_spec.rb
114
- - spec/implicit_conversions_spec.rb
115
- - spec/mimic_spec.rb
116
- - spec/naught/null_object_builder/command_spec.rb
117
- - spec/naught/null_object_builder_spec.rb
118
- - spec/naught_spec.rb
119
- - spec/pebble_spec.rb
120
- - spec/predicate_spec.rb
121
- - spec/singleton_null_object_spec.rb
122
- - spec/spec_helper.rb
123
- - spec/support/convertable_null.rb
124
- - spec/support/jruby.rb
125
- - spec/support/rubinius.rb
126
- - spec/support/ruby_18.rb
94
+ test_files: []
data/.gitignore DELETED
@@ -1,23 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- /naught.org
19
- /naught.html
20
- /bin
21
- /TAGS
22
- /gems.tags
23
- /tags
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --order random