passkit 0.4.2 → 0.5.0

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: 2e9e738c20524c07477a1e518f03075ec94db1cbb7a7d15c97311007af1064af
4
- data.tar.gz: '09a2f5e5af1c75756d8daba98ce8438100f4d9124ca9162bbffaab5f74b2d304'
3
+ metadata.gz: 6c3d8db0fdcb21bf1c79f1894074ba1bc36838e5d4ebf78076769cbcf28fb6ad
4
+ data.tar.gz: 6338ff436da5f1dffc1b23078c98e74a14f25f2dd7f522491529ea2828ca76a4
5
5
  SHA512:
6
- metadata.gz: 00365ff751c493b823045d5755540fb16aa97dfa30bfea684bff24362043ec11c84fecdcbc9545c3de90e60f48febe6c4daefea08fc8f914dd9e5a6ddf287baf
7
- data.tar.gz: 98daf625fe1f75043989d1883e14c20062da811ad8b7ac040e677ea807e3f9833f3d55224a8d25ea000feee5643b95dc4133790626bb73eeb364bfe29cca0d98
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.
@@ -0,0 +1 @@
1
+ //= link_tree ../images
@@ -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.2"
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.2
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-11-10 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
@@ -152,6 +152,7 @@ files:
152
152
  - LICENSE.txt
153
153
  - README.md
154
154
  - Rakefile
155
+ - app/assets/config/passkit_manifest.js
155
156
  - app/assets/images/passkit/add_to_apple_wallet_de.png
156
157
  - app/assets/images/passkit/add_to_apple_wallet_en.png
157
158
  - app/assets/images/passkit/add_to_apple_wallet_fr.png
@@ -236,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
237
  - !ruby/object:Gem::Version
237
238
  version: '0'
238
239
  requirements: []
239
- rubygems_version: 3.3.10
240
+ rubygems_version: 3.4.1
240
241
  signing_key:
241
242
  specification_version: 4
242
243
  summary: Serve Wallet Passes for iOS and Android directly from your Rails app