daazweb-api 0.0.5 → 0.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 798b2007fe49df18f5efbba6a9aa73762beb6cc23f978d939a836fb16c08ce5a
4
- data.tar.gz: 3d571c0c07eefa7364aeb86312290f5f713684ef4bffa11ab31c3b906147bc76
3
+ metadata.gz: e6bc46341c3f2d8b5017c909afe12c15e1e2b475bc6103e3b85b3eb13ff2b97b
4
+ data.tar.gz: 6c4d307afa5195537bc5248a40d2bfccfe2fb3408d237744a32c596132fc5f9e
5
5
  SHA512:
6
- metadata.gz: 1b534b15b653ca50264e546734f4adc94e84ec278e9adb75996b170d4fa533769636ccdd32cf5922fffa23fad841ca1e2530b6f6e1689383fe145d478f340690
7
- data.tar.gz: 9b6d23e3e4748282636af1740206a9e1b6bd0a29e6c2cb6b32ebaa47e5bd430f83d57d6821daaaeec58022314f4ff27b4eadc95b1f166e183783f91605c89fdb
6
+ metadata.gz: 7f908e4d4fc9975694dc13c660e2b0a0dca93fffae0816a67d5c36debf9021fd5f2e377539b572a3502b4c0cae86f753cbd8a3e7675c7abfcda86eb4be28640a
7
+ data.tar.gz: 9c3abd81666ac49446ffbef3ddf46fcc41528a8c7310501d06fff0caa578376507ba5edbfc0f8e0a59d7c72d6dbd524a62d078a6ac97ea6b1d6680ba95799488
@@ -92,8 +92,9 @@ module DaazwebApi
92
92
  def configure_request(request: nil, params: nil, headers: nil, body: nil)
93
93
  if request
94
94
  request.params.merge!(params) if params
95
+ request.headers = {}
95
96
  request.headers['Content-Type'] = 'application/json'
96
- request.headers['Authorization'] = "Bearer #{DaazwebApi::Request.access_token}"
97
+ request.headers['Authorization'] = "Bearer #{self.access_token}"
97
98
  request.headers['User-Agent'] = "DaazwebApi/#{DaazwebApi::VERSION} Ruby gem"
98
99
  request.headers.merge!(headers) if headers
99
100
  request.body = MultiJson.dump(body) if body
@@ -22,7 +22,9 @@ module DaazwebApi
22
22
  end
23
23
 
24
24
  def method_missing(method, *args)
25
- @path_parts << method.to_s.camelize(:lower).downcase
25
+ p = method.to_s.split('_').collect(&:capitalize).join
26
+ p[0] = p[0].to_s.downcase
27
+ @path_parts << p
26
28
  @path_parts << args if args.length > 0
27
29
  @path_parts.flatten!
28
30
  self
@@ -1,3 +1,3 @@
1
1
  module DaazwebApi
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/daazweb-api.rb CHANGED
@@ -8,7 +8,7 @@ require 'daazweb-api/response'
8
8
 
9
9
  module DaazwebApi
10
10
 
11
- API_ENDPOINT = "https://daazweb.space"
11
+ API_ENDPOINT = "https://daazweb.com"
12
12
 
13
13
  class << self
14
14
  def setup
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daazweb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov