constructorio 2.0.2 → 2.0.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: 7bdcf14c279f86ef947463344dd6cb458b3076f6
4
- data.tar.gz: 14df82b63a070e166fe17e2163090c2e10df17cb
3
+ metadata.gz: 92b3238b1ea8b5fbd5e047dcf452fcf01252105c
4
+ data.tar.gz: 0f38e485dc910f490140a804fe5856e637182604
5
5
  SHA512:
6
- metadata.gz: c578be95fc55ac3a23928ce990aad9bb36de2c5dff53bf557f2561f4799e2ba0e5f3a7f88ca28814255d2c27fec8275af5be1f01733fac4075bf7e53f9f48d8f
7
- data.tar.gz: 9f16bb3302e75a4f98f32e6a6784da8e96251de5f5e84d6ce52df838707157844b4cfd1658a5bf02260a9196a01a21eca2ff1c396df258f28a1d01ff1f7134cc
6
+ metadata.gz: 353c67115b4856ba3d4e17e0518b7e7967229f2c9f3e7ffa172813871830f9e619d6f7c5839e84bb4882157d394ab9a7fbd06c0005567584bcc91c90400c5fd1
7
+ data.tar.gz: ec5b94e6ce26de0e5db764df3165014fe817d8d28145e6e28673ec0459d07eaa992a63bc394471a097bd53584caa3ad9ef5ca164a9e37fa9edfbe2a1e235bccc
@@ -32,7 +32,7 @@ module ConstructorIO
32
32
 
33
33
  private
34
34
 
35
- def call_api(path, method, params)
35
+ def call_api(path, method, params = {})
36
36
  api_token = ConstructorIO.configuration.api_token
37
37
  api_url = ConstructorIO.configuration.api_url || "https://ac.constructor.io/"
38
38
  autocomplete_key = ConstructorIO.configuration.autocomplete_key
@@ -1,3 +1,3 @@
1
1
  module ConstructorIO
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
@@ -10,6 +10,6 @@ class ConfigurationTest < MiniTest::Test
10
10
  end
11
11
 
12
12
  def test_configure_api_url
13
- assert_equal ConstructorIO.configuration.api_url, "http://example.constructor.io"
13
+ assert_equal ConstructorIO.configuration.api_url, "http://dev.ac.cnstrc.com"
14
14
  end
15
15
  end
@@ -47,4 +47,27 @@ class ConstructorIOTest < MiniTest::Test
47
47
  c.modify( { item_name: "power drill" } )
48
48
  end
49
49
 
50
+ def test_verify_calls_get
51
+ c = ConstructorIO::Client.new
52
+ c.expects(:call_api).with(
53
+ "verify",
54
+ "get"
55
+ )
56
+
57
+ c.verify
58
+ end
59
+
60
+ def test_verify_sends_request
61
+ c = ConstructorIO::Client.new
62
+
63
+ c.expects(:send_request).with(
64
+ "verify",
65
+ "get",
66
+ instance_of(Faraday::Connection),
67
+ {},
68
+ "example_autocomplete_key"
69
+ )
70
+
71
+ c.verify
72
+ end
50
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constructorio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan McCormick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday