rapns 3.3.1-java → 3.3.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,8 @@
1
+ ## 3.3.2 (June 30, 2013)
2
+ * Fix Rails 3.0.x compatibility (#138) (@yoppi).
3
+ * Ensure Rails does not set a default value for text columns (#137).
4
+ * Fix error in down action for add_gcm migration (#135) (@alexperto).
5
+
1
6
  ## 3.3.1 (June 2, 2013)
2
7
  * Fix compatibility with postgres_ext (#104).
3
8
  * Add ability to switch the logger (@maxsz).
data/README.md CHANGED
@@ -166,3 +166,5 @@ Thank you to the following wonderful people for contributing:
166
166
  * [@maxsz](https://github.com/maxsz)
167
167
  * [@wilg](https://github.com/wilg)
168
168
  * [@perezda](https://github.com/perezda)
169
+ * [@alexperto](https://github.com/alexperto)
170
+ * [@yoppi](https://github.com/yoppi)
@@ -22,9 +22,9 @@ class AddGcm < ActiveRecord::Migration
22
22
  change_column :rapns_notifications, :device_token, :string, { :null => true, :limit => 64 }
23
23
  change_column :rapns_notifications, :expiry, :integer, { :null => true, :default => 1.day.to_i }
24
24
  change_column :rapns_apps, :environment, :string, :null => true
25
- change_column :rapns_apps, :certificate, :text, :null => true
25
+ change_column :rapns_apps, :certificate, :text, :null => true, :default => nil
26
26
 
27
- change_column :rapns_notifications, :error_description, :text
27
+ change_column :rapns_notifications, :error_description, :text, :null => true, :default => nil
28
28
  change_column :rapns_notifications, :sound, :string, :default => 'default'
29
29
 
30
30
  rename_column :rapns_notifications, :attributes_for_device, :data
@@ -65,7 +65,7 @@ class AddGcm < ActiveRecord::Migration
65
65
  change_column :rapns_apps, :environment, :string, :null => false
66
66
  change_column :rapns_apps, :certificate, :text, :null => false
67
67
 
68
- change_column :rapns_notifications, :error_description, :string
68
+ change_column :rapns_notifications, :error_description, :string, :null => true, :default => nil
69
69
  change_column :rapns_notifications, :sound, :string, :default => '1.aiff'
70
70
 
71
71
  rename_column :rapns_notifications, :data, :attributes_for_device
@@ -87,7 +87,6 @@ class AddGcm < ActiveRecord::Migration
87
87
  Rapns::Notification.update_all(['app = ?', app.key], ['app_id = ?', app.id])
88
88
  end
89
89
 
90
- change_column :rapns_notifications, :key, :string, :null => false
91
90
  remove_column :rapns_notifications, :app_id
92
91
 
93
92
  remove_index :rapns_notifications, :name => "index_rapns_notifications_multi"
@@ -62,9 +62,9 @@ module Rapns
62
62
  errors[i] = result['error'] if result['error']
63
63
  end
64
64
 
65
- if body['success'].to_i == 0 && errors.values.all? { |error| error.in?(UNAVAILABLE_STATES) }
65
+ if body['success'].to_i == 0 && errors.values.all? { |error| UNAVAILABLE_STATES.include?(error) }
66
66
  all_devices_unavailable(response)
67
- elsif errors.values.any? { |error| error.in?(UNAVAILABLE_STATES) }
67
+ elsif errors.values.any? { |error| UNAVAILABLE_STATES.include?(error) }
68
68
  some_devices_unavailable(response, errors)
69
69
  else
70
70
  raise Rapns::DeliveryError.new(nil, @notification.id, describe_errors(errors))
@@ -106,7 +106,7 @@ module Rapns
106
106
  end
107
107
 
108
108
  def some_devices_unavailable(response, errors)
109
- unavailable_idxs = errors.find_all { |i, error| error.in?(UNAVAILABLE_STATES) }.map(&:first)
109
+ unavailable_idxs = errors.find_all { |i, error| UNAVAILABLE_STATES.include?(error) }.map(&:first)
110
110
  new_notification = create_new_notification(response, unavailable_idxs)
111
111
  raise Rapns::DeliveryError.new(nil, @notification.id,
112
112
  describe_errors(errors) + " #{unavailable_idxs.join(', ')} will be retried as notification #{new_notification.id}.")
@@ -1,3 +1,3 @@
1
1
  module Rapns
2
- VERSION = '3.3.1'
2
+ VERSION = '3.3.2'
3
3
  end
@@ -26,7 +26,8 @@ if ENV['TRAVIS']
26
26
  DATABASE_CONFIG[$adapter]['username'] = 'postgres'
27
27
  else
28
28
  require 'etc'
29
- DATABASE_CONFIG[$adapter]['username'] = Etc.getlogin
29
+ username = $adapter =~ /mysql/ ? 'root' : Etc.getlogin
30
+ DATABASE_CONFIG[$adapter]['username'] = username
30
31
  end
31
32
 
32
33
  puts "Using #{$adapter} adapter."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapns
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -9,9 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-02 00:00:00.000000000 Z
12
+ date: 2013-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
+ name: multi_json
15
16
  version_requirements: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - ~>
@@ -24,10 +25,10 @@ dependencies:
24
25
  - !ruby/object:Gem::Version
25
26
  version: '1.0'
26
27
  none: false
27
- type: :runtime
28
28
  prerelease: false
29
- name: multi_json
29
+ type: :runtime
30
30
  - !ruby/object:Gem::Dependency
31
+ name: net-http-persistent
31
32
  version_requirements: !ruby/object:Gem::Requirement
32
33
  requirements:
33
34
  - - '>='
@@ -40,10 +41,10 @@ dependencies:
40
41
  - !ruby/object:Gem::Version
41
42
  version: '0'
42
43
  none: false
43
- type: :runtime
44
44
  prerelease: false
45
- name: net-http-persistent
45
+ type: :runtime
46
46
  - !ruby/object:Gem::Dependency
47
+ name: jruby-openssl
47
48
  version_requirements: !ruby/object:Gem::Requirement
48
49
  requirements:
49
50
  - - '>='
@@ -56,10 +57,10 @@ dependencies:
56
57
  - !ruby/object:Gem::Version
57
58
  version: '0'
58
59
  none: false
59
- type: :runtime
60
60
  prerelease: false
61
- name: jruby-openssl
61
+ type: :runtime
62
62
  - !ruby/object:Gem::Dependency
63
+ name: activerecord-jdbc-adapter
63
64
  version_requirements: !ruby/object:Gem::Requirement
64
65
  requirements:
65
66
  - - '>='
@@ -72,9 +73,8 @@ dependencies:
72
73
  - !ruby/object:Gem::Version
73
74
  version: '0'
74
75
  none: false
75
- type: :runtime
76
76
  prerelease: false
77
- name: activerecord-jdbc-adapter
77
+ type: :runtime
78
78
  description: Professional grade APNs and GCM for Ruby
79
79
  email:
80
80
  - port001@gmail.com
@@ -202,19 +202,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
202
  requirements:
203
203
  - - '>='
204
204
  - !ruby/object:Gem::Version
205
- version: '0'
206
- hash: 2
207
205
  segments:
208
206
  - 0
207
+ version: '0'
208
+ hash: 2
209
209
  none: false
210
210
  required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - '>='
213
213
  - !ruby/object:Gem::Version
214
- version: '0'
215
- hash: 2
216
214
  segments:
217
215
  - 0
216
+ version: '0'
217
+ hash: 2
218
218
  none: false
219
219
  requirements: []
220
220
  rubyforge_project: