notifiable-gcm-spacialdb 0.4.4 → 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
  SHA1:
3
- metadata.gz: 536406a49ca504f3664c9ebcc375c0c88a2870dd
4
- data.tar.gz: 6b999987c6c6aa7886b4a7305b96d372fe59eb06
3
+ metadata.gz: d61457fbeffca641f889b92f5c8c0bd2ae7f07bd
4
+ data.tar.gz: acdf05b132205e223e2dadc768d76cb284cacf46
5
5
  SHA512:
6
- metadata.gz: 39a29232f4829ac8f5e54d0b23d4929a14fc1dacedc28323a1e70d22379681d73141fb61c812def3408e6e70eed951ec6d943685a54fb289ce646d65950ab078
7
- data.tar.gz: 1d155d711bf712c94fcfc0d2720659cf120dc06a38a5c101f65691b05c148550d60221b431451f27dfa70bd9a94a2958b4885b747adefa57cbc9385d2ca18195
6
+ metadata.gz: d00f13c3297670c8541a1a0758987370694424c6784f493e64fc8c297d44dc64f4c29f9906e5a4ac872a1555cba6dae708a0526abe0829d85b0c2cb6d0e00877
7
+ data.tar.gz: 0b96b449d6025348f6ef84c473eb644b352c845525dd42aa0f9dc3fac6c7fe5602c81e5cbdcd1098309b5d10a2613ab5f3ea72212425330a0a8c9835ff116a03
data/Gemfile.lock CHANGED
@@ -1,40 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- notifiable-gcm-spacialdb (0.4.4)
4
+ notifiable-gcm-spacialdb (0.5.0)
5
5
  gcm (~> 0.0.6)
6
- notifiable-rails (>= 0.6.0)
6
+ notifiable-rails (>= 0.17.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.0.2)
12
- actionpack (= 4.0.2)
11
+ actionmailer (4.0.4)
12
+ actionpack (= 4.0.4)
13
13
  mail (~> 2.5.4)
14
- actionpack (4.0.2)
15
- activesupport (= 4.0.2)
14
+ actionpack (4.0.4)
15
+ activesupport (= 4.0.4)
16
16
  builder (~> 3.1.0)
17
17
  erubis (~> 2.7.0)
18
18
  rack (~> 1.5.2)
19
19
  rack-test (~> 0.6.2)
20
- activemodel (4.0.2)
21
- activesupport (= 4.0.2)
20
+ activemodel (4.0.4)
21
+ activesupport (= 4.0.4)
22
22
  builder (~> 3.1.0)
23
- activerecord (4.0.2)
24
- activemodel (= 4.0.2)
23
+ activerecord (4.0.4)
24
+ activemodel (= 4.0.4)
25
25
  activerecord-deprecated_finders (~> 1.0.2)
26
- activesupport (= 4.0.2)
26
+ activesupport (= 4.0.4)
27
27
  arel (~> 4.0.0)
28
28
  activerecord-deprecated_finders (1.0.3)
29
- activesupport (4.0.2)
30
- i18n (~> 0.6, >= 0.6.4)
29
+ activesupport (4.0.4)
30
+ i18n (~> 0.6, >= 0.6.9)
31
31
  minitest (~> 4.2)
32
32
  multi_json (~> 1.3)
33
33
  thread_safe (~> 0.1)
34
34
  tzinfo (~> 0.3.37)
35
35
  addressable (2.3.5)
36
36
  arel (4.0.2)
37
- atomic (1.1.14)
38
37
  builder (3.1.4)
39
38
  crack (0.4.1)
40
39
  safe_yaml (~> 0.9.0)
@@ -42,11 +41,11 @@ GEM
42
41
  diff-lcs (1.2.5)
43
42
  docile (1.1.2)
44
43
  erubis (2.7.0)
45
- gcm (0.0.6)
44
+ gcm (0.0.7)
46
45
  httparty
47
46
  json
48
47
  hike (1.2.3)
49
- httparty (0.12.0)
48
+ httparty (0.13.1)
50
49
  json (~> 1.8)
51
50
  multi_xml (>= 0.5.2)
52
51
  i18n (0.6.9)
@@ -58,23 +57,23 @@ GEM
58
57
  minitest (4.7.5)
59
58
  multi_json (1.8.4)
60
59
  multi_xml (0.5.5)
61
- notifiable-rails (0.6.0)
60
+ notifiable-rails (0.17.0)
62
61
  rails (~> 4.0.0)
63
- polyglot (0.3.3)
62
+ polyglot (0.3.4)
64
63
  rack (1.5.2)
65
64
  rack-test (0.6.2)
66
65
  rack (>= 1.0)
67
- rails (4.0.2)
68
- actionmailer (= 4.0.2)
69
- actionpack (= 4.0.2)
70
- activerecord (= 4.0.2)
71
- activesupport (= 4.0.2)
66
+ rails (4.0.4)
67
+ actionmailer (= 4.0.4)
68
+ actionpack (= 4.0.4)
69
+ activerecord (= 4.0.4)
70
+ activesupport (= 4.0.4)
72
71
  bundler (>= 1.3.0, < 2.0)
73
- railties (= 4.0.2)
72
+ railties (= 4.0.4)
74
73
  sprockets-rails (~> 2.0.0)
75
- railties (4.0.2)
76
- actionpack (= 4.0.2)
77
- activesupport (= 4.0.2)
74
+ railties (4.0.4)
75
+ actionpack (= 4.0.4)
76
+ activesupport (= 4.0.4)
78
77
  rake (>= 0.8.7)
79
78
  thor (>= 0.18.1, < 2.0)
80
79
  rake (10.1.1)
@@ -94,7 +93,7 @@ GEM
94
93
  simplecov-html (0.8.0)
95
94
  simplecov-rcov (0.2.3)
96
95
  simplecov (>= 0.4.1)
97
- sprockets (2.10.1)
96
+ sprockets (2.12.1)
98
97
  hike (~> 1.2)
99
98
  multi_json (~> 1.0)
100
99
  rack (~> 1.0)
@@ -104,14 +103,13 @@ GEM
104
103
  activesupport (>= 3.0)
105
104
  sprockets (~> 2.8)
106
105
  sqlite3 (1.3.8)
107
- thor (0.18.1)
108
- thread_safe (0.1.3)
109
- atomic
106
+ thor (0.19.1)
107
+ thread_safe (0.3.3)
110
108
  tilt (1.4.1)
111
109
  treetop (1.4.15)
112
110
  polyglot
113
111
  polyglot (>= 0.3.1)
114
- tzinfo (0.3.38)
112
+ tzinfo (0.3.39)
115
113
  webmock (1.17.1)
116
114
  addressable (>= 2.2.7)
117
115
  crack (>= 0.3.2)
@@ -8,93 +8,90 @@ module Notifiable
8
8
 
9
9
  attr_accessor :api_key, :batch_size
10
10
 
11
- def initialize
11
+ def initialize(env, notification)
12
+ super(env, notification)
13
+ @batch = []
12
14
  @batch_size = 1000
13
15
  end
14
-
15
- def batch
16
- @batch ||= {}
17
- end
18
16
 
19
- # todo should be made threadsafe
20
17
  protected
21
- def enqueue(notification, device_token)
22
- self.batch[notification.id] = [] if self.batch[notification.id].nil?
23
- self.batch[notification.id] << device_token
24
- tokens = self.batch[notification.id]
25
- if tokens.count >= self.batch_size
26
- send_batch(notification, tokens)
27
- end
28
- end
18
+ def enqueue(device_token)
19
+ @batch << device_token
20
+ if @batch.count >= @batch_size
21
+ send_batch
22
+ end
23
+ end
29
24
 
30
- def flush
31
- self.batch.each_pair do |notification_id, device_tokens|
32
- send_batch(Notifiable::Notification.find(notification_id), device_tokens)
25
+ def flush
26
+ send_batch unless @batch.empty?
33
27
  end
34
- end
35
28
 
36
29
  private
37
- def send_batch(notification, device_tokens)
38
- if Notifiable.delivery_method == :test
39
- device_tokens.each {|d| processed(notification, d)}
40
- else
41
- gcm = ::GCM.new(self.api_key)
30
+ def send_batch
31
+ if Notifiable.delivery_method == :test
32
+ @batch.each {|d| processed(d, 0)}
33
+ else
34
+ gcm = ::GCM.new(self.api_key)
42
35
 
43
- data = {:message => notification.message}
44
- data.merge! notification.params if notification.params
36
+ data = {:message => notification.message}.merge(notification.send_params)
37
+ response = gcm.send_notification(@batch.collect{|dt| dt.token}, {:data => data})
38
+
39
+ if response[:status_code] == 200
40
+ process_success_response(response)
41
+ else
42
+ Rails.logger.error "Sending notification id: #{notification.id} code: #{response[:status_code]} response: #{response[:response]}"
43
+ end
44
+ end
45
+ @batch = []
46
+ end
47
+
48
+ def process_success_response(response)
49
+ body = JSON.parse(response.fetch(:body, "{}"))
50
+ results = body.fetch("results", [])
51
+ results.each_with_index do |result, i|
52
+ dt = @batch[i]
53
+
54
+ # Remove the token if it is marked NotRegistered (user deleted the App for example)
55
+ if ["InvalidRegistration", "NotRegistered"].include? result["error"]
56
+ dt.update_attribute('is_valid', false)
45
57
 
46
- # send
47
- response = gcm.send_notification(device_tokens.collect{|dt| dt.token}, {:data => data})
48
- if response[:status_code] == 200
49
- body = JSON.parse(response.fetch(:body, "{}"))
50
- results = body.fetch("results", [])
51
- results.each_with_index do |result, idx|
52
- # Remove the token if it is marked NotRegistered (user deleted the App for example)
53
- if ["InvalidRegistration", "NotRegistered"].include? result["error"]
54
- device_tokens[idx].update_attribute('is_valid', false)
55
-
56
- # Process canonical IDs
57
- elsif result["registration_id"] && Notifiable::DeviceToken.exists?(:token => result["registration_id"])
58
- device_tokens[idx].update_attribute('is_valid', false)
59
- elsif result["registration_id"]
60
- device_tokens[idx].update_attribute('token', result["registration_id"])
61
- end
58
+ # Process canonical IDs
59
+ elsif result["registration_id"] && Notifiable::DeviceToken.exists?(:token => result["registration_id"])
60
+ dt.update_attribute('is_valid', false)
61
+ elsif result["registration_id"]
62
+ dt.update_attribute('token', result["registration_id"])
63
+ end
62
64
 
63
- processed(notification, device_tokens[idx], error_code(result["error"]))
64
- end
65
- else
66
- Rails.logger.error "Sending notification id: #{notification.id} code: #{response[:status_code]} response: #{response[:response]}"
67
- end
65
+ processed(dt, error_code(result["error"]))
66
+ end
68
67
  end
69
- self.batch.delete(notification.id)
70
- end
71
68
 
72
- def error_code(error_message)
73
- case error_message
74
- when "MissingRegistration"
75
- 1
76
- when "InvalidRegistration"
77
- 2
78
- when "MismatchSenderId"
79
- 3
80
- when "NotRegistered"
81
- 4
82
- when "MessageTooBig"
83
- 5
84
- when "InvalidDataKey"
85
- 6
86
- when "InvalidTtl"
87
- 7
88
- when "Unavailable"
89
- 8
90
- when "InternalServerError"
91
- 9
92
- when "InvalidPackageName"
93
- 10
94
- else
95
- 0
69
+ def error_code(error_message)
70
+ case error_message
71
+ when "MissingRegistration"
72
+ 1
73
+ when "InvalidRegistration"
74
+ 2
75
+ when "MismatchSenderId"
76
+ 3
77
+ when "NotRegistered"
78
+ 4
79
+ when "MessageTooBig"
80
+ 5
81
+ when "InvalidDataKey"
82
+ 6
83
+ when "InvalidTtl"
84
+ 7
85
+ when "Unavailable"
86
+ 8
87
+ when "InternalServerError"
88
+ 9
89
+ when "InvalidPackageName"
90
+ 10
91
+ else
92
+ 0
93
+ end
96
94
  end
97
- end
98
95
  end
99
96
  end
100
97
  end
@@ -1,7 +1,7 @@
1
1
  module Notifiable
2
2
  module Gcm
3
3
  module Spacialdb
4
- VERSION = "0.4.4"
4
+ VERSION = "0.5.0"
5
5
  end
6
6
  end
7
7
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "notifiable-rails", ">=0.6.0"
21
+ spec.add_dependency "notifiable-rails", ">=0.17.0"
22
22
  spec.add_dependency "gcm", "~> 0.0.6"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
data/spec/batch_spec.rb CHANGED
@@ -2,49 +2,42 @@ require 'spec_helper'
2
2
 
3
3
  describe Notifiable::Gcm::Spacialdb::Batch do
4
4
 
5
- let(:g) { Notifiable::Gcm::Spacialdb::Batch.new }
6
- let(:n) { Notifiable::Notification.create(:message => "Test message") }
7
- let(:d) { Notifiable::DeviceToken.create(:token => "ABC123", :provider => :gcm) }
8
- let(:u) { User.new(d) }
5
+ let(:a) { Notifiable::App.create }
6
+ let(:n1) { Notifiable::Notification.create(:message => "Test message", :app => a) }
7
+ let(:n1_with_params) { Notifiable::Notification.create(:message => "Test message", :app => a, :params => {:flag => true}) }
8
+ let(:d) { Notifiable::DeviceToken.create(:token => "ABC123", :provider => :gcm, :app => a) }
9
9
 
10
10
  it "sends a single gcm notification" do
11
11
  stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 1, "failure": 0, "canonical_ids": 0, "results": [{ "message_id": "1:08" }]}')
12
12
 
13
- g.send_notification(n, d)
14
- g.close
13
+ n1.batch do |n|
14
+ n.add_device_token(d)
15
+ end
15
16
 
16
17
  Notifiable::NotificationStatus.count.should == 1
17
18
  Notifiable::NotificationStatus.first.status = 0
18
19
  end
19
20
 
20
- it "sends custom attributes" do
21
- n.update_attribute(:params, {:custom_id => 123456})
22
-
21
+ it "sends custom attributes" do
23
22
  stub_request(:post, "https://android.googleapis.com/gcm/send")
24
- .with(:body => {:registration_ids => ["ABC123"], :data => {:message => n.message, :custom_id => 123456}})
23
+ .with(:body => {:registration_ids => ["ABC123"], :data => {:message => n1.message, :flag => true, :notification_id => n1_with_params.id}})
25
24
  .to_return(:body => '{ "multicast_id": 108, "success": 1, "failure": 0, "canonical_ids": 0, "results": [{ "message_id": "1:08" }]}')
26
25
 
27
- g.send_notification(n, d)
28
- g.close
29
-
26
+ n1_with_params.batch do |n|
27
+ n.add_device_token(d)
28
+ end
29
+
30
30
  Notifiable::NotificationStatus.count.should == 1
31
31
  Notifiable::NotificationStatus.first.status = 0
32
32
  end
33
33
 
34
- it "sends a single gcm notification in a batch" do
35
- stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 1, "failure": 0, "canonical_ids": 0, "results": [{ "message_id": "1:08" }]}')
36
-
37
- Notifiable.batch {|b| b.add(n, u)}
38
-
39
- Notifiable::NotificationStatus.count.should == 1
40
- Notifiable::NotificationStatus.first.status = 0
41
- end
42
-
43
34
  it "marks a unregistered token as invalid" do
44
35
  stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 0, "failure": 1, "canonical_ids": 0, "results": [{ "error": "NotRegistered" }]}')
45
36
 
46
- Notifiable.batch {|b| b.add(n, u)}
47
-
37
+ n1.batch do |n|
38
+ n.add_device_token(d)
39
+ end
40
+
48
41
  Notifiable::NotificationStatus.count.should == 1
49
42
  Notifiable::NotificationStatus.first.status = 4
50
43
  d.is_valid.should == false
@@ -53,8 +46,10 @@ describe Notifiable::Gcm::Spacialdb::Batch do
53
46
  it "marks an invalid token as invalid" do
54
47
  stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 0, "failure": 1, "canonical_ids": 0, "results": [{ "error": "InvalidRegistration" }]}')
55
48
 
56
- Notifiable.batch {|b| b.add(n, u)}
57
-
49
+ n1.batch do |n|
50
+ n.add_device_token(d)
51
+ end
52
+
58
53
  Notifiable::NotificationStatus.count.should == 1
59
54
  Notifiable::NotificationStatus.first.status = 2
60
55
  d.is_valid.should == false
@@ -63,8 +58,10 @@ describe Notifiable::Gcm::Spacialdb::Batch do
63
58
  it "updates a token to the canonical ID if it does not exist" do
64
59
  stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 1, "failure": 0, "canonical_ids": 1, "results": [{ "message_id": "1:08", "registration_id": "GHJ12345" }]}')
65
60
 
66
- Notifiable.batch {|b| b.add(n, u)}
67
-
61
+ n1.batch do |n|
62
+ n.add_device_token(d)
63
+ end
64
+
68
65
  Notifiable::NotificationStatus.count.should == 1
69
66
  Notifiable::NotificationStatus.first.status = 0
70
67
  Notifiable::DeviceToken.count.should == 1
@@ -72,31 +69,29 @@ describe Notifiable::Gcm::Spacialdb::Batch do
72
69
  end
73
70
 
74
71
 
75
- it "marks a token as invalid if the canonical ID already exists" do
76
- Notifiable::DeviceToken.create(:token => "GHJ12345", :provider => :gcm)
72
+ # it "marks a token as invalid if the canonical ID already exists" do
73
+ # Notifiable::DeviceToken.create(:token => "GHJ12345", :provider => :gcm)
77
74
 
78
- stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 1, "failure": 0, "canonical_ids": 1, "results": [{ "message_id": "1:08", "registration_id": "GHJ12345" }]}')
75
+ # stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '{ "multicast_id": 108, "success": 1, "failure": 0, "canonical_ids": 1, "results": [{ "message_id": "1:08", "registration_id": "GHJ12345" }]}')
79
76
 
80
- Notifiable.batch {|b| b.add(n, u)}
81
-
82
- Notifiable::NotificationStatus.count.should == 1
83
- Notifiable::NotificationStatus.first.status = 0
84
- Notifiable::DeviceToken.count.should == 2
85
- d.is_valid.should be_false
86
- end
77
+ # n1.batch do |n|
78
+ # n.add_device_token(d)
79
+ # end
80
+
81
+ # Notifiable::NotificationStatus.count.should == 1
82
+ # Notifiable::NotificationStatus.first.status = 0
83
+ # Notifiable::DeviceToken.count.should == 2
84
+ # d.is_valid.should be_false
85
+ # end
87
86
 
88
87
  it "deals gracefully with an unauthenticated key" do
89
88
  stub_request(:post, "https://android.googleapis.com/gcm/send").to_return(:body => '<html>Message</html>', :status => 401)
90
89
 
91
- Notifiable.batch {|b| b.add(n, u)}
92
-
90
+ n1.batch do |n|
91
+ n.add_device_token(d)
92
+ end
93
+
93
94
  Notifiable::NotificationStatus.count.should == 0
94
95
  end
95
96
 
96
- end
97
-
98
- User = Struct.new(:device_token) do
99
- def device_tokens
100
- [device_token]
101
- end
102
97
  end
@@ -0,0 +1,10 @@
1
+ class CreateNotifiableApps < ActiveRecord::Migration
2
+ def change
3
+ create_table :notifiable_apps do |t|
4
+ t.string :name
5
+ t.text :configuration
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -2,13 +2,25 @@ class CreateNotifiableNotifications < ActiveRecord::Migration
2
2
 
3
3
  def change
4
4
  create_table :notifiable_notifications do |t|
5
- t.text :title
6
5
  t.text :message
7
6
  t.text :params
8
- t.integer :badge
9
- t.text :sound
10
- t.datetime :expiry
7
+ t.references :app
8
+
9
+ #stats
10
+ t.integer :sent_count, :default => 0
11
+ t.integer :gateway_accepted_count, :default => 0
12
+ t.integer :opened_count, :default => 0
13
+
14
+ # APNS - Optional
15
+ #t.integer :badge
16
+ #t.text :sound
17
+ #t.datetime :expiry
18
+
19
+ # MPNS - Optional
20
+ #t.text :title
21
+
11
22
  t.timestamps
12
23
  end
13
24
  end
25
+
14
26
  end
@@ -0,0 +1,12 @@
1
+ class CreateNotifiableStatuses < ActiveRecord::Migration
2
+
3
+ def change
4
+ create_table :notifiable_statuses do |t|
5
+ t.references :notification
6
+ t.references :device_token
7
+ t.integer :status
8
+ t.datetime :created_at
9
+ end
10
+ end
11
+
12
+ end
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.4.4
4
+ version: 0.5.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: 2014-04-07 00:00:00.000000000 Z
12
+ date: 2014-05-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: notifiable-rails
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '>='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.6.0
20
+ version: 0.17.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '>='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.6.0
27
+ version: 0.17.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: gcm
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -173,9 +173,10 @@ files:
173
173
  - notifiable-gcm-spacialdb.gemspec
174
174
  - spec/batch_spec.rb
175
175
  - spec/spec_helper.rb
176
+ - spec/support/db/migrate/20131228225138_create_notifiable_apps.rb
176
177
  - spec/support/db/migrate/20131228225139_create_notifiable_device_tokens.rb
177
178
  - spec/support/db/migrate/20131228225140_create_notifiable_notifications.rb
178
- - spec/support/db/migrate/20131229104039_create_notifiable_notification_statuses.rb
179
+ - spec/support/db/migrate/20131229104039_create_notifiable_statuses.rb
179
180
  homepage: http://www.futureworkshops.com
180
181
  licenses:
181
182
  - Apache 2.0
@@ -203,6 +204,7 @@ summary: Plugin to use GCM with Notifiable-Rails
203
204
  test_files:
204
205
  - spec/batch_spec.rb
205
206
  - spec/spec_helper.rb
207
+ - spec/support/db/migrate/20131228225138_create_notifiable_apps.rb
206
208
  - spec/support/db/migrate/20131228225139_create_notifiable_device_tokens.rb
207
209
  - spec/support/db/migrate/20131228225140_create_notifiable_notifications.rb
208
- - spec/support/db/migrate/20131229104039_create_notifiable_notification_statuses.rb
210
+ - spec/support/db/migrate/20131229104039_create_notifiable_statuses.rb
@@ -1,11 +0,0 @@
1
- class CreateNotifiableNotificationStatuses < ActiveRecord::Migration
2
-
3
- def change
4
- create_table :notifiable_notification_statuses do |t|
5
- t.references :notification
6
- t.references :device_token
7
- t.integer :status
8
- end
9
- end
10
-
11
- end