omnievent-google 0.1.0.pre3 → 0.1.0.pre4

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: 17457c1afa0cc309b5145db2aa4671ab5c66805a154ce75337227a93f1518329
4
- data.tar.gz: 2c54e783679fa7738b5e8ed9a7ff88253e83f0a769c203e6d7214939ac9a68e4
3
+ metadata.gz: f0da08dfc39ca1d3912e18b576d42e684e8a7eb593140391ac0cfbc007826878
4
+ data.tar.gz: 44ee373377dd2062cbd0386a2954ef2b823014d5929ae9cd403682e9ecbc4538
5
5
  SHA512:
6
- metadata.gz: 54e9e976df87da13faa174b269cdd62d33a53db1dc0bfe21f2099d2915c87381ea210c8e7444a2836dfa6c85ca1f4b1e3c55ebc7ac384e3e6e462df6326cb29b
7
- data.tar.gz: 72adbcaebd73a3ffe8130222c800410bcfc84e3b38682b9f442307774c7a5bb99fb1f35db568064edabe0317aa965bd9c94c03a3be68314234ab7526ab346935
6
+ metadata.gz: 55559e8dd02abd686ac26285a5f1d8c4e2e057b63abe9a074db5c960cda91f931c92f29f0eab9bab298f3ab9d8d12f7a734c39e410797007935de1851e731856
7
+ data.tar.gz: 640619807882127fcc589e63e68a7a79a04ab16e8b2092056aec95392d03810feafc53a19b63cae3f44eaf742ad8c330125aa6a03a679383b3e5262002b64361
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omnievent-google (0.1.0.pre2)
4
+ omnievent-google (0.1.0.pre3)
5
5
  omnievent
6
6
  omnievent-api
7
7
 
@@ -24,11 +24,11 @@ GEM
24
24
  iso-639 (0.3.6)
25
25
  json (2.7.2)
26
26
  language_server-protocol (3.17.0.3)
27
- omnievent (0.1.0.pre6)
27
+ omnievent (0.1.0.pre7)
28
28
  hashie (>= 3.4.6)
29
29
  iso-639 (~> 0.3.5)
30
30
  tzinfo (~> 2.0)
31
- omnievent-api (0.1.0.pre3)
31
+ omnievent-api (0.1.0.pre4)
32
32
  excon
33
33
  omnievent
34
34
  parallel (1.26.3)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniEvent
4
4
  module Google
5
- VERSION = "0.1.0.pre3"
5
+ VERSION = "0.1.0.pre4"
6
6
  end
7
7
  end
@@ -14,8 +14,10 @@ module OmniEvent
14
14
  API_VERSION = "v3"
15
15
 
16
16
  def raw_events
17
- response = perform_request(path: request_path_with_params(list_params))
18
- events = response && response["items"]
17
+ response = perform_request(path: path_with_params(request_path, list_params))
18
+ return [] unless response.is_a?(Hash) && response["items"]
19
+
20
+ events = response["items"]
19
21
 
20
22
  next_link = build_next_link(response, list_params)
21
23
  while next_link
@@ -30,7 +32,7 @@ module OmniEvent
30
32
  def build_next_link(response, params)
31
33
  return nil unless response && response["nextPageToken"]
32
34
 
33
- request_path_with_params(params.merge(pageToken: response["nextPageToken"]))
35
+ path_with_params(request_path, params.merge(pageToken: response["nextPageToken"]))
34
36
  end
35
37
 
36
38
  def create_event
@@ -121,13 +123,6 @@ module OmniEvent
121
123
  end
122
124
  end
123
125
 
124
- def request_path_with_params(params = {})
125
- uri = URI.parse(request_path)
126
- params.reject! { |_k, v| v.to_s.strip.empty? }
127
- uri.query = URI.encode_www_form(params) unless params.empty?
128
- uri.to_s
129
- end
130
-
131
126
  def request_url
132
127
  "https://www.googleapis.com"
133
128
  end
@@ -167,6 +162,7 @@ module OmniEvent
167
162
  params = {}
168
163
  params[:timeMin] = options.from_time if options.from_time
169
164
  params[:timeMax] = options.to_time if options.to_time
165
+ params[:q] = options.match_name if options.match_name
170
166
  params
171
167
  end
172
168
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnievent-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre3
4
+ version: 0.1.0.pre4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod