osc_ruby 0.0.10 → 0.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 561551ea1fea605506d403ecdce3845426c75407
4
- data.tar.gz: 2a358168372fdd4d97cb1b34046d56ca99617d6c
3
+ metadata.gz: e9fb65f1ed0c87585e0a348ac30f615a64aea762
4
+ data.tar.gz: c6f381d187177ff020f116945048d9fb06c1089b
5
5
  SHA512:
6
- metadata.gz: a107a06e8322a1e36654a4b3853caada5a3ee15ea31d8699be91d9018af6c8c969a3b9c63d8986ea2f1a1e9817a788117429c1c7d57ec95b10014dc64c69917d
7
- data.tar.gz: 876701c89f061cf02072bf97e645714ccfb357bf53b2ef8147b1eeb190f8172b23b6165a9061965c9476dce0cf68a46282a03b1d3786daf140a2415d2e549388
6
+ metadata.gz: 7ccf2ca1aa6b781bd5ba932471e76c4a2cccec8a4e1a426d189544ccafb665ba78d0a0cc72108901444efc76be039a5a76f3cb609d76848af48098b0a68b8b57
7
+ data.tar.gz: 00c85030ccf6b442b0a63050060dde0748e8d43441def1f1bdb71498656d45874619137d86bf33ecc9dd95612b8764e608ace5481a256a77a725b798ec951f33
@@ -29,12 +29,7 @@ module OSCRuby
29
29
  request.basic_auth @username, @password
30
30
 
31
31
  response = http.request request # Net::HTTPResponse object
32
-
33
- json_response = JSON.parse(response.body)
34
-
35
- puts json_response
36
32
  end
37
-
38
33
  end
39
34
 
40
35
  private
@@ -1,3 +1,3 @@
1
1
  module OSCRuby
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'core/spec_helper'
2
+ require 'json'
2
3
 
3
4
  describe OSCRuby::Connect do
4
5
 
@@ -107,6 +108,10 @@ describe OSCRuby::Connect do
107
108
 
108
109
  end
109
110
 
111
+ let(:test){
112
+ OSCRuby::Connect.get(client)
113
+ }
114
+
110
115
  context '#get' do
111
116
 
112
117
  it 'should take at least a config parameter that is an instance of an OSCRuby::Client' do
@@ -132,12 +137,25 @@ describe OSCRuby::Connect do
132
137
 
133
138
  end
134
139
 
135
- # it 'should produce a JSON Response' do
136
- # expect do
137
-
140
+ it 'should produce a Net::HTTPResponse' do
141
+
142
+ expect(test).to be_an(Net::HTTPResponse)
143
+
144
+ end
145
+
146
+ it 'should produce a 200 response code' do
138
147
 
139
- # client.connect.should_be a('String')
140
- # end
141
- # end
148
+ expect(test.code).to eq("200")
149
+
150
+ end
151
+
152
+ it 'should produce a JSON Response form the response body' do
153
+
154
+ expect do
155
+ test.body.should_be a('String')
156
+ end
157
+
158
+ expect{JSON.parse(test.body)}.not_to raise_error
159
+ end
142
160
  end
143
161
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osc_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajan Davis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-20 00:00:00.000000000 Z
11
+ date: 2016-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler