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: cedb14f45651df7c388739fec42fabaf81f3ff25
4
- data.tar.gz: 887da73b3d84100cdd35349d3535e2d8de9818af
3
+ metadata.gz: 2f0dec322511c37cf30f1808cec4d78f02f38f25
4
+ data.tar.gz: 9e91961157cad102e7bb22cab3efbb7a552e0be4
5
5
  SHA512:
6
- metadata.gz: 280af413f3b244033571099deffac8cd74b7baee11cf442189790340fa9d7d8147146df876ecd9aacc8e3c1c0a6e08c0798a4b951021bde84b7e286d4a68054a
7
- data.tar.gz: ed6bec0277cc55ba920b642e52328b566b142dbd6d4a2ae8b4be9361ea2188927824623aee119847887db12ed867a9c06f55b50675fd20f20acdaa9af8f1b357
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, *options
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
- J7W1Worker.perform_async id
44
+ J7W1CreateEndpointWorker.perform_async id
45
45
  end
46
46
 
47
47
  def destroy_device_endpoint_async
48
- J7W1Worker.perform_async id
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.endpoint_arn = nil
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
@@ -1,3 +1,3 @@
1
1
  module J7W1
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j7w1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - condor