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.
@@ -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
@@ -15,4 +15,3 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
- .rbx
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ before_install:
3
+ - gem update --system
4
+ - gem --version
5
+ - gem install rubysl-bundler
6
+ script: bundle exec mspec spec
7
+ rvm:
8
+ - rbx-nightly-18mode
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RubySL::Enumerator
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 'Added some feature'`)
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
@@ -1,2 +1 @@
1
- #!/usr/bin/env rake
2
1
  require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ require "rubysl/enumerator"
@@ -0,0 +1,2 @@
1
+ require "rubysl/enumerator/enumerator"
2
+ require "rubysl/enumerator/version"
@@ -0,0 +1 @@
1
+ # Empty stub
@@ -1,5 +1,5 @@
1
1
  module RubySL
2
2
  module Enumerator
3
- VERSION = "0.0.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,22 +1,23 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/rubysl-enumerator/version', __FILE__)
1
+ # coding: utf-8
2
+ require './lib/rubysl/enumerator/version'
3
3
 
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Brian Shirai"]
6
- gem.email = ["brixen@gmail.com"]
7
- gem.description = %q{Ruby Standard Library - enumerator}
8
- gem.summary = %q{Ruby Standard Library - enumerator}
9
- gem.homepage = ""
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
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "rubysl-enumerator"
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
- gem.add_runtime_dependency "redcard", "~> 1.0"
19
-
20
- gem.add_development_dependency "rake", "~> 10.0"
21
- gem.add_development_dependency "mspec", "~> 1.5"
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
@@ -0,0 +1,7 @@
1
+ require File.expand_path('../../../shared/enumerator/each', __FILE__)
2
+
3
+ ruby_version_is "1.8.7"..."1.9" do
4
+ describe "Enumerator#each" do
5
+ it_behaves_like(:enum_each, :each)
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ ruby_version_is "1.8.7"..."1.9" do
2
+ require File.expand_path('../../../shared/enumerator/with_index', __FILE__)
3
+
4
+ describe "Enumerator#each_with_index" do
5
+ it_behaves_like(:enum_with_index, :each_with_index)
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ ruby_version_is ""..."1.9" do
2
+ require 'enumerator'
3
+ require File.expand_path('../../../shared/enumerator/enum_cons', __FILE__)
4
+
5
+ describe "Enumerator#enum_cons" do
6
+ it_behaves_like(:enum_cons, :enum_cons)
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ ruby_version_is ""..."1.9" do
2
+ require 'enumerator'
3
+ require File.expand_path('../../../shared/enumerator/enum_for', __FILE__)
4
+
5
+ describe "#enum_for" do
6
+ it_behaves_like :enum_for, :enum_for
7
+ end
8
+ end
@@ -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
@@ -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
@@ -0,0 +1,8 @@
1
+ ruby_version_is "1.8.7"..."1.9" do
2
+ require File.expand_path('../../../shared/enumerator/next', __FILE__)
3
+ require 'enumerator'
4
+
5
+ describe "Enumerator#next" do
6
+ it_behaves_like(:enum_next,:next)
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ ruby_version_is "1.8.7"..."1.9" do
2
+ require File.expand_path('../../../shared/enumerator/rewind', __FILE__)
3
+ require 'enumerator'
4
+
5
+ describe "Enumerator#rewind" do
6
+ it_behaves_like(:enum_rewind, :rewind)
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ ruby_version_is ""..."1.9" do
2
+ require File.expand_path('../../../shared/enumerator/enum_for', __FILE__)
3
+ require 'enumerator'
4
+
5
+ describe "#to_enum" do
6
+ it_behaves_like :enum_for, :enum_for
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ ruby_version_is "1.8.7"..."1.9" do
2
+ require File.expand_path('../../../shared/enumerator/with_index', __FILE__)
3
+
4
+ describe "Enumerator#with_index" do
5
+ it_behaves_like(:enum_with_index, :with_index)
6
+ end
7
+ end
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
- hash: 856480538658449761
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
- date: 2013-04-15 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: redcard
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
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
26
24
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 4428665182548103036
29
- segments:
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
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
41
31
  - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 1510892033553700768
44
- segments:
45
- - 10
46
- - 0
47
- version: "10.0"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
48
34
  type: :development
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
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
- requirement: &id003 !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
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
- hash: 1660815245844205030
59
- segments:
60
- - 1
61
- - 5
62
- version: "1.5"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
63
62
  type: :development
64
- version_requirements: *id003
65
- description: Ruby Standard Library - enumerator
66
- email:
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/rubysl-enumerator.rb
81
- - lib/rubysl-enumerator/version.rb
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
- homepage: ""
84
- licenses: []
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
- none: false
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- hash: 2002549777813010636
97
- segments:
98
- - 0
99
- version: "0"
100
- required_rubygems_version: !ruby/object:Gem::Requirement
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: 1.8.25
118
+ rubygems_version: 2.0.7
113
119
  signing_key:
114
- specification_version: 3
115
- summary: Ruby Standard Library - enumerator
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:
@@ -1,7 +0,0 @@
1
- require "rubysl-enumerator/version"
2
-
3
- module RubySL
4
- module Enumerator
5
- # Your code goes here...
6
- end
7
- end