api-client 2.0.0 → 2.0.1

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.
@@ -29,7 +29,7 @@ module ApiClient
29
29
  # @param [Hash] header hash with the header options.
30
30
  # @return [Base] the object initialized.
31
31
  def post(attributes, header = {})
32
- url = "#{ApiClient.config.path}#{self.resource_path}/"
32
+ url = "#{ApiClient.config.path}#{self.resource_path}"
33
33
  response = ApiClient::Dispatcher.post(url, attributes, header)
34
34
  params = ApiClient::Parser.response(response, url)
35
35
  build(params)
@@ -22,7 +22,7 @@ module ApiClient
22
22
  end
23
23
 
24
24
  def post(header = {})
25
- url = "#{ApiClient.config.path}#{self.class.resource_path}/"
25
+ url = "#{ApiClient.config.path}#{self.class.resource_path}"
26
26
  response = ApiClient::Dispatcher.post(url, self.attributes, header)
27
27
  attributes = ApiClient::Parser.response(response, url)
28
28
  update_attributes(attributes)
@@ -1,5 +1,5 @@
1
1
  # High Level Namespace of the library ApiClient.
2
2
  module ApiClient
3
3
  # Version of the library.
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe ApiClient::ClassMethods do
4
4
  before :each do
5
- stub_request(:any, 'http://api.example.com/users/').to_return(:body => {'a' => 'b'}.to_json)
5
+ stub_request(:any, 'http://api.example.com/users').to_return(:body => {'a' => 'b'}.to_json)
6
6
  stub_request(:any, 'http://api.example.com/users/1').to_return(:body => {'a' => 'b'}.to_json)
7
7
  end
8
8
 
@@ -4,7 +4,7 @@ describe ApiClient::InstanceMethods do
4
4
  let(:user) { User.new(:id => 1) }
5
5
 
6
6
  before :each do
7
- stub_request(:any, 'http://api.example.com/users/').to_return(:body => {'a' => 'b'}.to_json)
7
+ stub_request(:any, 'http://api.example.com/users').to_return(:body => {'a' => 'b'}.to_json)
8
8
  stub_request(:any, 'http://api.example.com/users/1').to_return(:body => {'a' => 'b'}.to_json)
9
9
  end
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -194,7 +194,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  segments:
196
196
  - 0
197
- hash: 4249835467579718948
197
+ hash: 4514506961521743435
198
198
  required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  none: false
200
200
  requirements:
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  segments:
205
205
  - 0
206
- hash: 4249835467579718948
206
+ hash: 4514506961521743435
207
207
  requirements: []
208
208
  rubyforge_project:
209
209
  rubygems_version: 1.8.25