raindeer 0.9.10 → 0.9.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6acad3a557af79fc084ff7e8eddc2e0db5595ba7980dbf67b1ddbfbb702fd5d
4
- data.tar.gz: 71af14856b712fed992b81b5ea38ee097bacf06ed5385b018edb424530ce1dd0
3
+ metadata.gz: 7b25856a055b944fa2f45a384fecfa862019d758b860add2df11c3c8f46b7638
4
+ data.tar.gz: 144c6e71229d03538ab278f42d67a0aebecaa8561188b930ac8a41fd4dea3b19
5
5
  SHA512:
6
- metadata.gz: b23946d114027b0da1f7e4d4c685676d96a44c5fbfe345365e97f1963c805cde33613e8f67a79d67aed768b08592ed5faf7a67fe817713b170337c84cb8861a6
7
- data.tar.gz: 123024ebe02083e5bb0092d50b52946585f59df8e17da19bd4ab46725659ef827e3621d0ad5469f5feb77d0b2f24a4850f486812569e26550fef65e21df583e3
6
+ metadata.gz: a755cca4990892d9d8798433599dff07274fcfc047cb396823faa5319afde39f1eec393bf104aef7ed7ae8ebd31bf9d72f0bcd1eaf02c4a2cc5eaa5a72d91a9e
7
+ data.tar.gz: 73a978a35344d4b03703638955381f3c2627975f256d5a4fbfa6d9e4b1105d943cc6f5bb2d22b494d7c59ccdf4c8de8b780ce67795c4cce447831d0740babe04
data/lib/cli/static.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'ruby-progressbar'
4
3
  require 'fileutils'
4
+ require 'protocol/http'
5
+ require 'ruby-progressbar'
5
6
 
6
7
  require 'antlers' # Adds antlers support to lowload.
7
8
  require 'lowload'
@@ -13,7 +14,6 @@ module Rain
13
14
  module Static
14
15
  extend self
15
16
 
16
- FakeRequest = Data.define(:path)
17
17
  RequestResult = Data.define(:path, :status, :html)
18
18
 
19
19
  def build(application_path:)
@@ -66,7 +66,7 @@ module Rain
66
66
  )
67
67
 
68
68
  paths.map do |path|
69
- request = FakeRequest.new(path:)
69
+ request = Protocol::HTTP::Request.new('http', nil, 'GET', path)
70
70
  response = Low::Events::RequestEvent.take(request:).response
71
71
  result = RequestResult.new(path:, status: response.status, html: response.read)
72
72
  progress_bar.increment
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Raindeer.router do
4
- route :get => '/system' do
5
- route :get => '/events'
6
- route :get => '/routes'
4
+ get '/system' do
5
+ get '/events'
6
+ get '/routes'
7
7
  end
8
8
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Raindeer
4
- VERSION = '0.9.10'
4
+ VERSION = '0.9.11'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raindeer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi