notifiable-gcm-spacialdb 0.12.0 → 0.13.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
  SHA1:
3
- metadata.gz: 190cc80990665f516754191f47e78b579befc5af
4
- data.tar.gz: c1c5fe160f08a3594171bc4eb669003df2de0b6d
3
+ metadata.gz: fee435aa04037ff6e150a5d16636951bbfe80eb5
4
+ data.tar.gz: 0c998785748490f5d6e6b5b4ae1e307e86b4b12b
5
5
  SHA512:
6
- metadata.gz: 98dfd2e9814235d051e53a82cf05d0a9c4bb45965c8f86f3d6a38c8b749ed01695be1f56b50310d1cf1ff482ffb872623bf6a2eb4cd3b006c66041dadda8351b
7
- data.tar.gz: 267e694ca074deb949704fdcf60d4e3e524a3ea2e9c05dce81075f89d168615e6a16c1d03f8cc4be25fece9778c274643f80bbb7837347869bb1a8c4376edcfd
6
+ metadata.gz: 6bb112c3bb7ec6eccddde5a24c389c6842c5197fa703e975933bdd9e326c3369c8f438379d498f3282ebe3e714bc18fe9404f00ce52c73400580b114b18136d3
7
+ data.tar.gz: a4f93815a9908e32312cb84ecc1c4dd015c08a1f2203be37e72f86023f2e591c6a5111e638641cb11a83f4bee40ec9e85bc073172c92ffb50ce510cb5f975ba9
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- notifiable-gcm-spacialdb (0.12.0)
5
- gcm (~> 0.1.1)
4
+ notifiable-gcm-spacialdb (0.13.0)
5
+ fcm (~> 0.0.6)
6
6
  notifiable-core (>= 0.2.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (5.2.1)
12
- activesupport (= 5.2.1)
13
- activerecord (5.2.1)
14
- activemodel (= 5.2.1)
15
- activesupport (= 5.2.1)
11
+ activemodel (5.2.3)
12
+ activesupport (= 5.2.3)
13
+ activerecord (5.2.3)
14
+ activemodel (= 5.2.3)
15
+ activesupport (= 5.2.3)
16
16
  arel (>= 9.0)
17
- activerecord-import (0.25.0)
17
+ activerecord-import (1.0.1)
18
18
  activerecord (>= 3.2)
19
- activesupport (5.2.1)
19
+ activesupport (5.2.3)
20
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
21
  i18n (>= 0.7, < 2)
22
22
  minitest (~> 5.1)
@@ -25,24 +25,26 @@ GEM
25
25
  public_suffix (>= 2.0.2, < 4.0)
26
26
  arel (9.0.0)
27
27
  byebug (10.0.1)
28
- concurrent-ruby (1.0.5)
28
+ concurrent-ruby (1.1.5)
29
29
  crack (0.4.3)
30
30
  safe_yaml (~> 1.0.0)
31
31
  database_cleaner (1.2.0)
32
32
  diff-lcs (1.3)
33
33
  docile (1.1.5)
34
- gcm (0.1.1)
35
- httparty
36
- json
37
- httparty (0.16.2)
34
+ fcm (0.0.6)
35
+ httparty (~> 0.10, >= 0.10.0)
36
+ httparty (0.16.4)
37
+ mime-types (~> 3.0)
38
38
  multi_xml (>= 0.5.2)
39
- i18n (1.1.0)
39
+ i18n (1.6.0)
40
40
  concurrent-ruby (~> 1.0)
41
- json (2.1.0)
41
+ mime-types (3.2.2)
42
+ mime-types-data (~> 3.2015)
43
+ mime-types-data (3.2019.0331)
42
44
  minitest (5.11.3)
43
45
  multi_json (1.13.1)
44
46
  multi_xml (0.6.0)
45
- notifiable-core (0.2.0)
47
+ notifiable-core (0.3.6)
46
48
  activerecord
47
49
  activerecord-import
48
50
  pg (1.0.0)
@@ -1,5 +1,5 @@
1
1
  require 'notifiable'
2
- require 'gcm'
2
+ require 'fcm'
3
3
 
4
4
  module Notifiable
5
5
  module Gcm
@@ -33,13 +33,13 @@ module Notifiable
33
33
  private
34
34
 
35
35
  def send_batch(notification)
36
- gcm = ::GCM.new(@api_key)
36
+ fcm = ::FCM.new(@api_key)
37
37
 
38
38
 
39
39
  data = {message: notification.message}
40
40
  data[:title] = notification.title if notification.title
41
41
  data = data.merge(notification.send_params)
42
- response = gcm.send_notification(batch.collect{|dt| dt.token}, {:data => data})
42
+ response = fcm.send(batch.collect{|dt| dt.token}, {:data => data})
43
43
 
44
44
  if response[:status_code] == 200
45
45
  process_success_response(response)
@@ -1,7 +1,7 @@
1
1
  module Notifiable
2
2
  module Gcm
3
3
  module Spacialdb
4
- VERSION = "0.12.0"
4
+ VERSION = "0.13.0"
5
5
  end
6
6
  end
7
7
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "notifiable-core", ">= 0.2.0"
22
- spec.add_dependency "gcm", '~> 0.1.1'
22
+ spec.add_dependency "fcm", '~> 0.0.6'
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake", "~> 10.1.1"
@@ -6,7 +6,7 @@ describe Notifiable::Gcm::Spacialdb::Batch do
6
6
  let(:a) { Notifiable::App.create gcm_api_key: 'abc123', configuration: app_configuration }
7
7
  let(:n1) { Notifiable::Notification.create(app: a, message: 'Test message', parameters: {flag: true} ) }
8
8
  let(:d) { Notifiable::DeviceToken.create(:token => "ABC123", :provider => :gcm, :app => a, :locale => 'en') }
9
- let!(:stubbed_request) { stub_request(:post, "https://gcm-http.googleapis.com/gcm/send").with(body: request_body).to_return(body: response_body) }
9
+ let!(:stubbed_request) { stub_request(:post, "https://fcm.googleapis.com/fcm/send").with(body: request_body).to_return(body: response_body) }
10
10
  let(:request_body) { }
11
11
  let(:response_body) { }
12
12
 
@@ -47,7 +47,7 @@ describe Notifiable::Gcm::Spacialdb::Batch do
47
47
  end
48
48
 
49
49
  context 'bad key' do
50
- let!(:stubbed_request) { stub_request(:post, "https://gcm-http.googleapis.com/gcm/send").to_return(body: '<html>Message</html>', status: 401) }
50
+ let!(:stubbed_request) { stub_request(:post, "https://fcm.googleapis.com/fcm/send").to_return(body: '<html>Message</html>', status: 401) }
51
51
  it { expect(Notifiable::NotificationStatus.count).to eq 0 }
52
52
  end
53
53
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiable-gcm-spacialdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Kocemba
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-10 00:00:00.000000000 Z
12
+ date: 2019-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: notifiable-core
@@ -26,19 +26,19 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.2.0
28
28
  - !ruby/object:Gem::Dependency
29
- name: gcm
29
+ name: fcm
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.1.1
34
+ version: 0.0.6
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.1.1
41
+ version: 0.0.6
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bundler
44
44
  requirement: !ruby/object:Gem::Requirement