static_collection 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +23 -2
- data/.github/workflows/stale.yml +20 -0
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +16 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +45 -43
- data/lib/static_collection/version.rb +1 -1
- data/lib/static_collection.rb +1 -1
- data/static_collection.gemspec +11 -11
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c35ba8c77c61ddfaf666a7b9a0be2a0ba9580ec568e6fbc7c5269590d300607b
|
4
|
+
data.tar.gz: a85d58e434c5d0dc7506016376d65b93e9715c55077ca7698cf637ab5eee76d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6639c1ad20a1ab0311597e4ef172b83b42ed15e5261948090314097f3b5464c4ceed9eda7516f162915409d70eb41c7d42586a4c50585c8f8eba7aa5b81b8e23
|
7
|
+
data.tar.gz: 9dcbf439545dfbe7f5de03d6415ed1205dab7a221e4637400b8260b0f1b6028bf5ae44fcde78ee0e0f77abf48cda4241da07a19a6b1a8561e944b4177fe97b79
|
data/.github/workflows/main.yml
CHANGED
@@ -1,21 +1,42 @@
|
|
1
1
|
---
|
2
2
|
name: Pipeline
|
3
3
|
on: push
|
4
|
+
concurrency:
|
5
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
6
|
+
cancel-in-progress: true
|
7
|
+
|
4
8
|
jobs:
|
5
9
|
build:
|
6
10
|
name: Build
|
7
11
|
runs-on: ubuntu-20.04
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: [2.7.5, 3.0.3, 3.1.0, 3.2.0]
|
8
15
|
steps:
|
9
16
|
- uses: actions/checkout@v2
|
10
|
-
-
|
17
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
18
|
+
uses: ruby/setup-ruby@v1
|
11
19
|
with:
|
12
20
|
bundler-cache: true
|
21
|
+
ruby-version: ${{ matrix.ruby-version }}
|
13
22
|
- name: Lint
|
14
23
|
run: bundle exec rubocop
|
15
24
|
- name: Test
|
16
25
|
run: bundle exec rspec
|
26
|
+
|
27
|
+
# Separate `release` job from `build`, as we only want release to be run once
|
28
|
+
# and not run for each ruby version in the matrix:
|
29
|
+
release:
|
30
|
+
name: Release
|
31
|
+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
32
|
+
needs: build
|
33
|
+
runs-on: ubuntu-20.04
|
34
|
+
steps:
|
35
|
+
- uses: actions/checkout@v2
|
36
|
+
- uses: ruby/setup-ruby@v1
|
37
|
+
with:
|
38
|
+
bundler-cache: true
|
17
39
|
- name: Release the gem
|
18
|
-
if: ${{ github.ref == 'refs/heads/main' }}
|
19
40
|
run: |
|
20
41
|
mkdir -p ~/.gem
|
21
42
|
cat << EOF > ~/.gem/credentials
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: 'Close stale PRs'
|
2
|
+
on:
|
3
|
+
schedule:
|
4
|
+
- cron: '30 6 1 * *' # 6:30 am UTC: 1:30 am EST on 1st day of the month
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
stale:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
steps:
|
10
|
+
- uses: actions/stale@v4
|
11
|
+
with:
|
12
|
+
days-before-stale: 30
|
13
|
+
days-before-close: 30
|
14
|
+
stale-pr-message: >
|
15
|
+
This issue has been automatically marked as stale because it has not had
|
16
|
+
recent activity. It will be closed if no further activity occurs.
|
17
|
+
close-pr-message: >
|
18
|
+
This issue has been automatically closed because it has had no activity
|
19
|
+
for over 90 days. Please re-open if you feel this was done in error.
|
20
|
+
exempt-pr-labels: 'dependabot,depfu,dependencies,security'
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2023-02-02 21:48:38 UTC using RuboCop version 1.44.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
|
11
|
+
# SupportedStyles: Gemfile, gems.rb, gemspec
|
12
|
+
# AllowedGems: bundler
|
13
|
+
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
|
14
|
+
Gemspec/DevelopmentDependencies:
|
15
|
+
Exclude:
|
16
|
+
- 'static_collection.gemspec'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.5
|
data/Gemfile.lock
CHANGED
@@ -1,82 +1,84 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
static_collection (0.
|
4
|
+
static_collection (0.3.1)
|
5
5
|
activesupport (>= 4)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (
|
10
|
+
activesupport (7.0.4.2)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 1.6, < 2)
|
13
13
|
minitest (>= 5.1)
|
14
14
|
tzinfo (~> 2.0)
|
15
|
-
zeitwerk (~> 2.3)
|
16
15
|
ast (2.4.2)
|
17
|
-
concurrent-ruby (1.
|
18
|
-
diff-lcs (1.
|
19
|
-
i18n (1.
|
16
|
+
concurrent-ruby (1.2.0)
|
17
|
+
diff-lcs (1.5.0)
|
18
|
+
i18n (1.12.0)
|
20
19
|
concurrent-ruby (~> 1.0)
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
json (2.6.3)
|
21
|
+
minitest (5.17.0)
|
22
|
+
parallel (1.22.1)
|
23
|
+
parser (3.2.0.0)
|
24
24
|
ast (~> 2.4.1)
|
25
|
-
rack (
|
26
|
-
rainbow (3.
|
25
|
+
rack (3.0.4.1)
|
26
|
+
rainbow (3.1.1)
|
27
27
|
rake (10.5.0)
|
28
|
-
regexp_parser (2.
|
28
|
+
regexp_parser (2.6.2)
|
29
29
|
rexml (3.2.5)
|
30
|
-
rspec (3.
|
31
|
-
rspec-core (~> 3.
|
32
|
-
rspec-expectations (~> 3.
|
33
|
-
rspec-mocks (~> 3.
|
34
|
-
rspec-core (3.
|
35
|
-
rspec-support (~> 3.
|
36
|
-
rspec-expectations (3.
|
30
|
+
rspec (3.12.0)
|
31
|
+
rspec-core (~> 3.12.0)
|
32
|
+
rspec-expectations (~> 3.12.0)
|
33
|
+
rspec-mocks (~> 3.12.0)
|
34
|
+
rspec-core (3.12.0)
|
35
|
+
rspec-support (~> 3.12.0)
|
36
|
+
rspec-expectations (3.12.2)
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.
|
38
|
+
rspec-support (~> 3.12.0)
|
39
39
|
rspec-its (1.3.0)
|
40
40
|
rspec-core (>= 3.0.0)
|
41
41
|
rspec-expectations (>= 3.0.0)
|
42
|
-
rspec-mocks (3.
|
42
|
+
rspec-mocks (3.12.3)
|
43
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
-
rubocop (1.
|
44
|
+
rspec-support (~> 3.12.0)
|
45
|
+
rspec-support (3.12.0)
|
46
|
+
rubocop (1.44.1)
|
47
|
+
json (~> 2.3)
|
47
48
|
parallel (~> 1.10)
|
48
|
-
parser (>= 3.
|
49
|
+
parser (>= 3.2.0.0)
|
49
50
|
rainbow (>= 2.2.2, < 4.0)
|
50
51
|
regexp_parser (>= 1.8, < 3.0)
|
51
|
-
rexml
|
52
|
-
rubocop-ast (>= 1.
|
52
|
+
rexml (>= 3.2.5, < 4.0)
|
53
|
+
rubocop-ast (>= 1.24.1, < 2.0)
|
53
54
|
ruby-progressbar (~> 1.7)
|
54
|
-
unicode-display_width (>=
|
55
|
-
rubocop-ast (1.
|
56
|
-
parser (>= 3.
|
57
|
-
rubocop-
|
55
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
56
|
+
rubocop-ast (1.24.1)
|
57
|
+
parser (>= 3.1.1.0)
|
58
|
+
rubocop-capybara (2.17.0)
|
59
|
+
rubocop (~> 1.41)
|
60
|
+
rubocop-performance (1.15.2)
|
58
61
|
rubocop (>= 1.7.0, < 2.0)
|
59
62
|
rubocop-ast (>= 0.4.0)
|
60
|
-
rubocop-rails (2.
|
63
|
+
rubocop-rails (2.17.4)
|
61
64
|
activesupport (>= 4.2.0)
|
62
65
|
rack (>= 1.1)
|
63
|
-
rubocop (>= 1.
|
64
|
-
rubocop-rspec (2.
|
65
|
-
rubocop (~> 1.
|
66
|
-
rubocop-
|
67
|
-
rubocop-vendor (0.
|
66
|
+
rubocop (>= 1.33.0, < 2.0)
|
67
|
+
rubocop-rspec (2.18.1)
|
68
|
+
rubocop (~> 1.33)
|
69
|
+
rubocop-capybara (~> 2.17)
|
70
|
+
rubocop-vendor (0.8.10)
|
68
71
|
rubocop (>= 0.53.0)
|
69
72
|
ruby-progressbar (1.11.0)
|
70
|
-
tzinfo (2.0.
|
73
|
+
tzinfo (2.0.6)
|
71
74
|
concurrent-ruby (~> 1.0)
|
72
|
-
unicode-display_width (2.
|
73
|
-
ws-style (6.
|
74
|
-
rubocop (>= 1.
|
75
|
+
unicode-display_width (2.4.2)
|
76
|
+
ws-style (6.14.4)
|
77
|
+
rubocop (>= 1.36)
|
75
78
|
rubocop-performance (>= 1.10.2)
|
76
79
|
rubocop-rails (>= 2.9.1)
|
77
80
|
rubocop-rspec (>= 2.2.0)
|
78
81
|
rubocop-vendor (>= 0.6.0)
|
79
|
-
zeitwerk (2.4.2)
|
80
82
|
|
81
83
|
PLATFORMS
|
82
84
|
ruby
|
@@ -91,4 +93,4 @@ DEPENDENCIES
|
|
91
93
|
ws-style
|
92
94
|
|
93
95
|
BUNDLED WITH
|
94
|
-
2.2.
|
96
|
+
2.2.32
|
data/lib/static_collection.rb
CHANGED
@@ -21,7 +21,7 @@ module StaticCollection
|
|
21
21
|
end
|
22
22
|
define_singleton_method("find_all_by_#{attribute_name}") do |value|
|
23
23
|
ActiveSupport::Deprecation.warn(
|
24
|
-
"find_all_by_#{attribute_name} is deprecated for StaticCollection, "\
|
24
|
+
"find_all_by_#{attribute_name} is deprecated for StaticCollection, " \
|
25
25
|
"use where(#{attribute_name}: [value])",
|
26
26
|
)
|
27
27
|
all.select { |instance| instance.send(attribute_name) == value }
|
data/static_collection.gemspec
CHANGED
@@ -3,23 +3,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
require 'static_collection/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
6
|
+
spec.name = "static_collection"
|
7
|
+
spec.version = StaticCollection::VERSION
|
8
|
+
spec.authors = ["Peter Graham"]
|
9
|
+
spec.email = ["peter@wealthsimple.com"]
|
10
10
|
|
11
|
-
spec.summary
|
12
|
-
spec.description
|
13
|
-
spec.homepage
|
14
|
-
spec.license
|
11
|
+
spec.summary = 'Run queries against static data.'
|
12
|
+
spec.description = 'Rubygem for running basic queries against static data.'
|
13
|
+
spec.homepage = "https://github.com/wealthsimple/static_collection"
|
14
|
+
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.required_ruby_version = '>= 2.7.
|
16
|
+
spec.required_ruby_version = '>= 2.7.5'
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
19
|
f.match(%r{^(test|spec|features)/})
|
20
20
|
end
|
21
|
-
spec.bindir
|
22
|
-
spec.executables
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
spec.add_dependency "activesupport", ">= 4"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: static_collection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Graham
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -117,9 +117,11 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- ".github/CODEOWNERS"
|
119
119
|
- ".github/workflows/main.yml"
|
120
|
+
- ".github/workflows/stale.yml"
|
120
121
|
- ".gitignore"
|
121
122
|
- ".rspec"
|
122
123
|
- ".rubocop.yml"
|
124
|
+
- ".rubocop_todo.yml"
|
123
125
|
- ".ruby-version"
|
124
126
|
- Gemfile
|
125
127
|
- Gemfile.lock
|
@@ -144,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
146
|
requirements:
|
145
147
|
- - ">="
|
146
148
|
- !ruby/object:Gem::Version
|
147
|
-
version: 2.7.
|
149
|
+
version: 2.7.5
|
148
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
151
|
requirements:
|
150
152
|
- - ">="
|