limit_detectors 0.0.7 → 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
- SHA1:
3
- metadata.gz: 22d7267330a8393ba610f0c80a49b9356aabcbc3
4
- data.tar.gz: f97f4b0598e4e03d28429d0ec7f5f9b15f27b95b
2
+ SHA256:
3
+ metadata.gz: 9738252b947222c3086089c51114911b2cc620b23c95a1f0b9b768b49cba0b9d
4
+ data.tar.gz: 7d3724ec0bf9968f1724938c61621d8067573322e1d4ec89b920ffb17ce240ea
5
5
  SHA512:
6
- metadata.gz: 2a6b872ca0d813bfb44914fcedcb48366adae1d54bf426e6ebb7fe244bfd698df6a318ff3ac70660118f099e642cbbb1357b4061657d7d55724b2c1ec5fdf722
7
- data.tar.gz: 2d7264762b9986909d343e81fc626b202f1fac1301dccced72b736ac63a60c70a65cea661e98321a6a753572caae8343dfa404b5ea5ed07f5db59f43d41eec04
6
+ metadata.gz: bd351474b2c0013b31985c09b218d761432905b1943ba247d0cb839f613661e4ecdb664c3f70720535aeb026ee1a2ee1a676d4ab0a21a3c86e0470669a24abe5
7
+ data.tar.gz: f55c1be6b0812a2a70db74009175ff21a1012f5ed014f677d9e0d663d6a185fe4b4bb6b894fbf154dcc0917e3890ea5b4f88e56d79af8a2593079951f9f962a1
data/.gitignore CHANGED
@@ -23,4 +23,5 @@ test/tmp
23
23
  test/version_tmp
24
24
  tmp
25
25
  /.idea/
26
- bin
26
+ bin
27
+ /projectFilesBackup
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --color
2
2
  --format documentation
3
+ --require spec_helper
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/.travis.yml CHANGED
@@ -3,9 +3,7 @@ cache: bundler
3
3
  sudo: false
4
4
 
5
5
  rvm:
6
- - 1.9.3
7
- - 2.0
8
- - 2.1
9
- - 2.2.4
10
- - 2.3.0
6
+ - 2.6.7
7
+ - 2.7.3
8
+ - 3.0.1
11
9
  - jruby
data/Gemfile CHANGED
@@ -1,13 +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
-
6
-
7
- # To support Rubinius on Travis-CI
8
- platforms :rbx do
9
- gem 'racc'
10
- gem 'minitest'
11
- gem 'rubysl'#, '~> 2.0'
12
- gem 'psych'
13
- end
data/README.md CHANGED
@@ -7,10 +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)
12
- * Codeship: [![Codeship Status for s2k/limit_detectors](https://codeship.com/projects/4313f520-2939-0133-bdc1-76c73dc375da/status?branch=master)](https://codeship.com/projects/97926)
13
- * Circle CI: [![Circle CI](https://circleci.com/gh/s2k/limit_detectors.svg?style=svg)](https://circleci.com/gh/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)
14
12
 
15
13
 
16
14
  ## Installation
@@ -29,54 +27,74 @@ Or install it yourself as:
29
27
 
30
28
  ## Usage
31
29
 
32
- In your code you can `require 'limit_detectors'` then define you classes (or use built-in classes like Array, Hash
33
- or other enumerable objects), extend these objects with LimitDetectors (or include the module in your class) and
34
- 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.
35
31
 
36
- For example:
32
+ For example using `pry`(you can use `irb` as well) you can do this:
37
33
 
38
- $pry -I lib -r limit_detectors
39
- [1] pry(main)> a = [1, 2, 3, 4, 5]
40
- => [1, 2, 3, 4, 5]
41
- [2] pry(main)> a.extend LimitDetectors
42
- => [1, 2, 3, 4, 5]
43
- [3] pry(main)> a.at_most?(4){|e| e.odd?}
44
- => true # There are indeed no more than 4 odd numbers in the array
45
- [4] pry(main)> a.at_most?(1){|e| e.even?}
46
- => 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
47
60
 
48
- ## Compatibility
49
61
 
50
- Please note the current version of 0.0.something, which means the future releases
51
- 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
+ ```
52
67
 
53
- This gem is tested with these (MRI) Ruby versions:
54
68
 
55
- - 1.9.3
56
- - 2.0
57
- - 2.1
58
- - 2.2.4
59
- - 2.3.0
60
- - jruby
69
+
70
+ ## Compatibility
71
+
72
+ This gem is tested with these Ruby versions (MRI, unless JRuby):
73
+
74
+ - 2.6.7
75
+ - 2.7.3
76
+ - 3.0.1
61
77
 
62
78
  as well as a current version of JRuby.
63
79
 
64
80
  ## Contributing
65
81
 
66
- 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)
67
83
  2. Create your feature branch (`git checkout -b my-new-feature`)
68
84
  3. Commit your changes (`git commit -am 'Add some feature'`)
69
85
  4. Push to the branch (`git push origin my-new-feature`)
70
86
  5. Create a new Pull Request
71
87
 
88
+ A more detailed descritpion is at https://opensource.com/article/19/7/create-pull-request-github
89
+
72
90
  ### Reporting a bug
73
91
 
74
92
  Please, provide answers to the following questions, when submitting a bug report:
75
93
 
76
- 1. What's actually happening? What the observed behaviour?
77
- 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?
78
96
  3. Why did you expect this behaviour?
79
97
 
80
- 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,
81
99
  especially in case of a minimal check, something that just demonstrates the bug without
82
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 = '0.0.7'
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,19 +9,19 @@ 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
 
16
17
  spec.files = `git ls-files -z`.split("\x0")
17
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
+ spec.require_paths = ['lib']
20
21
 
21
22
  spec.add_development_dependency 'bundler'
22
- spec.add_development_dependency 'rake', '~> 10.4'
23
- spec.add_development_dependency 'rspec', '~> 3.0'
24
- spec.add_development_dependency 'pry', '~> 0.10'
25
- spec.add_development_dependency 'pry-doc'
23
+ spec.add_development_dependency 'pry', '~> 0.14.1'
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,141 +1,137 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
+
2
3
  require 'set'
3
4
 
4
- Array.send :include, LimitDetectors
5
+ Array.include LimitDetectors
5
6
 
6
7
  describe '#at_most' do
7
-
8
8
  it 'is true for an empty Array' do
9
9
  expect(Kernel).to_not receive(:warn)
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
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
14
14
  end
15
15
 
16
16
  it 'is true if the criterion is met once' do
17
- 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
18
18
  end
19
19
 
20
20
  it 'is true if all elements meet the criterion and the size is the given maximum number' do
21
- expect([1,1,1].at_most?(3){|e| e == 1})
21
+ expect([1, 1, 1].at_most?(3) { |e| e == 1 })
22
22
  end
23
23
 
24
24
  it 'is false if not enough elements meet the criterion' do
25
- 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
26
26
  end
27
27
 
28
28
  it 'is true if 0 elements are expected to match' do
29
- r = Array.new(10){rand}
30
- 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
31
31
  end
32
32
 
33
33
  describe 'Hash#at_most' do
34
- Hash.send :include, LimitDetectors
34
+ Hash.include LimitDetectors
35
35
  it 'detects a condition based on key as well as value properties' do
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
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
38
38
  end
39
39
  end
40
-
41
40
  end
42
41
 
43
42
  describe '#at_least' do
44
-
45
43
  it 'is false for an empty Array, if at least one is expected' do
46
44
  expect(Kernel).to_not receive(:warn)
47
- expect([].at_least?(1){ true }).to be_falsey
45
+ expect([].at_least?(1) { true }).to be_falsey
48
46
  end
49
47
 
50
48
  it 'is true if the expected number is 0 and Array is empty' do
51
- expect([].at_least?(0){ true }).to be_truthy
52
- 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
53
51
  end
54
52
 
55
53
  it 'is false if the container ist smaller than the expected number' do
56
54
  size = 10
57
- 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
58
56
  end
59
57
 
60
58
  it 'is true if the criterion is met and expected once' do
61
- 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
62
60
  end
63
61
 
64
- it 'is false for an empty Array if you expect at leat 1' do
65
- 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
66
64
  end
67
65
 
68
- it 'is true for an empty Array if you expect at leat 0' do
69
- 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
70
68
  end
71
69
 
72
70
  it 'is true if the criterion is met once' do
73
- 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
74
72
  end
75
73
 
76
74
  it 'is true if all elements meet the criterion and the size is the given minimum number' do
77
- 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
78
76
  end
79
77
 
80
78
  it 'is true if enough elements meet the criterion' do
81
- 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
82
80
  end
83
81
 
84
82
  it 'is true if there are enough elements to match' do
85
- r = Array.new(10){|i|i}
86
- expect(r.at_least?(7){ |i| i > 2 }).to be_truthy
87
- 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
88
86
  end
89
-
90
87
  end
91
88
 
92
89
  describe '#ocurrences_of' do
93
90
  context 'collection with content' do
94
- Set.send :include, LimitDetectors
95
- 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]) }
96
93
 
97
- it('counts 3 even numbers') { expect( subject.ocurrences_of &:even?).to be 3 }
98
- it('counts 4 odd numbers') { expect( subject.ocurrences_of &:odd?).to be 4 }
99
- it('counts no number < 0') { expect( subject.ocurrences_of{ |e| e < 0}).to be 0 }
100
- 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 }
101
98
  end
102
99
 
103
100
  context 'empty collection' do
104
101
  it 'counts 0 for any empty collection' do
105
- [[], Set.new, {}].each do | obj |
106
- 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}"
107
104
  end
108
105
  end
109
106
  end
110
107
 
111
- 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 }
112
109
  end
113
110
 
114
-
115
- describe 'Using an object that doesn\'t respond to #inject' do
111
+ describe "Using an object that doesn't respond to #inject" do
116
112
  object = Object.new
117
113
  object.extend LimitDetectors
118
114
  it 'will raise an exception, if it\'s sent #at_most' do
119
- 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./)
120
116
  end
121
117
  end
122
118
 
123
119
  describe 'Give a warning, if non-predicate versions are used' do
124
120
  it 'yields a warning for old-style at_most' do
125
121
  expect(Kernel).to receive(:warn).with(/'at_most'.+deprecated.+'at_most\?'/)
126
- [1,2,4,8].at_most(2) {|e| e.even?}
122
+ [1, 2, 4, 8].at_most(2, &:even?)
127
123
  end
128
124
 
129
125
  it 'yields a warning for old-style at_least' do
130
126
  expect(Kernel).to receive(:warn).with(/'at_least'.+deprecated.+'at_least\?'/)
131
- [1,2,4,8].at_least(2) {|e| e.even?}
132
- end
127
+ [1, 2, 4, 8].at_least(2, &:even?)
133
128
  end
129
+ end
134
130
 
135
131
  describe 'When the provided block raises an exception' do
136
- subject{ [1] }
132
+ subject { [1] }
137
133
  it 'passes up the stack unchanged' do
138
- expect{ subject.at_most?(1) { raise ArgumentError, 'BoomError' } }.to raise_error(ArgumentError, 'BoomError')
139
- 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')
140
136
  end
141
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: 0.0.7
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Kämper
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-16 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: '10.4'
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: '10.4'
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.0'
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.0'
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.10'
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.10'
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: '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: '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
@@ -104,7 +106,7 @@ homepage: ''
104
106
  licenses:
105
107
  - MIT
106
108
  metadata: {}
107
- post_install_message:
109
+ post_install_message:
108
110
  rdoc_options: []
109
111
  require_paths:
110
112
  - lib
@@ -119,12 +121,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
121
  - !ruby/object:Gem::Version
120
122
  version: '0'
121
123
  requirements: []
122
- rubyforge_project:
123
- rubygems_version: 2.5.2
124
- signing_key:
124
+ rubygems_version: 3.2.16
125
+ signing_key:
125
126
  specification_version: 4
126
127
  summary: Detect certain conditions of elements of an Enumerable object
127
128
  test_files:
128
129
  - spec/limit_detectors_spec.rb
129
130
  - spec/spec_helper.rb
130
- has_rdoc: