apiture 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 160ccb2fb353faafd6d123a0b8a85cf274105a60
4
- data.tar.gz: a9a7661f0953d01ec9146fa2b406833bb83ad9fe
3
+ metadata.gz: 1044c97f93695fd584cb816de32ecdc5360fdc83
4
+ data.tar.gz: 3b0040692f4b4745fd93083f9c2426a19e273c52
5
5
  SHA512:
6
- metadata.gz: e182986957f2b292e3df895db859b6dd60aaabb112053b0efe467e760e1ad342568b6f8264bf14199c5631323d7121c261a75124a340966ed28770a1293193b0
7
- data.tar.gz: 786d2f22e4d43157f07a81780ccf0462b297ebb7c4d912db01e6790f9330eea1689ca195e747ef76882d4fd23ca4a8d2a5685a3523ffc368d2b4b48b1c4f4af9
6
+ metadata.gz: 60429eb5c7d58b4fa4b4558d3f0980b49fa64afce0f5c136c8877a4e5a2f1137d770892915032d50b52184c1c9b4367d99e353caba065fd0f4434f0e16ca49bf
7
+ data.tar.gz: 0e39796f098f3a85f962c4b91b31c804c5bdbf78bcb78a0bfd0cca1fcf6764fbd5dfbcd6cc62732b23ef9e11cc8ab9bfe4eb613e5f22ac8f8a7e285abf2ef5ab
@@ -28,6 +28,10 @@ module Apiture
28
28
  url.subdomain = options[:subdomain]
29
29
  end
30
30
 
31
+ if options[:url_options]
32
+ url.merge_components(options[:url_options])
33
+ end
34
+
31
35
  env = {
32
36
  method: endpoint.request_method,
33
37
  url: url,
@@ -12,6 +12,12 @@ module Apiture
12
12
  end
13
13
  end
14
14
 
15
+ def merge_components(components)
16
+ components.each_pair do |name, val|
17
+ instance_variable_set("@#{name}", val)
18
+ end
19
+ end
20
+
15
21
  def to_s
16
22
  build_url
17
23
  end
@@ -1,3 +1,3 @@
1
1
  module Apiture
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Calvin Yu