push_to_devices 0.1.4 → 0.1.5
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 +7 -0
- data/.travis.yml +3 -0
- data/README.md +10 -7
- data/lib/push_to_devices.rb +2 -2
- data/push_to_devices.gemspec +3 -3
- data/spec/push_to_device/push_to_device_spec.rb +1 -1
- metadata +15 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e72b6815a7b26c67edab6754dc92aa9e0089b847
|
4
|
+
data.tar.gz: 5abf6a2fafed87e1e349d61a36c882d66484f1ea
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1b0bf2fa9d4d86671cee679e3de27286f0aa3b3b0ec37b1f948421f08bf5930a995f6d175bf259ae8afc231681d983cd7b9aed4980fab1f4962f2c662bd51c20
|
7
|
+
data.tar.gz: 90408b6cc820da80d6cd0a1d1630ff8bc4f8509aacfaefc3a5222b3d362785a6300d30e13dba0e478783a5e302f8c7ab388e9faabfb8ca655de1c8b5062b532d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
Push to Devices Ruby Client Library
|
1
|
+
Push to Devices Ruby Client Library [](http://travis-ci.org/lloydmeta/push_to_devices_rb) [](https://codeclimate.com/github/lloydmeta/push_to_devices_rb)
|
2
2
|
------------------------------
|
3
3
|
|
4
|
-
[](http://travis-ci.org/lloydmeta/push_to_devices_rb)
|
6
|
-
|
7
|
-
[](https://codeclimate.com/github/lloydmeta/push_to_devices_rb)
|
8
|
-
|
9
4
|
A Ruby client library for [Push to Devices server](https://github.com/lloydmeta/push_to_devices) to make it easier to register users, send notifications to users individually, and send a notification to a bunch of users.
|
10
5
|
|
11
6
|
Installation
|
@@ -84,7 +79,15 @@ Examples
|
|
84
79
|
unique_hashes = ["h1k43jgh14g6hl34j1g6", "1bjhl6b134hj6gl41hj6", ...]
|
85
80
|
notification_data = {
|
86
81
|
ios_specific_fields: {alert: "Hello!", badge: 3},
|
87
|
-
android_specific_fields: {
|
82
|
+
android_specific_fields: {
|
83
|
+
data: {
|
84
|
+
title: "Android notification",
|
85
|
+
text: "Hello Android user!"
|
86
|
+
},
|
87
|
+
options: {
|
88
|
+
time_to_live: 3600
|
89
|
+
}
|
90
|
+
}
|
88
91
|
}
|
89
92
|
PushToDevices::API.post_notification_to_users(unique_hashes: unique_hashes, notification_data: notification_data)
|
90
93
|
```
|
data/lib/push_to_devices.rb
CHANGED
@@ -5,7 +5,7 @@ require "cgi"
|
|
5
5
|
module PushToDevices
|
6
6
|
|
7
7
|
module Config
|
8
|
-
VERSION = '0.1.
|
8
|
+
VERSION = '0.1.3'
|
9
9
|
end
|
10
10
|
|
11
11
|
class Exception < ::StandardError
|
@@ -171,7 +171,7 @@ module PushToDevices
|
|
171
171
|
# }
|
172
172
|
# }
|
173
173
|
def post_notification_to_users(params = {})
|
174
|
-
post("users/notifications", params)
|
174
|
+
post("users/notifications", params.merge(params.delete(:notification_data)))
|
175
175
|
end
|
176
176
|
|
177
177
|
# POSTS to users/ to register a user for push notifications
|
data/push_to_devices.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = %q{push_to_devices}
|
3
|
-
gem.version = "0.1.
|
4
|
-
gem.date = %q{2013-
|
3
|
+
gem.version = "0.1.5"
|
4
|
+
gem.date = %q{2013-12-03}
|
5
5
|
gem.authors = ["Lloyd Meta"]
|
6
6
|
gem.email = ["lloydmeta@gmail.com"]
|
7
7
|
gem.homepage = "http://github.com/lloydmeta/push_to_devices_rb"
|
@@ -18,4 +18,4 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.add_development_dependency 'rake'
|
19
19
|
gem.add_development_dependency 'rspec'
|
20
20
|
gem.add_development_dependency 'webmock'
|
21
|
-
end
|
21
|
+
end
|
@@ -42,7 +42,7 @@ describe PushToDevices do
|
|
42
42
|
android_specific_fields: {text: "android"}
|
43
43
|
}
|
44
44
|
PushToDevices::API.post_notification_to_users(unique_hashes: unique_hashes, notification_data: notification_data)
|
45
|
-
a_request(:post, "http://nowhere.com/users/notifications").with(body: {unique_hashes: unique_hashes
|
45
|
+
a_request(:post, "http://nowhere.com/users/notifications").with(body: {unique_hashes: unique_hashes}.merge(notification_data).to_json).should have_been_made
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: push_to_devices
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Lloyd Meta
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-12-03 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
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
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
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
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
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
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: webmock
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
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
|
77
68
|
version: '0'
|
78
69
|
description: A Ruby library for interfacing with push_to_devices
|
@@ -94,27 +85,26 @@ files:
|
|
94
85
|
- spec/spec_helper.rb
|
95
86
|
homepage: http://github.com/lloydmeta/push_to_devices_rb
|
96
87
|
licenses: []
|
88
|
+
metadata: {}
|
97
89
|
post_install_message:
|
98
90
|
rdoc_options: []
|
99
91
|
require_paths:
|
100
92
|
- lib
|
101
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
-
none: false
|
103
94
|
requirements:
|
104
|
-
- -
|
95
|
+
- - '>='
|
105
96
|
- !ruby/object:Gem::Version
|
106
97
|
version: '0'
|
107
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
99
|
requirements:
|
110
|
-
- -
|
100
|
+
- - '>='
|
111
101
|
- !ruby/object:Gem::Version
|
112
102
|
version: '0'
|
113
103
|
requirements: []
|
114
104
|
rubyforge_project:
|
115
|
-
rubygems_version: 1.
|
105
|
+
rubygems_version: 2.1.11
|
116
106
|
signing_key:
|
117
|
-
specification_version:
|
107
|
+
specification_version: 4
|
118
108
|
summary: A Ruby library for interfacing with push_to_devices
|
119
109
|
test_files:
|
120
110
|
- spec/push_to_device/push_to_device_spec.rb
|