thisdata 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d774e01e39a759a187a0a6978ab3d5e9e07b7d77
4
- data.tar.gz: b341f0c6c4746df21ae5f1cd82e98c2a02160239
3
+ metadata.gz: 56d376bdcb3b963ff85f5b8120a92b18444263fa
4
+ data.tar.gz: 84a70ced5519fd281c4f347d0f3ffbe86580e815
5
5
  SHA512:
6
- metadata.gz: 646823cf8b5a1a51b06e0b61ad796c1a06096dfd7dc7558fcd47dbc55ff495c322df6eecff7f1117d65814a5fe2a9313ede58751f95bc032a68377dfe02a41ea
7
- data.tar.gz: c4b4d3696498067e835262cd36a00bf553a936bca2e6b767d2c5f284b9696fa9c5750366ea395425efe8a4d3180dba726ab91ecba54312acafb19eaa323b5619
6
+ metadata.gz: 4b96311361b9a8de98e116ffc23308701ca49b8ec3e8f3ffd730df8434e53982a1315f0bf94e4c69b4c4e18b9f7f06c9f5251f650a5e53b62bb39bf4c6926fd9
7
+ data.tar.gz: f18a61f9f99903cc54d1981d40e70716170b3775e187d0091af943c2ed45fb3d5c03d1f1aeb0580a02833d9a5cc88e0daa86b17e907f8203ac71d0f05528a89e
@@ -49,11 +49,11 @@ module ThisData
49
49
  # - event (Required: Hash) a Hash containing details about the event.
50
50
  # See http://help.thisdata.com/v1.0/docs/apiv1events for a
51
51
  # full & current list of available options.
52
- def track(event, query: {})
52
+ def track(event, options={})
53
53
  if ThisData.configuration.async
54
- track_async(event, query: query)
54
+ track_async(event, options)
55
55
  else
56
- track_with_response(event, query: query)
56
+ track_with_response(event, options)
57
57
  end
58
58
  end
59
59
 
@@ -69,11 +69,11 @@ module ThisData
69
69
  # full & current list of available options.
70
70
  #
71
71
  # Returns a Hash
72
- def verify(params, query: {})
72
+ def verify(params, options={})
73
73
  response = Client.new.post(
74
74
  ThisData::VERIFY_ENDPOINT,
75
75
  body: JSON.generate(params),
76
- query: query
76
+ query: options
77
77
  )
78
78
  response.parsed_response
79
79
  end
@@ -110,8 +110,8 @@ module ThisData
110
110
  # Event must be a Hash.
111
111
  # Rescues and logs all exceptions.
112
112
  # Returns an HTTPResponse
113
- def track_with_response(event, query: {})
114
- response = Client.new.track(event, query: query)
113
+ def track_with_response(event, options={})
114
+ response = Client.new.track(event, options)
115
115
  success = response && response.success? # HTTParty doesn't like `.try`
116
116
  if success
117
117
  log("Tracked event! #{response.response.inspect}")
@@ -130,9 +130,9 @@ module ThisData
130
130
 
131
131
  # Performs the track function within a new Thread, so it is non blocking.
132
132
  # Returns the Thread created
133
- def track_async(event, query: {})
133
+ def track_async(event, options={})
134
134
  Thread.new do
135
- track_with_response(event, query: query)
135
+ track_with_response(event, options)
136
136
  end
137
137
  rescue => e
138
138
  ThisData.error("Cannot create Thread: #{e.inspect}")
@@ -30,8 +30,8 @@ module ThisData
30
30
  # - event (Required: Hash) a Hash containing details about the event.
31
31
  # See http://help.thisdata.com/v1.0/docs/apiv1events for a
32
32
  # full & current list of available options.
33
- def track(event, query: {})
34
- post(ThisData::EVENTS_ENDPOINT, query: query, body: JSON.generate(event))
33
+ def track(event, options={})
34
+ post(ThisData::EVENTS_ENDPOINT, query: options, body: JSON.generate(event))
35
35
  end
36
36
 
37
37
  # Perform a GET request against the ThisData API, with the API key
@@ -1,3 +1,3 @@
1
1
  module ThisData
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thisdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ThisData Ltd