loquacious 1.6.1 → 1.6.2

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.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.6.2 / 2010-06-01
2
+
3
+ * Bug Fixes
4
+ * Compatibility with Ruby 1.9.2
5
+
1
6
  == 1.6.1 / 2010-04-19
2
7
 
3
8
  * 1 bug fix
@@ -49,11 +49,7 @@ module Loquacious
49
49
  alias :help :help_for
50
50
  end
51
51
 
52
- # Internal alias for the respond_to? method.
53
- #
54
- alias :__respond_to? :respond_to?
55
-
56
- Keepers = %r/^__|^object_id$|^\w+\?$/
52
+ Keepers = %r/^__|^object_id$|^initialize$|^\w+\?$/
57
53
  instance_methods(true).each do |m|
58
54
  next if m[Keepers]
59
55
  undef_method m
@@ -119,7 +115,7 @@ module Loquacious
119
115
  # Only invoke public methods on the Configuration instances.
120
116
  #
121
117
  def __send( symbol, *args, &block )
122
- if self.__respond_to? symbol
118
+ if self.respond_to? symbol
123
119
  self.__send__(symbol, *args, &block)
124
120
  else
125
121
  self.method_missing(symbol, *args, &block)
@@ -188,7 +184,6 @@ module Loquacious
188
184
  # configuration object.
189
185
  #
190
186
  class DSL
191
- Keepers = %r/^__|^object_id|^initialize$/
192
187
  instance_methods(true).each do |m|
193
188
  next if m[Keepers]
194
189
  undef_method m
@@ -12,7 +12,7 @@ module Loquacious
12
12
  #
13
13
  class Undefined
14
14
 
15
- Keepers = %r/^__|^object_id$|^initialize$|^kind_of\?$|^respond_to\?$|^call$/
15
+ Keepers = %r/^__|^object_id$|^initialize$|^call$|^\w+\?$/
16
16
  instance_methods(true).each do |m|
17
17
  next if m[Keepers]
18
18
  undef_method m
@@ -69,6 +69,12 @@ information about the undefined properties.
69
69
  #
70
70
  def nil?() true; end
71
71
 
72
+ # We can respond to any method except :call. The call method is reserved
73
+ # for Procs and lambdas, and it is used internally by loquacious for lazy
74
+ # evaluation of configuration parameters.
75
+ #
76
+ def respond_to_missing?( id, priv = false ) id != :call; end
77
+
72
78
  # For every method invoked on an undefined object, generate a warning
73
79
  # message describing the undefined value and the method that was called.
74
80
  #
@@ -1,5 +1,5 @@
1
1
 
2
- require File.join(File.dirname(__FILE__), %w[spec_helper])
2
+ require File.expand_path('spec_helper', File.dirname(__FILE__))
3
3
 
4
4
  describe Loquacious::Configuration do
5
5
  before(:all) do
data/spec/help_spec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- require File.join(File.dirname(__FILE__), %w[spec_helper])
2
+ require File.expand_path('spec_helper', File.dirname(__FILE__))
3
3
 
4
4
  describe Loquacious::Configuration::Help do
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- require File.join(File.dirname(__FILE__), %w[spec_helper])
2
+ require File.expand_path('spec_helper', File.dirname(__FILE__))
3
3
 
4
4
  describe Loquacious::Configuration::Iterator do
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- require File.join(File.dirname(__FILE__), %w[spec_helper])
2
+ require File.expand_path('spec_helper', File.dirname(__FILE__))
3
3
 
4
4
  describe Loquacious do
5
5
  before(:all) do
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,5 @@
1
1
 
2
- require File.expand_path(
3
- File.join(File.dirname(__FILE__), %w[.. lib loquacious]))
2
+ require File.expand_path('../lib/loquacious', File.dirname(__FILE__))
4
3
 
5
4
  Spec::Runner.configure do |config|
6
5
  # == Mock Framework
data/spec/string_spec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- require File.join(File.dirname(__FILE__), %w[spec_helper])
2
+ require File.expand_path('spec_helper', File.dirname(__FILE__))
3
3
 
4
4
  describe String do
5
5
 
data/version.txt CHANGED
@@ -1 +1 @@
1
- 1.6.1
1
+ 1.6.2
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 6
8
- - 1
9
- version: 1.6.1
8
+ - 2
9
+ version: 1.6.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Pease
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-19 00:00:00 -06:00
17
+ date: 2010-06-01 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency