ionic_push 0.2.0 → 0.2.1
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 +4 -4
- data/.gitignore +1 -0
- data/lib/ionic_push/request.rb +18 -8
- data/lib/ionic_push/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 590d984a1bb6b46d9043bd44a4231aeca2d04a54
|
|
4
|
+
data.tar.gz: 3f8a672edb34314d4102ed0f6f4034c06e2673b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe7e706d73903ba549189ac9ac61448bded7d74bd0414d3f434a2c7eb2e81008d7ca01aa471873850541cc87c7f7c9ea6ba9a9161f123586a88aa1d09fb9d571
|
|
7
|
+
data.tar.gz: 18f681ed0e308038c97601e69a9561f195bfa9ffd3ced6b6ebadcbf26bc15ed96704e9c8fd304bcf7008dcdddf74311865ac115cd21892fb1690a49ff9da77c3
|
data/.gitignore
CHANGED
data/lib/ionic_push/request.rb
CHANGED
|
@@ -13,28 +13,38 @@ module IonicPush
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def send
|
|
16
|
+
puts request_params
|
|
16
17
|
self.class.post('/notifications', request_params)
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
private
|
|
20
21
|
|
|
21
22
|
def headers
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
@options[:headers] = content_type
|
|
24
|
+
@options[:headers].merge!(authorization)
|
|
24
25
|
end
|
|
25
26
|
|
|
26
|
-
def
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
def content_type
|
|
28
|
+
{ 'Content-Type' => 'application/json' }
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def authorization
|
|
32
|
+
auth = "Bearer #{@configuration.api_key}"
|
|
33
|
+
{ 'Authorization' => auth }
|
|
29
34
|
end
|
|
30
35
|
|
|
31
|
-
def
|
|
36
|
+
def security_profile
|
|
32
37
|
@data.merge!(profile: @configuration.profile)
|
|
33
38
|
end
|
|
34
39
|
|
|
40
|
+
def body
|
|
41
|
+
@options.merge!(body: @data.to_json)
|
|
42
|
+
end
|
|
43
|
+
|
|
35
44
|
def request_params
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
headers
|
|
46
|
+
security_profile
|
|
47
|
+
body
|
|
38
48
|
end
|
|
39
49
|
end
|
|
40
50
|
end
|
data/lib/ionic_push/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ionic_push
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thiago F. Lins
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-05-
|
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|