watson-api-client 0.0.4 → 0.0.5

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: 2853333b50372507056bf65468d99248c3c8fc02
4
- data.tar.gz: 37206172f43a2f9d38d5e121ea697d3fba10edda
3
+ metadata.gz: 80d9217a623965243bfff5dc95daf624318a0460
4
+ data.tar.gz: eb67925572e32a0e57740abbb181cc51df8b1ed4
5
5
  SHA512:
6
- metadata.gz: d7111a654d49c0314c20ce32f541613a8db16bd6fd1ca4a51628cfe55ac247dece5903cf34bc95827de58b6afa82028581976ac9c8c4fe5aa8f3d5eba9b99800
7
- data.tar.gz: 4d6dfe01b59a98402a86e65d98671f4135a08e69c58cae13275a492dc59381842731fa4e2a31dcc2055948a6ba13c1d10fd184f20212ca0fff26d1fec94fa115
6
+ metadata.gz: 0ec54a0d0c8a1e9a3f9f9707e6b04d73e6169c44d530e0cbfa5f4822d7d7b9b7a1458a391b9211677b3a6bc194aa68260cd0f2c4a06c773f743b750ed563d828
7
+ data.tar.gz: 56946b3c2b36ce78a83e553a4a66c8483d64dfdf313b9d42fef734965a2fdc73e5e6eb77f5af63694e1965a07b8e26fabdb37ae6334ba93c2f100a435236cbd3
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.0
4
+ - 2.1
5
+ - 2.0
6
+ script: "ruby lib/watson-api-client.rb"
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
- ruby '>= 1.9.3'
3
2
 
4
3
  gem 'rest-client'
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
  ================================================================
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/watson-api-client.svg)](http://badge.fury.io/rb/watson-api-client)
5
+ [![Build Status](https://travis-ci.org/blueboxjesse/watson-api-client.svg?branch=master)](https://travis-ci.org/blueboxjesse/watson-api-client)
5
6
 
6
7
  The [watson-api-client](http://rubygems.org/gems/watson-api-client) is a gem to use REST API on the IBM Watson™ Developer Cloud.
7
8
 
@@ -6,7 +6,7 @@ require 'pp' if __FILE__ == $PROGRAM_NAME
6
6
 
7
7
  class WatsonAPIClient
8
8
 
9
- VERSION = '0.0.4'
9
+ VERSION = '0.0.5'
10
10
 
11
11
  class << self
12
12
 
@@ -18,11 +18,14 @@ class WatsonAPIClient
18
18
  # Watson API Explorer
19
19
  host1 = doc_urls[:doc_base1][/^https?:\/\/[^\/]+/]
20
20
  open(doc_urls[:doc_base1], Options, &:read).scan(/<a class="swagger-list--item-link" href="\/(.+?)".*?>\s*(.+?)\s*<\/a>/i) do
21
- api = {'path'=>doc_urls[:doc_base1] + $1, 'title'=>$2.sub(/\s*\(.+?\)$/,'')}
22
- open(api['path'], Options, &:read).scan(/url:\s*'(.+?)'/) do
23
- api['path'] = host1 + $1
21
+ begin
22
+ api = {'path'=>doc_urls[:doc_base1] + $1, 'title'=>$2.sub(/\s*\(.+?\)$/,'')}
23
+ open(api['path'], Options, &:read).scan(/url:\s*'(.+?)'/) do
24
+ api['path'] = host1 + $1
25
+ end
26
+ apis[api['title']] = api
27
+ rescue OpenURI::HTTPError
24
28
  end
25
- apis[api['title']] = api
26
29
  end
27
30
 
28
31
  # Watson Developercloud
@@ -146,6 +149,7 @@ class WatsonAPIClient
146
149
 
147
150
  def rest_access_without_body(method, options={})
148
151
  path, access = swagger_info(method, options)
152
+ options = { :params => options } if access.downcase == 'get'
149
153
  @service[path].send(access, options)
150
154
  end
151
155
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watson-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi SUGA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-26 00:00:00.000000000 Z
11
+ date: 2016-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -33,6 +33,7 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
+ - ".travis.yml"
36
37
  - Gemfile
37
38
  - LICENSE
38
39
  - README.md