shove 0.52 → 1.0.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.
- data/.gitignore +5 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +63 -0
- data/README.markdown +263 -0
- data/Rakefile +47 -0
- data/bin/shove +128 -106
- data/lib/shove/app.rb +78 -0
- data/lib/shove/app_directory.rb +104 -0
- data/lib/shove/client/callback.rb +24 -0
- data/lib/shove/client/channel.rb +81 -0
- data/lib/shove/client/connection.rb +167 -0
- data/lib/shove/http/channel_context.rb +60 -0
- data/lib/shove/http/client_context.rb +82 -0
- data/lib/shove/http/request.rb +94 -0
- data/lib/shove/http/response.rb +30 -0
- data/lib/shove/protocol.rb +53 -0
- data/lib/shove.rb +60 -78
- data/shove.gemspec +11 -20
- data/spec/app_directory_spec.rb +66 -0
- data/spec/cassettes/should_authorize_oneself.yml +24 -0
- data/spec/cassettes/should_be_able_to_authorize_with_the_server.yml +24 -0
- data/spec/cassettes/should_cancel_a_binding.yml +24 -0
- data/spec/cassettes/should_configure_the_default.yml +24 -0
- data/spec/cassettes/should_configure_the_from_the_previous_test.yml +24 -0
- data/spec/cassettes/should_create_a_channel_context.yml +24 -0
- data/spec/cassettes/should_deny_a_connection.yml +24 -0
- data/spec/cassettes/should_deny_a_control_to_a_client.yml +24 -0
- data/spec/cassettes/should_deny_a_publishing_to_a_client.yml +24 -0
- data/spec/cassettes/should_deny_a_subscriptions_to_a_client.yml +24 -0
- data/spec/cassettes/should_deny_publishing_on_a_channel_context.yml +24 -0
- data/spec/cassettes/should_deny_subscriptions_on_a_channel_context.yml +24 -0
- data/spec/cassettes/should_get_a_set_of_nodes_for_the_network.yml +24 -0
- data/spec/cassettes/should_get_a_subscribe_granted_event.yml +24 -0
- data/spec/cassettes/should_grant_a_connection.yml +24 -0
- data/spec/cassettes/should_grant_a_control_to_a_client.yml +24 -0
- data/spec/cassettes/should_grant_a_publishing_to_a_client.yml +24 -0
- data/spec/cassettes/should_grant_a_subscriptions_to_a_client.yml +24 -0
- data/spec/cassettes/should_grant_publishing_on_a_channel_context.yml +24 -0
- data/spec/cassettes/should_grant_subscriptions_on_a_channel_context.yml +24 -0
- data/spec/cassettes/should_publish.yml +24 -0
- data/spec/cassettes/should_publish_on_a_channel_context.yml +24 -0
- data/spec/cassettes/should_publish_to_a_client.yml +24 -0
- data/spec/cassettes/should_receive_an_unsubscribe_event.yml +24 -0
- data/spec/cassettes/should_receive_messages_on_a_channel.yml +24 -0
- data/spec/cassettes/should_send_a_connect_op.yml +24 -0
- data/spec/cassettes/should_send_a_connect_op_with_an_id.yml +24 -0
- data/spec/cassettes/should_spawn_a_client.yml +24 -0
- data/spec/cassettes/should_subscribe_to_a_channel.yml +24 -0
- data/spec/cassettes/should_trigger_a_connect_denied_event.yml +24 -0
- data/spec/cassettes/should_trigger_a_connect_event.yml +24 -0
- data/spec/cassettes/should_trigger_a_disconnect_event.yml +24 -0
- data/spec/cassettes/should_trigger_an_error_event.yml +24 -0
- data/spec/cassettes/should_unsubscribe_from_a_channel.yml +24 -0
- data/spec/cassettes/should_update_the_default_app.yml +24 -0
- data/spec/helper.rb +60 -0
- data/spec/shove_client_spec.rb +194 -0
- data/spec/shove_http_spec.rb +142 -0
- metadata +111 -81
- data/README.md +0 -71
- data/lib/shove/client.rb +0 -54
- data/lib/shove/request.rb +0 -80
- data/lib/shove/response.rb +0 -23
- data/spec/shove_spec.rb +0 -40
@@ -0,0 +1,30 @@
|
|
1
|
+
module Shove
|
2
|
+
module Http
|
3
|
+
class Response
|
4
|
+
|
5
|
+
attr_accessor :status, :message, :error
|
6
|
+
|
7
|
+
def initialize status, message, error=false
|
8
|
+
self.status = status.to_i
|
9
|
+
self.message = message
|
10
|
+
self.error = error
|
11
|
+
end
|
12
|
+
|
13
|
+
# was there an error with the request?
|
14
|
+
def error?
|
15
|
+
error
|
16
|
+
end
|
17
|
+
|
18
|
+
# parse a json response
|
19
|
+
def parse
|
20
|
+
@parsed ||= Yajl::Parser.new(:symbolize_keys => true).parse(message)
|
21
|
+
end
|
22
|
+
|
23
|
+
# alias parse
|
24
|
+
def to_hash
|
25
|
+
parse
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Shove
|
2
|
+
module Protocol
|
3
|
+
|
4
|
+
ERROR = 0x00
|
5
|
+
|
6
|
+
# Connection
|
7
|
+
CONNECT = 0x01
|
8
|
+
CONNECT_GRANTED = 0x02
|
9
|
+
CONNECT_DENIED = 0x03
|
10
|
+
DISCONNECT = 0x04
|
11
|
+
DISCONNECT_COMPLETE = 0x06
|
12
|
+
|
13
|
+
# Subscribe Ops
|
14
|
+
SUBSCRIBE = 0x10
|
15
|
+
SUBSCRIBE_GRANTED = 0x11
|
16
|
+
SUBSCRIBE_DENIED = 0x12
|
17
|
+
UNSUBSCRIBE = 0x13
|
18
|
+
UNSUBSCRIBE_COMPLETE = 0x14
|
19
|
+
|
20
|
+
# Publish Ops
|
21
|
+
PUBLISH = 0x20
|
22
|
+
PUBLISH_DENIED = 0x21
|
23
|
+
PUBLISH_GRANTED = 0x22
|
24
|
+
|
25
|
+
# Authorize Ops
|
26
|
+
GRANT_PUBLISH = 0x30
|
27
|
+
GRANT_SUBSCRIBE = 0x31
|
28
|
+
GRANT_CONNECT = 0x32
|
29
|
+
GRANT_CONTROL = 0x33
|
30
|
+
|
31
|
+
# Deny Ops
|
32
|
+
DENY_PUBLISH = 0x40
|
33
|
+
DENY_SUBSCRIBE = 0x41
|
34
|
+
DENY_CONNECT = 0x42
|
35
|
+
DENY_CONTROL = 0x43
|
36
|
+
|
37
|
+
# Log Ops
|
38
|
+
LOG = 0x50
|
39
|
+
LOG_STARTED = 0x51
|
40
|
+
LOG_DENIED = 0x52
|
41
|
+
|
42
|
+
# Self authorize
|
43
|
+
AUTHORIZE = 0x60
|
44
|
+
AUTHORIZE_COMPLETE = 0x61
|
45
|
+
AUTHORIZE_DENIED = 0x62
|
46
|
+
|
47
|
+
# Presence Ops
|
48
|
+
PRESENCE_SUBSCRIBED = 0x70
|
49
|
+
PRESENCE_UNSUBSCRIBED = 0x71
|
50
|
+
PRESENCE_LIST = 0x72
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
data/lib/shove.rb
CHANGED
@@ -3,110 +3,92 @@ $:.unshift File.dirname(__FILE__)
|
|
3
3
|
require "rubygems"
|
4
4
|
require "net/http"
|
5
5
|
require "em-http-request"
|
6
|
+
require "em-ws-client"
|
6
7
|
require "yajl"
|
7
8
|
require "yaml"
|
9
|
+
require "confstruct"
|
8
10
|
|
9
11
|
##
|
10
12
|
# Shove
|
11
13
|
#
|
12
14
|
# See http://shove.io for an account and client documentation
|
13
|
-
# See https://github.com/shove/
|
15
|
+
# See https://github.com/shove/shove-ruby for gem documentation
|
16
|
+
# See https://github.com/shove/shove for client documentation
|
14
17
|
module Shove
|
15
18
|
|
16
|
-
Version = 0.
|
19
|
+
Version = "1.0.1"
|
17
20
|
|
18
|
-
class
|
21
|
+
class ShoveException < Exception; end
|
19
22
|
|
20
|
-
|
21
|
-
|
23
|
+
class << self
|
24
|
+
|
25
|
+
attr_accessor :config, :app
|
26
|
+
|
22
27
|
# configure shover
|
23
28
|
# +settings+ the settings for the created client as
|
24
29
|
# a string for a yaml file, or as a hash
|
25
|
-
def configure
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
def configure params=nil, &block
|
31
|
+
|
32
|
+
unless defined? @config
|
33
|
+
@config = Confstruct::Configuration.new do
|
34
|
+
api_url "https://api.shove.io/"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
if params
|
39
|
+
@config.configure params
|
32
40
|
end
|
33
41
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
42
|
+
if block
|
43
|
+
@config.configure(&block)
|
44
|
+
end
|
45
|
+
|
46
|
+
unless defined? @app
|
47
|
+
@app = App.new(@config)
|
48
|
+
else
|
49
|
+
|
50
|
+
end
|
43
51
|
end
|
44
|
-
|
45
|
-
#
|
46
|
-
# +
|
47
|
-
|
48
|
-
|
49
|
-
def direct uid, event, message, &block
|
50
|
-
client.direct uid, event, message, &block
|
52
|
+
|
53
|
+
# fetch a channel by name
|
54
|
+
# +name+ the name of the channel
|
55
|
+
def channel name
|
56
|
+
@app.channel(name)
|
51
57
|
end
|
52
|
-
|
53
|
-
#
|
54
|
-
|
55
|
-
|
56
|
-
def authorize uid, channel="*", &block
|
57
|
-
client.authorize uid, channel, &block
|
58
|
+
|
59
|
+
# fetch a client by id
|
60
|
+
def client id
|
61
|
+
@app.client(id)
|
58
62
|
end
|
59
63
|
|
60
64
|
# validate network settings
|
61
65
|
# used for the CLI
|
62
|
-
def
|
63
|
-
|
66
|
+
def valid?
|
67
|
+
@app.valid?
|
64
68
|
end
|
65
69
|
|
66
|
-
#
|
67
|
-
#
|
68
|
-
def
|
69
|
-
|
70
|
-
|
71
|
-
raise "You can stream when running in an Eventmachine event loop. EM.run { #code here }"
|
72
|
-
end
|
73
|
-
|
74
|
-
uid = ""
|
75
|
-
http = EventMachine::HttpRequest.new("ws://ws.shove.io/#{config[:network]}").get :timeout => 0
|
76
|
-
|
77
|
-
http.errback {
|
78
|
-
block.call("Connection Error")
|
79
|
-
}
|
80
|
-
|
81
|
-
http.callback {
|
82
|
-
block.call("Connected")
|
83
|
-
http.send("#{channel}!$subscribe!!!")
|
84
|
-
}
|
85
|
-
|
86
|
-
http.stream { |msg|
|
87
|
-
|
88
|
-
parts = msg.split "!"
|
89
|
-
|
90
|
-
case parts[1]
|
91
|
-
when "$identity"
|
92
|
-
uid = parts.last
|
93
|
-
when "$unauthorized"
|
94
|
-
Shove.authorize uid, channel
|
95
|
-
end
|
96
|
-
|
97
|
-
block.call({
|
98
|
-
:channel => parts[0],
|
99
|
-
:event => parts[1],
|
100
|
-
:to => parts[2],
|
101
|
-
:from => parts[3],
|
102
|
-
:data => parts[4]
|
103
|
-
})
|
104
|
-
}
|
70
|
+
# fetch the available stream nodes
|
71
|
+
# for this network.
|
72
|
+
def hosts
|
73
|
+
@app.hosts
|
74
|
+
end
|
105
75
|
|
76
|
+
# Connect to the default app with a
|
77
|
+
# WebSocket connection
|
78
|
+
def connect
|
79
|
+
@app.connect
|
106
80
|
end
|
81
|
+
|
107
82
|
end
|
108
83
|
end
|
109
84
|
|
110
|
-
require "shove/
|
111
|
-
require "shove/
|
112
|
-
require "shove/
|
85
|
+
require "shove/app"
|
86
|
+
require "shove/app_directory"
|
87
|
+
require "shove/protocol"
|
88
|
+
require "shove/client/connection"
|
89
|
+
require "shove/client/channel"
|
90
|
+
require "shove/client/callback"
|
91
|
+
require "shove/http/request"
|
92
|
+
require "shove/http/response"
|
93
|
+
require "shove/http/channel_context"
|
94
|
+
require "shove/http/client_context"
|
data/shove.gemspec
CHANGED
@@ -1,32 +1,23 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "shove"
|
3
|
-
s.version = "0.
|
4
|
-
s.date = "
|
3
|
+
s.version = "1.0.1"
|
4
|
+
s.date = "2012-02-08"
|
5
5
|
s.summary = "Ruby gem for leveraging shove.io, the web push platform"
|
6
6
|
s.email = "dan@shove.io"
|
7
|
-
s.homepage = "https://github.com/shove/
|
7
|
+
s.homepage = "https://github.com/shove/shove-ruby"
|
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", "
|
12
|
-
s.add_dependency("
|
13
|
-
s.add_dependency("yajl-ruby", ">=
|
11
|
+
s.add_dependency("em-http-request", ">= 1.0.0")
|
12
|
+
s.add_dependency("em-ws-client", ">= 0.1.1")
|
13
|
+
s.add_dependency("yajl-ruby", ">= 1.1.0")
|
14
|
+
s.add_dependency("confstruct", ">= 0.2.1")
|
14
15
|
|
15
16
|
s.bindir = "bin"
|
16
|
-
s.executables = ["shove"]
|
17
|
-
|
18
17
|
s.authors = ["Dan Simpson"]
|
19
18
|
|
20
|
-
s.files =
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
"spec/helper.rb",
|
25
|
-
"spec/shove_spec.rb",
|
26
|
-
"lib/shove.rb",
|
27
|
-
"lib/shove/request.rb",
|
28
|
-
"lib/shove/response.rb",
|
29
|
-
"lib/shove/client.rb",
|
30
|
-
"bin/shove"
|
31
|
-
]
|
19
|
+
s.files = `git ls-files`.split("\n")
|
20
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
|
+
|
32
23
|
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/helper"
|
2
|
+
|
3
|
+
module Shove
|
4
|
+
|
5
|
+
# Mock standard in (for CLI app)
|
6
|
+
class MockStdin
|
7
|
+
|
8
|
+
def initialize *msgs
|
9
|
+
@msgs = msgs
|
10
|
+
end
|
11
|
+
|
12
|
+
def gets
|
13
|
+
"#{@msgs.shift}\r\n"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
describe AppDirectory do
|
19
|
+
|
20
|
+
before do |context|
|
21
|
+
VCR.insert_cassette context.example.metadata[:description_args].first
|
22
|
+
end
|
23
|
+
|
24
|
+
after do |context|
|
25
|
+
VCR.eject_cassette
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should configure the default" do
|
29
|
+
system "rm /tmp/shove.yml"
|
30
|
+
dir = AppDirectory.new(MockStdin.new("test","test"), "/tmp/shove.yml")
|
31
|
+
config = dir.default
|
32
|
+
config[:app_id].should == "test"
|
33
|
+
config[:app_key].should == "test"
|
34
|
+
FileTest.exist?("/tmp/shove.yml").should == true
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should configure the from the previous test" do
|
38
|
+
dir = AppDirectory.new(MockStdin.new, "/tmp/shove.yml")
|
39
|
+
config = dir.get_config "test"
|
40
|
+
config[:app_id].should == "test"
|
41
|
+
config[:app_key].should == "test"
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should save an app" do
|
45
|
+
dir = AppDirectory.new(MockStdin.new, "/tmp/shove.yml")
|
46
|
+
dir.put "id1", "key1"
|
47
|
+
dir.put "id2", "key2"
|
48
|
+
dir.put "id3", "key3"
|
49
|
+
dir.apps.size.should == 4
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should update an app" do
|
53
|
+
dir = AppDirectory.new(MockStdin.new, "/tmp/shove.yml")
|
54
|
+
dir.put "id2", "key9"
|
55
|
+
dir.key("id2").should == "key9"
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should update the default app" do
|
59
|
+
dir = AppDirectory.new(MockStdin.new, "/tmp/shove.yml")
|
60
|
+
dir.default = "id2"
|
61
|
+
dir.app.should == "id2"
|
62
|
+
dir.default()[:app_key].should == "key9"
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/hosts
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '19'
|
21
|
+
body: ! '["test-1","test-2"]'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 03:09:18 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/validate
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '32'
|
21
|
+
body: ! '{"code":"200 Ok","details":"Ok"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/hosts
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '19'
|
21
|
+
body: ! '["test-1","test-2"]'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/validate
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '32'
|
21
|
+
body: ! '{"code":"200 Ok","details":"Ok"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.shove.dev:8080/apps/test/validate
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '39'
|
21
|
+
body: ! '{"code":"503","error":"Not Authorized"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 02:02:05 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/hosts
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '19'
|
21
|
+
body: ! '["test-1","test-2"]'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/deny_connect?client=dan
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '36'
|
21
|
+
body: ! '{"code":"400","error":"Invalid URL"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/deny_control?client=dan
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '36'
|
21
|
+
body: ! '{"code":"400","error":"Invalid URL"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/deny_publish?channel=channel&client=dan
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '36'
|
21
|
+
body: ! '{"code":"400","error":"Invalid URL"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/deny_subscribe?channel=channel&client=dan
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '36'
|
21
|
+
body: ! '{"code":"400","error":"Invalid URL"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/deny_publish?channel=test&client=dan
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '36'
|
21
|
+
body: ! '{"code":"400","error":"Invalid URL"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://:test@api.shove.dev:8080/apps/test/deny_subscribe?channel=test&client=dan
|
6
|
+
body: ''
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- ! '*/*'
|
10
|
+
User-Agent:
|
11
|
+
- Ruby
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: Ok
|
16
|
+
headers:
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Content-Length:
|
20
|
+
- '36'
|
21
|
+
body: ! '{"code":"400","error":"Invalid URL"}'
|
22
|
+
http_version: !!null
|
23
|
+
recorded_at: Fri, 17 Feb 2012 01:53:24 GMT
|
24
|
+
recorded_with: VCR 2.0.0.rc1
|