push_bot 0.4.2 → 0.4.4
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/README.md +3 -0
- data/lib/push_bot/request.rb +3 -0
- data/lib/push_bot/version.rb +1 -1
- data/spec/lib/request_spec.rb +33 -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: bbb6953a5ad1d80e64ec1d1166ecb8563b0e8599
|
4
|
+
data.tar.gz: b7dfb9c767b35ebff5d500104d9784d9b5528278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31be6e4e9a72045239edf3eaa5fb6367f0fd7a75cd68201536b6e41427152c6f26f9fd93957e0491586e4e8be81758f05494f1c10d15930f62439b9f19dec678
|
7
|
+
data.tar.gz: 61c22bd74c0a0bb7552398ee5286f1f9d91f92270b1ff226d248a02aa3117147aae6aa332e6137ff01d5362a9d0aa5f391276f79137300dbd30bed4dd5434178
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
PushBot is the Ruby Gem for connecting to the PushBots push notification service
|
4
4
|
|
5
|
+
#####Full Documentation
|
6
|
+
[](https://www.omniref.com/ruby/gems/push_bot)
|
7
|
+
|
5
8
|
## Installation
|
6
9
|
|
7
10
|
Add this line to your application's Gemfile:
|
data/lib/push_bot/request.rb
CHANGED
data/lib/push_bot/version.rb
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PushBot::Request do
|
4
|
+
describe '#request' do
|
5
|
+
describe 'POST' do
|
6
|
+
let(:id) { 42 }
|
7
|
+
let(:secret) { 'super_secret_key' }
|
8
|
+
let(:type) { :all }
|
9
|
+
let(:options) { { msg:'foo', platform: '0' } }
|
10
|
+
let(:request_options) { {
|
11
|
+
method: :post,
|
12
|
+
body: JSON.dump(options),
|
13
|
+
headers: {
|
14
|
+
:'X-PushBots-AppID' => id,
|
15
|
+
:'X-PushBots-Secret' => secret,
|
16
|
+
:'Content-Type' => :'application/json'
|
17
|
+
}
|
18
|
+
} }
|
19
|
+
|
20
|
+
before do
|
21
|
+
PushBot.configure do |config|
|
22
|
+
config.id = id
|
23
|
+
config.secret = secret
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'Typhoeus::Request should receive #new' do
|
28
|
+
expect(Typhoeus::Request).to receive(:new).with("https://api.pushbots.com/push/#{type}",request_options)
|
29
|
+
described_class.new(:push).post(type, options)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end #request
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: push_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Norton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- push_bot.gemspec
|
98
98
|
- spec/lib/device_spec.rb
|
99
99
|
- spec/lib/push_spec.rb
|
100
|
+
- spec/lib/request_spec.rb
|
100
101
|
- spec/spec_helper.rb
|
101
102
|
homepage: https://github.com/push_bot
|
102
103
|
licenses:
|
@@ -125,4 +126,5 @@ summary: A Ruby interface to the PushBots API
|
|
125
126
|
test_files:
|
126
127
|
- spec/lib/device_spec.rb
|
127
128
|
- spec/lib/push_spec.rb
|
129
|
+
- spec/lib/request_spec.rb
|
128
130
|
- spec/spec_helper.rb
|