fast_group_by 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_group_by
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wes Oldenbeuving
8
8
  autorequire:
9
- bindir: bin
9
+ bindir:
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-16 00:00:00 +02:00
12
+ date: 2009-09-11 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,9 +23,6 @@ extra_rdoc_files:
23
23
  - readme.rdoc
24
24
  files:
25
25
  - readme.rdoc
26
- - Rakefile
27
- - fast_group_by.gemspec
28
- - spec/fast_group_by_spec.rb
29
26
  - lib/fast_group_by.rb
30
27
  has_rdoc: true
31
28
  homepage: http://www.github.com/Narnach/fast_group_by
@@ -58,5 +55,5 @@ rubygems_version: 1.3.4
58
55
  signing_key:
59
56
  specification_version: 3
60
57
  summary: Fast group_by is an Enumerable#group_by implementation that uses hash instead of OrderedHash and is thus faster, but not ordered.
61
- test_files:
62
- - spec/fast_group_by_spec.rb
58
+ test_files: []
59
+
data/Rakefile DELETED
@@ -1,49 +0,0 @@
1
- require "rake"
2
- require "rake/clean"
3
- require "rake/gempackagetask"
4
- require 'rubygems'
5
-
6
- ################################################################################
7
- ### Gem
8
- ################################################################################
9
-
10
- begin
11
- # Parse gemspec using the github safety level.
12
- file = Dir['*.gemspec'].first
13
- data = File.read(file)
14
- spec = nil
15
- # FIXME: Lowered SAFE from 3 to 2 to work with Ruby 1.9 due to rubygems
16
- # performing a require internally
17
- Thread.new { spec = eval("$SAFE = 2\n%s" % data)}.join
18
-
19
- # Create the gem tasks
20
- Rake::GemPackageTask.new(spec) do |package|
21
- package.gem_spec = spec
22
- end
23
- rescue Exception => e
24
- printf "WARNING: Error caught (%s): %s\n%s", e.class.name, e.message, e.backtrace[0...5].map {|l| ' %s' % l}.join("\n")
25
- end
26
-
27
- desc 'Package and install the gem for the current version'
28
- task :install => :gem do
29
- system "sudo gem install -l pkg/%s-%s.gem" % [spec.name, spec.version]
30
- end
31
-
32
- desc 'Show files missing from gemspec'
33
- task :diff do
34
- files = %w[
35
- Rakefile
36
- *README*
37
- *LICENSE*
38
- *.gemspec
39
- bin/*
40
- lib/**/*
41
- spec/**/*
42
- ].map {|pattern| Dir.glob(pattern)}.flatten.select{|f| File.file?(f)}
43
- missing_files = files - spec.files
44
- extra_files = spec.files - files
45
- puts "Missing files:"
46
- puts missing_files.join(" ")
47
- puts "Extra files:"
48
- puts extra_files.join(" ")
49
- end
@@ -1,33 +0,0 @@
1
- Gem::Specification.new do |s|
2
- # Project
3
- s.name = 'fast_group_by'
4
- s.summary = "Fast group_by is an Enumerable#group_by implementation that uses hash instead of OrderedHash and is thus faster, but not ordered."
5
- s.description = s.summary
6
- s.version = '0.1.0'
7
- s.date = '2009-07-16'
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Wes Oldenbeuving"]
10
- s.email = "narnach@gmail.com"
11
- s.homepage = "http://www.github.com/Narnach/fast_group_by"
12
-
13
- # Files
14
- root_files = %w[readme.rdoc Rakefile fast_group_by.gemspec]
15
- bin_files = []
16
- lib_files = %w[fast_group_by]
17
- test_files = %w[]
18
- spec_files = %w[fast_group_by]
19
- other_files = %w[]
20
- s.bindir = "bin"
21
- s.require_path = "lib"
22
- s.executables = bin_files
23
- s.test_files = test_files.map {|f| 'test/%s_test.rb' % f} + spec_files.map {|f| 'spec/%s_spec.rb' % f}
24
- s.files = root_files + s.test_files + other_files + bin_files.map {|f| 'bin/%s' % f} + lib_files.map {|f| 'lib/%s.rb' % f}
25
-
26
- # rdoc
27
- s.has_rdoc = true
28
- s.extra_rdoc_files = %w[readme.rdoc]
29
- s.rdoc_options << '--inline-source' << '--line-numbers' << '--main' << 'readme.rdoc'
30
-
31
- # Requirements
32
- s.required_ruby_version = ">= 1.8.0"
33
- end
@@ -1,12 +0,0 @@
1
- require File.join(File.dirname(__FILE__),%w[.. lib fast_group_by])
2
-
3
- describe Array, '#fast_group_by' do
4
- it 'should return a Hash with key-Array pairs' do
5
- ary = (1..10).to_a
6
- groups = ary.fast_group_by {|e| e%2}
7
- groups.should == {
8
- 0 => [2, 4, 6, 8, 10],
9
- 1 => [1, 3, 5, 7, 9]
10
- }
11
- end
12
- end