ruby-push-notifications 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +35 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +55 -0
- data/LICENSE +22 -0
- data/README.md +56 -0
- data/Rakefile +12 -0
- data/examples/apns copy.rb +17 -0
- data/examples/apns.rb +16 -0
- data/examples/gcm copy.rb +16 -0
- data/examples/gcm.rb +16 -0
- data/lib/ruby-push-notifications.rb +8 -0
- data/lib/ruby-push-notifications/apns.rb +19 -0
- data/lib/ruby-push-notifications/apns/apns_connection.rb +45 -0
- data/lib/ruby-push-notifications/apns/apns_notification.rb +62 -0
- data/lib/ruby-push-notifications/apns/apns_pusher.rb +51 -0
- data/lib/ruby-push-notifications/gcm.rb +7 -0
- data/lib/ruby-push-notifications/gcm/gcm_connection.rb +31 -0
- data/lib/ruby-push-notifications/gcm/gcm_error.rb +14 -0
- data/lib/ruby-push-notifications/gcm/gcm_notification.rb +21 -0
- data/lib/ruby-push-notifications/gcm/gcm_pusher.rb +17 -0
- data/lib/ruby-push-notifications/gcm/gcm_response.rb +52 -0
- data/lib/ruby-push-notifications/gcm/gcm_result.rb +38 -0
- data/lib/ruby-push-notifications/version.rb +3 -0
- data/ruby-push-notifications.gemspec +26 -0
- data/spec/factories.rb +10 -0
- data/spec/factories/notifications.rb +15 -0
- data/spec/ruby-push-notifications/apns/apns_connection_spec.rb +79 -0
- data/spec/ruby-push-notifications/apns/apns_notification_spec.rb +30 -0
- data/spec/ruby-push-notifications/apns/apns_pusher_spec.rb +299 -0
- data/spec/ruby-push-notifications/gcm/gcm_connection_spec.rb +32 -0
- data/spec/ruby-push-notifications/gcm/gcm_notification_spec.rb +24 -0
- data/spec/ruby-push-notifications/gcm/gcm_pusher_spec.rb +45 -0
- data/spec/ruby-push-notifications/gcm/gcm_response_spec.rb +82 -0
- data/spec/spec_helper.rb +110 -0
- data/spec/support/dummy.pem +44 -0
- data/spec/support/factory_girl.rb +5 -0
- metadata +177 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
module RubyPushNotifications
|
3
|
+
module GCM
|
4
|
+
describe GCMConnection do
|
5
|
+
|
6
|
+
describe '::post' do
|
7
|
+
|
8
|
+
let(:body) { 'abc' }
|
9
|
+
let(:key) { 'def' }
|
10
|
+
let(:response) { JSON.dump a: 1 }
|
11
|
+
|
12
|
+
before do
|
13
|
+
stub_request(:post, 'https://android.googleapis.com/gcm/send').
|
14
|
+
to_return status: [200, 'OK'], body: response
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'runs the right request' do
|
18
|
+
GCMConnection.post body, key
|
19
|
+
|
20
|
+
expect(WebMock).
|
21
|
+
to have_requested(:post, 'https://android.googleapis.com/gcm/send').
|
22
|
+
with(body: body, headers: { 'Content-Type' => 'application/json', 'Authorization' => "key=#{key}" }).
|
23
|
+
once
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'returns the response encapsulated in a GCMResponse object' do
|
27
|
+
expect(GCMConnection.post body, key).to eq GCMResponse.new(200, response)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
module RubyPushNotifications
|
3
|
+
module GCM
|
4
|
+
describe GCMNotification do
|
5
|
+
|
6
|
+
let(:registration_ids) { %w(a b c) }
|
7
|
+
let(:data) { { a: 1 } }
|
8
|
+
let(:notification) { build :gcm_notification, registration_ids: registration_ids, data: data }
|
9
|
+
|
10
|
+
it 'builds the right gcm json' do
|
11
|
+
expect(notification.as_gcm_json).to eq JSON.dump(
|
12
|
+
registration_ids: registration_ids,
|
13
|
+
data: data
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'validates the registration_ids format'
|
18
|
+
|
19
|
+
# According to https://developer.android.com/google/gcm/server-ref.html#table1
|
20
|
+
it 'validates the data'
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
module RubyPushNotifications
|
3
|
+
module GCM
|
4
|
+
describe GCMPusher do
|
5
|
+
|
6
|
+
let(:gcm_key) { 'gcm key' }
|
7
|
+
let(:pusher) { GCMPusher.new gcm_key }
|
8
|
+
|
9
|
+
describe '#push' do
|
10
|
+
|
11
|
+
let(:notif1) { build :gcm_notification }
|
12
|
+
let(:notif2) { build :gcm_notification }
|
13
|
+
let(:response) { JSON.dump a: 1 }
|
14
|
+
|
15
|
+
before do
|
16
|
+
stub_request(:post, 'https://android.googleapis.com/gcm/send').
|
17
|
+
to_return status: [200, 'OK'], body: response
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'submits every notification' do
|
21
|
+
pusher.push [notif1, notif2]
|
22
|
+
|
23
|
+
expect(WebMock).
|
24
|
+
to have_requested(:post, 'https://android.googleapis.com/gcm/send').
|
25
|
+
with(body: notif1.as_gcm_json, headers: { 'Content-Type' => 'application/json', 'Authorization' => "key=#{gcm_key}" }).
|
26
|
+
once
|
27
|
+
|
28
|
+
expect(WebMock).
|
29
|
+
to have_requested(:post, 'https://android.googleapis.com/gcm/send').
|
30
|
+
with(body: notif2.as_gcm_json, headers: { 'Content-Type' => 'application/json', 'Authorization' => "key=#{gcm_key}" }).
|
31
|
+
once
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'sets results to notifications' do
|
35
|
+
expect do
|
36
|
+
pusher.push [notif1, notif2]
|
37
|
+
end.to change { [notif1, notif2].map &:results }.from([nil, nil]).to [GCMResponse.new(200, response)]*2
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'splits notifications with more than 1000 destinations in parts'
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
|
2
|
+
module RubyPushNotifications
|
3
|
+
module GCM
|
4
|
+
describe GCMResponse do
|
5
|
+
|
6
|
+
describe 'success' do
|
7
|
+
|
8
|
+
let(:successful_messages) { 3 }
|
9
|
+
let(:failed_messages) { 1 }
|
10
|
+
let(:canonical_ids) { 2 }
|
11
|
+
let(:body) { JSON.dump(
|
12
|
+
multicast_id: 123456789,
|
13
|
+
success: successful_messages,
|
14
|
+
failure: failed_messages,
|
15
|
+
canonical_ids: canonical_ids,
|
16
|
+
results: [
|
17
|
+
{ message_id: 1,
|
18
|
+
registration_id: 'new_reg_id' },
|
19
|
+
{ message_id: 2,
|
20
|
+
registration_id: 'new_reg_id_2' },
|
21
|
+
{ message_id: 3 },
|
22
|
+
{ message_id: 4,
|
23
|
+
error: 'NotRegistered' }
|
24
|
+
]
|
25
|
+
) }
|
26
|
+
|
27
|
+
let(:response) { GCMResponse.new 200, body }
|
28
|
+
|
29
|
+
it 'parses the number of successfully processed notifications' do
|
30
|
+
expect(response.success).to eq successful_messages
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'parses the number of failed messages' do
|
34
|
+
expect(response.failed).to eq failed_messages
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'parses the number of canonical ids received' do
|
38
|
+
expect(response.canonical_ids).to eq canonical_ids
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'parses the results' do
|
42
|
+
expect(response.results).to eq [GCMCanonicalIDResult.new('new_reg_id'), GCMCanonicalIDResult.new('new_reg_id_2'), GCMResultOK.new, GCMResultError.new('NotRegistered')]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'errors' do
|
47
|
+
let(:dummy_response_body) { 'dummy response body' }
|
48
|
+
describe '400 Bad Request error code' do
|
49
|
+
it 'raises a MalformedGCMJSONError' do
|
50
|
+
expect do
|
51
|
+
GCMResponse.new 400, dummy_response_body
|
52
|
+
end.to raise_error MalformedGCMJSONError, dummy_response_body
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe '401 Unauthorized error code' do
|
57
|
+
it 'raises a GCMAuthError' do
|
58
|
+
expect do
|
59
|
+
GCMResponse.new 401, dummy_response_body
|
60
|
+
end.to raise_error GCMAuthError, dummy_response_body
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe '500 Internal Server Error error code' do
|
65
|
+
it 'raises a GCMInternalError' do
|
66
|
+
expect do
|
67
|
+
GCMResponse.new 500, dummy_response_body
|
68
|
+
end.to raise_error GCMInternalError, dummy_response_body
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe '302 Found error code' do
|
73
|
+
it 'raises a UnexpectedGCMResponseError' do
|
74
|
+
expect do
|
75
|
+
GCMResponse.new 302, dummy_response_body
|
76
|
+
end.to raise_error UnexpectedGCMResponseError, '302'
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
|
2
|
+
Bundler.setup
|
3
|
+
Bundler.require :defaults, :development
|
4
|
+
require 'webmock/rspec'
|
5
|
+
|
6
|
+
require 'ruby-push-notifications'
|
7
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
8
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
9
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
10
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
11
|
+
# files.
|
12
|
+
#
|
13
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
14
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
15
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
16
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
17
|
+
# a separate helper file that requires the additional dependencies and performs
|
18
|
+
# the additional setup, and require it from the spec files that actually need
|
19
|
+
# it.
|
20
|
+
#
|
21
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
22
|
+
# users commonly want.
|
23
|
+
#
|
24
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
25
|
+
RSpec.configure do |config|
|
26
|
+
# rspec-expectations config goes here. You can use an alternate
|
27
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
28
|
+
# assertions if you prefer.
|
29
|
+
config.expect_with :rspec do |expectations|
|
30
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
31
|
+
# and `failure_message` of custom matchers include text for helper methods
|
32
|
+
# defined using `chain`, e.g.:
|
33
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
34
|
+
# # => "be bigger than 2 and smaller than 4"
|
35
|
+
# ...rather than:
|
36
|
+
# # => "be bigger than 2"
|
37
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
41
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
42
|
+
config.mock_with :rspec do |mocks|
|
43
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
44
|
+
# a real object. This is generally recommended, and will default to
|
45
|
+
# `true` in RSpec 4.
|
46
|
+
mocks.verify_partial_doubles = true
|
47
|
+
mocks.verify_doubled_constant_names = true
|
48
|
+
end
|
49
|
+
|
50
|
+
# The settings below are suggested to provide a good initial experience
|
51
|
+
# with RSpec, but feel free to customize to your heart's content.
|
52
|
+
=begin
|
53
|
+
# These two settings work together to allow you to limit a spec run
|
54
|
+
# to individual examples or groups you care about by tagging them with
|
55
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
56
|
+
# get run.
|
57
|
+
config.filter_run :focus
|
58
|
+
config.run_all_when_everything_filtered = true
|
59
|
+
|
60
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
61
|
+
# recommended. For more details, see:
|
62
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
63
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
64
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
65
|
+
config.disable_monkey_patching!
|
66
|
+
|
67
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
68
|
+
# be too noisy due to issues in dependencies.
|
69
|
+
config.warnings = true
|
70
|
+
|
71
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
72
|
+
# file, and it's useful to allow more verbose output when running an
|
73
|
+
# individual spec file.
|
74
|
+
if config.files_to_run.one?
|
75
|
+
# Use the documentation formatter for detailed output,
|
76
|
+
# unless a formatter has already been configured
|
77
|
+
# (e.g. via a command-line flag).
|
78
|
+
config.default_formatter = 'doc'
|
79
|
+
end
|
80
|
+
|
81
|
+
# Print the 10 slowest examples and example groups at the
|
82
|
+
# end of the spec run, to help surface which specs are running
|
83
|
+
# particularly slow.
|
84
|
+
config.profile_examples = 10
|
85
|
+
|
86
|
+
# Run specs in random order to surface order dependencies. If you find an
|
87
|
+
# order dependency and want to debug it, you can fix the order by providing
|
88
|
+
# the seed, which is printed after each run.
|
89
|
+
# --seed 1234
|
90
|
+
config.order = :random
|
91
|
+
|
92
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
93
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
94
|
+
# test failures related to randomization by passing the same `--seed` value
|
95
|
+
# as the one that triggered the failure.
|
96
|
+
Kernel.srand config.seed
|
97
|
+
=end
|
98
|
+
end
|
99
|
+
|
100
|
+
Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
|
101
|
+
|
102
|
+
require 'ruby-push-notifications/apns/apns_notification'
|
103
|
+
|
104
|
+
def apns_binary(json, token, id)
|
105
|
+
json = JSON.dump(json) if json.is_a?(Hash)
|
106
|
+
[
|
107
|
+
2, 56+json.bytesize, 1, 32, token, 2, json.bytesize, json,
|
108
|
+
3, 4, id, 4, 4, (Time.now + RubyPushNotifications::APNS::APNSNotification::WEEKS_4).to_i, 5, 1, 10
|
109
|
+
].pack 'cNcnH64cna*cnNcnNcnc'
|
110
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIICsDCCA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WjY3i8rX98QmXL9565nFmQe7RmzBZrzFLyKd7FjxjYIz1hk+CfFS
|
34
|
+
jhMb4WNdeVvV8AVPTiTHomCxdVasfadfadsfdPFCHbkbizenFJf0DNx14qe7eSds
|
35
|
+
2gQSZ3eTD7XdFNxqwF1dvPXPtDbVBa8SHlijDkcCgYB1tX4e9Xi+Ksq/tfAsu295
|
36
|
+
auzuOBOkkDgWf3+pVI1IiUEc98aj998dNzYes/9qUdAhT0wAYcNztLQwE8YCt0NR
|
37
|
+
K2hoAoPhQJhZ8skMlpyTDUTUxXWlPR5p4lNKDEi6EhELr7l7Jzga3O9Zh9kIsz04
|
38
|
+
djBzYHN3wfk5xIBUx1ltMQKBgBMA8XRIg4cZ45j9AdNyi2/dyzcaQVhDjWOIHzpQ
|
39
|
+
K9B4v/TF1NYJYOlcEL64B+WMST6YrWsdFKZZWZiV22r9ovrZcuUqGXE7PMgpXGcE
|
40
|
+
jZZZTlYFQbszl2rNGEtqEodxtnMIw3+n0K1aOSWOOwKTCnfhldHRuSoFPZqmHTsj
|
41
|
+
RJ3FAoGAXpx+ulBu99kOxOWWofmP7ff9DF3doF+Jmjwo6KdOAIq++74hNRgYCIKM
|
42
|
+
X+4TSnmu8qBOt++r+EaBgxb+m+36iQxJRhU25ggzlA97v7n7KSxdyt7OLCe5zXP5
|
43
|
+
iiMWAO+qJD6ZyHlzVz0wwu3nAvkhjTxQ2c3+7xjUwCZK1lXjvvM=
|
44
|
+
-----END RSA PRIVATE KEY-----
|
metadata
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-push-notifications
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Carlos Alonso
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.6'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.6'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '10.4'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '10.4'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.2'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.2'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: factory_girl
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '4.0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '4.0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: webmock
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '1.20'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '1.20'
|
94
|
+
description: Easy to use gem to send iOS and Android Push notifications
|
95
|
+
email:
|
96
|
+
- info@mrcalonso.com
|
97
|
+
executables: []
|
98
|
+
extensions: []
|
99
|
+
extra_rdoc_files: []
|
100
|
+
files:
|
101
|
+
- .gitignore
|
102
|
+
- .rspec
|
103
|
+
- .travis.yml
|
104
|
+
- Gemfile
|
105
|
+
- Gemfile.lock
|
106
|
+
- LICENSE
|
107
|
+
- README.md
|
108
|
+
- Rakefile
|
109
|
+
- examples/apns copy.rb
|
110
|
+
- examples/apns.rb
|
111
|
+
- examples/gcm copy.rb
|
112
|
+
- examples/gcm.rb
|
113
|
+
- lib/ruby-push-notifications.rb
|
114
|
+
- lib/ruby-push-notifications/apns.rb
|
115
|
+
- lib/ruby-push-notifications/apns/apns_connection.rb
|
116
|
+
- lib/ruby-push-notifications/apns/apns_notification.rb
|
117
|
+
- lib/ruby-push-notifications/apns/apns_pusher.rb
|
118
|
+
- lib/ruby-push-notifications/gcm.rb
|
119
|
+
- lib/ruby-push-notifications/gcm/gcm_connection.rb
|
120
|
+
- lib/ruby-push-notifications/gcm/gcm_error.rb
|
121
|
+
- lib/ruby-push-notifications/gcm/gcm_notification.rb
|
122
|
+
- lib/ruby-push-notifications/gcm/gcm_pusher.rb
|
123
|
+
- lib/ruby-push-notifications/gcm/gcm_response.rb
|
124
|
+
- lib/ruby-push-notifications/gcm/gcm_result.rb
|
125
|
+
- lib/ruby-push-notifications/version.rb
|
126
|
+
- ruby-push-notifications.gemspec
|
127
|
+
- spec/factories.rb
|
128
|
+
- spec/factories/notifications.rb
|
129
|
+
- spec/ruby-push-notifications/apns/apns_connection_spec.rb
|
130
|
+
- spec/ruby-push-notifications/apns/apns_notification_spec.rb
|
131
|
+
- spec/ruby-push-notifications/apns/apns_pusher_spec.rb
|
132
|
+
- spec/ruby-push-notifications/gcm/gcm_connection_spec.rb
|
133
|
+
- spec/ruby-push-notifications/gcm/gcm_notification_spec.rb
|
134
|
+
- spec/ruby-push-notifications/gcm/gcm_pusher_spec.rb
|
135
|
+
- spec/ruby-push-notifications/gcm/gcm_response_spec.rb
|
136
|
+
- spec/spec_helper.rb
|
137
|
+
- spec/support/dummy.pem
|
138
|
+
- spec/support/factory_girl.rb
|
139
|
+
homepage: https://github.com/calonso/ruby-push-notifications
|
140
|
+
licenses:
|
141
|
+
- MIT
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
148
|
+
requirements:
|
149
|
+
- - ! '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 1.8.23.2
|
161
|
+
signing_key:
|
162
|
+
specification_version: 3
|
163
|
+
summary: iOS and Android Push Notifications made easy!
|
164
|
+
test_files:
|
165
|
+
- spec/factories.rb
|
166
|
+
- spec/factories/notifications.rb
|
167
|
+
- spec/ruby-push-notifications/apns/apns_connection_spec.rb
|
168
|
+
- spec/ruby-push-notifications/apns/apns_notification_spec.rb
|
169
|
+
- spec/ruby-push-notifications/apns/apns_pusher_spec.rb
|
170
|
+
- spec/ruby-push-notifications/gcm/gcm_connection_spec.rb
|
171
|
+
- spec/ruby-push-notifications/gcm/gcm_notification_spec.rb
|
172
|
+
- spec/ruby-push-notifications/gcm/gcm_pusher_spec.rb
|
173
|
+
- spec/ruby-push-notifications/gcm/gcm_response_spec.rb
|
174
|
+
- spec/spec_helper.rb
|
175
|
+
- spec/support/dummy.pem
|
176
|
+
- spec/support/factory_girl.rb
|
177
|
+
has_rdoc:
|