rubysl-enumerator 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +0 -1
- data/.travis.yml +8 -0
- data/README.md +2 -2
- data/Rakefile +0 -1
- data/lib/enumerator.rb +1 -0
- data/lib/rubysl/enumerator.rb +2 -0
- data/lib/rubysl/enumerator/enumerator.rb +1 -0
- data/lib/{rubysl-enumerator → rubysl/enumerator}/version.rb +1 -1
- data/rubysl-enumerator.gemspec +19 -18
- data/spec/each_spec.rb +7 -0
- data/spec/each_with_index_spec.rb +7 -0
- data/spec/enum_cons_spec.rb +8 -0
- data/spec/enum_for_spec.rb +8 -0
- data/spec/enum_slice_spec.rb +15 -0
- data/spec/enum_with_index_spec.rb +14 -0
- data/spec/new_spec.rb +12 -0
- data/spec/next_spec.rb +8 -0
- data/spec/rewind_spec.rb +8 -0
- data/spec/to_enum_spec.rb +8 -0
- data/spec/with_index_spec.rb +7 -0
- metadata +102 -86
- data/lib/rubysl-enumerator.rb +0 -7
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 13b5b820b217d631d8cd675ec4648a27132efb97
|
4
|
+
data.tar.gz: a694732228767754026136e3a510ef22c5a2ea7b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fd6129331558cdd62c9060cbbfc8359b1345068bb949cce58563a76c04b5b4da24c3f345871d5cee8e9dea3f4668693737b6346c6862a9d9ad91b984d4a6a049
|
7
|
+
data.tar.gz: ea76da9475b21b9c6933a9cfc4b7691f2fd01f277d32e167f072c426d2d9d9135a6ccabdffe12b4b42a550cd61a07d7efae8f36d3cabddb17cf55046f80a3470
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Rubysl::Enumerator
|
2
2
|
|
3
3
|
TODO: Write a gem description
|
4
4
|
|
@@ -24,6 +24,6 @@ TODO: Write usage instructions here
|
|
24
24
|
|
25
25
|
1. Fork it
|
26
26
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am '
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
28
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
29
|
5. Create new Pull Request
|
data/Rakefile
CHANGED
data/lib/enumerator.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "rubysl/enumerator"
|
@@ -0,0 +1 @@
|
|
1
|
+
# Empty stub
|
data/rubysl-enumerator.gemspec
CHANGED
@@ -1,22 +1,23 @@
|
|
1
|
-
#
|
2
|
-
require
|
1
|
+
# coding: utf-8
|
2
|
+
require './lib/rubysl/enumerator/version'
|
3
3
|
|
4
|
-
Gem::Specification.new do |
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = "rubysl-enumerator"
|
6
|
+
spec.version = RubySL::Enumerator::VERSION
|
7
|
+
spec.authors = ["Brian Shirai"]
|
8
|
+
spec.email = ["brixen@gmail.com"]
|
9
|
+
spec.description = %q{Ruby standard library enumerator.}
|
10
|
+
spec.summary = %q{Ruby standard library enumerator.}
|
11
|
+
spec.homepage = "https://github.com/rubysl/rubysl-enumerator"
|
12
|
+
spec.license = "BSD"
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
gem.require_paths = ["lib"]
|
16
|
-
gem.version = RubySL::Enumerator::VERSION
|
14
|
+
spec.files = `git ls-files`.split($/)
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ["lib"]
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
20
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
+
spec.add_development_dependency "mspec", "~> 1.5"
|
22
|
+
spec.add_development_dependency "rubysl-prettyprint", "~> 1.0"
|
22
23
|
end
|
data/spec/each_spec.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.expand_path('../../../fixtures/enumerator/classes', __FILE__)
|
2
|
+
|
3
|
+
ruby_version_is ""..."1.9" do
|
4
|
+
require 'enumerator'
|
5
|
+
|
6
|
+
describe "Enumerator#enum_slice" do
|
7
|
+
it "returns an enumerator of the receiver with iteration of each_slice for each slice of n elemts" do
|
8
|
+
a = []
|
9
|
+
enum = EnumSpecs::Numerous.new.enum_slice(4)
|
10
|
+
enum.should be_an_instance_of(enumerator_class)
|
11
|
+
enum.each { |e| a << e }
|
12
|
+
a.should == [[2, 5, 3, 6], [1, 4]]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
ruby_version_is ""..."1.9" do
|
2
|
+
require File.expand_path('../../../fixtures/enumerator/classes', __FILE__)
|
3
|
+
require 'enumerator'
|
4
|
+
|
5
|
+
describe "Enumerator#enum_with_index" do
|
6
|
+
it "returns an enumerator of the receiver with an iteration of each_with_index" do
|
7
|
+
a = []
|
8
|
+
enum = EnumSpecs::Numerous.new.enum_with_index
|
9
|
+
enum.should be_an_instance_of(enumerator_class)
|
10
|
+
enum.each { |e| a << e }
|
11
|
+
a.should == [[2, 0], [5, 1], [3, 2], [6, 3], [1, 4], [4, 5]]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/spec/new_spec.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
ruby_version_is ""..."1.9" do
|
2
|
+
require 'enumerator'
|
3
|
+
require File.expand_path('../../../shared/enumerator/new', __FILE__)
|
4
|
+
|
5
|
+
describe "Enumerator.new" do
|
6
|
+
it "requires an argument" do
|
7
|
+
lambda {enumerator_class.new}.should raise_error(ArgumentError)
|
8
|
+
end
|
9
|
+
|
10
|
+
it_behaves_like(:enum_new, :new)
|
11
|
+
end
|
12
|
+
end
|
data/spec/next_spec.rb
ADDED
data/spec/rewind_spec.rb
ADDED
metadata
CHANGED
@@ -1,118 +1,134 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysl-enumerator
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Brian Shirai
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
date: 2013-09-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
22
21
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
26
24
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
- 1
|
31
|
-
- 0
|
32
|
-
version: "1.0"
|
33
|
-
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
36
28
|
name: rake
|
37
|
-
|
38
|
-
|
39
|
-
none: false
|
40
|
-
requirements:
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
41
31
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 10
|
46
|
-
- 0
|
47
|
-
version: "10.0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
48
34
|
type: :development
|
49
|
-
|
50
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
51
42
|
name: mspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
48
|
+
type: :development
|
52
49
|
prerelease: false
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubysl-prettyprint
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
56
59
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
segments:
|
60
|
-
- 1
|
61
|
-
- 5
|
62
|
-
version: "1.5"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
63
62
|
type: :development
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
description: Ruby standard library enumerator.
|
70
|
+
email:
|
67
71
|
- brixen@gmail.com
|
68
72
|
executables: []
|
69
|
-
|
70
73
|
extensions: []
|
71
|
-
|
72
74
|
extra_rdoc_files: []
|
73
|
-
|
74
|
-
files:
|
75
|
+
files:
|
75
76
|
- .gitignore
|
77
|
+
- .travis.yml
|
76
78
|
- Gemfile
|
77
79
|
- LICENSE
|
78
80
|
- README.md
|
79
81
|
- Rakefile
|
80
|
-
- lib/
|
81
|
-
- lib/rubysl
|
82
|
+
- lib/enumerator.rb
|
83
|
+
- lib/rubysl/enumerator.rb
|
84
|
+
- lib/rubysl/enumerator/enumerator.rb
|
85
|
+
- lib/rubysl/enumerator/version.rb
|
82
86
|
- rubysl-enumerator.gemspec
|
83
|
-
|
84
|
-
|
85
|
-
|
87
|
+
- spec/each_spec.rb
|
88
|
+
- spec/each_with_index_spec.rb
|
89
|
+
- spec/enum_cons_spec.rb
|
90
|
+
- spec/enum_for_spec.rb
|
91
|
+
- spec/enum_slice_spec.rb
|
92
|
+
- spec/enum_with_index_spec.rb
|
93
|
+
- spec/new_spec.rb
|
94
|
+
- spec/next_spec.rb
|
95
|
+
- spec/rewind_spec.rb
|
96
|
+
- spec/to_enum_spec.rb
|
97
|
+
- spec/with_index_spec.rb
|
98
|
+
homepage: https://github.com/rubysl/rubysl-enumerator
|
99
|
+
licenses:
|
100
|
+
- BSD
|
101
|
+
metadata: {}
|
86
102
|
post_install_message:
|
87
103
|
rdoc_options: []
|
88
|
-
|
89
|
-
require_paths:
|
104
|
+
require_paths:
|
90
105
|
- lib
|
91
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
none: false
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
hash: 2002549777813010636
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
version: "0"
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
109
116
|
requirements: []
|
110
|
-
|
111
117
|
rubyforge_project:
|
112
|
-
rubygems_version:
|
118
|
+
rubygems_version: 2.0.7
|
113
119
|
signing_key:
|
114
|
-
specification_version:
|
115
|
-
summary: Ruby
|
116
|
-
test_files:
|
117
|
-
|
120
|
+
specification_version: 4
|
121
|
+
summary: Ruby standard library enumerator.
|
122
|
+
test_files:
|
123
|
+
- spec/each_spec.rb
|
124
|
+
- spec/each_with_index_spec.rb
|
125
|
+
- spec/enum_cons_spec.rb
|
126
|
+
- spec/enum_for_spec.rb
|
127
|
+
- spec/enum_slice_spec.rb
|
128
|
+
- spec/enum_with_index_spec.rb
|
129
|
+
- spec/new_spec.rb
|
130
|
+
- spec/next_spec.rb
|
131
|
+
- spec/rewind_spec.rb
|
132
|
+
- spec/to_enum_spec.rb
|
133
|
+
- spec/with_index_spec.rb
|
118
134
|
has_rdoc:
|