indico 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/indico/helper.rb CHANGED
@@ -42,10 +42,15 @@ module Indico
42
42
  raise ArgumentError, 'api key is required'
43
43
  end
44
44
 
45
- url = url_join(server, api) + \
46
- ("?key=" + api_key) + \
47
- (apis ? "&apis=" + apis.join(",") : "") + \
48
- (version ? "&version=" + version : "")
45
+ url_params = Array.new
46
+ if apis
47
+ url_params.push(['apis', apis.join(",")])
48
+ end
49
+ if version
50
+ url_params.push(['version', version])
51
+ end
52
+ url_params = URI.encode_www_form(url_params)
53
+ url = url_join(server, api) + "?" + url_params
49
54
 
50
55
  response = make_request(url, JSON.dump(d),
51
56
  add_api_key_to_header(api_key))
@@ -1,3 +1,3 @@
1
1
  module Indico
2
- VERSION = '0.8.0'
2
+ VERSION = '0.9.0'
3
3
  end
data/spec/indico_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require 'spec_helper'
2
4
  require 'set'
3
5
  require 'oily_png'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-03-22 00:00:00.000000000 Z
15
+ date: 2016-03-28 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: inifile