connect_client 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/.gitignore +38 -38
- data/Gemfile +2 -2
- data/LICENSE +22 -22
- data/README.md +45 -45
- data/Rakefile +21 -21
- data/connect_client.gemspec +24 -24
- data/lib/connect_client.rb +40 -40
- data/lib/connect_client/client.rb +42 -42
- data/lib/connect_client/configuration.rb +11 -11
- data/lib/connect_client/event.rb +51 -51
- data/lib/connect_client/event_push_response.rb +48 -48
- data/lib/connect_client/http/event_endpoint.rb +138 -138
- data/lib/connect_client/version.rb +2 -2
- data/spec/connect_client/client_spec.rb +47 -47
- data/spec/connect_client/configuration_spec.rb +54 -54
- data/spec/connect_client/event_push_response_spec.rb +149 -149
- data/spec/connect_client/event_spec.rb +46 -46
- data/spec/connect_client/http/http_event_endpoint_spec.rb +120 -120
- data/spec/connect_client/http/synchrony/event_endpoint_spec.rb +59 -59
- data/spec/connect_client_spec.rb +24 -24
- metadata +1 -1
data/spec/connect_client_spec.rb
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
require 'minitest/spec'
|
2
|
-
require 'minitest/autorun'
|
3
|
-
require 'connect_client/configuration'
|
4
|
-
require 'connect_client'
|
5
|
-
|
6
|
-
describe ConnectClient do
|
7
|
-
before do
|
8
|
-
ConnectClient.reset
|
9
|
-
end
|
10
|
-
|
11
|
-
it "should throw a configuration error configuration has not been called" do
|
12
|
-
connect_event = proc { ConnectClient.push 'test', {} }.must_raise ConnectClient::UnconfiguredError
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should respond to push" do
|
16
|
-
ConnectClient.configure {}
|
17
|
-
ConnectClient.respond_to?(:push).must_equal true
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should support configuration via a block" do
|
21
|
-
ConnectClient.configure do |config|
|
22
|
-
config.must_be_instance_of ConnectClient::Configuration
|
23
|
-
end
|
24
|
-
end
|
1
|
+
require 'minitest/spec'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'connect_client/configuration'
|
4
|
+
require 'connect_client'
|
5
|
+
|
6
|
+
describe ConnectClient do
|
7
|
+
before do
|
8
|
+
ConnectClient.reset
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should throw a configuration error configuration has not been called" do
|
12
|
+
connect_event = proc { ConnectClient.push 'test', {} }.must_raise ConnectClient::UnconfiguredError
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should respond to push" do
|
16
|
+
ConnectClient.configure {}
|
17
|
+
ConnectClient.respond_to?(:push).must_equal true
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should support configuration via a block" do
|
21
|
+
ConnectClient.configure do |config|
|
22
|
+
config.must_be_instance_of ConnectClient::Configuration
|
23
|
+
end
|
24
|
+
end
|
25
25
|
end
|