zero_push 2.1.0 → 2.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.
data/.travis.yml CHANGED
@@ -3,8 +3,8 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.2
5
5
  - 1.9.3
6
+ - 2.0.0
6
7
  - jruby-19mode
7
- - rbx-19mode
8
8
  notifications:
9
9
  email:
10
10
  - adam.v.duke@gmail.com
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zero_push (2.1.0)
4
+ zero_push (2.2.0)
5
5
  faraday (~> 0.8.5)
6
6
  faraday_middleware (~> 0.9.0)
7
7
 
@@ -26,7 +26,7 @@ GEM
26
26
  multi_json (~> 1.0)
27
27
  builder (3.0.4)
28
28
  erubis (2.7.0)
29
- faraday (0.8.8)
29
+ faraday (0.8.9)
30
30
  multipart-post (~> 1.2.0)
31
31
  faraday_middleware (0.9.0)
32
32
  faraday (>= 0.7.4, < 0.9)
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 ZeroPush
1
+ Copyright (c) 2014 Symmetric Infinity LLC
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -51,3 +51,29 @@ For more documentation, check our [Getting Started Guide with ZeroPush](https://
51
51
  1. Commit your changes (`git commit -am 'Add some feature'`)
52
52
  1. Push to the branch (`git push origin my-new-feature`)
53
53
  1. Create new Pull Request
54
+
55
+ ## License
56
+
57
+ Copyright (c) 2014 Symmetric Infinity LLC
58
+
59
+ MIT License
60
+
61
+ Permission is hereby granted, free of charge, to any person obtaining
62
+ a copy of this software and associated documentation files (the
63
+ "Software"), to deal in the Software without restriction, including
64
+ without limitation the rights to use, copy, modify, merge, publish,
65
+ distribute, sublicense, and/or sell copies of the Software, and to
66
+ permit persons to whom the Software is furnished to do so, subject to
67
+ the following conditions:
68
+
69
+ The above copyright notice and this permission notice shall be
70
+ included in all copies or substantial portions of the Software.
71
+
72
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
73
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
74
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
75
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
76
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
77
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
78
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79
+
@@ -1,3 +1,3 @@
1
1
  module ZeroPush
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.2.0'
3
3
  end
data/lib/zero_push.rb CHANGED
@@ -18,6 +18,14 @@ module ZeroPush
18
18
  client.broadcast(params)
19
19
  end
20
20
 
21
+ def subscribe(device_token, channel)
22
+ client.subscribe(device_token, channel)
23
+ end
24
+
25
+ def unsubscribe(device_token, channel)
26
+ client.unsubscribe(device_token, channel)
27
+ end
28
+
21
29
  def register(device_token)
22
30
  client.register(device_token)
23
31
  end
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  Content-Type:
15
15
  - application/x-www-form-urlencoded
16
16
  response:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  response:
15
15
  status:
16
16
  code: 200
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  Content-Type:
15
15
  - application/x-www-form-urlencoded
16
16
  response:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  Content-Type:
15
15
  - application/x-www-form-urlencoded
16
16
  response:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  Content-Type:
15
15
  - application/x-www-form-urlencoded
16
16
  response:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  Content-Type:
15
15
  - application/x-www-form-urlencoded
16
16
  response:
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  response:
15
15
  status:
16
16
  code: 200
@@ -10,7 +10,7 @@ http_interactions:
10
10
  Authorization:
11
11
  - Token token="test_token"
12
12
  User-Agent:
13
- - Faraday v0.8.8
13
+ - Faraday v0.8.9
14
14
  response:
15
15
  status:
16
16
  code: 200
@@ -74,7 +74,7 @@ http_interactions:
74
74
  Authorization:
75
75
  - Token token="not a valid token"
76
76
  User-Agent:
77
- - Faraday v0.8.8
77
+ - Faraday v0.8.9
78
78
  response:
79
79
  status:
80
80
  code: 401
data/spec/spec_helper.rb CHANGED
@@ -8,7 +8,9 @@ VCR.configure do |c|
8
8
  c.hook_into :faraday
9
9
  c.default_cassette_options = {
10
10
  record: :new_episodes,
11
- match_requests_on: [:method, :uri, :headers],
12
- serialize_with: :syck
11
+ match_requests_on: [:method, :uri, :headers]
13
12
  }
13
+ #Note: in some cases it may be necessary to add
14
+ #serialize_with: :syck to the default cassett options
15
+ #when recording new cassettes
14
16
  end
@@ -12,7 +12,7 @@ describe ZeroPush do
12
12
  end
13
13
 
14
14
  describe 'methods the module responds to' do
15
- [:verify_credentials, :notify, :broadcast, :register, :set_badge, :inactive_tokens, :client].each do |method|
15
+ [:verify_credentials, :notify, :broadcast, :subscribe, :unsubscribe, :register, :set_badge, :inactive_tokens, :client].each do |method|
16
16
  it "should respond to #{method}" do
17
17
  ZeroPush.respond_to?(method).must_equal(true)
18
18
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zero_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Stefan Natchev
@@ -9,11 +10,12 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-01-03 00:00:00.000000000 Z
13
+ date: 2014-03-21 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: faraday
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - ~>
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - ~>
26
29
  - !ruby/object:Gem::Version
@@ -28,6 +31,7 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: faraday_middleware
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ~>
33
37
  - !ruby/object:Gem::Version
@@ -35,6 +39,7 @@ dependencies:
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ~>
40
45
  - !ruby/object:Gem::Version
@@ -42,6 +47,7 @@ dependencies:
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: actionpack
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
52
  - - ~>
47
53
  - !ruby/object:Gem::Version
@@ -49,6 +55,7 @@ dependencies:
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
60
  - - ~>
54
61
  - !ruby/object:Gem::Version
@@ -56,6 +63,7 @@ dependencies:
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: activesupport
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
68
  - - ~>
61
69
  - !ruby/object:Gem::Version
@@ -63,6 +71,7 @@ dependencies:
63
71
  type: :development
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
76
  - - ~>
68
77
  - !ruby/object:Gem::Version
@@ -70,6 +79,7 @@ dependencies:
70
79
  - !ruby/object:Gem::Dependency
71
80
  name: minitest
72
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
73
83
  requirements:
74
84
  - - ~>
75
85
  - !ruby/object:Gem::Version
@@ -77,6 +87,7 @@ dependencies:
77
87
  type: :development
78
88
  prerelease: false
79
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
80
91
  requirements:
81
92
  - - ~>
82
93
  - !ruby/object:Gem::Version
@@ -84,6 +95,7 @@ dependencies:
84
95
  - !ruby/object:Gem::Dependency
85
96
  name: mocha
86
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
87
99
  requirements:
88
100
  - - ~>
89
101
  - !ruby/object:Gem::Version
@@ -91,6 +103,7 @@ dependencies:
91
103
  type: :development
92
104
  prerelease: false
93
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
94
107
  requirements:
95
108
  - - ~>
96
109
  - !ruby/object:Gem::Version
@@ -98,6 +111,7 @@ dependencies:
98
111
  - !ruby/object:Gem::Dependency
99
112
  name: rake
100
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
101
115
  requirements:
102
116
  - - ~>
103
117
  - !ruby/object:Gem::Version
@@ -105,6 +119,7 @@ dependencies:
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
108
123
  requirements:
109
124
  - - ~>
110
125
  - !ruby/object:Gem::Version
@@ -112,6 +127,7 @@ dependencies:
112
127
  - !ruby/object:Gem::Dependency
113
128
  name: railties
114
129
  requirement: !ruby/object:Gem::Requirement
130
+ none: false
115
131
  requirements:
116
132
  - - ~>
117
133
  - !ruby/object:Gem::Version
@@ -119,6 +135,7 @@ dependencies:
119
135
  type: :development
120
136
  prerelease: false
121
137
  version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
122
139
  requirements:
123
140
  - - ~>
124
141
  - !ruby/object:Gem::Version
@@ -126,6 +143,7 @@ dependencies:
126
143
  - !ruby/object:Gem::Dependency
127
144
  name: vcr
128
145
  requirement: !ruby/object:Gem::Requirement
146
+ none: false
129
147
  requirements:
130
148
  - - ~>
131
149
  - !ruby/object:Gem::Version
@@ -133,6 +151,7 @@ dependencies:
133
151
  type: :development
134
152
  prerelease: false
135
153
  version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
136
155
  requirements:
137
156
  - - ~>
138
157
  - !ruby/object:Gem::Version
@@ -149,7 +168,7 @@ files:
149
168
  - .travis.yml
150
169
  - Gemfile
151
170
  - Gemfile.lock
152
- - LICENSE.txt
171
+ - LICENSE
153
172
  - README.md
154
173
  - Rakefile
155
174
  - lib/generators/zero_push/install_generator.rb
@@ -174,26 +193,27 @@ files:
174
193
  homepage: https://zeropush.com
175
194
  licenses:
176
195
  - MIT
177
- metadata: {}
178
196
  post_install_message:
179
197
  rdoc_options: []
180
198
  require_paths:
181
199
  - lib
182
200
  required_ruby_version: !ruby/object:Gem::Requirement
201
+ none: false
183
202
  requirements:
184
203
  - - ! '>='
185
204
  - !ruby/object:Gem::Version
186
205
  version: '1.9'
187
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
+ none: false
188
208
  requirements:
189
209
  - - ! '>='
190
210
  - !ruby/object:Gem::Version
191
211
  version: '0'
192
212
  requirements: []
193
213
  rubyforge_project:
194
- rubygems_version: 2.1.0
214
+ rubygems_version: 1.8.23
195
215
  signing_key:
196
- specification_version: 4
216
+ specification_version: 3
197
217
  summary: A gem for interacting with the ZeroPush API. (http://zeropush.com)
198
218
  test_files:
199
219
  - spec/fixtures/broadcast.yml
@@ -208,3 +228,4 @@ test_files:
208
228
  - spec/spec_helper.rb
209
229
  - spec/zero_push_client_spec.rb
210
230
  - spec/zero_push_spec.rb
231
+ has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTc4NzM0MmZmYmVmYWJjNGM5NTFkZGJmZjMxODFmZGQzNWNmOTIxNA==
5
- data.tar.gz: !binary |-
6
- ZjEwYjcyZDEzNjI4NTkzMjU5YTljZWY2ZGIyZTc4NjMxYWIxNmRiMQ==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- NDJmODBmNTU2M2JmZjJkMTFiOGMyZjZiZmJmMDVjZTMxZmYzNzM5ZTc3MmU2
10
- YWIyYzYyMWQxNjQ0M2Q5OTA4NTNmOTQ0NWRlMDcwY2NhZjc5YWFkNWJjN2Qz
11
- OThmNDU0YzJhNjcyMzFmMzE1NDNjMjg4YzY3NDI2MGNkNzRiOGE=
12
- data.tar.gz: !binary |-
13
- N2VlMjI4ODExYTg1YmY4Y2Q0NjE5NjAyY2JiYzNiOTU3NDBmZGRiOTEwYjRm
14
- NjAyMzg3ZDA4OGQ4ZGVmMDE5ZjE2YmI4NzAxNDQyMDI0NjlhOGI5YWQ1Mzlk
15
- ZmY5MWQ5YzNjNDg5MDNiYzE3YWM3ODE5OWYzZDVkOWQ2OTJkZGQ=