Index: head/devel/rubygem-hashie/Makefile =================================================================== --- head/devel/rubygem-hashie/Makefile (revision 378532) +++ head/devel/rubygem-hashie/Makefile (revision 378533) @@ -1,22 +1,18 @@ # Created by: Cheng-Lung Sung # $FreeBSD$ PORTNAME= hashie PORTVERSION= 3.4.0 CATEGORIES= devel rubygems MASTER_SITES= RG -PATCHFILES= 09821f3c90755d019c5083174ab42f442e182767.diff -PATCH_SITES= https://github.com/intridea/hashie/commit/ -PATCH_DIST_STRIP=-p1 -S + # We don't care to patch CHANGELOG.md - MAINTAINER= ports@FreeBSD.org COMMENT= Hashie is a simple collection of useful Hash extensions LICENSE= MIT USE_RUBY= yes USE_RUBYGEMS= yes RUBYGEM_AUTOPLIST=yes .include Index: head/devel/rubygem-hashie/files/patch-lib_hashie_extensions_indifferent__access.rb =================================================================== --- head/devel/rubygem-hashie/files/patch-lib_hashie_extensions_indifferent__access.rb (nonexistent) +++ head/devel/rubygem-hashie/files/patch-lib_hashie_extensions_indifferent__access.rb (revision 378533) @@ -0,0 +1,31 @@ +--- lib/hashie/extensions/indifferent_access.rb.orig 2015-02-06 12:45:47 UTC ++++ lib/hashie/extensions/indifferent_access.rb +@@ -76,16 +76,16 @@ module Hashie + # is injecting itself into member hashes. + def convert! + keys.each do |k| +- regular_writer convert_key(k), convert_value(regular_delete(k)) ++ regular_writer convert_key(k), indifferent_value(regular_delete(k)) + end + self + end + +- def convert_value(value) ++ def indifferent_value(value) + if hash_lacking_indifference?(value) + IndifferentAccess.inject!(value) + elsif value.is_a?(::Array) +- value.replace(value.map { |e| convert_value(e) }) ++ value.replace(value.map { |e| indifferent_value(e) }) + else + value + end +@@ -104,7 +104,7 @@ module Hashie + end + + def indifferent_writer(key, value) +- regular_writer convert_key(key), convert_value(value) ++ regular_writer convert_key(key), indifferent_value(value) + end + + def indifferent_fetch(key, *args, &block) Property changes on: head/devel/rubygem-hashie/files/patch-lib_hashie_extensions_indifferent__access.rb ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/rubygem-hashie/files/patch-spec_hashie_extensions_indifferent__access__with__rails__hwia__spec.rb =================================================================== --- head/devel/rubygem-hashie/files/patch-spec_hashie_extensions_indifferent__access__with__rails__hwia__spec.rb (nonexistent) +++ head/devel/rubygem-hashie/files/patch-spec_hashie_extensions_indifferent__access__with__rails__hwia__spec.rb (revision 378533) @@ -0,0 +1,36 @@ +--- spec/hashie/extensions/indifferent_access_with_rails_hwia_spec.rb.orig 2015-02-06 12:45:47 UTC ++++ spec/hashie/extensions/indifferent_access_with_rails_hwia_spec.rb +@@ -1,8 +1,9 @@ + # This set of tests verifies that Hashie::Extensions::IndifferentAccess works with + # ActiveSupport HashWithIndifferentAccess hashes. See #164 and #166 for details. + +-require 'spec_helper' + require 'active_support/hash_with_indifferent_access' ++require 'active_support/core_ext/hash' ++require 'spec_helper' + + describe Hashie::Extensions::IndifferentAccess do + class IndifferentHashWithMergeInitializer < Hash +@@ -35,6 +36,10 @@ describe Hashie::Extensions::Indifferent + include Hashie::Extensions::MergeInitializer + end + ++ class MashWithIndifferentAccess < Hashie::Mash ++ include Hashie::Extensions::IndifferentAccess ++ end ++ + shared_examples_for 'hash with indifferent access' do + it 'is able to access via string or symbol' do + indifferent_hash = ActiveSupport::HashWithIndifferentAccess.new(abc: 123) +@@ -193,4 +198,11 @@ describe Hashie::Extensions::Indifferent + expect(instance[:foo]).to be_a(ActiveSupport::HashWithIndifferentAccess) + end + end ++ ++ describe 'Mash with indifferent access' do ++ it 'is able to be created for a deep nested HashWithIndifferentAccess' do ++ indifferent_hash = ActiveSupport::HashWithIndifferentAccess.new(abc: { def: 123 }) ++ MashWithIndifferentAccess.new(indifferent_hash) ++ end ++ end + end Property changes on: head/devel/rubygem-hashie/files/patch-spec_hashie_extensions_indifferent__access__with__rails__hwia__spec.rb ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property