Permalink
Browse files

Merge branch 'release/0.5.0'

  • Loading branch information...
2 parents ecb811e + 95d3448 commit d64e0e8e4ccd3998a6ccb8f8a651cb689e6e0b36 @benlangfeld benlangfeld committed Jun 1, 2011
View
@@ -1,9 +1,16 @@
+v0.5.0
+ Feature(radsaq): Add a #connected? method on Blather::Client
+ Feature(benlangfeld)[API change]: Allow the removal of child nodes from an IQ reply
+ Bugfix(zlu): Use rubygems properly in examples
+ Bugfix(benlangfeld): Remove code borrowed from ActiveSupport and instead depend on it to avoid version conflicts
+ Documentation(sprsquish)
+
v0.4.16
- Feature(benlangfeld): switch from jeweler to bundler
- Feature(benlangfeld): add cap support (XEP-0115)
- Bugfix(sprsquish): Better equality checking
- Bugfix(sprsquish): Fix #to_proc
- Bugfix(mironov): Skip private IPs by default
+ Feature(benlangfeld): switch from jeweler to bundler
+ Feature(benlangfeld): add cap support (XEP-0115)
+ Bugfix(sprsquish): Better equality checking
+ Bugfix(sprsquish): Fix #to_proc
+ Bugfix(mironov): Skip private IPs by default
v0.4.15
Feature(mironov): Implement XEP-0054: vcard-temp
View
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
s.add_dependency("eventmachine", ["~> 0.12.6"])
s.add_dependency("nokogiri", [">= 1.4.0"])
s.add_dependency("minitest", [">= 1.7.1"])
+ s.add_dependency("activesupport", [">= 3.0.7"])
s.add_development_dependency("minitest", ["~> 1.7.1"])
s.add_development_dependency("mocha", ["~> 0.9.12"])
View
@@ -8,7 +8,9 @@
digest/sha1
logger
- blather/core_ext/active_support
+ active_support/core_ext/class/inheritable_attributes
+ active_support/core_ext/object/blank
+
blather/core_ext/eventmachine
blather/core_ext/ipaddr
blather/core_ext/nokogiri
@@ -1,45 +0,0 @@
-require File.join(File.dirname(__FILE__), 'active_support', 'inheritable_attributes')
-
-class Object # @private
- def duplicable?; true; end
- def blank?; respond_to?(:empty?) ? empty? : !self; end
- def present?; !blank?; end
-end
-
-class Array # @private
- alias_method :blank?, :empty?
- def extract_options!; last.is_a?(::Hash) ? pop : {}; end
-end
-
-class Hash # @private
- alias_method :blank?, :empty?
-end
-
-class String # @private
- def blank?; self !~ /\S/; end
-end
-
-class NilClass # @private
- def duplicable?; false; end
- def blank?; true; end
-end
-
-class FalseClass # @private
- def duplicable?; false; end
- def blank?; true; end
-end
-
-class TrueClass # @private
- def duplicable?; false; end
- def blank?; false; end
-end
-
-class Symbol # @private
- def duplicable?; false; end
- def to_proc; Proc.new { |*args| args.shift.__send__(self, *args) }; end
-end
-
-class Numeric # @private
- def duplicable?; false; end
- def blank?; false; end
-end
@@ -1,119 +0,0 @@
-# Thanks to Rails ActiveSupport for everything in this file
-
-# Allows attributes to be shared within an inheritance hierarchy, but where each descendant gets a copy of
-# their parents' attributes, instead of just a pointer to the same. This means that the child can add elements
-# to, for example, an array without those additions being shared with either their parent, siblings, or
-# children, which is unlike the regular class-level attributes that are shared across the entire hierarchy.
-#
-# @private
-class Class
- def class_inheritable_reader(*syms)
- syms.each do |sym|
- next if sym.is_a?(Hash)
- class_eval <<-EOS
- def self.#{sym}
- read_inheritable_attribute(:#{sym})
- end
-
- def #{sym}
- self.class.#{sym}
- end
- EOS
- end
- end
-
- def class_inheritable_writer(*syms)
- syms.each do |sym|
- class_eval <<-EOS
- def self.#{sym}=(obj)
- write_inheritable_attribute(:#{sym}, obj)
- end
- EOS
- end
- end
-
- def class_inheritable_array_writer(*syms)
- syms.each do |sym|
- class_eval <<-EOS
- def self.#{sym}=(obj)
- write_inheritable_array(:#{sym}, obj)
- end
- EOS
- end
- end
-
- def class_inheritable_hash_writer(*syms)
- syms.each do |sym|
- class_eval <<-EOS
- def self.#{sym}=(obj)
- write_inheritable_hash(:#{sym}, obj)
- end
- EOS
- end
- end
-
- def class_inheritable_accessor(*syms)
- class_inheritable_reader(*syms)
- class_inheritable_writer(*syms)
- end
-
- def class_inheritable_array(*syms)
- class_inheritable_reader(*syms)
- class_inheritable_array_writer(*syms)
- end
-
- def class_inheritable_hash(*syms)
- class_inheritable_reader(*syms)
- class_inheritable_hash_writer(*syms)
- end
-
- def inheritable_attributes
- @inheritable_attributes ||= EMPTY_INHERITABLE_ATTRIBUTES
- end
-
- def write_inheritable_attribute(key, value)
- if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES)
- @inheritable_attributes = {}
- end
- inheritable_attributes[key] = value
- end
-
- def write_inheritable_array(key, elements)
- write_inheritable_attribute(key, []) if read_inheritable_attribute(key).nil?
- write_inheritable_attribute(key, read_inheritable_attribute(key) + elements)
- end
-
- def write_inheritable_hash(key, hash)
- write_inheritable_attribute(key, {}) if read_inheritable_attribute(key).nil?
- write_inheritable_attribute(key, read_inheritable_attribute(key).merge(hash))
- end
-
- def read_inheritable_attribute(key)
- inheritable_attributes[key]
- end
-
- def reset_inheritable_attributes
- @inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
- end
-
- private
- # Prevent this constant from being created multiple times
- EMPTY_INHERITABLE_ATTRIBUTES = {}.freeze unless const_defined?(:EMPTY_INHERITABLE_ATTRIBUTES)
-
- def inherited_with_inheritable_attributes(child)
- inherited_without_inheritable_attributes(child) if respond_to?(:inherited_without_inheritable_attributes)
-
- if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES)
- new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
- else
- new_inheritable_attributes = inheritable_attributes.inject({}) do |memo, (key, value)|
- memo.update(key => value.duplicable? ? value.dup : value)
- end
- end
-
- child.instance_variable_set('@inheritable_attributes', new_inheritable_attributes)
- end
-
- alias inherited_without_inheritable_attributes inherited
- alias inherited inherited_with_inheritable_attributes
-end # Class
@@ -1,4 +1,4 @@
module Blather
# Blather version number
- VERSION = '0.4.16'
+ VERSION = '0.5.0'
end

0 comments on commit d64e0e8

Please sign in to comment.