homeflow_api 0.17.14 → 0.17.15

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.17.14
1
+ 0.17.15
data/homeflow_api.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "homeflow_api"
8
- s.version = "0.17.14"
8
+ s.version = "0.17.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Cooper"]
12
- s.date = "2013-07-23"
12
+ s.date = "2013-08-06"
13
13
  s.description = "A gem for dealing the homeflow api"
14
14
  s.email = "daniel@homeflow.co.uk"
15
15
  s.extra_rdoc_files = [
@@ -22,11 +22,7 @@ module Homeflow
22
22
  end
23
23
 
24
24
  def perform_request
25
- if request_specification.is_a? Query
26
- url = "#{Homeflow::API.config.source}/#{request_specification.resource_class.resource_uri}"
27
- else
28
- url = "#{Homeflow::API.config.source}/#{request_specification.resource_uri}"
29
- end
25
+ url = normalised_base_url
30
26
  query_params = @request_specification.to_params.merge(constant_params)
31
27
  post_params = (@request_specification.respond_to?(:post_params) ? @request_specification.post_params : {})
32
28
  if Homeflow::API.config.show_debug && Homeflow::API.configuration.logger
@@ -52,6 +48,15 @@ module Homeflow
52
48
  end
53
49
  end
54
50
 
51
+ def normalised_base_url
52
+ source = Homeflow::API.config.source.gsub(/.\/$/,'')
53
+ if request_specification.is_a? Query
54
+ return "#{source}/#{request_specification.resource_class.resource_uri}"
55
+ else
56
+ return "#{source}/#{request_specification.resource_uri}"
57
+ end
58
+ end
59
+
55
60
  def body_of_request(request)
56
61
  if request.respond_to? :body
57
62
  request.body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homeflow_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.14
4
+ version: 0.17.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-23 00:00:00.000000000 Z
12
+ date: 2013-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hashie
@@ -178,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  segments:
180
180
  - 0
181
- hash: 21769251784496199
181
+ hash: -1047818709259987954
182
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  none: false
184
184
  requirements: