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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29191ae9aaf1405aba9fb433dd40c69c13e17a9d
4
- data.tar.gz: 338bcfdea55c3dfc4e6f4ff6ae03435c6feaec58
3
+ metadata.gz: bbb6953a5ad1d80e64ec1d1166ecb8563b0e8599
4
+ data.tar.gz: b7dfb9c767b35ebff5d500104d9784d9b5528278
5
5
  SHA512:
6
- metadata.gz: 664ea271be56c169ea256034779495170cc128666c47412d882c137d3f36006e6bfaf383d04b4cb32e2e2e42e850289c1505a7f490f794a6a1da27bae899974b
7
- data.tar.gz: fd52debda219d452b5ced857b5a9c17c37cf282ed9a8966d347320e3d151c55934c9c67fd6afe2051c0c00ec8834545d7a93e3492dfe27d6f59c5c41c1d11f70
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
+ [![push_bot API Documentation](https://www.omniref.com/ruby/gems/push_bot.png)](https://www.omniref.com/ruby/gems/push_bot)
7
+
5
8
  ## Installation
6
9
 
7
10
  Add this line to your application's Gemfile:
@@ -1,3 +1,6 @@
1
+ require 'typhoeus'
2
+ require 'json'
3
+
1
4
  module PushBot
2
5
  class Request
3
6
  def initialize(base)
@@ -1,3 +1,3 @@
1
1
  module PushBot
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.4'
3
3
  end
@@ -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.2
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: 2014-10-09 00:00:00.000000000 Z
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