runeblog 0.1.86 → 0.1.88
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 +4 -4
- data/lib/liveblog.rb +43 -40
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 9e46979242ed8767ec2ef126cf345067bfa290e5b8730bb12fbc2aaa9f2cb470
         | 
| 4 | 
            +
              data.tar.gz: e420c52a7a3e19b3def738c66fe7fd128d70d01864951e10327499542a173e8a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a7f392d33a2be29e265f3bbeef0c3a4c8a4aeb9c6481f664ef22bc9ff4cc52d578af7d236a758e870f0680472ff2f74171a490c35ec4f36e3fa0194210c602cc
         | 
| 7 | 
            +
              data.tar.gz: a46054951a8b79c0fbc1b409bfb23c2743362711fda79ee7ef7b226575f6306c8990f08cb12ef50b8bedcec584d314abf321dd0ea12a4fdc0fb50d0e4a7e0db7
         | 
    
        data/lib/liveblog.rb
    CHANGED
    
    | @@ -8,16 +8,14 @@ require 'runeblog' | |
| 8 8 | 
             
            errfile = File.new("liveblog.out", "w")
         | 
| 9 9 | 
             
            STDERR.reopen(errfile)
         | 
| 10 10 |  | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
            491:def _post_lookup(postid)    # side-effect
         | 
| 20 | 
            -
            =end
         | 
| 11 | 
            +
            # def title                   # side-effect
         | 
| 12 | 
            +
            # def pubdate                 # side-effect
         | 
| 13 | 
            +
            # def tags                    # side-effect
         | 
| 14 | 
            +
            # def views                   # side-effect
         | 
| 15 | 
            +
            # def pin                     # side-effect
         | 
| 16 | 
            +
            # def write_post              # side-effect
         | 
| 17 | 
            +
            # def main                    # side-effect
         | 
| 18 | 
            +
            # def _post_lookup(postid)    # side-effect
         | 
| 21 19 |  | 
| 22 20 | 
             
            def init_liveblog    # FIXME - a lot of this logic sucks
         | 
| 23 21 | 
             
              here = Dir.pwd
         | 
| @@ -224,7 +222,6 @@ def teaser | |
| 224 222 | 
             
              raise "'post' was not called" unless @meta
         | 
| 225 223 | 
             
              @meta.teaser = _body_text
         | 
| 226 224 | 
             
              _out @meta.teaser + "\n"
         | 
| 227 | 
            -
            STDERR.puts "TEASER cwd = #{Dir.pwd}"
         | 
| 228 225 | 
             
              # FIXME
         | 
| 229 226 | 
             
            end
         | 
| 230 227 |  | 
| @@ -362,7 +359,6 @@ end | |
| 362 359 | 
             
            def main    # side-effect
         | 
| 363 360 | 
             
              _out %[<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">]
         | 
| 364 361 | 
             
              which = _args[0]
         | 
| 365 | 
            -
            STDERR.puts "--- inside #main: which = #{which.inspect}"
         | 
| 366 362 | 
             
              case which
         | 
| 367 363 | 
             
                when "recent_posts"
         | 
| 368 364 | 
             
                  all_teasers
         | 
| @@ -498,50 +494,57 @@ def _teaser(slug) | |
| 498 494 | 
             
              text
         | 
| 499 495 | 
             
            end
         | 
| 500 496 |  | 
| 497 | 
            +
            def _card_generic(card_title:, middle:, extra: "")
         | 
| 498 | 
            +
              front = <<-HTML
         | 
| 499 | 
            +
                <div class="card #{extra} mb-3">
         | 
| 500 | 
            +
                  <div class="card-body">
         | 
| 501 | 
            +
                    <h5 class="card-title">#{card_title}</h5>
         | 
| 502 | 
            +
              HTML
         | 
| 503 | 
            +
             | 
| 504 | 
            +
              tail = <<-HTML
         | 
| 505 | 
            +
                  </div>
         | 
| 506 | 
            +
                </div>
         | 
| 507 | 
            +
              HTML
         | 
| 508 | 
            +
              text = front + middle + tail
         | 
| 509 | 
            +
              _out text + "\n "
         | 
| 510 | 
            +
            end
         | 
| 501 511 |  | 
| 502 512 | 
             
            def card_iframe
         | 
| 503 | 
            -
              title = _data
         | 
| 504 | 
            -
              lines | 
| 513 | 
            +
              title, lines = _data, _body
         | 
| 514 | 
            +
              lines.map!(&:chomp)
         | 
| 505 515 | 
             
              url = lines[0].chomp
         | 
| 506 516 | 
             
              stuff = lines[1..-1].join(" ")  # FIXME later
         | 
| 507 | 
            -
               | 
| 508 | 
            -
             | 
| 509 | 
            -
             | 
| 510 | 
            -
                         | 
| 511 | 
            -
             | 
| 512 | 
            -
                                style="border: 0" height="350" 
         | 
| 513 | 
            -
                                frameborder="0" scrolling="no">
         | 
| 514 | 
            -
                        </iframe>
         | 
| 515 | 
            -
                      </div>
         | 
| 516 | 
            -
                    </div>
         | 
| 517 | 
            +
              middle = <<-HTML
         | 
| 518 | 
            +
                <iframe src="#{url}" #{stuff} 
         | 
| 519 | 
            +
                        style="border: 0" height="350" 
         | 
| 520 | 
            +
                        frameborder="0" scrolling="no">
         | 
| 521 | 
            +
                </iframe>
         | 
| 517 522 | 
             
              HTML
         | 
| 518 | 
            -
             | 
| 519 | 
            -
             | 
| 520 | 
            -
             | 
| 523 | 
            +
             | 
| 524 | 
            +
              _card_generic(card_title: title, middle: middle, extra: "bg-dark text-white")
         | 
| 525 | 
            +
             | 
| 521 526 | 
             
            end
         | 
| 522 527 |  | 
| 523 528 | 
             
            def card1
         | 
| 524 | 
            -
               | 
| 525 | 
            -
              lines = _body
         | 
| 529 | 
            +
              title, lines = _data, _body
         | 
| 526 530 | 
             
              lines.map!(&:chomp)
         | 
| 531 | 
            +
             | 
| 527 532 | 
             
              card_text = lines[0]
         | 
| 528 533 | 
             
              url, target, classname, cdata = lines[1].split(",", 4)
         | 
| 529 | 
            -
             | 
| 530 | 
            -
             | 
| 531 | 
            -
             | 
| 532 | 
            -
             | 
| 533 | 
            -
                    <p class="card-text">#{card_text}</p>
         | 
| 534 | 
            -
                    <a href="#{url}" target="#{target}" class="#{classname}">#{cdata}</a>
         | 
| 535 | 
            -
                  </div>
         | 
| 536 | 
            -
                </div>
         | 
| 534 | 
            +
             | 
| 535 | 
            +
              middle = <<-HTML
         | 
| 536 | 
            +
                <p class="card-text">#{card_text}</p>
         | 
| 537 | 
            +
                <a href="#{url}" target="#{target}" class="#{classname}">#{cdata}</a>
         | 
| 537 538 | 
             
              HTML
         | 
| 538 | 
            -
             | 
| 539 | 
            -
             | 
| 540 | 
            -
              puts @live.body
         | 
| 539 | 
            +
             | 
| 540 | 
            +
              _card_generic(card_title: title, middle: middle, extra: "bg-dark text-white")
         | 
| 541 541 | 
             
            end
         | 
| 542 542 |  | 
| 543 543 | 
             
            def card2
         | 
| 544 544 | 
             
              card_title = _data
         | 
| 545 | 
            +
             | 
| 546 | 
            +
            # FIXME is this wrong??
         | 
| 547 | 
            +
             | 
| 545 548 | 
             
              open = <<-HTML
         | 
| 546 549 | 
             
                <div class="card mb-3">
         | 
| 547 550 | 
             
                  <div class="card-body">
         | 
    
        data/lib/runeblog_version.rb
    CHANGED