limit_detectors 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f398636cec36bb15d61697a991d57a6c68601e1e0c36fa1bc43331e07691dfd
4
- data.tar.gz: 8124df6653bdd41a652d8bbef5227af8f786623dd79a896d93570ac259530c73
3
+ metadata.gz: 9738252b947222c3086089c51114911b2cc620b23c95a1f0b9b768b49cba0b9d
4
+ data.tar.gz: 7d3724ec0bf9968f1724938c61621d8067573322e1d4ec89b920ffb17ce240ea
5
5
  SHA512:
6
- metadata.gz: fb52a0fe84e61ed1d555829baf489470e51ae6cbefa30fd5e9480aa59ef8e1470efe82c2ed0b4d9097e34353f9902535f6e6ac877346674eb6f2b2465cb284ef
7
- data.tar.gz: d131a52a266b894d03d9909213cd62b5edf6b2b6bece70d4ad3259da8becba4fc3e2b62203c59f62298fa16df9cf131bd06c603fe0d37e865f61c2f10d19065f
6
+ metadata.gz: bd351474b2c0013b31985c09b218d761432905b1943ba247d0cb839f613661e4ecdb664c3f70720535aeb026ee1a2ee1a676d4ab0a21a3c86e0470669a24abe5
7
+ data.tar.gz: f55c1be6b0812a2a70db74009175ff21a1012f5ed014f677d9e0d663d6a185fe4b4bb6b894fbf154dcc0917e3890ea5b4f88e56d79af8a2593079951f9f962a1
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ Exclude:
4
+ - 'bin/**/*'
5
+
6
+ Style/EmptyMethod:
7
+ Enabled: false
8
+
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in limit_detectors.gemspec
4
6
  gemspec
5
-
data/README.md CHANGED
@@ -7,8 +7,8 @@ A second reason to create this gem is to explore various other services -- see t
7
7
  ## Stati
8
8
 
9
9
  * Version: [![Gem Version](https://badge.fury.io/rb/limit_detectors.svg)](http://badge.fury.io/rb/limit_detectors)
10
- * Travis CI: [![Build Status](https://travis-ci.org/s2k/limit_detectors.svg?branch=master)](https://travis-ci.org/s2k/limit_detectors)
11
- * Code Climate: [![Code Climate](https://codeclimate.com/github/s2k/limit_detectors.png)](https://codeclimate.com/github/s2k/limit_detectors)
10
+ * Travis CI: [![Build Status](https://travis-ci.com/s2k/limit_detectors.svg?branch=main)](https://travis-ci.com/s2k/limit_detectors)
11
+ * Code Climate: [![Maintainability](https://api.codeclimate.com/v1/badges/f29deb5bcd4e2ad44d25/maintainability)](https://codeclimate.com/github/s2k/limit_detectors/maintainability)
12
12
 
13
13
 
14
14
  ## Installation
@@ -27,51 +27,74 @@ Or install it yourself as:
27
27
 
28
28
  ## Usage
29
29
 
30
- In your code you can `require 'limit_detectors'` then define you classes (or use built-in classes like Array, Hash
31
- or other enumerable objects), extend these objects with LimitDetectors (or include the module in your class) and
32
- then call `at_most?` (or àt_least?') on your object.
30
+ In your code, you can `require 'limit_detectors'` then define your classes and `include` module `LimitDetectors` in your class, or create enumerable objects and `extend` these objects with `LimitDetectors`. Then call `at_most?` (or `t_least?`) on your object.
33
31
 
34
- For example:
32
+ For example using `pry`(you can use `irb` as well) you can do this:
35
33
 
36
- $pry -I lib -r limit_detectors
37
- [1] pry(main)> a = [1, 2, 3, 4, 5]
38
- => [1, 2, 3, 4, 5]
39
- [2] pry(main)> a.extend LimitDetectors
40
- => [1, 2, 3, 4, 5]
41
- [3] pry(main)> a.at_most?(4){|e| e.odd?}
42
- => true # There are indeed no more than 4 odd numbers in the array
43
- [4] pry(main)> a.at_most?(1){|e| e.even?}
44
- => false # In fact there are two even numbers in the array
34
+ ```ruby
35
+ $pry -I lib -r limit_detectors
36
+ [1] pry(main)> a = [1, 2, 3, 4, 5]
37
+ => [1, 2, 3, 4, 5]
38
+ [2] pry(main)> a.extend LimitDetectors
39
+ => [1, 2, 3, 4, 5]
40
+ [3] pry(main)> a.at_most?(4){|e| e.odd?}
41
+ => true # There are indeed no more than 4 odd numbers in the array
42
+ [4] pry(main)> a.at_most?(1){|e| e.even?}
43
+ => false # In fact there are two even numbers in the array
44
+ ```
45
+
46
+ In code the usage may look like this (see example/example.rb for the file):
47
+
48
+ ```ruby
49
+ require 'limit_detectors'
50
+
51
+ class Example
52
+ include Enumerable
53
+ def each
54
+ ('a'..'d').each { |c| yield c }
55
+ end
56
+ end
57
+
58
+ e = Example.new
59
+ e.extend LimitDetectors
45
60
 
46
- ## Compatibility
47
61
 
48
- Please note the current version of 0.0.something, which means the future releases
49
- may not be compatible with the current version.
62
+ puts e.at_least?(1) { |c| 'f' == c }
63
+ puts e.at_least?(1) { |c| 'b' == c }
64
+ puts e.at_most?(0) { |c| 'b' == c }
65
+ puts e.at_most?(42) { |c| 'b' == c }
66
+ ```
67
+
68
+
69
+
70
+ ## Compatibility
50
71
 
51
72
  This gem is tested with these Ruby versions (MRI, unless JRuby):
52
73
 
53
- - 2.5.8
54
- - 2.6.6
55
- - 2.7.1
74
+ - 2.6.7
75
+ - 2.7.3
76
+ - 3.0.1
56
77
 
57
78
  as well as a current version of JRuby.
58
79
 
59
80
  ## Contributing
60
81
 
61
- 1. Fork it ( https://github.com/[my-github-username]/limit_detectors/fork )
82
+ 1. Fork it ( https://github.com/[my-github-username]/limit_detectors/fork)
62
83
  2. Create your feature branch (`git checkout -b my-new-feature`)
63
84
  3. Commit your changes (`git commit -am 'Add some feature'`)
64
85
  4. Push to the branch (`git push origin my-new-feature`)
65
86
  5. Create a new Pull Request
66
87
 
88
+ A more detailed descritpion is at https://opensource.com/article/19/7/create-pull-request-github
89
+
67
90
  ### Reporting a bug
68
91
 
69
92
  Please, provide answers to the following questions, when submitting a bug report:
70
93
 
71
- 1. What's actually happening? What the observed behaviour?
72
- 2. What's the expectation, i.e. what should have happened?
94
+ 1. What's _actually_ happening? What is the observed behaviour?
95
+ 2. What's the _expectation_, i.e. what should have happened?
73
96
  3. Why did you expect this behaviour?
74
97
 
75
- If you provide an RSpec check that demonstrates the bug, would give extra good karma,
98
+ If you provide an `RSpec` check that demonstrates the bug, would give extra good karma,
76
99
  especially in case of a minimal check, something that just demonstrates the bug without
77
100
  any (or much) overhead.
data/Rakefile CHANGED
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new :spec
5
7
 
6
- task :default => :spec
8
+ task default: :spec
7
9
 
8
10
  task :console do
9
11
  exec 'irb -I ./lib -r limit_detectors'
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'limit_detectors'
4
+
5
+ class Example
6
+ include Enumerable
7
+ def each(&block)
8
+ ('a'..'d').each(&block)
9
+ end
10
+ end
11
+
12
+ e = Example.new
13
+ e.extend LimitDetectors
14
+
15
+ puts e.at_least?(1) { |c| c == 'f' }
16
+ puts e.at_least?(1) { |c| c == 'b' }
17
+ puts e.at_most?(0) { |c| c == 'b' }
18
+ puts e.at_most?(42) { |c| c == 'b' }
@@ -1,7 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'limit_detectors/version'
2
4
 
3
5
  module LimitDetectors
4
-
5
6
  # Deprecated, use at_most? instead
6
7
  def at_most(limit, &block)
7
8
  Kernel.warn "'at_most' is deprecated, use 'at_most?' instead"
@@ -17,22 +18,21 @@ module LimitDetectors
17
18
  # Check whether the condition given in the block
18
19
  # occurs at most limit times in the collection
19
20
  def at_most?(limit, &block)
20
- ocurrences_of(&block) <= limit
21
+ occurrences_of(&block) <= limit
21
22
  end
22
23
 
23
24
  # Check whether the condition given in the block
24
25
  # occurs at least limit times in the collection
25
26
  def at_least?(limit, &block)
26
- ocurrences_of(&block) >= limit
27
+ occurrences_of(&block) >= limit
27
28
  end
28
29
 
29
30
  # Count how often the condition given in the block
30
31
  # is met for the collection
31
- def ocurrences_of &block
32
- inject(0) { |res, el|
32
+ def occurrences_of
33
+ inject(0) do |res, el|
33
34
  res += 1 if yield el
34
35
  res
35
- }
36
+ end
36
37
  end
37
-
38
38
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LimitDetectors
2
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
3
5
  end
@@ -1,5 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'limit_detectors/version'
5
6
 
@@ -8,8 +9,8 @@ Gem::Specification.new do |spec|
8
9
  spec.version = LimitDetectors::VERSION
9
10
  spec.authors = ['Stephan Kämper']
10
11
  spec.email = ['the.tester@seasidetesting.com']
11
- spec.summary = %q{Detect certain conditions of elements of an Enumerable object}
12
- spec.description = %q{Some methods to detect whether an Enumerable object contains a constrained number of elements that match a given condition.}
12
+ spec.summary = 'Detect certain conditions of elements of an Enumerable object'
13
+ spec.description = 'Some methods to detect whether an Enumerable object contains a constrained number of elements that match a given condition.'
13
14
  spec.homepage = ''
14
15
  spec.license = 'MIT'
15
16
 
@@ -19,8 +20,8 @@ Gem::Specification.new do |spec|
19
20
  spec.require_paths = ['lib']
20
21
 
21
22
  spec.add_development_dependency 'bundler'
22
- spec.add_development_dependency 'rake', '~> 13.0.3'
23
- spec.add_development_dependency 'rspec', '~> 3.10'
24
23
  spec.add_development_dependency 'pry', '~> 0.14.1'
25
24
  spec.add_development_dependency 'pry-doc', '~> 1.1.0'
25
+ spec.add_development_dependency 'rake', '~> 13.0.3'
26
+ spec.add_development_dependency 'rspec', '~> 3.10'
26
27
  end
@@ -1,140 +1,137 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'set'
2
4
 
3
- Array.send :include, LimitDetectors
5
+ Array.include LimitDetectors
4
6
 
5
7
  describe '#at_most' do
6
-
7
8
  it 'is true for an empty Array' do
8
9
  expect(Kernel).to_not receive(:warn)
9
- expect([].at_most?(5){ true }).to be_truthy
10
- expect([].at_most?(0){ true }).to be_truthy
11
- expect([].at_most?(1){ true }).to be_truthy
12
- expect([].at_most?(5){ :foo }).to be_truthy
10
+ expect([].at_most?(5) { true }).to be_truthy
11
+ expect([].at_most?(0) { true }).to be_truthy
12
+ expect([].at_most?(1) { true }).to be_truthy
13
+ expect([].at_most?(5) { :foo }).to be_truthy
13
14
  end
14
15
 
15
16
  it 'is true if the criterion is met once' do
16
- expect(["it's there"].at_most?(1){ |el| el == "it's there"}).to be_truthy
17
+ expect(["it's there"].at_most?(1) { |el| el == "it's there" }).to be_truthy
17
18
  end
18
19
 
19
20
  it 'is true if all elements meet the criterion and the size is the given maximum number' do
20
- expect([1,1,1].at_most?(3){|e| e == 1})
21
+ expect([1, 1, 1].at_most?(3) { |e| e == 1 })
21
22
  end
22
23
 
23
24
  it 'is false if not enough elements meet the criterion' do
24
- expect([1, 2, 4].at_most?(1){|e| e.even?}).to be_falsey
25
+ expect([1, 2, 4].at_most?(1, &:even?)).to be_falsey
25
26
  end
26
27
 
27
28
  it 'is true if 0 elements are expected to match' do
28
- r = Array.new(10){rand}
29
- expect(r.at_most?(0){ |i| i > 2 }).to be_truthy
29
+ r = Array.new(10) { rand }
30
+ expect(r.at_most?(0) { |i| i > 2 }).to be_truthy
30
31
  end
31
32
 
32
33
  describe 'Hash#at_most' do
33
- Hash.send :include, LimitDetectors
34
+ Hash.include LimitDetectors
34
35
  it 'detects a condition based on key as well as value properties' do
35
- h = { 'foo' => 1, 'bar' => 4, 'baz' => 5, 'bum' => 1, 'fum' => 0}
36
- expect( h.at_most?(3){|ky,vl| ky.match(/^b/) || vl > 1 }).to be_truthy
36
+ h = { 'foo' => 1, 'bar' => 4, 'baz' => 5, 'bum' => 1, 'fum' => 0 }
37
+ expect(h.at_most?(3) { |ky, vl| ky.match(/^b/) || vl > 1 }).to be_truthy
37
38
  end
38
39
  end
39
-
40
40
  end
41
41
 
42
42
  describe '#at_least' do
43
-
44
43
  it 'is false for an empty Array, if at least one is expected' do
45
44
  expect(Kernel).to_not receive(:warn)
46
- expect([].at_least?(1){ true }).to be_falsey
45
+ expect([].at_least?(1) { true }).to be_falsey
47
46
  end
48
47
 
49
48
  it 'is true if the expected number is 0 and Array is empty' do
50
- expect([].at_least?(0){ true }).to be_truthy
51
- expect({}.at_least?(0){ false }).to be_truthy
49
+ expect([].at_least?(0) { true }).to be_truthy
50
+ expect({}.at_least?(0) { false }).to be_truthy
52
51
  end
53
52
 
54
53
  it 'is false if the container ist smaller than the expected number' do
55
54
  size = 10
56
- expect(Array.new(10).at_least?(size + 1){true}).to be_falsey
55
+ expect(Array.new(10).at_least?(size + 1) { true }).to be_falsey
57
56
  end
58
57
 
59
58
  it 'is true if the criterion is met and expected once' do
60
- expect(["it's there"].at_least?(1){ |el| el == "it's there"}).to be_truthy
59
+ expect(["it's there"].at_least?(1) { |el| el == "it's there" }).to be_truthy
61
60
  end
62
61
 
63
- it 'is false for an empty Array if you expect at leat 1' do
64
- expect([].at_least?(1){ true }).to be_falsey
62
+ it 'is false for an empty Array if you expect at least 1' do
63
+ expect([].at_least?(1) { true }).to be_falsey
65
64
  end
66
65
 
67
- it 'is true for an empty Array if you expect at leat 0' do
68
- expect([].at_least?(0){ }).to be_truthy
66
+ it 'is true for an empty Array if you expect at least 0' do
67
+ expect([].at_least?(0) {}).to be_truthy
69
68
  end
70
69
 
71
70
  it 'is true if the criterion is met once' do
72
- expect(["it's there"].at_least?(1){ |el| el == "it's there"}).to be_truthy
71
+ expect(["it's there"].at_least?(1) { |el| el == "it's there" }).to be_truthy
73
72
  end
74
73
 
75
74
  it 'is true if all elements meet the criterion and the size is the given minimum number' do
76
- expect([1,1,1].at_least?(3){|e| e == 1}).to be_truthy
75
+ expect([1, 1, 1].at_least?(3) { |e| e == 1 }).to be_truthy
77
76
  end
78
77
 
79
78
  it 'is true if enough elements meet the criterion' do
80
- expect([1, 2, 4, 8].at_least?(2){|e| e.even?}).to be_truthy
79
+ expect([1, 2, 4, 8].at_least?(2, &:even?)).to be_truthy
81
80
  end
82
81
 
83
82
  it 'is true if there are enough elements to match' do
84
- r = Array.new(10){|i|i}
85
- expect(r.at_least?(7){ |i| i > 2 }).to be_truthy
86
- expect(r.at_least?(8){ |i| i > 2 }).to be_falsey
83
+ r = Array.new(10) { |i| i }
84
+ expect(r.at_least?(7) { |i| i > 2 }).to be_truthy
85
+ expect(r.at_least?(8) { |i| i > 2 }).to be_falsey
87
86
  end
88
-
89
87
  end
90
88
 
91
89
  describe '#ocurrences_of' do
92
90
  context 'collection with content' do
93
- Set.send :include, LimitDetectors
94
- subject{ Set.new( [1, 2, 3, 4, 5, 6, 7]) }
91
+ Set.include LimitDetectors
92
+ subject { Set.new([1, 2, 3, 4, 5, 6, 7]) }
95
93
 
96
- it('counts 3 even numbers') { expect( subject.ocurrences_of &:even?).to be 3 }
97
- it('counts 4 odd numbers') { expect( subject.ocurrences_of &:odd?).to be 4 }
98
- it('counts no number < 0') { expect( subject.ocurrences_of{ |e| e < 0}).to be 0 }
99
- it('counts 7 positive numbers') { expect( subject.ocurrences_of{ |e| e > 0}).to be 7 }
94
+ it('counts 3 even numbers') { expect(subject.occurrences_of(&:even?)).to be 3 }
95
+ it('counts 4 odd numbers') { expect(subject.occurrences_of(&:odd?)).to be 4 }
96
+ it('counts no number < 0') { expect(subject.occurrences_of { |e| e < 0 }).to be 0 }
97
+ it('counts 7 positive numbers') { expect(subject.occurrences_of { |e| e > 0 }).to be 7 }
100
98
  end
101
99
 
102
100
  context 'empty collection' do
103
101
  it 'counts 0 for any empty collection' do
104
- [[], Set.new, {}].each do | obj |
105
- expect(obj.ocurrences_of {true}).to be(0), "Expected to count 0, for an empty #{obj.class}"
102
+ [[], Set.new, {}].each do |obj|
103
+ expect(obj.occurrences_of { true }).to be(0), "Expected to count 0, for an empty #{obj.class}"
106
104
  end
107
105
  end
108
106
  end
109
107
 
110
- it('doen\'t return nil') { expect([1].ocurrences_of {}).not_to be_nil }
108
+ it("doesn't return nil") { expect([1].occurrences_of {}).not_to be_nil }
111
109
  end
112
110
 
113
-
114
- describe 'Using an object that doesn\'t respond to #inject' do
111
+ describe "Using an object that doesn't respond to #inject" do
115
112
  object = Object.new
116
113
  object.extend LimitDetectors
117
114
  it 'will raise an exception, if it\'s sent #at_most' do
118
- expect{ object.at_most?(1){ |el| el.condition? } }.to raise_exception(NoMethodError, /undefined method .inject./)
115
+ expect { object.at_most?(1, &:condition?) }.to raise_exception(NoMethodError, /undefined method .inject./)
119
116
  end
120
117
  end
121
118
 
122
119
  describe 'Give a warning, if non-predicate versions are used' do
123
120
  it 'yields a warning for old-style at_most' do
124
121
  expect(Kernel).to receive(:warn).with(/'at_most'.+deprecated.+'at_most\?'/)
125
- [1,2,4,8].at_most(2) {|e| e.even?}
122
+ [1, 2, 4, 8].at_most(2, &:even?)
126
123
  end
127
124
 
128
125
  it 'yields a warning for old-style at_least' do
129
126
  expect(Kernel).to receive(:warn).with(/'at_least'.+deprecated.+'at_least\?'/)
130
- [1,2,4,8].at_least(2) {|e| e.even?}
131
- end
127
+ [1, 2, 4, 8].at_least(2, &:even?)
132
128
  end
129
+ end
133
130
 
134
131
  describe 'When the provided block raises an exception' do
135
- subject{ [1] }
132
+ subject { [1] }
136
133
  it 'passes up the stack unchanged' do
137
- expect{ subject.at_most?(1) { raise ArgumentError, 'BoomError' } }.to raise_error(ArgumentError, 'BoomError')
138
- expect{ subject.ocurrences_of { raise ArgumentError, 'BoomError'} }.to raise_error(ArgumentError, 'BoomError')
134
+ expect { subject.at_most?(1) { raise ArgumentError, 'BoomError' } }.to raise_error(ArgumentError, 'BoomError')
135
+ expect { subject.occurrences_of { raise ArgumentError, 'BoomError' } }.to raise_error(ArgumentError, 'BoomError')
139
136
  end
140
137
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'limit_detectors'
2
4
 
3
5
  # This file was generated by the `rspec --init` command. Conventionally, all
@@ -7,9 +9,9 @@ require 'limit_detectors'
7
9
  #
8
10
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
9
11
  RSpec.configure do |config|
10
- #config.treat_symbols_as_metadata_keys_with_true_values = true
11
- #config.run_all_when_everything_filtered = true
12
- #config.filter_run :focus
12
+ # config.treat_symbols_as_metadata_keys_with_true_values = true
13
+ # config.run_all_when_everything_filtered = true
14
+ # config.filter_run :focus
13
15
 
14
16
  # Run specs in random order to surface order dependencies. If you find an
15
17
  # order dependency and want to debug it, you can fix the order by providing
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limit_detectors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Kämper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-01 00:00:00.000000000 Z
11
+ date: 2021-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -25,61 +25,61 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 13.0.3
33
+ version: 0.14.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 13.0.3
40
+ version: 0.14.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: pry-doc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.10'
47
+ version: 1.1.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.10'
54
+ version: 1.1.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: pry
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.14.1
61
+ version: 13.0.3
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.14.1
68
+ version: 13.0.3
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry-doc
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.1.0
75
+ version: '3.10'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.1.0
82
+ version: '3.10'
83
83
  description: Some methods to detect whether an Enumerable object contains a constrained
84
84
  number of elements that match a given condition.
85
85
  email:
@@ -90,11 +90,13 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
92
  - ".rspec"
93
+ - ".rubocop.yml"
93
94
  - ".travis.yml"
94
95
  - Gemfile
95
96
  - LICENSE.txt
96
97
  - README.md
97
98
  - Rakefile
99
+ - example/example.rb
98
100
  - lib/limit_detectors.rb
99
101
  - lib/limit_detectors/version.rb
100
102
  - limit_detectors.gemspec