pubnub-publisher 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/LICENSE.txt +3 -22
- data/README.md +2 -0
- data/lib/pubnub/publisher/version.rb +1 -8
- data/lib/pubnub/publisher.rb +9 -0
- data/spec/publisher_spec.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c9746182be62395a1bc58e0c89dd49822bb8870
|
4
|
+
data.tar.gz: eea4c04dfa118ffd17cebd1c6b94d01f15d54780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9cd29094bd772de854239e258a6d3772ea0244f5779ccfec99863d2b2cc79c352a7be013614534b3f58db61e1b7bd210a3f133c3d6f74eca34e9b9f57fa0da9
|
7
|
+
data.tar.gz: 0cf14af323d35e6b70fda75d2785a10cd7966f8ddb847e633b8e958307066b115e0d466112e06567ed955edcda67efcf2ab90336050538b389f4ee6c3cf47da8
|
data/CHANGELOG.md
ADDED
data/LICENSE.txt
CHANGED
@@ -1,22 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
MIT
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
LICENSE
|
2
|
+
Copyright (c) Matt Aimonetti
|
3
|
+
MIT: http://mattaimonetti.mit-license.org
|
data/README.md
CHANGED
data/lib/pubnub/publisher.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
require "net/https"
|
2
|
+
require "net/http"
|
3
|
+
require "uri"
|
4
|
+
require "json"
|
5
|
+
require "securerandom"
|
1
6
|
require "pubnub/publisher/version"
|
2
7
|
|
3
8
|
module Pubnub
|
@@ -42,6 +47,10 @@ module Pubnub
|
|
42
47
|
instance
|
43
48
|
end
|
44
49
|
|
50
|
+
def self.publish_key; @publish_key end
|
51
|
+
def self.subscribe_key; @subscribe_key end
|
52
|
+
def self.ssl; @ssl end
|
53
|
+
|
45
54
|
def initialize(opts={})
|
46
55
|
opts.each do |k,v|
|
47
56
|
next unless CONFIG_KEYS.include?(k)
|
data/spec/publisher_spec.rb
CHANGED
@@ -56,6 +56,12 @@ describe Pubnub::Publisher do
|
|
56
56
|
expect(pub_client.ssl).to be_true
|
57
57
|
end
|
58
58
|
|
59
|
+
it "has some global getters" do
|
60
|
+
Pubnub::Publisher.setup(publish_key: "pub key", subscribe_key: "sub key", ssl: false)
|
61
|
+
expect(Pubnub::Publisher.publish_key).to eql("pub key")
|
62
|
+
expect(Pubnub::Publisher.subscribe_key).to eql("sub key")
|
63
|
+
end
|
64
|
+
|
59
65
|
end
|
60
66
|
|
61
67
|
context "new instance" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubnub-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Aimonetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- .gitignore
|
63
|
+
- CHANGELOG.md
|
63
64
|
- Gemfile
|
64
65
|
- LICENSE.txt
|
65
66
|
- README.md
|