scan_left 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ada6f02fa663948a57b934fced8f69dbd24a4eface9f62fcad535d7ecc3fe6e3
4
- data.tar.gz: 660026f96d8d1e84404043256043851012be5a0dd85fd3373641e372cce95865
3
+ metadata.gz: b44a24facdfe1cb6c3ddacbd249c1eee171a1dcdd36a1c17cbbb3d744d0b3fc0
4
+ data.tar.gz: f6bfaeb6c2ab5effebcfd9f78016e6c0f95b546cdb8eac0bef70a60fa9caf6c0
5
5
  SHA512:
6
- metadata.gz: d3f355a17a62e271ac8c1a5c65e07be7f2a31059a5a74db9de38ce5db7e2ad187e2bd1cb2b910d7fa20f12446905b4cf0ffa485dc813cb2a3f89d03d6868c23d
7
- data.tar.gz: 9bb78ebd390fbb37d93c9a95e0b6d6ea02467e3d42445dfda5e546dcfb8bff754652b0c77d9d36984b509c2814a8a37181d42871ccf2548c7f4a66d63ba8b7ec
6
+ metadata.gz: 775ec35bf0b1cc43e8346d32adc5e15592b0364e1a8c1c9e3d0a8f043a039ac055c534099e3e4981344b4b8775e3ac3e98f1fba1eb88009748a7938e78cebbb6
7
+ data.tar.gz: 548214f3448a0d68ec8c6aa19eb86b4ddf556ec87e986032bbae051da253d9679f470c89a8cdda1ce3e3bb550633864d234325a21432c935ba34b0740fcdc875
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ time: "00:00"
8
+ timezone: America/New_York
9
+ open-pull-requests-limit: 99
10
+ labels:
11
+ - dependencies
12
+ - Needs QA
13
+ allow:
14
+ - dependency-type: direct
@@ -0,0 +1,32 @@
1
+ name: Dependabot Pull Request
2
+ on:
3
+ pull_request_target:
4
+ types: [opened, synchronize, reopened, labeled]
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ if: ${{ github.actor == 'dependabot[bot]' }}
9
+ steps:
10
+ - name: Fetch Dependabot metadata
11
+ id: dependabot-metadata
12
+ uses: dependabot/fetch-metadata@v1.1.0
13
+ with:
14
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
15
+ - name: Approve and merge Dependabot PRs for development dependencies
16
+ # Auto-merge the PR if either:
17
+ # a) it has the `development-dependencies` label, which we add for certain
18
+ # categories of PRs (see `.github/dependabot.yml`), OR
19
+ # b) Dependabot has categorized it as a `direct:development` dependency,
20
+ # meaning it's in the Gemfile in a `development` or `test` group
21
+ #
22
+ # Note that we also do nothing when the PR has already had auto-merge
23
+ # enabled, to prevent scenarios where this check runs many times (for
24
+ # instance, because removing `Needs QA` triggers another run, or because
25
+ # other PRs are merging and causing this to rebase and trigger another
26
+ # run) and then approves the PR many times, which is confusing and looks
27
+ # awkward.
28
+ if: ${{ !github.event.pull_request.auto_merge && (contains(github.event.pull_request.labels.*.name, 'development-dependencies') || steps.dependabot-metadata.outputs.dependency-type == 'direct:development') }}
29
+ run: gh pr merge --auto --merge "$PR_URL" && gh pr edit "$PR_URL" --remove-label "Needs QA" && gh pr review --approve "$PR_URL"
30
+ env:
31
+ PR_URL: ${{github.event.pull_request.html_url}}
32
+ GITHUB_TOKEN: ${{secrets.PANORAMA_BOT_RW_TOKEN}}
@@ -1,32 +1,39 @@
1
- # based on https://github.com/ruby/setup-ruby/blob/master/README.md
2
- name: Tests
3
- on: [push, pull_request]
1
+ name: Main
2
+ on:
3
+ pull_request:
4
+ branches:
5
+ - main
6
+ push:
7
+ branches:
8
+ - main
4
9
  jobs:
5
10
  ci:
6
11
  name: CI
7
12
  strategy:
8
13
  fail-fast: false
9
14
  matrix:
10
- os: [ ubuntu-latest ]
11
- ruby: [ 2.5, 2.6, 2.7, jruby ]
12
- runs-on: ${{ matrix.os }}
13
- env:
14
- CI: true
15
+ # Due to https://github.com/actions/runner/issues/849, we have to use
16
+ # quotes for '3.0'. Without quotes, CI runs 3.1.
17
+ ruby: [ jruby, truffleruby, 2.5, 2.6, 2.7, '3.0', 3.1 ]
18
+ runs-on: ubuntu-latest
15
19
  steps:
16
20
  - uses: actions/checkout@v2
21
+
22
+ # Conditionally configure bundler via environment variables as advised
23
+ # * https://github.com/ruby/setup-ruby#bundle-config
24
+ - name: Set bundler environment variables
25
+ run: |
26
+ echo "BUNDLE_WITHOUT=checks" >> $GITHUB_ENV
27
+ if: matrix.ruby != 3.1
28
+
29
+ # Use 'bundler-cache: true' instead of actions/cache as advised:
30
+ # * https://github.com/actions/cache/blob/main/examples.md#ruby---bundler
17
31
  - uses: ruby/setup-ruby@v1
18
32
  with:
19
33
  ruby-version: ${{ matrix.ruby }}
20
- - uses: actions/cache@v1
21
- with:
22
- path: vendor/bundle
23
- key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
24
- restore-keys: |
25
- bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
26
- - name: bundle install
27
- run: |
28
- ruby -v
29
- bundle config path vendor/bundle
30
- bundle install --jobs 4 --retry 3
31
- - run: bundle exec rubocop
34
+ bundler-cache: true
35
+
32
36
  - run: bundle exec rspec
37
+
38
+ - run: bundle exec rubocop
39
+ if: matrix.ruby == 3.1
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  inherit_gem:
2
- panolint: rubocop.yml
2
+ panolint-ruby: panolint-ruby-rubocop.yml
3
3
  Metrics/BlockLength:
4
4
  Exclude:
5
5
  - scan_left.gemspec
data/CHANGELOG.md CHANGED
@@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.1] - 2023-06-05
10
+ ### Changed
11
+ - Changed linting development dependency from `panolint` to `panolint-ruby`.
12
+
13
+ ## [0.3.0] - 2020-06-30
14
+ ### Added
15
+ - Dependabot configuration for automatic dependency update PRs
16
+ - Added Parker Finch as a gem author in the gemspec!
17
+
18
+ ### Changed
19
+ - Moved panolint to *development* dependency (oops!)
20
+ - Fixed YARD docs link and other typos
21
+
9
22
  ## [0.2.1] - 2020-05-15
10
23
  ### Added
11
24
  - Additional documentation and examples
@@ -41,7 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
41
54
  - Initial gem project structure
42
55
  - Initial CHANGELOG.md based on keepachangelog.com
43
56
 
44
- [Unreleased]: https://github.com/panorama-ed/scan_left/compare/v0.2.1...HEAD
57
+ [Unreleased]: https://github.com/panorama-ed/scan_left/compare/v0.3.0...HEAD
58
+ [0.3.0]: https://github.com/panorama-ed/scan_left/compare/v0.2.1...v0.3.0
45
59
  [0.2.1]: https://github.com/panorama-ed/scan_left/compare/v0.2.0...v0.2.1
46
60
  [0.2.0]: https://github.com/panorama-ed/scan_left/compare/v0.1.0...v0.2.0
47
61
  [0.1.0]: https://github.com/panorama-ed/scan_left/compare/v0.0.1...v0.1.0
data/Gemfile CHANGED
@@ -2,7 +2,10 @@ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
- # Specify your gem's dependencies in scan_left.gemspec
6
- gemspec
5
+ group :development do
6
+ gem "rspec", "~> 3.0"
7
+ end
7
8
 
8
- gem "panolint", github: "panorama-ed/panolint"
9
+ group :checks do
10
+ gem "panolint-ruby", github: "panorama-ed/panolint-ruby", branch: "main"
11
+ end
data/Gemfile.lock CHANGED
@@ -1,86 +1,70 @@
1
1
  GIT
2
- remote: https://github.com/panorama-ed/panolint
3
- revision: 145a6b9415534d5563f319798297d00e3c184fd1
2
+ remote: https://github.com/panorama-ed/panolint-ruby
3
+ revision: 86f87fb9d8b39ce3542342b5583b0ba926e801a2
4
+ branch: main
4
5
  specs:
5
- panolint (0.1.2)
6
- brakeman (~> 4.8)
7
- rubocop (~> 0.83)
8
- rubocop-performance (~> 1.5)
9
- rubocop-rails (~> 2.5)
10
- rubocop-rspec (~> 1.39)
11
-
12
- PATH
13
- remote: .
14
- specs:
15
- scan_left (0.2.1)
6
+ panolint-ruby (0)
7
+ rubocop (= 1.52.0)
8
+ rubocop-performance (= 1.18.0)
9
+ rubocop-rspec (= 2.22.0)
16
10
 
17
11
  GEM
18
12
  remote: https://rubygems.org/
19
13
  specs:
20
- activesupport (6.0.3)
21
- concurrent-ruby (~> 1.0, >= 1.0.2)
22
- i18n (>= 0.7, < 2)
23
- minitest (~> 5.1)
24
- tzinfo (~> 1.1)
25
- zeitwerk (~> 2.2, >= 2.2.2)
26
- ast (2.4.0)
27
- brakeman (4.8.2)
28
- concurrent-ruby (1.1.6)
29
- diff-lcs (1.3)
30
- i18n (1.8.2)
31
- concurrent-ruby (~> 1.0)
32
- minitest (5.14.0)
33
- parallel (1.19.1)
34
- parser (2.7.1.2)
35
- ast (~> 2.4.0)
36
- rack (2.2.2)
37
- rainbow (3.0.0)
38
- rake (12.3.3)
39
- rexml (3.2.4)
40
- rspec (3.9.0)
41
- rspec-core (~> 3.9.0)
42
- rspec-expectations (~> 3.9.0)
43
- rspec-mocks (~> 3.9.0)
44
- rspec-core (3.9.2)
45
- rspec-support (~> 3.9.3)
46
- rspec-expectations (3.9.2)
14
+ ast (2.4.2)
15
+ diff-lcs (1.5.0)
16
+ json (2.6.3)
17
+ parallel (1.23.0)
18
+ parser (3.2.2.1)
19
+ ast (~> 2.4.1)
20
+ rainbow (3.1.1)
21
+ regexp_parser (2.8.0)
22
+ rexml (3.2.5)
23
+ rspec (3.12.0)
24
+ rspec-core (~> 3.12.0)
25
+ rspec-expectations (~> 3.12.0)
26
+ rspec-mocks (~> 3.12.0)
27
+ rspec-core (3.12.0)
28
+ rspec-support (~> 3.12.0)
29
+ rspec-expectations (3.12.0)
47
30
  diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.9.0)
49
- rspec-mocks (3.9.1)
31
+ rspec-support (~> 3.12.0)
32
+ rspec-mocks (3.12.0)
50
33
  diff-lcs (>= 1.2.0, < 2.0)
51
- rspec-support (~> 3.9.0)
52
- rspec-support (3.9.3)
53
- rubocop (0.83.0)
34
+ rspec-support (~> 3.12.0)
35
+ rspec-support (3.12.0)
36
+ rubocop (1.52.0)
37
+ json (~> 2.3)
54
38
  parallel (~> 1.10)
55
- parser (>= 2.7.0.1)
39
+ parser (>= 3.2.0.0)
56
40
  rainbow (>= 2.2.2, < 4.0)
57
- rexml
41
+ regexp_parser (>= 1.8, < 3.0)
42
+ rexml (>= 3.2.5, < 4.0)
43
+ rubocop-ast (>= 1.28.0, < 2.0)
58
44
  ruby-progressbar (~> 1.7)
59
- unicode-display_width (>= 1.4.0, < 2.0)
60
- rubocop-performance (1.5.2)
61
- rubocop (>= 0.71.0)
62
- rubocop-rails (2.5.2)
63
- activesupport
64
- rack (>= 1.1)
65
- rubocop (>= 0.72.0)
66
- rubocop-rspec (1.39.0)
67
- rubocop (>= 0.68.1)
68
- ruby-progressbar (1.10.1)
69
- thread_safe (0.3.6)
70
- tzinfo (1.2.7)
71
- thread_safe (~> 0.1)
72
- unicode-display_width (1.7.0)
73
- zeitwerk (2.3.0)
45
+ unicode-display_width (>= 2.4.0, < 3.0)
46
+ rubocop-ast (1.29.0)
47
+ parser (>= 3.2.1.0)
48
+ rubocop-capybara (2.18.0)
49
+ rubocop (~> 1.41)
50
+ rubocop-factory_bot (2.23.1)
51
+ rubocop (~> 1.33)
52
+ rubocop-performance (1.18.0)
53
+ rubocop (>= 1.7.0, < 2.0)
54
+ rubocop-ast (>= 0.4.0)
55
+ rubocop-rspec (2.22.0)
56
+ rubocop (~> 1.33)
57
+ rubocop-capybara (~> 2.17)
58
+ rubocop-factory_bot (~> 2.22)
59
+ ruby-progressbar (1.13.0)
60
+ unicode-display_width (2.4.2)
74
61
 
75
62
  PLATFORMS
76
63
  ruby
77
64
 
78
65
  DEPENDENCIES
79
- bundler (~> 2.1)
80
- panolint!
81
- rake (~> 12.3)
66
+ panolint-ruby!
82
67
  rspec (~> 3.0)
83
- scan_left!
84
68
 
85
69
  BUNDLED WITH
86
- 2.1.4
70
+ 2.3.22
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Panorama Education
3
+ Copyright (c) 2020-2022 Panorama Education
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # scan_left
2
- ![Tests](https://github.com/panorama-ed/scan_left/workflows/Tests/badge.svg)
2
+ [![Tests](https://github.com/panorama-ed/scan_left/workflows/Tests/badge.svg)](https://github.com/panorama-ed/scan_left/actions?query=workflow%3ATests)
3
3
 
4
- [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/panorma-ed/scan_left)
4
+ [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/panorama-ed/scan_left)
5
5
  [![Docs Coverage](http://inch-ci.org/github/panorama-ed/scan_left.png)](http://inch-ci.org/github/panorama-ed/scan_left)
6
6
 
7
7
  [![Gem Version](https://img.shields.io/gem/v/scan_left.svg)](https://rubygems.org/gems/scan_left)
@@ -46,7 +46,7 @@ The key differences between `#inject` and `#scan_left` are:
46
46
  2. **Laziness**: `#scan_left` can preserve the laziness of the input
47
47
  series. As each incremental result is read from the output
48
48
  series, the actual calculation is lazily performed against the
49
- input. `#inject` cannot be a a lazy operation in general, as its
49
+ input. `#inject` cannot be a lazy operation in general, as its
50
50
  single result reflects a calculation across every element of the
51
51
  input series.
52
52
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ScanLeft
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.1"
5
5
  end
data/scan_left.gemspec CHANGED
@@ -7,8 +7,9 @@ require "scan_left/version"
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "scan_left"
9
9
  spec.version = ScanLeft::VERSION
10
- spec.authors = ["Marc Siegel"]
11
- spec.email = ["msiegel@panoramaed.com", "marc@usainnov.com"]
10
+ spec.authors = ["Marc Siegel", "Parker Finch"]
11
+ spec.email = ["marc@usainnov.com", "msiegel@panoramaed.com",
12
+ "pfinch@panoramaed.com"]
12
13
 
13
14
  spec.summary = "A tiny Ruby gem to provide the 'scan_left' operation on "\
14
15
  "any Ruby Enumerable."
@@ -21,7 +22,7 @@ Gem::Specification.new do |spec|
21
22
  spec.metadata["homepage_uri"] = spec.homepage
22
23
  spec.metadata["source_code_uri"] = spec.homepage
23
24
  spec.metadata["changelog_uri"] =
24
- "https://github.com/panorama-ed/scan_left/blob/master/CHANGELOG.md"
25
+ "https://github.com/panorama-ed/scan_left/blob/main/CHANGELOG.md"
25
26
  spec.metadata["documentation_uri"] = "https://rubydoc.info/gems/scan_left"
26
27
  else
27
28
  raise "RubyGems 2.0 or newer is required to protect against "\
@@ -40,7 +41,5 @@ Gem::Specification.new do |spec|
40
41
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
41
42
  spec.require_paths = ["lib"]
42
43
 
43
- spec.add_development_dependency "bundler", "~> 2.1"
44
- spec.add_development_dependency "rake", "~> 12.3"
45
- spec.add_development_dependency "rspec", "~> 3.0"
44
+ spec.metadata["rubygems_mfa_required"] = "true"
46
45
  end
metadata CHANGED
@@ -1,77 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scan_left
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Siegel
8
- autorequire:
8
+ - Parker Finch
9
+ autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2020-05-15 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.1'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.1'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '12.3'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '12.3'
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'
12
+ date: 2023-06-05 00:00:00.000000000 Z
13
+ dependencies: []
55
14
  description: A tiny Ruby gem to provide the 'scan_left' operation on any Ruby Enumerable.
56
15
  email:
57
- - msiegel@panoramaed.com
58
16
  - marc@usainnov.com
17
+ - msiegel@panoramaed.com
18
+ - pfinch@panoramaed.com
59
19
  executables: []
60
20
  extensions: []
61
21
  extra_rdoc_files: []
62
22
  files:
23
+ - ".github/dependabot.yml"
24
+ - ".github/workflows/dependabot-prs.yml"
63
25
  - ".github/workflows/tests.yml"
64
26
  - ".gitignore"
65
27
  - ".rspec"
66
28
  - ".rubocop.yml"
67
- - ".travis.yml"
68
29
  - CHANGELOG.md
69
30
  - CODE_OF_CONDUCT.md
70
31
  - Gemfile
71
32
  - Gemfile.lock
72
33
  - LICENSE
73
34
  - README.md
74
- - Rakefile
75
35
  - bin/console
76
36
  - bin/setup
77
37
  - lib/scan_left.rb
@@ -85,9 +45,10 @@ metadata:
85
45
  allowed_push_host: https://rubygems.org/
86
46
  homepage_uri: https://github.com/panorama-ed/scan_left
87
47
  source_code_uri: https://github.com/panorama-ed/scan_left
88
- changelog_uri: https://github.com/panorama-ed/scan_left/blob/master/CHANGELOG.md
48
+ changelog_uri: https://github.com/panorama-ed/scan_left/blob/main/CHANGELOG.md
89
49
  documentation_uri: https://rubydoc.info/gems/scan_left
90
- post_install_message:
50
+ rubygems_mfa_required: 'true'
51
+ post_install_message:
91
52
  rdoc_options: []
92
53
  require_paths:
93
54
  - lib
@@ -102,8 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
63
  - !ruby/object:Gem::Version
103
64
  version: '0'
104
65
  requirements: []
105
- rubygems_version: 3.0.8
106
- signing_key:
66
+ rubygems_version: 3.3.7
67
+ signing_key:
107
68
  specification_version: 4
108
69
  summary: A tiny Ruby gem to provide the 'scan_left' operation on any Ruby Enumerable.
109
70
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.8
7
- before_install: gem install bundler -v 1.17.3
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec