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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c7fd4770f804c5a31cdd504dff4dc9385450cdf
4
- data.tar.gz: 219d4ab33ebc43ce15e8e79c2b61eba7ca63195f
3
+ metadata.gz: a7145f4d71d1db18676851795941acc28a1ba575
4
+ data.tar.gz: cb521f1c7915ec8916f315caeabe2e89238dd516
5
5
  SHA512:
6
- metadata.gz: bf7186ada64381b5f2f4ef5ac710fd81da7135dea44251fc0373e1f9d9f4b4b6449ebdba32b9ad10c79e7e7344b174bbb6b9f2b80ca8930dcacf71911b4ecac8
7
- data.tar.gz: 28d5c3bc3f54e76414d4e7d8356e303397d40399c18fd6895aec1ebe4dcb62d5ca345a65ba607f058b86529e7eafacae74d33db5e3a5f363419daea2946583f8
6
+ metadata.gz: 56baf8fe5e686e2aa70dd837bb460a5485c30284601ee90962c453f393e063f68b4d610a369abac0718295b4f1ae7619af06b0d981f3a74ea18d9fe56e9e3531
7
+ data.tar.gz: bd18b4e7a77cb6cbc1ca1977f42901b2fbb069e4a7fb839065125a3b34823c04e255c6d0cf0cc3d47bfc3cb0145fd607863800170be2e0377a8546f7fe035fef
@@ -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
@@ -18,6 +18,7 @@ module CoRE
18
18
  end
19
19
  end
20
20
 
21
+ require 'celluloid/current'
21
22
  require 'celluloid/io'
22
23
  require 'ipaddr'
23
24
  require 'logger'
@@ -1,5 +1,5 @@
1
1
  module CoRE
2
2
  module CoAP
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
@@ -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
- expect { Transmission.send('hello', '::1') }.not_to raise_error
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
@@ -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("4.coap.me").ip_address
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
- # coap_me_ipv6_address = Addrinfo.ip("6.coap.me").ip_address
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann