passkit 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0c05041e75887566bb738e8f1790e2ea3f15ba6c32d9119ca5110165b29dbde
4
- data.tar.gz: 8c2d539c1df658b8feb046ce89224e3fae22aadcb7a20c57b8cf3050e625be8b
3
+ metadata.gz: d9497741a31a5d15fa1851b3e6fbb3630fdb4d6af850a3a8350f98dc48f22d48
4
+ data.tar.gz: 80eef27f99457b8c43636e447fcb80de4b550a6f34234a0df67cc53aa7a94d44
5
5
  SHA512:
6
- metadata.gz: 561ccb895669cd9d8cdb062b76573a78b74ec0c6bf1a8e3682e567f00cbf809cc3844cddd765a32634ea06bf2d83fdc0f2b4a04484611b7a623e2ed163b71f46
7
- data.tar.gz: 1d91f866e30baaea0fa9a706fa9f0a05382b8b7286daeda44bb2b1e83af12cabef8a40bb0930912a31b17a726da83f0682188ada633ef8e08b6c18a827ea62b3
6
+ metadata.gz: 78c6bb6a55584dcba885ea10e3a285bb594830a6fedbbc92d865cd50ff547010e0ae5a47435377f60ad06718e94494bc7fd66db6904a2d9897b296874f536aea
7
+ data.tar.gz: c8790f8dd33ae6d33fa557f9c2d4bec831be29f663e013941cd0bf1fe94ffac7f9fe41abc17034c77966cb2d2f778b811ea26051ea5599fa6f762d2acc24c614
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.5.4]
2
+
3
+ - Fix last-modified header format. Return it in RFC 2616 format.
4
+
1
5
  ## [0.5.3]
2
6
 
3
7
  - [#15](https://github.com/coorasse/passkit/pull/15): Send correct headers also on passes_controller
@@ -5,7 +5,7 @@ module Passkit
5
5
  before_action :decrypt_payload, only: :create
6
6
 
7
7
  def create
8
- send_file(fetch_pass(@payload), type: 'application/vnd.apple.pkpass', disposition: 'attachment')
8
+ send_file(fetch_pass(@payload), type: "application/vnd.apple.pkpass", disposition: "attachment")
9
9
  end
10
10
 
11
11
  # @return If request is authorized, returns HTTP status 200 with a payload of the pass data.
@@ -26,10 +26,10 @@ module Passkit
26
26
 
27
27
  pass_output_path = Passkit::Generator.new(pass).generate_and_sign
28
28
 
29
- response.headers["last-modified"] = pass.last_update.strftime("%Y-%m-%d %H:%M:%S")
29
+ response.headers["last-modified"] = pass.last_update.httpdate
30
30
  if request.headers["If-Modified-Since"].nil? ||
31
31
  (pass.last_update.to_i > Time.zone.parse(request.headers["If-Modified-Since"]).to_i)
32
- send_file(pass_output_path, type: 'application/vnd.apple.pkpass', disposition: 'attachment')
32
+ send_file(pass_output_path, type: "application/vnd.apple.pkpass", disposition: "attachment")
33
33
  else
34
34
  head :not_modified
35
35
  end
@@ -8,7 +8,7 @@ module Passkit
8
8
  builder = Passkit.configuration.available_passes[params[:class_name]]
9
9
  path = Factory.create_pass(params[:class_name].constantize, builder.call)
10
10
 
11
- send_file path, type: 'application/vnd.apple.pkpass', disposition: 'attachment', filename: 'pass.pkpass'
11
+ send_file path, type: "application/vnd.apple.pkpass", disposition: "attachment", filename: "pass.pkpass"
12
12
  end
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Passkit
4
- VERSION = "0.5.3"
4
+ VERSION = "0.5.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-20 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails