From de51c827f6fbaef6c23d75f2753407de991cee1c Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 22 Jun 2022 21:26:31 -0700 Subject: [PATCH] rm rzz --- meta/docker/rzz/Dockerfile | 13 --------- meta/docker/rzz/Gemfile | 14 ---------- meta/docker/rzz/Gemfile.lock | 39 --------------------------- meta/docker/rzz/Rakefile | 17 ------------ meta/docker/rzz/config.ru | 3 --- meta/docker/rzz/rzz.rb | 51 ------------------------------------ meta/on-fire-within/main.yml | 11 +------- 7 files changed, 1 insertion(+), 147 deletions(-) delete mode 100644 meta/docker/rzz/Dockerfile delete mode 100644 meta/docker/rzz/Gemfile delete mode 100644 meta/docker/rzz/Gemfile.lock delete mode 100644 meta/docker/rzz/Rakefile delete mode 100644 meta/docker/rzz/config.ru delete mode 100644 meta/docker/rzz/rzz.rb diff --git a/meta/docker/rzz/Dockerfile b/meta/docker/rzz/Dockerfile deleted file mode 100644 index ba9ef26..0000000 --- a/meta/docker/rzz/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM arm32v7/ruby:2.7 - -# throw errors if Gemfile has been modified since Gemfile.lock -RUN bundle config --global frozen 1 - -WORKDIR /usr/src/app - -COPY Gemfile Gemfile.lock ./ -RUN bundle install - -COPY . . - -CMD ["rackup", "--host", "0.0.0.0"] diff --git a/meta/docker/rzz/Gemfile b/meta/docker/rzz/Gemfile deleted file mode 100644 index ac1f8b7..0000000 --- a/meta/docker/rzz/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -gem "nokogiri" -gem "roda" - -group :development do - gem "pry" - gem "rake" - gem "rerun" -end diff --git a/meta/docker/rzz/Gemfile.lock b/meta/docker/rzz/Gemfile.lock deleted file mode 100644 index 084c352..0000000 --- a/meta/docker/rzz/Gemfile.lock +++ /dev/null @@ -1,39 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - coderay (1.1.2) - ffi (1.12.1) - listen (3.2.1) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - method_source (0.9.2) - mini_portile2 (2.8.0) - nokogiri (1.13.6) - mini_portile2 (~> 2.8.0) - racc (~> 1.4) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - racc (1.6.0) - rack (2.2.3.1) - rake (13.0.1) - rb-fsevent (0.10.3) - rb-inotify (0.10.1) - ffi (~> 1.0) - rerun (0.13.0) - listen (~> 3.0) - roda (3.28.0) - rack - -PLATFORMS - ruby - -DEPENDENCIES - nokogiri - pry - rake - rerun - roda - -BUNDLED WITH - 2.1.2 diff --git a/meta/docker/rzz/Rakefile b/meta/docker/rzz/Rakefile deleted file mode 100644 index f14f253..0000000 --- a/meta/docker/rzz/Rakefile +++ /dev/null @@ -1,17 +0,0 @@ -desc "Run RZZ in development mode" -task :dev do - sh "rerun -- rackup" -end - -namespace :docker do - TAG = "kejadlen/rzz" - - task :build do - sh "docker build --tag #{TAG} ." - end - - task push: :build do - sh "docker push #{TAG}" - end -end - diff --git a/meta/docker/rzz/config.ru b/meta/docker/rzz/config.ru deleted file mode 100644 index 12c0fb7..0000000 --- a/meta/docker/rzz/config.ru +++ /dev/null @@ -1,3 +0,0 @@ -require_relative "rzz" - -run Rzz::App.freeze.app diff --git a/meta/docker/rzz/rzz.rb b/meta/docker/rzz/rzz.rb deleted file mode 100644 index c578560..0000000 --- a/meta/docker/rzz/rzz.rb +++ /dev/null @@ -1,51 +0,0 @@ -require "digest/sha1" -require "open-uri" - -require "nokogiri" -require "roda" - -module Rzz - - class App < Roda - plugin :caching - plugin :json - - route do |r| - r.get do - r.is "test-gym" do - url = "https://elemental.medium.com/test-gym/home" - html = URI.open(url).read - - doc = Nokogiri::HTML(html) - items = doc.xpath("//a[@data-post-id]").map {|a| - attrs = a.attributes - id = attrs.fetch("data-post-id").value - title = a.xpath("./h3").text - content = a.xpath("./div").text - href = URI(attrs.fetch("href")) - url = "#{href.scheme}://#{href.host}#{href.path}" - { id: id, title: title, content_text: content, url: url } - } - - { - version: "https://jsonfeed.org/version/1", - title: "Test Gym", - home_page_url: url, - feed_url: "#{r.base_url}#{r.path}", - items: items, - } - end - end - end - end - -end - -if __FILE__ == $0 - url = "https://elemental.medium.com/feed" - xml = URI.open(url).read - doc = Nokogiri::XML(xml) - - require "pry" - binding.pry -end diff --git a/meta/on-fire-within/main.yml b/meta/on-fire-within/main.yml index 957d731..14d54ea 100644 --- a/meta/on-fire-within/main.yml +++ b/meta/on-fire-within/main.yml @@ -18,7 +18,7 @@ # Needed for Docker stuff - docker-compose - - python-pip + - python3-pip - python-backports-shutil-get-terminal-size - python-backports.ssl-match-hostname @@ -182,15 +182,6 @@ - traefik.http.routers.pihole.tls.certresolver=le - traefik.http.services.pihole.loadbalancer.server.port=80 restart: unless-stopped - rzz: - image: kejadlen/rzz:latest - container_name: rzz - labels: - - traefik.enable=true - - traefik.http.routers.rzz.rule=Host(`{{ traefik.host_rules.rzz }}`) - - traefik.http.routers.rzz.tls=true - - traefik.http.routers.rzz.tls.certresolver=le - - traefik.http.services.rzz.loadbalancer.server.port=9292 syncthing: image: kejadlen/syncthing:latest container_name: syncthing