1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00

- Update to 3.4.1

- Reformat pkg-descr
- Take maintainership

Changes:	https://github.com/intridea/hashie/blob/master/CHANGELOG.md
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2015-05-21 21:25:57 +00:00
parent 63c4018b4f
commit 49e0ed3ef2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=386973
5 changed files with 13 additions and 83 deletions

View File

@ -2,17 +2,17 @@
# $FreeBSD$
PORTNAME= hashie
PORTVERSION= 3.4.0
PORTVERSION= 3.4.1
CATEGORIES= devel rubygems
MASTER_SITES= RG
MAINTAINER= ports@FreeBSD.org
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Hashie is a simple collection of useful Hash extensions
LICENSE= MIT
USE_RUBY= yes
USE_RUBYGEMS= yes
RUBYGEM_AUTOPLIST=yes
RUBYGEM_AUTOPLIST= yes
.include <bsd.port.mk>

View File

@ -1,4 +1,2 @@
SHA256 (rubygem/hashie-3.4.0.gem) = 5e39f20c0087ff8fc415f378427c17dc8cd21fa282b7f26267a863b073655802
SIZE (rubygem/hashie-3.4.0.gem) = 51712
SHA256 (rubygem/09821f3c90755d019c5083174ab42f442e182767.diff) = 6281bfb9615b4abce7771e550273cf89ebd5e919e0608553fe1b4a5e9d2a70c5
SIZE (rubygem/09821f3c90755d019c5083174ab42f442e182767.diff) = 3348
SHA256 (rubygem/hashie-3.4.1.gem) = 76dc47a37116e8e6be30e37389776cecd3809efa5e4e207f2d02de0f3d9a4f34
SIZE (rubygem/hashie-3.4.1.gem) = 54784

View File

@ -1,31 +0,0 @@
--- 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)

View File

@ -1,36 +0,0 @@
--- 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

View File

@ -1,12 +1,11 @@
Hashie is available as a RubyGem which extend Hashes and make them more useful.
Hashie is available as a RubyGem which extend Hashes and make them more useful.
* Hashie::Mash: gives simple pseudo-object functionality that can be
built from hashes and easily extended
* Hashie::Dash: has a discrete set of defined properties and only those
properties may be set on the hash.
* Hashie::Trash: a Dash that allows you to translate keys on
initialization.
* Hashie::Clash: allows you to easily construct complex hashes using
method notation chaining.
- Hashie::Mash: gives simple pseudo-object functionality that can be built from
hashes and easily extended
- Hashie::Dash: has a discrete set of defined properties and only those
properties may be set on the hash.
- Hashie::Trash: a Dash that allows you to translate keys on initialization.
- Hashie::Clash: allows you to easily construct complex hashes using method
notation chaining.
WWW: https://github.com/intridea/hashie