-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,035 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
advent_of_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#guard :shell do | ||
# watch(%r{^*\.rb}) { `bundle exec rspec --force-color -f doc spec/ ` } | ||
#end | ||
|
||
guard 'rspec', cmd: 'bundle exec rspec --force-color -f doc spec/', :all_on_start => true do | ||
watch(%r{^([^/]+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^spec/.*_spec\.rb$}) | ||
end | ||
|
||
notification :tmux, | ||
display_message: true, | ||
timeout: 5, # in seconds | ||
default_message_format: '%s >> %s', | ||
success: "green", | ||
failed: "red", | ||
pending: "yellow", | ||
default: "green" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'set' | ||
require '../lib/grid.rb' | ||
require '../lib/ring.rb' | ||
|
||
module Advent | ||
|
||
class Blank | ||
attr_accessor :debug | ||
|
||
def initialize(input) | ||
@debug = false | ||
end | ||
|
||
def debug! | ||
@debug = true | ||
end | ||
end | ||
end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require_relative 'blank' | ||
|
||
input = File.read('./input.txt') | ||
|
||
ad = Advent::Blank.new(input) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require './blank.rb' | ||
require 'rspec' | ||
require 'pry' | ||
|
||
describe Advent do | ||
|
||
let(:input) { | ||
<<~EOS | ||
EOS | ||
} | ||
|
||
describe Advent::Blank do | ||
let(:ad) { Advent::Blank.new(input) } | ||
|
||
describe "#new" do | ||
end | ||
|
||
context "validation" do | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -o verbose | ||
|
||
NAME=$1 | ||
DATE=$(date "+%d") | ||
DAY=${2:-$DATE} | ||
NAME="$(tr '[:lower:]' '[:upper:]' <<< ${NAME:0:1})${NAME:1}" | ||
FNAME=$(echo ${NAME} | tr '[:upper:]' '[:lower:]') | ||
|
||
cp -pr blank ${DAY} | ||
pushd ${DAY} | ||
find . | grep rb | xargs gsed -i "s/blank/${FNAME}/g" | ||
find . | grep rb | xargs gsed -i "s/Blank/${NAME}/g" | ||
mv blank.rb ${FNAME}.rb | ||
mv spec/blank_spec.rb spec/${FNAME}_spec.rb | ||
touch input.txt | ||
popd |
Oops, something went wrong.