passkit 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/models/passkit/pass.rb +2 -0
- data/lib/passkit/base_pass.rb +12 -0
- data/lib/passkit/generator.rb +6 -5
- data/lib/passkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ae5fc20f42471a94fd3789e30d7da1a7f815d273ec2c4d5c8ebf06589065dd5
|
4
|
+
data.tar.gz: bf457cd34517e7abe73fe796ac830529124c355b96e7694008d9cc6f8ea658c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3408f1a7936e55f3a0b29332777951c78eb6a68d80f5189dc6b5a9a5ca908e7cce9d142f4bcb1df0ae0dbb33e68c6f78f5a2ed5c02a41b35571268e47bc489df
|
7
|
+
data.tar.gz: 493c69be73b1b37dbb56be7eb33008cf66893f865d98dbf9068c866ed042042e333cd0ca8e3ce82b6b28f57d372e75e0ab0f744651de39feec477cf297243f2c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [0.5.1]
|
2
|
+
|
3
|
+
- [#13](https://github.com/coorasse/passkit/pull/13): Added sharingProhibited
|
4
|
+
- [#13](https://github.com/coorasse/passkit/pull/13): Added maxDistance
|
5
|
+
- [#13](https://github.com/coorasse/passkit/pull/13): Allow custom files with add_other_files
|
6
|
+
|
1
7
|
## [0.5.0]
|
2
8
|
|
3
9
|
- Allow configuring labelColor
|
data/app/models/passkit/pass.rb
CHANGED
data/lib/passkit/base_pass.rb
CHANGED
@@ -75,6 +75,14 @@ module Passkit
|
|
75
75
|
false
|
76
76
|
end
|
77
77
|
|
78
|
+
# After base files are copied this is called to allow for adding custom images
|
79
|
+
def add_other_files(path)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Distance in meters from locations; if blank uses pass default
|
83
|
+
def max_distance
|
84
|
+
end
|
85
|
+
|
78
86
|
def file_name
|
79
87
|
@file_name ||= SecureRandom.uuid
|
80
88
|
end
|
@@ -119,6 +127,10 @@ module Passkit
|
|
119
127
|
[]
|
120
128
|
end
|
121
129
|
|
130
|
+
def sharing_prohibited
|
131
|
+
false
|
132
|
+
end
|
133
|
+
|
122
134
|
private
|
123
135
|
|
124
136
|
def folder_name
|
data/lib/passkit/generator.rb
CHANGED
@@ -13,6 +13,7 @@ module Passkit
|
|
13
13
|
check_necessary_files
|
14
14
|
create_temporary_directory
|
15
15
|
copy_pass_to_tmp_location
|
16
|
+
@pass.instance.add_other_files(@temporary_path)
|
16
17
|
clean_ds_store_files
|
17
18
|
I18n.with_locale(@pass.language) do
|
18
19
|
generate_json_pass
|
@@ -56,14 +57,14 @@ module Passkit
|
|
56
57
|
description: @pass.description,
|
57
58
|
logoText: @pass.logo_text,
|
58
59
|
locations: @pass.locations,
|
59
|
-
labelColor: @pass.label_color
|
60
|
-
|
61
|
-
|
62
|
-
pass = pass.merge({
|
60
|
+
labelColor: @pass.label_color,
|
61
|
+
sharingProhibited: @pass.sharing_prohibited,
|
63
62
|
serialNumber: @pass.serial_number,
|
64
63
|
passTypeIdentifier: @pass.pass_type_identifier,
|
65
64
|
authenticationToken: @pass.authentication_token
|
66
|
-
}
|
65
|
+
}
|
66
|
+
|
67
|
+
pass[:maxDistance] = @pass.max_distance if @pass.max_distance
|
67
68
|
|
68
69
|
pass[@pass.pass_type] = {
|
69
70
|
headerFields: @pass.header_fields,
|
data/lib/passkit/version.rb
CHANGED
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.
|
4
|
+
version: 0.5.1
|
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-
|
11
|
+
date: 2023-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|