staccato 0.4.7 → 0.5.0

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: c02d78537b954c9f3e1660f4a85bb8aac426eeae
4
- data.tar.gz: 2aad14fa3dc9de0a1eade48d9a8b7a62bb822875
3
+ metadata.gz: ee2c0f61d931e1fe18965baeef84213f42086310
4
+ data.tar.gz: afc0cd71e2b001f6b6e4fe762c1b8f69a15b9a68
5
5
  SHA512:
6
- metadata.gz: af6f922e599dcefda0588ff8e1e44c6eb79ff8b81c850e86fd936057aa3ef83b56ef70400833a678d2817a9d4bc359cd17f5336eb6566070cf56acce422b4186
7
- data.tar.gz: 8ee89019edbbdf531be5ba8458a619112bb5bd296b3e8d8b70ebcb67c76c821e883948fb819436cd47c407845e7fcabb92958a41d2a941e177c7dd86c8cc1889
6
+ metadata.gz: 02205abcbdb2efeced0a9f3fcdce3371334983f3c63b7370fc218ad35d9574337078d56cef143dcdba8bc53cdaa4523fde639b218f01ce8914c3f7e8cb948efa
7
+ data.tar.gz: e15522d3162b563b8b0b223123c337753079da28786397875ffcbc6a4b369661fe40e614dd2234322de3a28a083ba3bff57748c6e8d7e27e2c9044176e520919
@@ -1,3 +1,9 @@
1
+ ## Staccato 0.5.0 ##
2
+
3
+ * SSL option set on tracker is used when generating `as_url` from a hit
4
+
5
+ *Tony Pitale - @tpitale*
6
+
1
7
  ## Staccato 0.4.7 ##
2
8
 
3
9
  * Set ssl option when creating a tracker
@@ -51,7 +51,9 @@ module Staccato
51
51
  # @param hit [Hit] anything that returns a hash for #params
52
52
  # @param uri [URI]
53
53
  # @return String
54
- def self.as_url(hit, uri = Staccato.ga_collection_uri)
54
+ def self.as_url(hit, uri = nil)
55
+ uri ||= hit.tracker.default_uri
56
+
55
57
  uri.query = URI.encode_www_form(hit.params)
56
58
  uri.to_s
57
59
  end
@@ -159,6 +159,10 @@ module Staccato
159
159
  post(params)
160
160
  end
161
161
 
162
+ def default_uri
163
+ Staccato.ga_collection_uri(@ssl)
164
+ end
165
+
162
166
  private
163
167
 
164
168
  # @private
@@ -167,7 +171,7 @@ module Staccato
167
171
  end
168
172
 
169
173
  def adapter
170
- @adapter ||= Staccato.default_adapter.new(Staccato.ga_collection_uri(@ssl))
174
+ @adapter ||= Staccato.default_adapter.new(default_uri)
171
175
  end
172
176
  end
173
177
 
@@ -218,5 +222,9 @@ module Staccato
218
222
  # (see Tracker#track)
219
223
  def track(params = {})
220
224
  end
225
+
226
+ def default_uri
227
+ Staccato.ga_collection_uri
228
+ end
221
229
  end
222
230
  end
@@ -1,4 +1,4 @@
1
1
  module Staccato
2
2
  # The current Staccato VERSION
3
- VERSION = "0.4.7"
3
+ VERSION = "0.5.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staccato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Pitale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-20 00:00:00.000000000 Z
11
+ date: 2016-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler