hashslice 1.0.4 → 1.0.5
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/CHANGES +10 -2
- data/README +3 -3
- data/lib/hashslice.rb +1 -1
- data/test/test_hashslice.rb +5 -1
- metadata +11 -9
- data/Rakefile +0 -16
data/CHANGES
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
-
|
1
|
+
== 1.0.5 - 30-Jul-2009
|
2
|
+
* Several updates to the gemspec, including a change in the license from
|
3
|
+
Artistic to Artistic 2.0.
|
4
|
+
* Added the install_gem Rake task, and other minor refactorings to the
|
5
|
+
Rakefile.
|
6
|
+
* Minor update to the test suite to make it Ruby 1.9.x compliant. The library
|
7
|
+
itself required no changes.
|
8
|
+
|
9
|
+
== 1.0.4 - 22-May-2008
|
2
10
|
* Library now managed by Daniel Berger with the kind permission of
|
3
11
|
the original author, Michael Granger.
|
4
12
|
* Added gemspec, README, MANIFEST, and CHANGES files.
|
5
13
|
* Added a Rakefile with tasks for testing and installation.
|
6
14
|
* Replaced the test suite with one based on Test::Unit.
|
7
15
|
|
8
|
-
|
16
|
+
== 1.0.3 - 9-Jun-2004
|
9
17
|
* Last release by Michael Granger
|
data/README
CHANGED
@@ -32,14 +32,14 @@
|
|
32
32
|
If there are more values than keys, the extra values are dropped.
|
33
33
|
|
34
34
|
= Copyright
|
35
|
-
Copyright (c) 2001-
|
35
|
+
Copyright (c) 2001-2009, The FaerieMUD Consortium and Daniel J. Berger.
|
36
36
|
All rights reserved.
|
37
37
|
|
38
38
|
= License
|
39
39
|
This module is free software. You may use, modify, and/or redistribute this
|
40
|
-
software under the terms of the
|
40
|
+
software under the terms of the Artistic License 2.0
|
41
41
|
|
42
|
-
|
42
|
+
http://www.perlfoundation.org/artistic_license_2_0
|
43
43
|
|
44
44
|
= Authors
|
45
45
|
Michael Granger (original author)
|
data/lib/hashslice.rb
CHANGED
@@ -3,7 +3,7 @@ class Hash
|
|
3
3
|
alias :hset :[]=
|
4
4
|
|
5
5
|
# The version of this library
|
6
|
-
VERSION_HASHSLICE = '1.0.
|
6
|
+
VERSION_HASHSLICE = '1.0.5'
|
7
7
|
|
8
8
|
# Retrieve a hash slice. If a single key is provided, returns a single
|
9
9
|
# value. If multiple keys are provided, an array of values is returned.
|
data/test/test_hashslice.rb
CHANGED
@@ -9,7 +9,11 @@ require 'test/unit'
|
|
9
9
|
|
10
10
|
class TC_Hashslice < Test::Unit::TestCase
|
11
11
|
def setup
|
12
|
-
@hash = {'a'
|
12
|
+
@hash = {'a' => 1, 'b' => 2}
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_version
|
16
|
+
assert_equal('1.0.5', Hash::VERSION_HASHSLICE)
|
13
17
|
end
|
14
18
|
|
15
19
|
def test_get_slice_instance_method_basic
|
metadata
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashslice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
8
|
+
- Michael Granger
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date:
|
13
|
+
date: 2009-07-29 00:00:00 -06:00
|
13
14
|
default_executable:
|
14
15
|
dependencies: []
|
15
16
|
|
16
|
-
description:
|
17
|
+
description: " The hashslice library adds builtin hash slicing to Ruby's Hash class.\n This lets you reference, or assign to, multiple hash keys simultaneously\n via the Hash#[] and Hash#[]= methods, respectively.\n"
|
17
18
|
email: djberg96@gmail.com
|
18
19
|
executables: []
|
19
20
|
|
@@ -25,13 +26,14 @@ extra_rdoc_files:
|
|
25
26
|
- MANIFEST
|
26
27
|
files:
|
27
28
|
- lib/hashslice.rb
|
29
|
+
- test/test_hashslice.rb
|
30
|
+
- README
|
28
31
|
- CHANGES
|
29
32
|
- MANIFEST
|
30
|
-
- README
|
31
|
-
- Rakefile
|
32
|
-
- test/test_hashslice.rb
|
33
33
|
has_rdoc: true
|
34
34
|
homepage: http://www.rubyforge.org/projects/shards
|
35
|
+
licenses:
|
36
|
+
- Artistic 2.0
|
35
37
|
post_install_message:
|
36
38
|
rdoc_options: []
|
37
39
|
|
@@ -52,9 +54,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
54
|
requirements: []
|
53
55
|
|
54
56
|
rubyforge_project: shards
|
55
|
-
rubygems_version: 1.
|
57
|
+
rubygems_version: 1.3.5
|
56
58
|
signing_key:
|
57
|
-
specification_version:
|
58
|
-
summary:
|
59
|
+
specification_version: 3
|
60
|
+
summary: Adds hash slicing to Ruby's Hash class
|
59
61
|
test_files:
|
60
62
|
- test/test_hashslice.rb
|
data/Rakefile
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/clean'
|
3
|
-
require 'rake/testtask'
|
4
|
-
|
5
|
-
desc "Install the pure hashslice library (non-gem)"
|
6
|
-
task :install do
|
7
|
-
cp 'lib/hashslice.rb', Config::CONFIG['sitelibdir']
|
8
|
-
end
|
9
|
-
|
10
|
-
|
11
|
-
desc "Run the tests"
|
12
|
-
Rake::TestTask.new('test') do |t|
|
13
|
-
t.warning = true
|
14
|
-
t.libs << 'lib'
|
15
|
-
t.test_files = FileList['test/*.rb']
|
16
|
-
end
|