fanforce 0.4.5 → 0.4.6

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.
data/lib/fanforce/main.rb CHANGED
@@ -37,15 +37,17 @@ class Fanforce
37
37
  end
38
38
 
39
39
  def get_curl_command(method, path, req_params={})
40
+ req_params = apply_auth(req_params)
41
+ url = complete_url(path)
40
42
  case method
41
43
  when :get
42
- "curl \"#{path}?#{to_param(req_params)}\""
44
+ "curl \"#{url}?#{to_param(req_params)}\""
43
45
  when :post
44
- "curl -X POST -d \"#{to_param(req_params)}\" #{path}"
46
+ "curl -X POST -d \"#{to_param(req_params)}\" #{url}"
45
47
  when :put
46
- "curl -X PUT -d \"#{to_param(req_params)}\" #{path.to_json}"
48
+ "curl -X PUT -d \"#{to_param(req_params)}\" #{url.to_json}"
47
49
  when :delete
48
- "curl --request DELETE \"#{path}?#{to_param(req_params)}\""
50
+ "curl --request DELETE \"#{url}?#{to_param(req_params)}\""
49
51
  else
50
52
  raise 'Unknown request method'
51
53
  end
@@ -1,3 +1,3 @@
1
1
  class Fanforce
2
- VERSION = '0.4.5'
2
+ VERSION = '0.4.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: