coap 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/lib/core/coap.rb +1 -0
- data/lib/core/coap/version.rb +1 -1
- data/spec/transmission_spec.rb +4 -1
- data/test/test_client.rb +8 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7145f4d71d1db18676851795941acc28a1ba575
|
4
|
+
data.tar.gz: cb521f1c7915ec8916f315caeabe2e89238dd516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56baf8fe5e686e2aa70dd837bb460a5485c30284601ee90962c453f393e063f68b4d610a369abac0718295b4f1ae7619af06b0d981f3a74ea18d9fe56e9e3531
|
7
|
+
data.tar.gz: bd18b4e7a77cb6cbc1ca1977f42901b2fbb069e4a7fb839065125a3b34823c04e255c6d0cf0cc3d47bfc3cb0145fd607863800170be2e0377a8546f7fe035fef
|
data/.travis.yml
CHANGED
@@ -5,7 +5,6 @@ os:
|
|
5
5
|
- osx
|
6
6
|
|
7
7
|
rvm:
|
8
|
-
- head
|
9
8
|
- 2.3.0
|
10
9
|
- 2.2.4
|
11
10
|
- jruby-9.0.4.0
|
@@ -14,12 +13,14 @@ matrix:
|
|
14
13
|
fast_finish: true
|
15
14
|
allow_failures:
|
16
15
|
- os: osx
|
17
|
-
- rvm: head
|
18
16
|
- rvm: jruby-9.0.4.0
|
19
17
|
|
20
18
|
notifications:
|
21
19
|
email: false
|
22
20
|
|
21
|
+
env:
|
22
|
+
- NO_IPV6_TESTS=1
|
23
|
+
|
23
24
|
script:
|
24
25
|
- bundle exec rake build
|
25
26
|
- bundle exec rake coveralls
|
data/lib/core/coap.rb
CHANGED
data/lib/core/coap/version.rb
CHANGED
data/spec/transmission_spec.rb
CHANGED
@@ -47,7 +47,10 @@ describe Transmission do
|
|
47
47
|
context 'resolve' do
|
48
48
|
it 'no error for IP addresses' do
|
49
49
|
expect { Transmission.send('hello', '127.0.0.1') }.not_to raise_error
|
50
|
-
|
50
|
+
|
51
|
+
if ENV['NO_IPV6_TESTS'].nil?
|
52
|
+
expect { Transmission.send('hello', '::1') }.not_to raise_error
|
53
|
+
end
|
51
54
|
end
|
52
55
|
|
53
56
|
it 'error for invalid host' do
|
data/test/test_client.rb
CHANGED
@@ -6,30 +6,26 @@ require 'helper'
|
|
6
6
|
|
7
7
|
class TestClient < Minitest::Test
|
8
8
|
def test_client_get_v4_v6_hostname
|
9
|
-
# client = CoRE::CoAP::Client.new
|
10
|
-
# answer = client.get('/hello', '2001:638:708:30da:219:d1ff:fea4:abc5')
|
11
|
-
# assert_equal([2, 5],answer.mcode)
|
12
|
-
# assert_equal('world',answer.payload)
|
13
|
-
|
14
9
|
client = CoRE::CoAP::Client.new
|
15
10
|
answer = client.get('/hello', 'coap.me')
|
16
11
|
assert_equal([2, 5], answer.mcode)
|
17
12
|
assert_equal('world', answer.payload)
|
18
13
|
|
19
|
-
coap_me_ipv4_address = Addrinfo.ip(
|
14
|
+
coap_me_ipv4_address = Addrinfo.ip('4.coap.me').ip_address
|
20
15
|
|
21
16
|
client = CoRE::CoAP::Client.new
|
22
17
|
answer = client.get('/hello', coap_me_ipv4_address)
|
23
18
|
assert_equal([2, 5], answer.mcode)
|
24
19
|
assert_equal('world', answer.payload)
|
25
20
|
|
26
|
-
|
27
|
-
|
28
|
-
# client = CoRE::CoAP::Client.new
|
29
|
-
# answer = client.get('/hello', coap_me_ipv6_address)
|
30
|
-
# assert_equal([2, 5], answer.mcode)
|
31
|
-
# assert_equal('world', answer.payload)
|
21
|
+
if ENV['NO_IPV6_TESTS'].nil?
|
22
|
+
coap_me_ipv6_address = Addrinfo.ip('6.coap.me').ip_address
|
32
23
|
|
24
|
+
client = CoRE::CoAP::Client.new
|
25
|
+
answer = client.get('/hello', coap_me_ipv6_address)
|
26
|
+
assert_equal([2, 5], answer.mcode)
|
27
|
+
assert_equal('world', answer.payload)
|
28
|
+
end
|
33
29
|
end
|
34
30
|
|
35
31
|
def test_client_404
|