limit_detectors 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/ruby.yml +2 -2
- data/Gemfile +2 -0
- data/Guardfile +44 -0
- data/README.md +19 -6
- data/checksums/limit_detectors-1.0.5.gem.sha512 +1 -0
- data/lib/limit_detectors/version.rb +1 -1
- data/limit_detectors.gemspec +8 -3
- metadata +68 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08827de27b632ea804924087e93836a9b92fb3e7d9c387066550b832b9088812'
|
4
|
+
data.tar.gz: f4dd58b52ca1ebe2c95f0f845b78a857cca74b2459348826c1f26b327b0464b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6effb307cb6ac9474da96d6925750121c3661aeb9ad14b0074942fe1bc3d6c5ca789da32c945a68dfb8a48851c543b86167c9e2b46a275e0d2f50b6225685df
|
7
|
+
data.tar.gz: b8be0fea72f0f9f15092a1716c2d7eb6ea9a75ff3c8916174779c4e97bce08addf8b22c5190e25fd19655fa3c00b8e73179285bcd9816ed34a63c52515649dbe
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ main ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ main ]
|
20
|
+
schedule:
|
21
|
+
- cron: '22 23 * * 3'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
38
|
+
|
39
|
+
steps:
|
40
|
+
- name: Checkout repository
|
41
|
+
uses: actions/checkout@v2
|
42
|
+
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
44
|
+
- name: Initialize CodeQL
|
45
|
+
uses: github/codeql-action/init@v1
|
46
|
+
with:
|
47
|
+
languages: ${{ matrix.language }}
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
52
|
+
|
53
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
54
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
55
|
+
- name: Autobuild
|
56
|
+
uses: github/codeql-action/autobuild@v1
|
57
|
+
|
58
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
59
|
+
# 📚 https://git.io/JvXDl
|
60
|
+
|
61
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
62
|
+
# and modify them (or add more) to build your code if your project
|
63
|
+
# uses a compiled language
|
64
|
+
|
65
|
+
#- run: |
|
66
|
+
# make bootstrap
|
67
|
+
# make release
|
68
|
+
|
69
|
+
- name: Perform CodeQL Analysis
|
70
|
+
uses: github/codeql-action/analyze@v1
|
data/.github/workflows/ruby.yml
CHANGED
@@ -19,10 +19,10 @@ jobs:
|
|
19
19
|
runs-on: ubuntu-latest
|
20
20
|
strategy:
|
21
21
|
matrix:
|
22
|
-
ruby-version: ['
|
22
|
+
ruby-version: ['3.0', '3.1.3', '3.2.2',, '3.3.0' 'jruby', 'truffleruby']
|
23
23
|
|
24
24
|
steps:
|
25
|
-
- uses: actions/checkout@
|
25
|
+
- uses: actions/checkout@v3
|
26
26
|
- name: Set up Ruby
|
27
27
|
uses: ruby/setup-ruby@v1
|
28
28
|
with:
|
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sample Guardfile
|
4
|
+
# More info at https://github.com/guard/guard#readme
|
5
|
+
|
6
|
+
## Uncomment and set this to only include directories you want to watch
|
7
|
+
# directories %w(app lib config test spec features) \
|
8
|
+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
9
|
+
|
10
|
+
## Note: if you are using the `directories` clause above and you are not
|
11
|
+
## watching the project directory ('.'), then you will want to move
|
12
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
13
|
+
#
|
14
|
+
# $ mkdir config
|
15
|
+
# $ mv Guardfile config/
|
16
|
+
# $ ln -s config/Guardfile .
|
17
|
+
#
|
18
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
19
|
+
|
20
|
+
# NOTE: The cmd option is now required due to the increasing number of ways
|
21
|
+
# rspec may be run, below are examples of the most common uses.
|
22
|
+
# * bundler: 'bundle exec rspec'
|
23
|
+
# * bundler binstubs: 'bin/rspec'
|
24
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
25
|
+
# installed the spring binstubs per the docs)
|
26
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
27
|
+
# * 'just' rspec: 'rspec'
|
28
|
+
|
29
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
30
|
+
require 'guard/rspec/dsl'
|
31
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
32
|
+
|
33
|
+
# Feel free to open issues for suggestions and improvements
|
34
|
+
|
35
|
+
# RSpec files
|
36
|
+
rspec = dsl.rspec
|
37
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
38
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
39
|
+
watch(rspec.spec_files)
|
40
|
+
|
41
|
+
# Ruby files
|
42
|
+
ruby = dsl.ruby
|
43
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
44
|
+
end
|
data/README.md
CHANGED
@@ -8,7 +8,9 @@ A second reason to create this gem is to explore various other services -- see t
|
|
8
8
|
## Status & Links
|
9
9
|
|
10
10
|
* Version: [![Gem Version](https://badge.fury.io/rb/limit_detectors.svg)](http://badge.fury.io/rb/limit_detectors)
|
11
|
-
* GitHub Actions:
|
11
|
+
* GitHub Actions:
|
12
|
+
* [![Main workflow: unit tests](https://github.com/s2k/limit_detectors/actions/workflows/ruby.yml/badge.svg)](https://github.com/s2k/limit_detectors/actions)
|
13
|
+
* [![CodeQL](https://github.com/s2k/limit_detectors/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/s2k/limit_detectors/actions/workflows/codeql-analysis.yml)
|
12
14
|
* Code Climate: [![Maintainability](https://api.codeclimate.com/v1/badges/f29deb5bcd4e2ad44d25/maintainability)](https://codeclimate.com/github/s2k/limit_detectors/maintainability)
|
13
15
|
|
14
16
|
|
@@ -67,21 +69,20 @@ end
|
|
67
69
|
e = Example.new
|
68
70
|
e.extend LimitDetectors
|
69
71
|
|
70
|
-
|
71
72
|
puts e.at_least?(1) { |c| 'f' == c }
|
72
73
|
puts e.at_least?(1) { |c| 'b' == c }
|
73
74
|
puts e.at_most?(0) { |c| 'b' == c }
|
74
75
|
puts e.at_most?(42) { |c| 'b' == c }
|
75
76
|
```
|
76
77
|
|
77
|
-
|
78
78
|
## Compatibility
|
79
79
|
|
80
80
|
This gem is tested with these Ruby versions (MRI, unless JRuby):
|
81
81
|
|
82
|
-
-
|
83
|
-
- 3.
|
84
|
-
- 3.
|
82
|
+
- 3.0.x
|
83
|
+
- 3.1.x
|
84
|
+
- 3.2.x
|
85
|
+
- 3.3.x
|
85
86
|
|
86
87
|
as well as a current version of JRuby and TruffleRuby
|
87
88
|
|
@@ -95,6 +96,18 @@ as well as a current version of JRuby and TruffleRuby
|
|
95
96
|
|
96
97
|
A more detailed description is at https://opensource.com/article/19/7/create-pull-request-github
|
97
98
|
|
99
|
+
### Tip
|
100
|
+
|
101
|
+
After `bundle install` (or `update`) you can now use [`Guard`](https://github.com/guard/guard).
|
102
|
+
|
103
|
+
In the project directory run
|
104
|
+
|
105
|
+
```
|
106
|
+
bundle exec guard
|
107
|
+
```
|
108
|
+
|
109
|
+
Now, RSpec should run when files are saved (or changed otherwise).
|
110
|
+
Note though, that this may or may not work out-of-the-box on all operating systems.
|
98
111
|
|
99
112
|
### Reporting a bug
|
100
113
|
|
@@ -0,0 +1 @@
|
|
1
|
+
1239898f83c71b2c47cf6e8950369976824382a67cd53f3d99500fcb72af7ddaa5ffb8d42813e0c08a64087e51ede97e2a36d39d2442c67de4028fb9a1bdd434
|
data/limit_detectors.gemspec
CHANGED
@@ -20,10 +20,15 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_development_dependency 'bundler'
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency 'pry
|
23
|
+
spec.add_development_dependency 'guard-rspec'
|
24
|
+
spec.add_development_dependency 'pry', '~> 0.14.2'
|
25
|
+
spec.add_development_dependency 'pry-doc', '~> 1.4.0'
|
25
26
|
spec.add_development_dependency 'rake', '~> 13.0.6'
|
26
|
-
spec.add_development_dependency '
|
27
|
+
spec.add_development_dependency 'rb-fsevent'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.12'
|
29
|
+
spec.add_development_dependency 'terminal-notifier'
|
30
|
+
spec.add_development_dependency 'terminal-notifier-guard'
|
31
|
+
|
27
32
|
spec.metadata = {
|
28
33
|
'rubygems_mfa_required' => 'true'
|
29
34
|
}
|
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.
|
4
|
+
version: 1.0.7
|
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:
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,34 +24,48 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard-rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: pry
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.14.
|
47
|
+
version: 0.14.2
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.14.
|
54
|
+
version: 0.14.2
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: pry-doc
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
61
|
+
version: 1.4.0
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
68
|
+
version: 1.4.0
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +80,62 @@ dependencies:
|
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: 13.0.6
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rb-fsevent
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rspec
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - "~>"
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
103
|
+
version: '3.12'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
110
|
+
version: '3.12'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: terminal-notifier
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: terminal-notifier-guard
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
83
139
|
description: Some methods to detect whether an Enumerable object contains a constrained
|
84
140
|
number of elements that match a given condition.
|
85
141
|
email:
|
@@ -88,17 +144,20 @@ executables: []
|
|
88
144
|
extensions: []
|
89
145
|
extra_rdoc_files: []
|
90
146
|
files:
|
147
|
+
- ".github/workflows/codeql-analysis.yml"
|
91
148
|
- ".github/workflows/ruby.yml"
|
92
149
|
- ".gitignore"
|
93
150
|
- ".rspec"
|
94
151
|
- ".rubocop.yml"
|
95
152
|
- Gemfile
|
153
|
+
- Guardfile
|
96
154
|
- LICENSE.txt
|
97
155
|
- README.md
|
98
156
|
- Rakefile
|
99
157
|
- checksums/limit_detectors-1.0.2.gem.sha512
|
100
158
|
- checksums/limit_detectors-1.0.3.gem.sha512
|
101
159
|
- checksums/limit_detectors-1.0.4.gem.sha512
|
160
|
+
- checksums/limit_detectors-1.0.5.gem.sha512
|
102
161
|
- example/example.rb
|
103
162
|
- lib/limit_detectors.rb
|
104
163
|
- lib/limit_detectors/version.rb
|
@@ -125,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
184
|
- !ruby/object:Gem::Version
|
126
185
|
version: '0'
|
127
186
|
requirements: []
|
128
|
-
rubygems_version: 3.3
|
187
|
+
rubygems_version: 3.5.3
|
129
188
|
signing_key:
|
130
189
|
specification_version: 4
|
131
190
|
summary: Detect certain conditions of elements of an Enumerable object
|