sync_enum 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 29058cd0e8c7631c47f92729165ce7d17a3f7ce12f89dd3038edafd7860b2abd
4
+ data.tar.gz: ab716ac8d40e25f5d7f024f870b70ab8ec7f79f3c88c477a3f141963ae9d115b
5
+ SHA512:
6
+ metadata.gz: bc48c2672decd18cc58a77835606887e66399d3a80d8195a31821228e9f1df0bfc4e358f14740cc4a6c6e198eab473d1dd0665c3e81bc5ad67764d0cb34f24ed
7
+ data.tar.gz: a1fa3a8735a4681c8ee3c56a72dcd23efe75a08c627c54ea317e0b058cf8f551f92c9e86d0a1217c1d3ed2b25f0948d8944e16064d2e715c246ff863eca28358
data/.gitattributes ADDED
@@ -0,0 +1,14 @@
1
+ # By default, git should determine if a file is binary, and normalize it
2
+ # when the file is not binary (text).
3
+ * text=auto
4
+
5
+ # These files are text and should be normalized to CRLF in the working
6
+ # directory.
7
+ *.rb text
8
+ *.yml text
9
+ *.md text
10
+ *.bat text
11
+
12
+ # These files are binary, and should not be normalized.
13
+ *.mar binary
14
+ *.pdf binary
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /temp/
10
+ /data/
11
+ /.idea/
12
+ /*.gem
13
+
14
+ # rspec failure tracking
15
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,12 @@
1
+ # RSpec default options
2
+ # ./.rspec is loaded automatically by RSpec
3
+ #
4
+ # RSpec automatically adds to $LOAD_PATH:
5
+ # <project>/spec
6
+ # <project>/lib # at least in RubyMine
7
+
8
+ --format documentation
9
+ --color
10
+
11
+ # load the contents of spec/spec_helper.rb
12
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,18 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rake
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+ NewCops: enable
8
+
9
+ Style/StringLiterals:
10
+ Enabled: true
11
+ EnforcedStyle: single_quotes
12
+
13
+ Style/StringLiteralsInInterpolation:
14
+ Enabled: true
15
+ EnforcedStyle: double_quotes
16
+
17
+ Layout/LineLength:
18
+ Max: 80
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2021-05-15
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at tesar@rutgers.edu. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in sync_enum.gemspec
6
+ gemspec
7
+
8
+ gem 'launchy', '~> 2.5'
9
+ gem 'rubocop-rake', require: false
10
+ gem 'rubocop-rspec'
data/Gemfile.lock ADDED
@@ -0,0 +1,69 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sync_enum (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ addressable (2.7.0)
10
+ public_suffix (>= 2.0.2, < 5.0)
11
+ ast (2.4.2)
12
+ diff-lcs (1.4.4)
13
+ launchy (2.5.0)
14
+ addressable (~> 2.7)
15
+ parallel (1.20.1)
16
+ parser (3.0.1.1)
17
+ ast (~> 2.4.1)
18
+ public_suffix (4.0.6)
19
+ rainbow (3.0.0)
20
+ rake (13.0.3)
21
+ regexp_parser (2.1.1)
22
+ rexml (3.2.5)
23
+ rspec (3.10.0)
24
+ rspec-core (~> 3.10.0)
25
+ rspec-expectations (~> 3.10.0)
26
+ rspec-mocks (~> 3.10.0)
27
+ rspec-core (3.10.1)
28
+ rspec-support (~> 3.10.0)
29
+ rspec-expectations (3.10.1)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.10.0)
32
+ rspec-mocks (3.10.2)
33
+ diff-lcs (>= 1.2.0, < 2.0)
34
+ rspec-support (~> 3.10.0)
35
+ rspec-support (3.10.2)
36
+ rubocop (1.14.0)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.0.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.5.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.5.0)
46
+ parser (>= 3.0.1.1)
47
+ rubocop-rake (0.5.1)
48
+ rubocop
49
+ rubocop-rspec (2.3.0)
50
+ rubocop (~> 1.0)
51
+ rubocop-ast (>= 1.1.0)
52
+ ruby-progressbar (1.11.0)
53
+ unicode-display_width (2.0.0)
54
+
55
+ PLATFORMS
56
+ x64-mingw32
57
+
58
+ DEPENDENCIES
59
+ bundler (~> 2.0)
60
+ launchy (~> 2.5)
61
+ rake (~> 13.0)
62
+ rspec (~> 3.0)
63
+ rubocop (~> 1.7)
64
+ rubocop-rake
65
+ rubocop-rspec
66
+ sync_enum!
67
+
68
+ BUNDLED WITH
69
+ 2.2.17
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Bruce Tesar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # SyncEnum
2
+
3
+ Iterate over multiple enumerators in parallel, using the external interface
4
+ based on the #next method. Each call to #next returns an array, containing
5
+ the next element for each of the enumerators. A StopIteration exception
6
+ is raised as soon as any of the enumerators runs out of elements.
7
+
8
+ SyncEnum differs from the standard library's REXML::SyncEnumerator in its
9
+ use of the #next external iterator interface, while REXML::SyncEnumerator
10
+ uses an #each internal interator interface. The external interface is more
11
+ convenient when you expect to end iteration before reaching the end of
12
+ any of the enumerations, including cases where an enumerator generates
13
+ an unending sequence.
14
+
15
+ ## Installation
16
+
17
+ Add this line to your application's Gemfile:
18
+
19
+ ```ruby
20
+ gem 'sync_enum'
21
+ ```
22
+
23
+ And then execute:
24
+
25
+ $ bundle install
26
+
27
+ Or install it yourself as:
28
+
29
+ $ gem install sync_enum
30
+
31
+ ## Usage
32
+
33
+ Require the sync_enum gem in your code:
34
+
35
+ ```ruby
36
+ require 'sync_enum'
37
+ ```
38
+
39
+ Create a new SyncEnum by giving the constructor the enumerators as
40
+ arguments:
41
+
42
+ ```ruby
43
+ se = SyncEnum.new(enum1, enum2, ...)
44
+ ```
45
+
46
+ Each call to #next will return an array of the next elements of the
47
+ enumerators, in the same order as the enumerators were given to the
48
+ constructor.
49
+
50
+ ```ruby
51
+ se.next # => [enum1.next, enum2.next, ...]
52
+ ```
53
+
54
+ This can be used in a loop construction, where the loop keyword silently
55
+ rescues the StopIteration exception.
56
+
57
+ ```ruby
58
+ se = SyncEnum.new(enum1, enum2, enum3)
59
+ loop do
60
+ values = se.next
61
+ next_from_enum1 = values[0]
62
+ break if condition_for_stopping_early
63
+ end
64
+ # To get here, either one of the enumerators ran out of elements, or the
65
+ # break statement was executed.
66
+ ```
67
+
68
+ ## Development
69
+
70
+ After checking out the repo, run `bin/setup` to install dependencies. Then,
71
+ run `rake spec` to run the tests. You can also run `bin/console` for an
72
+ interactive prompt that will allow you to experiment.
73
+
74
+ To install this gem onto your local machine, run `bundle exec rake install`.
75
+ To release a new version, update the version number in `version.rb`, and
76
+ then run `bundle exec rake release`, which will create a git tag for the
77
+ version, push git commits and the created tag, and push the `.gem` file to
78
+ [rubygems.org](https://rubygems.org).
79
+
80
+ ## Contributing
81
+
82
+ Bug reports and pull requests are welcome on GitHub at
83
+ https://github.com/brucetesar/sync_enum. This project is intended to be a
84
+ safe, welcoming space for collaboration, and contributors are expected to
85
+ adhere to the
86
+ [code of conduct](https://github.com/brucetesar/sync_enum/blob/master/CODE_OF_CONDUCT.md).
87
+
88
+ ## License
89
+
90
+ The gem is available as open source under the terms of the
91
+ [MIT License](https://opensource.org/licenses/MIT).
92
+
93
+ ## Code of Conduct
94
+
95
+ Everyone interacting in the SyncEnum project's codebases, issue trackers,
96
+ chat rooms and mailing lists is expected to follow the
97
+ [code of conduct](https://github.com/brucetesar/sync_enum/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'launchy'
5
+
6
+ desc 'delete all files/directories in the temp dir'
7
+ task :clear_temp do
8
+ Dir.glob('temp/*').each do |f|
9
+ rm_rf(f, verbose: false)
10
+ end
11
+ end
12
+
13
+ # ***********
14
+ # RSpec Tasks
15
+ # ***********
16
+
17
+ require 'rspec/core/rake_task'
18
+
19
+ RSpec::Core::RakeTask.new(:spec)
20
+
21
+ # *************
22
+ # RuboCop Tasks
23
+ # *************
24
+
25
+ require 'rubocop/rake_task'
26
+
27
+ RuboCop::RakeTask.new do |task|
28
+ task.requires << 'rubocop-rspec'
29
+ end
30
+
31
+ # task default: %i[spec rubocop]
32
+
33
+ # **********
34
+ # RDoc Tasks
35
+ # **********
36
+
37
+ require 'rdoc/task'
38
+
39
+ Rake::RDocTask.new do |rdoc|
40
+ files = %w[README.md LICENSE.txt CHANGELOG.md lib/**/*.rb bin/**/*.rb]
41
+ rdoc.rdoc_files.add(files)
42
+ rdoc.main = 'README' # page to start on
43
+ rdoc.title = 'sync_enum Docs'
44
+ rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
45
+ rdoc.options << '--line-numbers'
46
+ end
47
+
48
+ desc 'display RDoc in browser'
49
+ task :rdoc_in_browser do
50
+ # Display the rdoc documentation in the system's default browser.
51
+ Launchy.open('doc/rdoc/index.html')
52
+ end
53
+
54
+ desc 'Regenerate RDoc and display in browser'
55
+ task rerdoc_in_browser: [:rerdoc] do
56
+ # Display the rdoc documentation in the system's default browser.
57
+ Launchy.open('doc/rdoc/index.html')
58
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'sync_enum'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/sync_enum.rb ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Author: Bruce Tesar
4
+
5
+ require 'sync_enum/version'
6
+ require 'sync_enum/sync_enum'
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Author: Bruce Tesar
4
+
5
+ # Allows a collection of enumerators to be iterated over in parallel,
6
+ # using the same call to next as a normal enumerator.
7
+ class SyncEnum
8
+ # Returns a new SyncEnum, containing each of the enumerators
9
+ # provided as arguments to #new.
10
+ # === Parameters
11
+ # * *enums - each argument is a distinct enumerator, and the returned
12
+ # arrays of values are ordered exactly as the enumerators are in
13
+ # the argument list.
14
+ # :call-seq:
15
+ # new(*enums) -> sync_enum
16
+ def initialize(*enums)
17
+ @enum_bank = enums
18
+ end
19
+
20
+ # Returns an array containing the next set of values. The first
21
+ # value in the returned array is the next element of the first
22
+ # enumerator, the second value in the returned array is the next
23
+ # element of the second enumerator, and so forth.
24
+ #
25
+ # A StopIteration exception is raised as soon as next is called and
26
+ # one of the enumerators is out of elements. If no enumerators were
27
+ # provided to the constructor, StopIteration is raised on the first
28
+ # call to next.
29
+ # :call-seq:
30
+ # next -> array or raise StopIteration
31
+ def next
32
+ raise StopIteration if @enum_bank.empty?
33
+
34
+ @enum_bank.map(&:next)
35
+ end
36
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SyncEnum
4
+ # The version number for sync_enum.
5
+ VERSION = '0.1.0'
6
+ end
data/sync_enum.gemspec ADDED
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/sync_enum/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'sync_enum'
7
+ spec.version = SyncEnum::VERSION
8
+ spec.authors = ['Bruce Tesar']
9
+ spec.email = ['tesar@rutgers.edu']
10
+
11
+ spec.summary = 'Iterates over multiple enumerators.'
12
+ spec.description =
13
+ <<~ENDOFSTRING
14
+ Iterate over multiple enumerators in parallel, using the external
15
+ interface based on the #next method. Each call to #next returns an
16
+ array, containing the next element for each of the enumerators. A
17
+ StopIteration exception is raised as soon as any of the enumerators
18
+ runs out of elements.
19
+
20
+ SyncEnum differs from the standard library's REXML::SyncEnumerator in
21
+ its use of the #next external iterator interface, while
22
+ REXML::SyncEnumerator uses an #each internal interator interface. The
23
+ external interface is more convenient when you expect to end
24
+ iteration before reaching the end of any of the enumerations,
25
+ including cases where an enumerator generates an unending sequence.
26
+ ENDOFSTRING
27
+
28
+ spec.homepage = 'https://github.com/brucetesar/sync_enum'
29
+ spec.license = 'MIT'
30
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
31
+
32
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
33
+
34
+ spec.metadata['homepage_uri'] = spec.homepage
35
+ spec.metadata['source_code_uri'] =
36
+ 'https://github.com/brucetesar/sync_enum'
37
+ spec.metadata['changelog_uri'] =
38
+ 'https://github.com/brucetesar/sync_enum/blob/master/CHANGELOG.md'
39
+
40
+ # Specify which files should be added to the gem when it is released.
41
+ # The `git ls-files -z` loads the files in the RubyGem that have been
42
+ # added into git.
43
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
44
+ `git ls-files -z`.split("\x0").reject \
45
+ { |f| f.match(%r{\A(?:test|spec|features)/}) }
46
+ end
47
+ spec.bindir = 'exe'
48
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
49
+ spec.require_paths = ['lib']
50
+
51
+ # Register the development-specific dependencies
52
+ spec.add_development_dependency 'bundler', '~> 2.0'
53
+ spec.add_development_dependency 'rake', '~> 13.0'
54
+ spec.add_development_dependency 'rspec', '~> 3.0'
55
+ spec.add_development_dependency 'rubocop', '~> 1.7'
56
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sync_enum
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Bruce Tesar
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-05-17 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: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.7'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.7'
69
+ description: |
70
+ Iterate over multiple enumerators in parallel, using the external
71
+ interface based on the #next method. Each call to #next returns an
72
+ array, containing the next element for each of the enumerators. A
73
+ StopIteration exception is raised as soon as any of the enumerators
74
+ runs out of elements.
75
+
76
+ SyncEnum differs from the standard library's REXML::SyncEnumerator in
77
+ its use of the #next external iterator interface, while
78
+ REXML::SyncEnumerator uses an #each internal interator interface. The
79
+ external interface is more convenient when you expect to end
80
+ iteration before reaching the end of any of the enumerations,
81
+ including cases where an enumerator generates an unending sequence.
82
+ email:
83
+ - tesar@rutgers.edu
84
+ executables: []
85
+ extensions: []
86
+ extra_rdoc_files: []
87
+ files:
88
+ - ".gitattributes"
89
+ - ".gitignore"
90
+ - ".rspec"
91
+ - ".rubocop.yml"
92
+ - CHANGELOG.md
93
+ - CODE_OF_CONDUCT.md
94
+ - Gemfile
95
+ - Gemfile.lock
96
+ - LICENSE.txt
97
+ - README.md
98
+ - Rakefile
99
+ - bin/console
100
+ - bin/setup
101
+ - lib/sync_enum.rb
102
+ - lib/sync_enum/sync_enum.rb
103
+ - lib/sync_enum/version.rb
104
+ - sync_enum.gemspec
105
+ homepage: https://github.com/brucetesar/sync_enum
106
+ licenses:
107
+ - MIT
108
+ metadata:
109
+ allowed_push_host: https://rubygems.org
110
+ homepage_uri: https://github.com/brucetesar/sync_enum
111
+ source_code_uri: https://github.com/brucetesar/sync_enum
112
+ changelog_uri: https://github.com/brucetesar/sync_enum/blob/master/CHANGELOG.md
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: 2.6.0
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubygems_version: 3.0.3
129
+ signing_key:
130
+ specification_version: 4
131
+ summary: Iterates over multiple enumerators.
132
+ test_files: []