aoc_rb 0.2.0 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38ac165e5227f5d9b076d64d93dea19911b340dc9d5548d09f5ae5cb212bc6db
4
- data.tar.gz: ca88a6b53beea0f7494a48ec17ba26314b9d87c37f22ddeb32d8b4fb782ebfef
3
+ metadata.gz: c6b9b02f670f239d02ce4b04aebc3520e82dfda9654ec8e031b929c9b2fcd379
4
+ data.tar.gz: 260fcdaaa65f8652e075dae3f6d67f867692d1f50468ea058110de0ca9666397
5
5
  SHA512:
6
- metadata.gz: '03981012538cc9f76c88e32b1ba4d7cf3c0f51101da979065e84ea22ce8f7a12fcd45eb9d7f2451d8a044b0352150b73a94efa6bba99700e3c4f797c211aac6d'
7
- data.tar.gz: 6ff40d3a21324bcad2f840583ad9e9bb1388e84c852ae268580c343c04254775fbfcf50280767fb3841f586f874f07a2d21bf18fd5d7faf4ee6951e6a624c560
6
+ metadata.gz: 50e0b3d7d0debb618b240109d6da5d684e4327d6a66231c716a1d0f18e5e17287082449a08f25bf685c7cd8a2bd186f55f88d0b4c7f9b813454cfdc181637d1b
7
+ data.tar.gz: 30d87e13feb0c05846b86df8563ccdc407ea6136cbbd39e1865104a6a00e2d15c9b0727533e70d806ba79e2ff3d7155cac8ff1b4bfa96e0b22783a259a4ef02e
@@ -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: '21 7 * * 4'
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@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
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@v2
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@v2
@@ -12,22 +12,38 @@ on:
12
12
  branches: [ main ]
13
13
  pull_request:
14
14
  branches: [ main ]
15
+ types:
16
+ - opened
17
+ - synchronize
18
+ - reopened
19
+ - ready_for_review
20
+ - labeled
21
+ - unlabeled
15
22
 
16
23
  jobs:
24
+ changelog:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v2
28
+ - id: read-version
29
+ run: |
30
+ echo "::set-output name=VERSION::`cat lib/aoc_rb/version.rb | grep -i version | awk '{ print $3 }' | sed -e 's/\"//g'`"
31
+ - uses: dangoslen/changelog-enforcer@v2.3.1
32
+ with:
33
+ skipLabels: 'skip-changelog'
34
+ expectedLatestVersion: ${{ steps.read-version.outputs.VERSION }}
17
35
  test:
18
-
19
36
  runs-on: ubuntu-latest
20
37
  strategy:
21
38
  matrix:
22
- ruby-version: ['2.6', '2.7', '3.0']
23
-
39
+ ruby-version: ['2.6', '2.7', '3.0', '3.1']
24
40
  steps:
25
41
  - uses: actions/checkout@v2
26
42
  - name: Set up Ruby
27
43
  # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
44
  # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
45
  # uses: ruby/setup-ruby@v1
30
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
46
+ uses: ruby/setup-ruby@ebaea52cb20fea395b0904125276395e37183dac
31
47
  with:
32
48
  ruby-version: ${{ matrix.ruby-version }}
33
49
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
data/CHANGELOG.md ADDED
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.3]
10
+ ### Changed
11
+ - Update minimum nokogiri version
12
+ - Update thor gem
13
+
14
+ ## [0.2.2]
15
+ ### Fixed
16
+ - FileUtils uninitialized constant bug ([#10](https://github.com/pacso/aoc_rb/pull/10))
17
+
18
+ ## [0.2.1]
19
+ ### Changed
20
+ - Allow any number of arguments to be passed to solutions
21
+
22
+ ## [0.2.0]
23
+ ### Changed
24
+ - Improved input handling in puzzle solutions
25
+
26
+ ## [0.1.1]
27
+ ### Changed
28
+ - Switch from Travis to GitHub Actions
29
+ - Added Gem version badge
30
+ - Update gems and fix specs
31
+
32
+ ## [0.1.0]
33
+ ### Changed
34
+ - Simplified README
35
+
36
+ ### Fixed
37
+ - Added require for pathname
38
+
39
+ ## [0.0.0]
40
+
41
+ Initial release.
42
+
43
+ [Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.3...HEAD
44
+ [0.2.3]: https://github.com/pacso/aoc_rb/compare/v0.2.2...v0.2.3
45
+ [0.2.2]: https://github.com/pacso/aoc_rb/compare/v0.2.1...v0.2.2
46
+ [0.2.1]: https://github.com/pacso/aoc_rb/compare/v0.2.0...v0.2.1
47
+ [0.2.0]: https://github.com/pacso/aoc_rb/compare/v0.1.1...v0.2.0
48
+ [0.1.1]: https://github.com/pacso/aoc_rb/compare/v0.1.0...v0.1.1
49
+ [0.1.0]: https://github.com/pacso/aoc_rb/compare/v0.0.0...v0.1.0
50
+ [0.0.0]: https://github.com/pacso/aoc_rb/tree/9fc471cb0accb95ddad1aeb138d542056a0034c2
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in aoc_rb.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake", "~> 12.0"
6
+ gem "rake", "~> 13.0"
7
7
  gem "byebug"
data/aoc_rb.gemspec CHANGED
@@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency "dotenv", "~> 2.7.6"
29
29
  spec.add_dependency "httparty", "~> 0.20.0"
30
- spec.add_dependency "thor", "~> 1.1.0"
30
+ spec.add_dependency "thor", "~> 1.2.1"
31
31
  spec.add_dependency "rspec", "~> 3.0"
32
- spec.add_dependency "nokogiri", "~> 1.12.5"
32
+ spec.add_dependency "nokogiri", "~> 1.13.6"
33
33
 
34
34
  spec.add_development_dependency "webmock", "~> 3.14.0"
35
35
  end
data/lib/aoc_rb/cli.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "fileutils"
3
4
  require "aoc_rb/app_loader"
4
5
  AocRb::AppLoader.exec_app
5
6
 
@@ -1,3 +1,3 @@
1
1
  module AocRb
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true %>
2
2
 
3
3
  class Solution
4
- def self.part_1(input)
5
- new(input).part_1
4
+ def self.part_1(*input)
5
+ new(*input).part_1
6
6
  end
7
7
 
8
- def self.part_2(input)
9
- new(input).part_2
8
+ def self.part_2(*input)
9
+ new(*input).part_2
10
10
  end
11
11
 
12
12
  def initialize(input)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aoc_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Pascoe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2022-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.1.0
47
+ version: 1.2.1
48
48
  type: :runtime
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: 1.1.0
54
+ version: 1.2.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.12.5
75
+ version: 1.13.6
76
76
  type: :runtime
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.12.5
82
+ version: 1.13.6
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -103,9 +103,11 @@ executables:
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - ".github/workflows/codeql-analysis.yml"
106
107
  - ".github/workflows/tests.yml"
107
108
  - ".gitignore"
108
109
  - ".rspec"
110
+ - CHANGELOG.md
109
111
  - CODE_OF_CONDUCT.md
110
112
  - Gemfile
111
113
  - LICENSE
@@ -155,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
157
  - !ruby/object:Gem::Version
156
158
  version: '0'
157
159
  requirements: []
158
- rubygems_version: 3.2.3
160
+ rubygems_version: 3.0.9
159
161
  signing_key:
160
162
  specification_version: 4
161
163
  summary: A Ruby toolkit for Advent of Code