hashslice 1.0.6 → 1.0.7
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 +5 -0
- data/Rakefile +23 -0
- data/hashslice.gemspec +25 -0
- data/lib/hashslice.rb +1 -1
- data/test/test_hashslice.rb +1 -1
- metadata +7 -5
data/CHANGES
CHANGED
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/clean'
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
desc "Install the hashslice library (non-gem)"
|
6
|
+
task :install do
|
7
|
+
cp 'lib/hashslice.rb', Config::CONFIG['sitelibdir'], :verbose => true
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Build the hashslice gem'
|
11
|
+
task :gem do
|
12
|
+
spec = eval(IO.read('hashslice.gemspec'))
|
13
|
+
Gem::Builder.new(spec).build
|
14
|
+
|
15
|
+
desc "Install the hashslice library as a gem"
|
16
|
+
task :install_gem => [:gem] do
|
17
|
+
file = Dir["*.gem"].first
|
18
|
+
sh "gem install #{file}"
|
19
|
+
|
20
|
+
Rake::TestTask.new do |t|
|
21
|
+
t.warning = true
|
22
|
+
t.verbose = true
|
23
|
+
end
|
data/hashslice.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = 'hashslice'
|
5
|
+
gem.version = '1.0.7'
|
6
|
+
gem.authors = ['Daniel J. Berger', 'Michael Granger']
|
7
|
+
gem.license = 'Artistic 2.0'
|
8
|
+
gem.email = 'djberg96@gmail.com'
|
9
|
+
gem.homepage = 'http://www.rubyforge.org/projects/shards'
|
10
|
+
gem.summary = "Adds hash slicing to Ruby's Hash class"
|
11
|
+
gem.test_file = 'test/test_hashslice.rb'
|
12
|
+
gem.has_rdoc = true
|
13
|
+
gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
|
14
|
+
|
15
|
+
gem.rubyforge_project = 'shards'
|
16
|
+
gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
17
|
+
|
18
|
+
gem.add_development_dependency('test-unit', '>= 2.0.3')
|
19
|
+
|
20
|
+
gem.description = <<-EOF
|
21
|
+
The hashslice library adds builtin hash slicing to Ruby's Hash class.
|
22
|
+
This lets you reference, or assign to, multiple hash keys simultaneously
|
23
|
+
via the Hash#[] and Hash#[]= methods, respectively.
|
24
|
+
EOF
|
25
|
+
end
|
data/lib/hashslice.rb
CHANGED
@@ -3,7 +3,7 @@ class Hash
|
|
3
3
|
alias hset []=
|
4
4
|
|
5
5
|
# The version of the hashslice library
|
6
|
-
VERSION_HASHSLICE = '1.0.
|
6
|
+
VERSION_HASHSLICE = '1.0.7'
|
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
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-09-27 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -34,11 +34,13 @@ extra_rdoc_files:
|
|
34
34
|
- CHANGES
|
35
35
|
- MANIFEST
|
36
36
|
files:
|
37
|
-
- lib/hashslice.rb
|
38
|
-
- test/test_hashslice.rb
|
39
|
-
- README
|
40
37
|
- CHANGES
|
38
|
+
- hashslice.gemspec
|
39
|
+
- lib/hashslice.rb
|
41
40
|
- MANIFEST
|
41
|
+
- Rakefile
|
42
|
+
- README
|
43
|
+
- test/test_hashslice.rb
|
42
44
|
has_rdoc: true
|
43
45
|
homepage: http://www.rubyforge.org/projects/shards
|
44
46
|
licenses:
|