Skip to content

Commit

Permalink
2016: Add ruby setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jp7677 committed Dec 17, 2024
1 parent 6a2dd83 commit 27fc43d
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ jobs:
pylint .
pytest
AoC-2016:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Run AoC 2016
run: |
cd 2016
bundler install
rake
AoC-2017:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions 2016/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/**/*
8 changes: 8 additions & 0 deletions 2016/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'minitest', group: 'development'
gem 'mutex_m', group: 'development'
gem 'rake', group: 'development'
gem 'rubocop', group: 'development', require: false
45 changes: 45 additions & 0 deletions 2016/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.9.0)
language_server-protocol (3.17.0.3)
minitest (5.25.4)
mutex_m (0.2.0)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.3)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
minitest
mutex_m
rake
rubocop

BUNDLED WITH
2.5.22
7 changes: 7 additions & 0 deletions 2016/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

task default: %w[test]

task :test do
ruby 'test/day00_test.rb'
end
1 change: 1 addition & 0 deletions 2016/data/day00-input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
14 changes: 14 additions & 0 deletions 2016/test/day00_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

require 'minitest/autorun'

describe 'day00' do
it 'solves part 01' do
input =
File
.readlines(File.join(__dir__ || raise('no current dir'), '../data/day00-input.txt'))
.map(&:strip)

assert_equal '0', input.first
end
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ From <https://adventofcode.com/>. Very much work in progress and better late tha
## The years

- Advent of Code 2015 Python <https://github.com/jp7677/adventofcode/tree/main/2015>
- Advent of Code 2016
- Advent of Code 2016 Ruby <https://github.com/jp7677/adventofcode/tree/main/2016>
- Advent of Code 2017 Typescript <https://github.com/jp7677/adventofcode/tree/main/2017>
- Advent of Code 2018 C# <https://github.com/jp7677/adventofcode/tree/main/2018>
- Advent of Code 2019 Kotlin <https://github.com/jp7677/adventofcode/tree/main/2019>
Expand Down

0 comments on commit 27fc43d

Please sign in to comment.