primate-run 0.6.0 → 0.6.2

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: 298505225ee6957a303e3ab1a7f0ec86d012027d4324832e2cce9babb125bf31
4
- data.tar.gz: 47b930327e88dab753f0f93cc2644e1ad8619b74ba723950727c16ca519db4f4
3
+ metadata.gz: '0094f419c8bff00498e035ee485f06b75877eb16773f7e18d9a44b965a174806'
4
+ data.tar.gz: 3f53ecdd9869dab4c12bec6ed0f164fdfea766de235d2613b14935728e775bdf
5
5
  SHA512:
6
- metadata.gz: 55f0be59609602f8c2ba6fea00a429c47f6733c5b9f33a7f062ea86db97a8fc4211716cc2110d94d83b52b6f235a1f6cc67989798138f18792f280816bc13de4
7
- data.tar.gz: 6ea0c1769518a53c3b8f0b9dedaf7c120e67122b2f5c83d0e6f04cc69f92c98e7c0d402372738bfa8be69da5c490017995a461da74a5dd161ecc6fdc1455de35
6
+ metadata.gz: 9d3ca6de23eff8519b61fef86bf63cc43438dda4ed4fa51674923582a064d4f4a6ac5f9f12644e0a7c91805055ed5827557bf8ee0d3e7aebdb43f05040e46fd3
7
+ data.tar.gz: 4b572231686955352479516e9e494820f95b17cdc9918b8fb99396f8e662b6c48c6de782590cc86bf2b3beda3e29a78baa2bdc48543c704b786ab815fef3b57d
@@ -2,11 +2,11 @@
2
2
 
3
3
  module Primate
4
4
  class Readable
5
- attr_reader :content_type
5
+ attr_reader :type
6
6
 
7
- def initialize(typed_array, content_type = nil)
7
+ def initialize(typed_array, type = nil)
8
8
  @ta = typed_array
9
- @content_type = content_type
9
+ @type = type
10
10
  @pos = 0
11
11
  @size = @ta[:length].to_i
12
12
  end
@@ -16,8 +16,10 @@ module Response
16
16
  # @param location [String] URL to redirect to
17
17
  # @param options [Hash] Redirect options (status code, etc.)
18
18
  # @return [Hash] Response object for the Primate framework
19
- def self.redirect(location, options = {})
20
- { __PRMT__: 'redirect', location: location, options: options }
19
+ def self.redirect(location, status = nil)
20
+ result = { __PRMT__: 'redirect', location: location }
21
+ result[:status] = status if status
22
+ result
21
23
  end
22
24
 
23
25
  # Create an error response
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Primate
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: primate-run
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Primate Team