desklight 0.1.0 → 0.2.0

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
- SHA1:
3
- metadata.gz: 3dd5dec252cd8f9cd9475dbeeda0191a0a9bcb7d
4
- data.tar.gz: a67ca3aadcde2603b6f96e8892c262a9a39752c5
2
+ SHA256:
3
+ metadata.gz: 1ec431c22d6e15b3f239b068ace1554026a34b36ffa77e241e3124a39c91bfb7
4
+ data.tar.gz: 236477cd0f5e47f9a5ba1c22bfa5632277173a7bdfbb3bc5ebcb81a18f6d95c3
5
5
  SHA512:
6
- metadata.gz: 4f3c14d67c2666763b9087d497641a0e6f3d86b9189dd9f36b23ef79e079bd934bffea5a7cdc004a68a5be4023fe78b3bfec19cfa8f7cb375d7f35b1a82713e1
7
- data.tar.gz: d7a57242c41847fc819472a758ec0d5938d15691c6351c701d543ff9b202c2196760742d50d12dab0dbf325d6d925af286980a9d79c2d987ca31e237b7793ec7
6
+ metadata.gz: b490a90c281a1cd1024fdad9c3f8511daffaa8754e9bc4bbfbccab87ee9edbd7dc33636738d718ea38974997d7c69ca232033576bbca6fbcea18efb5e8203015
7
+ data.tar.gz: e4817bd4cf2a7a8b33845ca2dba336f59a6edf427ad52fdfd05ae32c7ce1f21c89a4fab263619068d38f7ecb0ad89212a70ebf4c55452c30862c83af4b270578
@@ -5,21 +5,11 @@ require 'oauth'
5
5
 
6
6
  module DeskLight
7
7
  module Requester
8
- def self.get *args
9
- _uri = URI.parse("https://#{DeskLight.config.subdomain}.desk.com" << DeskLight.config.api_path << "/" << args.first.to_s)
10
- _params = CGI.parse(_uri.query || "")
11
- _path = DeskLight.config.api_path
12
- args.shift
13
- args.each do |arg|
14
- case arg.class.name
15
- when 'Symbol','String','Integer'
16
- _path << "/" << arg.to_s
17
- when 'Hash'
18
- _params.merge!(arg)
19
- end
20
- end
8
+ def self.get _path, _params = {}
9
+ _uri = URI.parse("https://#{DeskLight.config.subdomain}.desk.com" << _path)
10
+ _new_params = CGI.parse(_uri.query || "").merge!(_params)
21
11
  _url = "#{_uri.scheme}://#{_uri.host}#{_uri.path}"
22
- _url << "?#{URI.encode_www_form(_params)}" if _params.count > 0
12
+ _url << "?#{URI.encode_www_form(_new_params)}" if _new_params.count > 0
23
13
  consumer = OAuth::Consumer.new(
24
14
  DeskLight.config.key,
25
15
  DeskLight.config.secret,
@@ -1,3 +1,3 @@
1
1
  module DeskLight
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: desklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - onlyexcellence
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-28 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,8 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubyforge_project:
134
- rubygems_version: 2.6.13
133
+ rubygems_version: 3.0.6
135
134
  signing_key:
136
135
  specification_version: 4
137
136
  summary: Desk.com API