pushmeup 0.1.4.hf1 → 0.2.0
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.
- checksums.yaml +15 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +2 -6
- data/README.md +45 -14
- data/lib/pushmeup/apns/core.rb +56 -10
- data/lib/pushmeup/apns/notification.rb +15 -7
- data/lib/pushmeup/gcm/core.rb +13 -13
- data/lib/pushmeup/gcm/notification.rb +19 -10
- data/lib/pushmeup/version.rb +1 -1
- data/spec/lib/pushmeup_spec.rb +33 -9
- metadata +9 -21
- data/.rvmrc +0 -48
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTgxOGQzMTRiNmVlZTlkOWRiOTMyZTk2NDA4YzU3MmEwMWEzNDU0Nw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OGM3MzgwOWQ2ODhlNDc1ZWZjNTM5MmIzNDJlOTcxYzFhMWNiZGU1YQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YjVmZmM1NDM5Mzc4YWQ3N2I5MTFmOTRhMzI5YmY0N2E4YmM2YTgyZTRkNWZj
|
10
|
+
YjE5ZWE5ZDRiYWQxMDAwMjA4OGZmZWJiMTRjZTJhNWIyOTUxYzU1M2U1ZGFh
|
11
|
+
OGY1OTMyMjM3NzUwYmU4YzM1YTg0MWNmYjA1Mjc4OGRkYzk4YmQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjYwZTI4ZGM2OWRjNWYzNGM5NDVkYzI2NjZlNzdlMGZmOWExZTVkMTllOWQ5
|
14
|
+
ZTlhOTUyMzBhYzM2YTM1ZTMyOTdjNTdjYTA0ZDQxNzcxZDg0NmFiMWVkMGVh
|
15
|
+
ZTMwMzI5OGQ5ZmZiMjExMTBmOTgwY2JiNGU4N2VmNDY4NGRmMGQ=
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pushmeup
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.3
|
data/.travis.yml
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.8.7
|
4
|
-
- 1.9.2
|
5
3
|
- 1.9.3
|
6
|
-
-
|
4
|
+
- 2.0.0
|
7
5
|
- jruby-19mode # JRuby in 1.9 mode
|
8
|
-
- rbx-18mode
|
9
|
-
- rbx-19mode
|
10
6
|
# uncomment this line if your project needs to run something other than `rake`:
|
11
|
-
# script: bundle exec rspec spec
|
7
|
+
# script: bundle exec rspec spec
|
data/README.md
CHANGED
@@ -41,14 +41,15 @@ and install it with
|
|
41
41
|
3. After you have created your ``pem`` file. Set the host, port and certificate file location on the APNS class. You just need to set this once:
|
42
42
|
|
43
43
|
APNS.host = 'gateway.push.apple.com'
|
44
|
-
# gateway.sandbox.push.apple.com is default
|
44
|
+
# gateway.sandbox.push.apple.com is default and only for development
|
45
|
+
# gateway.push.apple.com is only for production
|
45
46
|
|
46
47
|
APNS.port = 2195
|
47
48
|
# this is also the default. Shouldn't ever have to set this, but just in case Apple goes crazy, you can.
|
48
|
-
|
49
|
+
|
49
50
|
APNS.pem = '/path/to/pem/file'
|
50
51
|
# this is the file you just created
|
51
|
-
|
52
|
+
|
52
53
|
APNS.pass = ''
|
53
54
|
# Just in case your pem need a password
|
54
55
|
|
@@ -56,25 +57,49 @@ and install it with
|
|
56
57
|
|
57
58
|
#### Sending a single notification:
|
58
59
|
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
device_token = '123abc456def'
|
61
|
+
APNS.send_notification(device_token, 'Hello iPhone!' )
|
62
|
+
APNS.send_notification(device_token, :alert => 'Hello iPhone!', :badge => 1, :sound => 'default')
|
62
63
|
|
63
64
|
#### Sending multiple notifications
|
64
65
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
device_token = '123abc456def'
|
67
|
+
n1 = APNS::Notification.new(device_token, 'Hello iPhone!' )
|
68
|
+
n2 = APNS::Notification.new(device_token, :alert => 'Hello iPhone!', :badge => 1, :sound => 'default')
|
69
|
+
APNS.send_notifications([n1, n2])
|
70
|
+
|
71
|
+
> All notifications passed as a parameter will be sent on a single connection, this is done to improve
|
72
|
+
> reliability with APNS servers.
|
73
|
+
|
74
|
+
#### Another way to send multiple notifications is to send notifications in a persistent connection (thread safe)
|
75
|
+
|
76
|
+
# Define that you want persistent connection
|
77
|
+
APNS.start_persistence
|
78
|
+
|
79
|
+
device_token = '123abc456def'
|
80
|
+
|
81
|
+
# Send single notifications
|
82
|
+
APNS.send_notification(device_token, 'Hello iPhone!' )
|
83
|
+
APNS.send_notification(device_token, :alert => 'Hello iPhone!', :badge => 1, :sound => 'default')
|
84
|
+
|
85
|
+
# Send multiple notifications
|
86
|
+
n1 = APNS::Notification.new(device_token, 'Hello iPhone!' )
|
87
|
+
n2 = APNS::Notification.new(device_token, :alert => 'Hello iPhone!', :badge => 1, :sound => 'default')
|
88
|
+
APNS.send_notifications([n1, n2])
|
89
|
+
|
90
|
+
...
|
91
|
+
|
92
|
+
# Stop persistence, from this point each new push will open and close connections
|
93
|
+
APNS.stop_persistence
|
69
94
|
|
70
95
|
#### Sending more information along
|
71
96
|
|
72
|
-
|
73
|
-
|
97
|
+
APNS.send_notification(device_token, :alert => 'Hello iPhone!', :badge => 1, :sound => 'default',
|
98
|
+
:other => {:sent => 'with apns gem', :custom_param => "value"})
|
74
99
|
|
75
100
|
this will result in a payload like this:
|
76
101
|
|
77
|
-
|
102
|
+
{"aps":{"alert":"Hello iPhone!","badge":1,"sound":"default"},"sent":"with apns gem", "custom_param":"value"}
|
78
103
|
|
79
104
|
### Getting your iOS device token
|
80
105
|
|
@@ -187,7 +212,9 @@ You can use multiple keys to send notifications, to do it just do this changes i
|
|
187
212
|
|
188
213
|
## Status
|
189
214
|
|
190
|
-
#### Build Status
|
215
|
+
#### Build Status
|
216
|
+
[](https://travis-ci.org/NicosKaralis/pushmeup)
|
217
|
+
[](https://codeclimate.com/github/NicosKaralis/pushmeup)
|
191
218
|
|
192
219
|
#### Dependency Status [](https://gemnasium.com/NicosKaralis/pushmeup)
|
193
220
|
|
@@ -202,3 +229,7 @@ Currently we need a lot of testing so if you are good at writing tests please he
|
|
202
229
|
Pushmeup is released under the MIT license:
|
203
230
|
|
204
231
|
http://www.opensource.org/licenses/MIT
|
232
|
+
|
233
|
+
|
234
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
235
|
+
|
data/lib/pushmeup/apns/core.rb
CHANGED
@@ -10,24 +10,41 @@ module APNS
|
|
10
10
|
@pem = nil # this should be the path of the pem file not the contentes
|
11
11
|
@pass = nil
|
12
12
|
|
13
|
+
@persistent = false
|
14
|
+
@mutex = Mutex.new
|
15
|
+
@retries = 3 # TODO: check if we really need this
|
16
|
+
|
17
|
+
@sock = nil
|
18
|
+
@ssl = nil
|
19
|
+
|
13
20
|
class << self
|
14
21
|
attr_accessor :host, :pem, :port, :pass
|
15
22
|
end
|
16
23
|
|
24
|
+
def self.start_persistence
|
25
|
+
@persistent = true
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.stop_persistence
|
29
|
+
@persistent = false
|
30
|
+
|
31
|
+
@ssl.close
|
32
|
+
@sock.close
|
33
|
+
end
|
34
|
+
|
17
35
|
def self.send_notification(device_token, message)
|
18
36
|
n = APNS::Notification.new(device_token, message)
|
19
37
|
self.send_notifications([n])
|
20
38
|
end
|
21
39
|
|
22
40
|
def self.send_notifications(notifications)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
41
|
+
@mutex.synchronize do
|
42
|
+
self.with_connection do
|
43
|
+
notifications.each do |n|
|
44
|
+
@ssl.write(n.packaged_notification)
|
45
|
+
end
|
27
46
|
end
|
28
|
-
|
29
|
-
ssl.close
|
30
|
-
sock.close
|
47
|
+
end
|
31
48
|
end
|
32
49
|
|
33
50
|
def self.feedback
|
@@ -47,8 +64,38 @@ module APNS
|
|
47
64
|
return apns_feedback
|
48
65
|
end
|
49
66
|
|
50
|
-
|
51
|
-
|
67
|
+
protected
|
68
|
+
|
69
|
+
def self.with_connection
|
70
|
+
attempts = 1
|
71
|
+
|
72
|
+
begin
|
73
|
+
# If no @ssl is created or if @ssl is closed we need to start it
|
74
|
+
if @ssl.nil? || @sock.nil? || @ssl.closed? || @sock.closed?
|
75
|
+
@sock, @ssl = self.open_connection
|
76
|
+
end
|
77
|
+
|
78
|
+
yield
|
79
|
+
|
80
|
+
rescue StandardError, Errno::EPIPE
|
81
|
+
raise unless attempts < @retries
|
82
|
+
|
83
|
+
@ssl.close
|
84
|
+
@sock.close
|
85
|
+
|
86
|
+
attempts += 1
|
87
|
+
retry
|
88
|
+
end
|
89
|
+
|
90
|
+
# Only force close if not persistent
|
91
|
+
unless @persistent
|
92
|
+
@ssl.close
|
93
|
+
@ssl = nil
|
94
|
+
@sock.close
|
95
|
+
@sock = nil
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
52
99
|
def self.open_connection
|
53
100
|
raise "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)" unless self.pem
|
54
101
|
raise "The path to your pem file does not exist!" unless File.exist?(self.pem)
|
@@ -73,7 +120,6 @@ module APNS
|
|
73
120
|
context.key = OpenSSL::PKey::RSA.new(File.read(self.pem), self.pass)
|
74
121
|
|
75
122
|
fhost = self.host.gsub('gateway','feedback')
|
76
|
-
puts fhost
|
77
123
|
|
78
124
|
sock = TCPSocket.new(fhost, 2196)
|
79
125
|
ssl = OpenSSL::SSL::SSLSocket.new(sock, context)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module APNS
|
2
2
|
class Notification
|
3
3
|
attr_accessor :device_token, :alert, :badge, :sound, :other
|
4
|
-
|
4
|
+
|
5
5
|
def initialize(device_token, message)
|
6
6
|
self.device_token = device_token
|
7
7
|
if message.is_a?(Hash)
|
@@ -12,28 +12,36 @@ module APNS
|
|
12
12
|
elsif message.is_a?(String)
|
13
13
|
self.alert = message
|
14
14
|
else
|
15
|
-
raise "Notification needs to have either a
|
15
|
+
raise "Notification needs to have either a Hash or String"
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def packaged_notification
|
20
20
|
pt = self.packaged_token
|
21
21
|
pm = self.packaged_message
|
22
22
|
[0, 0, 32, pt, 0, pm.bytesize, pm].pack("ccca*cca*")
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
def packaged_token
|
26
26
|
[device_token.gsub(/[\s|<|>]/,'')].pack('H*')
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def packaged_message
|
30
30
|
aps = {'aps'=> {} }
|
31
31
|
aps['aps']['alert'] = self.alert if self.alert
|
32
32
|
aps['aps']['badge'] = self.badge if self.badge
|
33
33
|
aps['aps']['sound'] = self.sound if self.sound
|
34
34
|
aps.merge!(self.other) if self.other
|
35
|
-
aps.to_json
|
35
|
+
aps.to_json.gsub(/\\u([\da-fA-F]{4})/) {|m| [$1].pack("H*").unpack("n*").pack("U*")}
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
|
+
def ==(that)
|
39
|
+
device_token == that.device_token &&
|
40
|
+
alert == that.alert &&
|
41
|
+
badge == that.badge &&
|
42
|
+
sound == that.sound &&
|
43
|
+
other == that.other
|
44
|
+
end
|
45
|
+
|
38
46
|
end
|
39
47
|
end
|
data/lib/pushmeup/gcm/core.rb
CHANGED
@@ -4,14 +4,14 @@ require 'json'
|
|
4
4
|
|
5
5
|
module GCM
|
6
6
|
include HTTParty
|
7
|
-
|
7
|
+
|
8
8
|
@host = 'https://android.googleapis.com/gcm/send'
|
9
9
|
@format = :json
|
10
10
|
@key = nil
|
11
11
|
|
12
12
|
class << self
|
13
13
|
attr_accessor :host, :format, :key
|
14
|
-
|
14
|
+
|
15
15
|
def key(identity = nil)
|
16
16
|
if @key.is_a?(Hash)
|
17
17
|
raise %{If your key is a hash of keys you'l need to pass a identifier to the notification!} if identity.nil?
|
@@ -20,7 +20,7 @@ module GCM
|
|
20
20
|
return @key
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def key_identities
|
25
25
|
if @key.is_a?(Hash)
|
26
26
|
return @key.keys
|
@@ -29,12 +29,12 @@ module GCM
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def self.send_notification(device_tokens, data = {}, options = {})
|
34
34
|
n = GCM::Notification.new(device_tokens, data, options)
|
35
35
|
self.send_notifications([n])
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
def self.send_notifications(notifications)
|
39
39
|
responses = []
|
40
40
|
notifications.each do |n|
|
@@ -44,7 +44,7 @@ module GCM
|
|
44
44
|
end
|
45
45
|
|
46
46
|
private
|
47
|
-
|
47
|
+
|
48
48
|
def self.prepare_and_send(n)
|
49
49
|
if n.device_tokens.count < 1 || n.device_tokens.count > 1000
|
50
50
|
raise "Number of device_tokens invalid, keep it betwen 1 and 1000"
|
@@ -55,7 +55,7 @@ module GCM
|
|
55
55
|
if @key.is_a?(Hash) && n.identity.nil?
|
56
56
|
raise %{If your key is a hash of keys you'l need to pass a identifier to the notification!}
|
57
57
|
end
|
58
|
-
|
58
|
+
|
59
59
|
if self.format == :json
|
60
60
|
self.send_push_as_json(n)
|
61
61
|
elsif self.format == :text
|
@@ -64,7 +64,7 @@ module GCM
|
|
64
64
|
raise "Invalid format"
|
65
65
|
end
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
def self.send_push_as_json(n)
|
69
69
|
headers = {
|
70
70
|
'Authorization' => "key=#{ self.key(n.identity) }",
|
@@ -79,7 +79,7 @@ module GCM
|
|
79
79
|
}
|
80
80
|
return self.send_to_server(headers, body.to_json)
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
def self.send_push_as_plain_text(n)
|
84
84
|
raise "Still has to be done: http://developer.android.com/guide/google/gcm/gcm.html"
|
85
85
|
headers = {
|
@@ -89,13 +89,13 @@ module GCM
|
|
89
89
|
}
|
90
90
|
return self.send_to_server(headers, body)
|
91
91
|
end
|
92
|
-
|
92
|
+
|
93
93
|
def self.send_to_server(headers, body)
|
94
94
|
params = {:headers => headers, :body => body}
|
95
|
-
response = self.post(
|
95
|
+
response = self.post(self.host, params)
|
96
96
|
return build_response(response)
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
def self.build_response(response)
|
100
100
|
case response.code
|
101
101
|
when 200
|
@@ -110,5 +110,5 @@ module GCM
|
|
110
110
|
{:response => 'Server is temporarily unavailable.', :status_code => response.code}
|
111
111
|
end
|
112
112
|
end
|
113
|
-
|
113
|
+
|
114
114
|
end
|
@@ -1,39 +1,39 @@
|
|
1
1
|
module GCM
|
2
2
|
class Notification
|
3
3
|
attr_accessor :device_tokens, :data, :collapse_key, :time_to_live, :delay_while_idle, :identity
|
4
|
-
|
4
|
+
|
5
5
|
def initialize(tokens, data, options = {})
|
6
6
|
self.device_tokens = tokens
|
7
7
|
self.data = data
|
8
|
-
|
8
|
+
|
9
9
|
@collapse_key = options[:collapse_key]
|
10
10
|
@time_to_live = options[:time_to_live]
|
11
11
|
@delay_while_idle = options[:delay_while_idle]
|
12
12
|
@identity = options[:identity]
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def device_tokens=(tokens)
|
16
16
|
if tokens.is_a?(Array)
|
17
17
|
@device_tokens = tokens
|
18
18
|
elsif tokens.is_a?(String)
|
19
19
|
@device_tokens = [tokens]
|
20
20
|
else
|
21
|
-
raise "device_tokens needs to be either a
|
21
|
+
raise "device_tokens needs to be either a Hash or String"
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
def data=(data)
|
26
26
|
if data.is_a?(Hash)
|
27
27
|
@data = data
|
28
28
|
else
|
29
|
-
raise "data parameter must be the
|
29
|
+
raise "data parameter must be the type of Hash"
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def delay_while_idle=(delay_while_idle)
|
34
34
|
@delay_while_idle = (delay_while_idle == true || delay_while_idle == :true)
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
def time_to_live=(time_to_live)
|
38
38
|
if time_to_live.is_a?(Integer)
|
39
39
|
@time_to_live = time_to_live
|
@@ -41,6 +41,15 @@ module GCM
|
|
41
41
|
raise %q{"time_to_live" must be seconds as an integer value, like "100"}
|
42
42
|
end
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
|
+
def ==(that)
|
46
|
+
device_tokens == that.device_tokens &&
|
47
|
+
data == that.data &&
|
48
|
+
collapse_key == that.collapse_key &&
|
49
|
+
time_to_live == that.time_to_live &&
|
50
|
+
delay_while_idle == that.delay_while_idle &&
|
51
|
+
identity == that.identity
|
52
|
+
end
|
53
|
+
|
45
54
|
end
|
46
|
-
end
|
55
|
+
end
|
data/lib/pushmeup/version.rb
CHANGED
data/spec/lib/pushmeup_spec.rb
CHANGED
@@ -5,23 +5,37 @@ describe Pushmeup do
|
|
5
5
|
it "should have a APNS object" do
|
6
6
|
defined?(APNS).should_not be_false
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
it "should not forget the APNS default parameters" do
|
10
10
|
APNS.host.should == "gateway.sandbox.push.apple.com"
|
11
11
|
APNS.port.should == 2195
|
12
12
|
APNS.pem.should be_equal(nil)
|
13
13
|
APNS.pass.should be_equal(nil)
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
|
+
describe "Notifications" do
|
17
|
+
|
18
|
+
describe "#==" do
|
19
|
+
|
20
|
+
it "should properly equate objects without caring about object identity" do
|
21
|
+
a = APNS::Notification.new("123", {:alert => "hi"})
|
22
|
+
b = APNS::Notification.new("123", {:alert => "hi"})
|
23
|
+
a.should eq(b)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
16
30
|
end
|
17
|
-
|
31
|
+
|
18
32
|
describe "GCM" do
|
19
33
|
it "should have a GCM object" do
|
20
34
|
defined?(GCM).should_not be_false
|
21
35
|
end
|
22
|
-
|
36
|
+
|
23
37
|
describe "Notifications" do
|
24
|
-
|
38
|
+
|
25
39
|
before do
|
26
40
|
@options = {:data => "dummy data"}
|
27
41
|
end
|
@@ -38,20 +52,30 @@ describe Pushmeup do
|
|
38
52
|
end
|
39
53
|
|
40
54
|
it "should allow only notifications with data as hash with :data root" do
|
41
|
-
n = GCM::Notification.new("id", {:data => "data"})
|
42
|
-
|
55
|
+
n = GCM::Notification.new("id", { :data => "data" })
|
56
|
+
|
43
57
|
n.data.is_a?(Hash).should be_true
|
44
58
|
n.data.should == {:data => "data"}
|
45
59
|
|
46
60
|
n.data = {:a => ["a", "b", "c"]}
|
47
61
|
n.data.is_a?(Hash).should be_true
|
48
62
|
n.data.should == {:a => ["a", "b", "c"]}
|
49
|
-
|
63
|
+
|
50
64
|
n.data = {:a => "a"}
|
51
65
|
n.data.is_a?(Hash).should be_true
|
52
66
|
n.data.should == {:a => "a"}
|
53
67
|
end
|
54
|
-
|
68
|
+
|
69
|
+
describe "#==" do
|
70
|
+
|
71
|
+
it "should properly equate objects without caring about object identity" do
|
72
|
+
a = GCM::Notification.new("id", { :data => "data" })
|
73
|
+
b = GCM::Notification.new("id", { :data => "data" })
|
74
|
+
a.should eq(b)
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
55
79
|
end
|
56
80
|
end
|
57
81
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushmeup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease: 6
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nicos Karalis
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: httparty
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -88,7 +79,8 @@ extensions: []
|
|
88
79
|
extra_rdoc_files: []
|
89
80
|
files:
|
90
81
|
- .gitignore
|
91
|
-
- .
|
82
|
+
- .ruby-gemset
|
83
|
+
- .ruby-version
|
92
84
|
- .travis.yml
|
93
85
|
- Gemfile
|
94
86
|
- Keychain Access.jpg
|
@@ -108,30 +100,26 @@ files:
|
|
108
100
|
- spec/spec_helper.rb
|
109
101
|
homepage: https://github.com/NicosKaralis/pushmeup
|
110
102
|
licenses: []
|
103
|
+
metadata: {}
|
111
104
|
post_install_message:
|
112
105
|
rdoc_options: []
|
113
106
|
require_paths:
|
114
107
|
- lib
|
115
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
-
none: false
|
117
109
|
requirements:
|
118
110
|
- - ! '>='
|
119
111
|
- !ruby/object:Gem::Version
|
120
112
|
version: '0'
|
121
|
-
segments:
|
122
|
-
- 0
|
123
|
-
hash: -548351084538645532
|
124
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
-
none: false
|
126
114
|
requirements:
|
127
|
-
- - ! '
|
115
|
+
- - ! '>='
|
128
116
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
117
|
+
version: '0'
|
130
118
|
requirements: []
|
131
119
|
rubyforge_project: pushmeup
|
132
|
-
rubygems_version:
|
120
|
+
rubygems_version: 2.2.2
|
133
121
|
signing_key:
|
134
|
-
specification_version:
|
122
|
+
specification_version: 4
|
135
123
|
summary: Send push notifications to Apple devices through ANPS and Android devices
|
136
124
|
through GCM
|
137
125
|
test_files:
|
data/.rvmrc
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
-
# development environment upon cd'ing into the directory
|
5
|
-
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
-
# Only full ruby name is supported here, for short names use:
|
8
|
-
# echo "rvm use 1.9.3" > .rvmrc
|
9
|
-
environment_id="ruby-1.9.3-p125@pushmeup"
|
10
|
-
|
11
|
-
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
-
# rvmrc_rvm_version="1.11.5 (master)" # 1.10.1 seams as a safe start
|
13
|
-
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
-
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
-
# return 1
|
16
|
-
# }
|
17
|
-
|
18
|
-
# First we attempt to load the desired environment directly from the environment
|
19
|
-
# file. This is very fast and efficient compared to running through the entire
|
20
|
-
# CLI and selector. If you want feedback on which environment was used then
|
21
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
22
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
23
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
24
|
-
then
|
25
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
26
|
-
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
27
|
-
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
28
|
-
else
|
29
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
30
|
-
rvm --create "$environment_id" || {
|
31
|
-
echo "Failed to create RVM environment '${environment_id}'."
|
32
|
-
return 1
|
33
|
-
}
|
34
|
-
fi
|
35
|
-
|
36
|
-
# If you use bundler, this might be useful to you:
|
37
|
-
if [[ -s Gemfile ]] && {
|
38
|
-
! builtin command -v bundle >/dev/null ||
|
39
|
-
builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
|
40
|
-
}
|
41
|
-
then
|
42
|
-
printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
43
|
-
gem install bundler
|
44
|
-
fi
|
45
|
-
if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
46
|
-
then
|
47
|
-
bundle install | grep -vE '^Using|Your bundle is complete'
|
48
|
-
fi
|