shove 0.2 → 0.3

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.
Files changed (4) hide show
  1. data/README.md +19 -19
  2. data/lib/shove.rb +2 -4
  3. data/shove.gemspec +4 -2
  4. metadata +18 -4
data/README.md CHANGED
@@ -12,35 +12,35 @@
12
12
  ##Install Step 3
13
13
  Configure shover with your credentials
14
14
 
15
- require "shove"
15
+ require "shove"
16
16
 
17
- Shove.configure(
18
- :network => "network",
19
- :key => "apikey"
20
- )
17
+ Shove.configure(
18
+ :network => "network",
19
+ :key => "apikey"
20
+ )
21
21
 
22
22
  ##Broadcast messages
23
23
 
24
- # broadcast the "hello" event on the "default" channel with
25
- # Hello World! as the data
26
- Shove.broadcast("default", "hello", "Hello World!") do |response|
27
- puts response.error?
28
- puts response.status
29
- puts response.message
30
- end
24
+ # broadcast the "hello" event on the "default" channel with
25
+ # Hello World! as the data
26
+ Shove.broadcast("default", "hello", "Hello World!") do |response|
27
+ puts response.error?
28
+ puts response.status
29
+ puts response.message
30
+ end
31
31
 
32
32
  ##Direct messages
33
33
 
34
- Shove.direct(userid, "hello", "Hello World!") do |response|
35
- # handle response
36
- end
34
+ Shove.direct(userid, "hello", "Hello World!") do |response|
35
+ # handle response
36
+ end
37
37
 
38
38
  ##Authorize a user
39
39
 
40
- # authorize user with id userid on channel "default"
41
- Shove.authorize(userid, "default") do |response|
42
- # handle response
43
- end
40
+ # authorize user with id userid on channel "default"
41
+ Shove.authorize(userid, "default") do |response|
42
+ # handle response
43
+ end
44
44
 
45
45
  ##Block and Non-blocking
46
46
  shover does both. If the shover code happens to run inside of an EM.run block, the HTTP calls
@@ -1,10 +1,8 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require "rubygems"
4
- require "eventmachine"
5
- require "em-http"
4
+ require "em-http-request"
6
5
  require "yaml"
7
- require "json"
8
6
 
9
7
  ##
10
8
  # Shove
@@ -12,7 +10,7 @@ require "json"
12
10
  # See http://shove.io for an account
13
11
  module Shove
14
12
 
15
- Version = 0.2
13
+ Version = 0.3
16
14
 
17
15
  class << self
18
16
 
@@ -1,13 +1,15 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = "shove"
3
- s.version = "0.2"
3
+ s.version = "0.3"
4
4
  s.date = "2010-12-16"
5
5
  s.summary = "Ruby gem for leveraging shove.io, the web push platform"
6
6
  s.email = "dan@shove.io"
7
7
  s.homepage = "https://github.com/shove/shover"
8
8
  s.description = "Client side implementation for the shove.io API. See http://shove.io/documentation"
9
9
  s.has_rdoc = true
10
-
10
+
11
+ s.add_dependency("em-http-request", ">= 0.3.0")
12
+
11
13
  s.authors = ["Dan Simpson"]
12
14
 
13
15
  s.files = [
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- version: "0.2"
7
+ - 3
8
+ version: "0.3"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Dan Simpson
@@ -15,8 +15,22 @@ cert_chain: []
15
15
 
16
16
  date: 2010-12-16 00:00:00 -08:00
17
17
  default_executable:
18
- dependencies: []
19
-
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: em-http-request
21
+ prerelease: false
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 3
30
+ - 0
31
+ version: 0.3.0
32
+ type: :runtime
33
+ version_requirements: *id001
20
34
  description: Client side implementation for the shove.io API. See http://shove.io/documentation
21
35
  email: dan@shove.io
22
36
  executables: []