passkit 0.4.3 → 0.5.0

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: 5a8b13fecd2042a92f697ad87b3645b2e10dd864143cba99c7ba961536eed934
4
- data.tar.gz: a07b3dc5f83c08b0e6506a43f9691ea86199c0b6732fdac96890b0406bec84c5
3
+ metadata.gz: 6c3d8db0fdcb21bf1c79f1894074ba1bc36838e5d4ebf78076769cbcf28fb6ad
4
+ data.tar.gz: 6338ff436da5f1dffc1b23078c98e74a14f25f2dd7f522491529ea2828ca76a4
5
5
  SHA512:
6
- metadata.gz: 012aa3ed35b25fb3db48cfbb4c3915ba42af5879e6f48d664cdaccab15d1e28630bdbc5fc9292ccfce04a35fd5008113b7248c1c3a2843e013b357b33505b8b9
7
- data.tar.gz: 7ccbae36e92e7c9e59fff95a86e21a36c46c0ec93b912c53b245c1f3227a53ec9a82cffb3d7a47da1befd0d5aa380a8a73121d6d1d7a33b3d574fbbcf1cd143d
6
+ metadata.gz: 3fb31540b3b4212b0a75dd3d162622efcef24a7e3fe128d45ed78bda2abced5274cf750d555d46559c1549e9773a7e95cd02135bc334540c6fdfbc245a1b6511
7
+ data.tar.gz: 1780c34f7c9b7b1b8f6174898cede7a0a7a012c978172d134ebf12ce6e9bb895db89fe053eb590df76472ebb2f5999404fd02a2042686678434a392e87ec0c26
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.5.0]
2
+
3
+ - Allow configuring labelColor
4
+ - Allow receiving the same push otken with different device identifiers
5
+ - Make the last_update more flexible
6
+
1
7
  ## [0.4.2]
2
8
 
3
9
  - Fix the unregister endpoint.
data/README.md CHANGED
@@ -134,7 +134,7 @@ Use the [Passkit::UrlGenerator](lib/passkit/url_generator.rb) to generate the UR
134
134
  You can initialize it with:
135
135
 
136
136
  ```ruby
137
- Passkit::UrlGenerator.new(pass_class: Passkit::MyPass, generator: User.find(1))
137
+ Passkit::UrlGenerator.new(Passkit::MyPass, User.find(1))
138
138
  ```
139
139
 
140
140
  and then use `.android` or `.ios` to get the URL to serve the Wallet Pass.
@@ -81,7 +81,7 @@ module Passkit
81
81
  passes = @device.passes
82
82
 
83
83
  if params[:passesUpdatedSince]&.present?
84
- passes.all.filter { |a| a.generator.updated_at >= Date.parse(params[:passesUpdatedSince]) }
84
+ passes.all.filter { |a| a.last_update >= Date.parse(params[:passesUpdatedSince]) }
85
85
  else
86
86
  passes
87
87
  end
@@ -1,7 +1,6 @@
1
1
  module Passkit
2
2
  class Device < ActiveRecord::Base
3
3
  validates_uniqueness_of :identifier
4
- validates_uniqueness_of :push_token
5
4
 
6
5
  has_many :registrations, foreign_key: :passkit_device_id
7
6
  has_many :passes, through: :registrations
@@ -14,6 +14,7 @@ module Passkit
14
14
  :apple_team_identifier,
15
15
  :foreground_color,
16
16
  :background_color,
17
+ :label_color,
17
18
  :web_service_url,
18
19
  :barcode,
19
20
  :voided,
@@ -52,6 +52,10 @@ module Passkit
52
52
  "rgb(255, 255, 255)"
53
53
  end
54
54
 
55
+ def label_color
56
+ "rgb(255, 255, 255)"
57
+ end
58
+
55
59
  def organization_name
56
60
  "Passkit"
57
61
  end
@@ -55,7 +55,8 @@ module Passkit
55
55
  organizationName: @pass.organization_name,
56
56
  description: @pass.description,
57
57
  logoText: @pass.logo_text,
58
- locations: @pass.locations
58
+ locations: @pass.locations,
59
+ labelColor: @pass.label_color
59
60
  }
60
61
 
61
62
  pass = pass.merge({
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Passkit
4
- VERSION = "0.4.3"
4
+ VERSION = "0.5.0"
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.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-05 00:00:00.000000000 Z
11
+ date: 2023-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  requirements: []
240
- rubygems_version: 3.3.10
240
+ rubygems_version: 3.4.1
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Serve Wallet Passes for iOS and Android directly from your Rails app