j7w1 0.0.7 → 0.0.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f0dec322511c37cf30f1808cec4d78f02f38f25
|
4
|
+
data.tar.gz: 9e91961157cad102e7bb22cab3efbb7a552e0be4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6e5c5bbe7f12368617047e80432dcd0802c76cb50608b580144cb39d6118636ee0028235079dce3820596c20ff52c39463870f3d1b5166ccd860241c7c7411
|
7
|
+
data.tar.gz: adc56d06aede68b513e63d79ddb8ad6fd47816b7f7908aa808c35b5707711f4542aee194d68a26d96ff13efe8010b7397f51b44515fc59d875e22f7dbc3f8ffa
|
@@ -15,7 +15,7 @@ class J7W1ApplicationDevice < ActiveRecord::Base
|
|
15
15
|
scope :on_platform, -> platform { where(platform: J7W1::Util.normalize_platform(platform)) }
|
16
16
|
|
17
17
|
def push!(options = {})
|
18
|
-
J7W1::PushClient.push device_endpoint_arn, platform,
|
18
|
+
J7W1::PushClient.push device_endpoint_arn, platform, options
|
19
19
|
end
|
20
20
|
|
21
21
|
def create_device_endpoint
|
@@ -41,11 +41,11 @@ class J7W1ApplicationDevice < ActiveRecord::Base
|
|
41
41
|
<%- elsif options['async_engine'] == 'sidekiq' -%>
|
42
42
|
|
43
43
|
def create_device_endpoint_async
|
44
|
-
|
44
|
+
J7W1CreateEndpointWorker.perform_async id
|
45
45
|
end
|
46
46
|
|
47
47
|
def destroy_device_endpoint_async
|
48
|
-
|
48
|
+
J7W1DestroyEndpointWorker.perform_async id
|
49
49
|
end
|
50
50
|
<%- end -%>
|
51
51
|
end
|
@@ -19,7 +19,7 @@ module J7W1
|
|
19
19
|
device =
|
20
20
|
J7W1ApplicationDevice.identified(device_identifier).on_platform(J7W1::Util.normalize_platform(platform)).
|
21
21
|
first_or_initialize
|
22
|
-
device.
|
22
|
+
device.device_endpoint_arn = nil
|
23
23
|
device.owner = self
|
24
24
|
device.save!
|
25
25
|
end
|
data/lib/j7w1/mock.rb
CHANGED
@@ -9,6 +9,10 @@ module J7W1
|
|
9
9
|
def push(endpoint_arn, platform, options)
|
10
10
|
@push_histories.push(options.merge(device: {platform: platform, endpoint_arn: endpoint_arn}))
|
11
11
|
end
|
12
|
+
|
13
|
+
def create_device_endpoint(device_identifier, platform, options = {})
|
14
|
+
[device_identifier, J7W1::Util.normalize_platform(platform)].compact.join('@')
|
15
|
+
end
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
data/lib/j7w1/version.rb
CHANGED