houston 0.3.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/houston-0.3.1.gem +0 -0
- data/houston.gemspec +1 -1
- data/lib/houston.rb +1 -4
- data/lib/houston/client.rb +1 -0
- data/lib/houston/notification.rb +6 -0
- data/lib/houston/version.rb +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1f9887759e151475336ef952b607870f3b29b3
|
4
|
+
data.tar.gz: 1e09658a9c4177061c0e5137385779dcbee858e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 537b0cd3c221e84bc6b156e33eebb07d65edf5c5eb79430b4755f48ad8a7d2fd6532570619d07d12fd17d0d8861b2b64b300b297f498469cacc9cf18e42e75bd
|
7
|
+
data.tar.gz: 35b91cd235c889a02b2e18828f99c8ea5bcd0a3a67c85f30f69fb467466a97334676bf8365bd15df6fa518303251cc802491cc080359d4f63df91648e25bee02
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
houston (0.
|
4
|
+
houston (1.0.0)
|
5
5
|
commander (~> 4.1)
|
6
6
|
json
|
7
7
|
|
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
commander (4.1.5)
|
12
12
|
highline (~> 1.6.11)
|
13
13
|
highline (1.6.19)
|
14
|
-
json (1.8.
|
14
|
+
json (1.8.1)
|
15
15
|
rake (0.9.6)
|
16
16
|
rspec (0.9.4)
|
17
17
|
|
data/houston-0.3.1.gem
ADDED
Binary file
|
data/houston.gemspec
CHANGED
data/lib/houston.rb
CHANGED
data/lib/houston/client.rb
CHANGED
data/lib/houston/notification.rb
CHANGED
@@ -2,6 +2,8 @@ require 'json'
|
|
2
2
|
|
3
3
|
module Houston
|
4
4
|
class Notification
|
5
|
+
MAXIMUM_PAYLOAD_SIZE = 256
|
6
|
+
|
5
7
|
attr_accessor :token, :alert, :badge, :sound, :content_available, :custom_data, :id, :expiry
|
6
8
|
attr_reader :sent_at
|
7
9
|
|
@@ -51,5 +53,9 @@ module Houston
|
|
51
53
|
def sent?
|
52
54
|
!!@sent_at
|
53
55
|
end
|
56
|
+
|
57
|
+
def valid?
|
58
|
+
payload.to_json.bytesize <= MAXIMUM_PAYLOAD_SIZE
|
59
|
+
end
|
54
60
|
end
|
55
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: houston
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -76,10 +76,12 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ./Gemfile
|
78
78
|
- ./Gemfile.lock
|
79
|
+
- ./houston-0.3.1.gem
|
79
80
|
- ./houston.gemspec
|
80
81
|
- ./lib/houston/client.rb
|
81
82
|
- ./lib/houston/connection.rb
|
82
83
|
- ./lib/houston/notification.rb
|
84
|
+
- ./lib/houston/version.rb
|
83
85
|
- ./lib/houston.rb
|
84
86
|
- ./LICENSE
|
85
87
|
- ./Rakefile
|