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
# NOTE As seen at https://gist.github.com/costa/f9ae7184ca254b25f98872ae7a170358 | |
# | |
# Keeps spec (https://RSpec.info) test results (as YAML) in Git commit messages | |
# | |
# NOTE Makes sense for heavy or lengthy (e.g. manual) tests, both for | |
# - documenting the results in the repo | |
# - splitting testing sessions | |
require 'yaml' | |
require 'git' |
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
# NOTE As seen at https://gist.github.com/costa/1f7a77d0949a1ee1f612fcd35b4fc23e | |
# | |
# Enables proper manual (human operator / QA) testing (with https://RSpec.info) | |
# | |
# NOTE It is recommended to tag manual specs with `, manual: true`, | |
# -- so they can be skipped with `$ rspec -t ~manual` when human is not present. | |
# | |
# DSL: | |
# - #explain "<MESSAGE-TO-OPERATOR>" | |
# - #demand "<OPERATOR-TO-CHECK>" |
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
# ...definitions... | |
describe "REST API" do | |
# ... | |
context "when authenticated, with a sample video" do | |
# ...setup... | |
describe 'PUT /media/YYYY/MM/DD/IMG_NNNN.MOV' do | |
it "downloads media (a video) if it doesn't exist" do | |
expect(File.exist? video_path).not_to be | |
rest_put({}, "media/#{@media_path}") | |
expect_in_time 30 do # NOTE the file just started to download |
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
# ...definitions... | |
describe "Automated publishing" do | |
# ...setup... | |
it "should happen whenever .pub.video is comitted to 'log' git repo" do | |
expect((channel_ids = api_get).length).to eq 1 | |
expect(youtube_channel_url = api_get(channel_ids[0])[:pub_url].to_s).not_to be_empty | |
Dir.chdir LOG_PROJ_DIR do | |
sample_pub_video_path = File.join(TODAY_DATE_PATH, 'chang-wash-fun.pub.video') | |
sample_pub_ffmprb_path = File.join(TODAY_DATE_PATH, 'chang-wash-fun.pub.ffmprb') | |
sample_pub_video_text = |
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
# ...definitions... | |
describe "Automated vlogging" do | |
# ...setup... | |
it "should happen whenever iCloud has a new *relevant* video" do | |
Dir.chdir LOG_PROJ_DIR do | |
before_dir = Dir.children(TODAY_DATE_DIR) rescue [] | |
expect(expected_pub_url = ask("Enter the (\"channel\") URL for publishing")).not_to be_empty | |
puts RQRCode::QRCode.new(expected_pub_url).as_ansi | |
expect(ask "Now, shoot your best (very short, please) video with your (stock) iSome device:\n" + | |
"at the end of the video, point and focus its camera on the QR above (publishing URL).\n" + |
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
FROM python:3.9 | |
WORKDIR /stan-xpolog | |
ADD requirements.txt . | |
RUN pip install -r requirements.txt | |
ADD . . | |
ENV PORT=80 |
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
version: '2.1' | |
services: | |
xpolog: | |
build: . |
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
FROM debian:bookworm | |
RUN apt update && apt install -y curl | |
WORKDIR /tmp | |
RUN curl -O "https://xdn.xplg.com/downloads/xpolog/GA/linux/XpoLogCenterSetup-64.bin.gz" && gunzip XpoLogCenterSetup-64.bin.gz && chmod a+x XpoLogCenterSetup-64.bin | |
RUN yes '' | ./XpoLogCenterSetup-64.bin | |
WORKDIR /root | |
EXPOSE 30303 |
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
describe "Automated publishing" do # NOTE incl. drv/youtube integration | |
# ...setup... | |
it "should happen whenever .pub.video is comitted to 'log' git repo" do | |
Dir.chdir log_repo_work_dir do | |
sample_pub_video_path = File.join(today_date_path, 'just-testing.pub.video') | |
sample_pub_video_text = # NOTE straight outta ../README.md | |
<<EOF | |
Chang Wash Fun, winter 2022, Chiang Mai, Thailand | |
src: |
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
# NOTE re: deployment | |
# - with self server (running on any VM from any provider): | |
# $ @@ dev docker-compose up --remove-orphans | |
# and then: | |
# $ @@ ^dev # will securely tunnel WUI (:3000) to http://localhost:16623 | |
# - with docker-compose configured otherwise: | |
# # well, you must know how to run this in your environment then, see below | |
version: '2.1' | |
services: | |
chat: |
NewerOlder