homeflow_api 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.0
1
+ 0.17.0
data/homeflow_api.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "homeflow_api"
8
- s.version = "0.16.0"
8
+ s.version = "0.17.0"
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"]
@@ -25,7 +25,7 @@ module Homeflow
25
25
  url = "#{Homeflow::API.config.source}/#{request_specification.resource_uri}"
26
26
  end
27
27
  query_params = @request_specification.to_params.merge(constant_params)
28
- post_params = @request_specification.post_params
28
+ post_params = (@request_specification.respond_to?(:post_params) ? @request_specification.post_params : {})
29
29
  if Homeflow::API.config.show_debug
30
30
  puts "****************************************************************************************"
31
31
  puts "HESTIA CALL"
@@ -39,18 +39,19 @@ module Homeflow
39
39
  end
40
40
 
41
41
  if request_specification.is_a? Query
42
- return (HTTParty.get (url, :query => query)).body
42
+ return (HTTParty.get(url, :query => query_params)).body
43
43
  elsif request_specification.is_a? ResourceIdentifier
44
- return (HTTParty.get (url, :query => query)).body
44
+ return (HTTParty.get(url, :query => query_params)).body
45
45
  elsif request_specification.is_a? Delete
46
- return (HTTParty.delete(url, :query => query)).body
46
+ return (HTTParty.delete(url, :query => query_params)).body
47
47
  elsif request_specification.is_a? Put
48
- return (HTTParty.put (url, :query => query, :body => post_params)).body
48
+ return (HTTParty.put(url, :query => query_params, :body => post_params)).body
49
49
  elsif request_specification.is_a? Post
50
- return (HTTParty.post (url, :query => query, :body => post_params)).body
50
+ return (HTTParty.pos(url, :query => query_params, :body => post_params)).body
51
51
  end
52
52
  end
53
53
 
54
+
54
55
  def constant_params
55
56
  {:api_key=> Homeflow::API.config.api_key}
56
57
  end
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.16.0
4
+ version: 0.17.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -177,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  segments:
179
179
  - 0
180
- hash: 3908852289382539102
180
+ hash: -4205346514009264280
181
181
  required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements: